:root {
  --sx-ink: #2c241b;
  --sx-gold: #946e19;
  --sx-line: #e4d9c7;
}
.sx-panel {
  background: #fffdf9;
  border: 1px solid var(--sx-line);
  border-radius: 12px;
  padding: 20px;
  margin: 18px 0;
  color: var(--sx-ink);
  font:
    400 16px/1.65 Arial,
    sans-serif;
}
.sx-panel h2,
.sx-panel h3 {
  margin: 0 0 12px;
  font-size: 20px;
}
.sx-panel label {
  display: block;
  font-size: 14px;
  margin: 10px 0 5px;
}
.sx-panel input,
.sx-panel select,
.sx-panel textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #bdb09a;
  border-radius: 6px;
  background: white;
  color: #2c241b;
  font: inherit;
}
.sx-panel button,
.sx-dialog button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #946e19;
  border-radius: 7px;
  background: #f8f1e3;
  color: #302416;
  font:
    600 15px Arial,
    sans-serif;
  cursor: pointer;
}
.sx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.sx-dialog {
  box-sizing: border-box;
  width: min(720px, 94vw);
  max-height: 88vh;
  border: 1px solid #b9a681;
  border-radius: 14px;
  padding: 24px;
  color: #302416;
  background: #fffdf9;
  font:
    16px/1.6 Arial,
    sans-serif;
}
.sx-dialog::backdrop {
  background: #0009;
}
.sx-dialog dl {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2fr;
  gap: 8px 16px;
}
.sx-dialog dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.sx-dialog dt {
  font-weight: 600;
}
.sx-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.sx-footer {
  background: #1b140b;
  color: #f1e5ce;
  padding: 32px max(24px, calc((100% - 1160px) / 2));
  font:
    15px/1.7 Arial,
    sans-serif;
}
.sx-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.sx-footer a {
  color: #f1e5ce;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sx-footer p {
  max-width: 800px;
}
.sx-notice {
  padding: 12px;
  border-left: 3px solid #946e19;
  background: #fff8e8;
}
.sx-panel :focus-visible,
.sx-dialog :focus-visible,
.sx-footer :focus-visible {
  outline: 3px solid #946e19;
  outline-offset: 3px;
}
body.sx-review-open {
  overflow: hidden;
}
.sx-guidance {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}
.sx-guidance h1 {
  font-size: clamp(28px, 5vw, 44px);
}
.sx-guidance [lang="ar"],
.sx-guidance [lang="ur"] {
  font-size: 18px;
  line-height: 1.9;
}
.sx-guidance [hidden] {
  display: none !important;
}
@media (max-width: 480px) {
  .sx-dialog dl {
    grid-template-columns: 1fr;
  }
  .sx-dialog dt {
    margin-top: 8px;
  }
  .sx-panel {
    padding: 15px;
  }
  .sx-dialog {
    padding: 18px;
  }
}

.sx-footer nav {
  position: static !important;
  top: auto !important;
  background: transparent !important;
  border: 0 !important;
  backdrop-filter: none !important;
  padding: 0 !important;
}
.sx-footer strong {
  font-size: 19px;
}
.sx-family {
  min-height: 44px;
  padding: 10px 14px;
  margin: 0 0 14px;
  border: 1px solid #946e19;
  background: #faf4e8;
  color: #302416;
  border-radius: 7px;
  cursor: pointer;
}

/* Supplement existing footer layouts; never restyle or hide their controls. */
.sx-footer-additions {
  max-width: 1200px;
  margin: 22px auto 0;
  padding: 18px 0 0;
  border-top: 1px solid #c9a84c40;
  font:
    500 14px/1.6 Arial,
    sans-serif;
}
.sx-footer-additions nav {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px 24px;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  backdrop-filter: none !important;
}
.sx-footer-additions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #e8d5a3;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.sx-footer-additions a:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 4px;
}
/* Keep legacy footer text legible without exposing or restyling the hidden trigger. */
footer:not(.sx-footer) .footer-brand p,
footer:not(.sx-footer) .footer-col a {
  color: #c9bda9;
}
footer:not(.sx-footer) .footer-bottom p {
  color: #b9ac96;
}
footer:not(.sx-footer) .footer-bottom a {
  color: #c9bda9 !important;
}
footer:not(.sx-footer) .footer-col a:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 3px;
}
