:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #2f241d;
  --muted: #604f44;
  --accent: #974329;
  --accent-dark: #77321f;
  --line: #e7ddd1;
  --wash: #faf4eb;
  --header-green: #20553c;
  --footer-green: #b9ea4d;
  --serif: Georgia, 'Times New Roman', serif;
  font: 100%/1.65 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, dl, dd { margin: 0; }
a { color: var(--accent-dark); text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(73rem, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; inset: .5rem auto auto .5rem; padding: .6rem 1rem; background: var(--paper); transform: translateY(-200%); }
.skip:focus { transform: none; z-index: 1; }

.site-header { border-block-end: 1px solid #194630; background: var(--header-green); color: white; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .7rem 2rem; min-height: 4.5rem; }
.brand { color: inherit; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; letter-spacing: -.035em; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .45rem 1.6rem; }
nav a { color: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.site-header a:focus-visible { outline-color: white; }

.hero { padding-block: clamp(1.7rem, 3.7vw, 3.6rem); text-align: center; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.6vw, 5.1rem); letter-spacing: -.06em; }
h2 { font-size: clamp(2rem, 3.55vw, 3.15rem); letter-spacing: -.045em; }
.hero > p { max-width: 41rem; margin: .65rem auto 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.12rem); text-wrap: pretty; }
.hero #chat-room { max-width: 61rem; min-height: 0; margin: 1.5rem auto 0; text-align: start; }
#chat.cframe { background: #153c2b; border-color: #20553c; box-shadow: inset 0 0 0 2px #3a7050; }
#chat .ctab, #chat .cmin, #chat .ptab, #chat #toolbar .btn2, #chat #toolbar select, #chat #ubtn, #chat #uhead, #chat #uhead button { background: #26563e; border-color: #528362; color: white; }
#chat .ptab.on, #chat #toolbar .q.sel, #chat #ubtn.on, #chat #send, #chat #newmsg { background: #34734d; border-color: #528362; }
#chat #log, #chat #right, #chat #input, #chat #logwrap .pmpane { border-color: #528362; }
#chat #input:disabled, #chat #input:disabled::placeholder { background: #eff4eb; color: #556154; }
#chat #gate { border-color: #528362; background: rgb(224 239 224 / .48); }
#chat #gate #gform { border-color: #528362; background: #f6faf2; }
#chat #gate .ghd { border-color: #20553c; background: #20553c; }
#chat #gate #nickIn { border-color: #7c9b82; }
#chat #gate button { border-color: #20553c; background: #20553c; color: white; }
#chat #gate button:hover, #chat #send:hover:not(:disabled) { background: #143c28; }
#chat #gate button:disabled { opacity: .7; cursor: wait; }
#chat #gate #gerr { color: #802b23; }
#chat :is(button, input, select):focus-visible { outline: 2px solid #578636; outline-offset: 2px; }
#chat-room .chat-note { color: #435f47; font-size: .875rem; }

section[id] { scroll-margin-top: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1.25rem clamp(2rem, 7vw, 6rem); }
.basics, .faq { padding-block: clamp(2rem, 4.8vw, 4rem); }
.basics { border-block-start: 1px solid var(--line); }
.body-copy, .section-note, .faq-items p { color: var(--muted); }
.body-copy { font-size: 1.07rem; text-wrap: pretty; }
.body-copy p + p { margin-top: .85rem; }

.languages { padding-block: clamp(2rem, 4.6vw, 4rem); border-block: 1px solid var(--line); background: var(--wash); }
.section-note { max-width: 37rem; margin-top: .7rem; }
.language-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.6rem; border-block: 1px solid #dcc9b7; }
.language-grid > div { padding: .9rem 1.15rem; }
.language-grid > div + div { border-inline-start: 1px solid #dcc9b7; }
.language-grid dt { color: var(--accent-dark); font-size: .875rem; font-weight: 725; }
.language-grid dd { margin-top: .4rem; font-size: clamp(1.05rem, 2vw, 1.23rem); font-weight: 600; line-height: 1.45; }
.language-grid [lang='ur'] { font-family: 'Segoe UI', Tahoma, sans-serif; }

.faq-items { border-block-start: 1px solid var(--line); }
details { border-block-end: 1px solid var(--line); }
summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding-block: .85rem; list-style: none; font-weight: 650; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+' / ''; flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--wash); color: var(--accent-dark); font-size: 1.2rem; font-weight: 450; line-height: 1; }
details[open] summary::after { content: '−' / ''; }
.faq-items p { padding: 0 1.5rem 1rem 0; }

.site-footer { border-block-start: 1px solid #9bc536; background: var(--footer-green); }
.footer-inner { color: #344739; font-size: .9rem; }
.footer-inner span { font-weight: 650; }
.footer-inner a { color: #304c37; }
.error-page { padding-block: 4rem; }
.error-page p { margin-top: 1.5rem; }

@media (max-width: 43rem) {
  .header-inner { flex-wrap: wrap; padding-block: .8rem; }
  .split { grid-template-columns: 1fr; }
  .language-grid { grid-template-columns: 1fr; }
  .language-grid > div { display: grid; grid-template-columns: minmax(5.6rem, 1fr) minmax(0, 1.75fr); align-items: baseline; gap: .6rem; }
  .language-grid > div + div { border-inline-start: 0; border-block-start: 1px solid #dcc9b7; }
  .language-grid dd { margin-top: 0; }
}

@media (max-width: 28rem) {
  .shell { width: calc(100% - 2.25rem); }
  .header-inner { gap: .4rem; }
  nav { width: 100%; column-gap: .9rem; }
  nav a { font-size: .875rem; }
}

@media (max-width: 600px) {
  .hero.shell { width: calc(100% - 1.25rem); }
  .hero > p { padding-inline: .4rem; }
  .hero #chat-room { min-height: 0 !important; margin-top: 1.05rem; }
  #chat .cmain { height: clamp(335px, calc(100svh - 295px), 485px) !important; }
  #chat #send { height: 44px; }
  body.chatmode::before { background: #eef4ea; }
}
