/* Agora support site — one stylesheet, no build step, no external assets.
   Tuned to match the app: Helvetica, the #F4F2F1 / white card surfaces from
   src/theme/colors.ts, the #2D2D53 brand indigo, 16px radii, soft shadows,
   extrabold headings and wide-tracked uppercase labels. */

:root {
  color-scheme: light dark;

  /* Surfaces — lightColors in src/theme/colors.ts */
  --bg:      #f4f2f1;   /* background1 */
  --bg-alt:  #e9e4e2;   /* background2 */
  --card:    #ffffff;   /* card        */

  /* Text. textPrimary is the app's exact value; the two greys below are the
     app's slate family darkened to clear WCAG AA — #6B7280 lands at 4.33 and
     #9CA3AF at 2.28 against this background, which is fine at phone reading
     distance and not fine on the web. */
  --ink:       #111827;
  --ink-soft:  #4b5563;
  --ink-faint: #646b78;

  /* Lines. The app's border token, kept for rules and dividers only. */
  --rule:        #e5e7eb;
  --rule-strong: #d6d9de;

  /* Brand — colors.brand / tailwind primary */
  --accent:       #2d2d53;
  --accent-hover: #1c1c38;
  --accent-wash:  #eaeaf1;

  --focus: #2d2d53;

  --shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
  --radius: 16px;
  --radius-sm: 12px;

  /* The app sets Helvetica as the default font family for every Text node
     (src/app/_layout.tsx). */
  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;

  --measure: 65ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* darkColors in src/theme/colors.ts */
    --bg:      #0f1115;
    --bg-alt:  #171a21;
    --card:    #1b1f2a;

    --ink:       #f9fafb;
    --ink-soft:  #d1d5db;
    --ink-faint: #9ca3af;

    --rule:        #2b3140;
    --rule-strong: #3a4152;

    --accent:       #8b8bd9;
    --accent-hover: #a9a9e6;
    --accent-wash:  #23233a;

    --focus: #a9a9e6;

    --shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ─────────────────────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 10;
}

.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ── Layout ────────────────────────────────────────────── */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main {
  padding-top: 2.25rem;
  padding-bottom: 3rem;
}

section + section { margin-top: 3.25rem; }

/* ── Masthead ──────────────────────────────────────────── */

.masthead {
  padding: 2.75rem 0 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.masthead h1 {
  font-size: 2.375rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  font-weight: 800;
}

.masthead .lede {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* The app's tracking-widest uppercase section labels. */
.eyebrow {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.65rem;
}

/* ── Navigation ────────────────────────────────────────── */

.navrow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.sitenav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}

/* Pills, the way the app renders its filter and status chips. */
.sitenav a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 600;
}

.sitenav a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.sitenav [aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sitenav [aria-current="page"]:hover {
  color: #fff;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.langswitch {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.langswitch .sep { color: var(--rule-strong); }

.langswitch a {
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
}

.langswitch a:hover { border-bottom-color: var(--accent); }

.langswitch .current {
  color: var(--ink);
  font-weight: 700;
}

/* ── Headings ──────────────────────────────────────────── */

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.5rem;
  scroll-margin-top: 1.5rem;
}

h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
}

p { margin: 0 0 1rem; }

/* ── Links ─────────────────────────────────────────────── */

a {
  color: var(--accent);
  font-weight: 500;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover { color: var(--accent-hover); }

a:focus-visible,
summary:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Lists ─────────────────────────────────────────────── */

ul, ol { padding-left: 1.35rem; }

li { margin-bottom: 0.5rem; }

ol.steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.9rem;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1.75rem;
  text-align: center;
  border-radius: 999px;
}

/* ── Cards ─────────────────────────────────────────────── */

.contact {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 0.6rem;
  margin: 0 0 1.25rem;
}

.contact .address {
  font-size: 1.0625rem;
  font-weight: 700;
  word-break: break-word;
}

.note {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}

.note > *:last-child { margin-bottom: 0; }

.meta {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin: 0 0 2rem;
}

/* ── Question index ────────────────────────────────────── */

.index-list {
  list-style: none;
  padding: 0.35rem 0;
  margin: 0 0 1.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.index-list li {
  margin: 0;
  border-bottom: 1px solid var(--rule);
}

.index-list li:last-child { border-bottom: none; }

.index-list a {
  display: block;
  padding: 0.7rem 1.15rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.index-list a:hover { background: var(--bg-alt); }

/* ── FAQ entries ───────────────────────────────────────── */

.qa {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.35rem 1.15rem 0.9rem;
  margin-bottom: 0.9rem;
  scroll-margin-top: 1.5rem;
}

.qa > summary {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 0 0.6rem 1.5rem;
  position: relative;
}

.qa > summary h3 {
  display: inline;
  font: inherit;
  letter-spacing: inherit;
  margin: 0;
}

.qa > summary::-webkit-details-marker { display: none; }

.qa > summary::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.3rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.qa[open] > summary::before {
  transform: rotate(45deg);
  top: 1.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .qa > summary::before { transition: none; }
}

.qa:target { border-color: var(--accent); }

.qa-body > *:last-child { margin-bottom: 0; }

.permalink {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
}

.permalink:hover { color: var(--accent); }

/* ── Tables ────────────────────────────────────────────── */

.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  background: var(--card);
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--rule);
}

thead th {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule);
}

tbody tr:last-child td { border-bottom: none; }

/* ── Footer ────────────────────────────────────────────── */

.sitefooter {
  border-top: 1px solid var(--rule);
  margin-top: 3.5rem;
  padding: 1.75rem 0 3rem;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.sitefooter ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  padding: 0;
  margin: 0 0 1rem;
}

.sitefooter a { font-weight: 600; }

.sitefooter p { margin: 0 0 0.35rem; }

/* ── Small screens ─────────────────────────────────────── */

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .masthead { padding-top: 2rem; }
  .masthead h1 { font-size: 2rem; }
  h2 { font-size: 1.375rem; }
  .qa { padding-left: 0.9rem; padding-right: 0.9rem; }
  .qa > summary { font-size: 1rem; }
}

/* ── Print ─────────────────────────────────────────────── */

@media print {
  .sitenav, .skip-link, .index-list, .langswitch { display: none; }
  body { background: #fff; color: #000; }
  .qa, .contact, .table-scroll, .note { box-shadow: none; }
  .qa[open] > summary::before { display: none; }
}
