/* ==========================================================================
   World of Exams: "Notification Gazette"
   Newsprint, black ink, one crimson spot ink. One 12-column grid. Square corners.
   ========================================================================== */

@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #F3F1EA;
  --paper-2: #E8E5DA;
  --paper-3: #FBFAF6;
  --ink: #16140F;
  --ink-2: #3F3B34;
  --ink-3: #5F5A50;
  --rule-soft: #CDC8BB;
  --crimson: #D82A4E;
  --crimson-ink: #AE1F3D;
  --crimson-wash: rgba(216, 42, 78, .07);
  --ok: #1E6B45;

  --serif: "Literata", "Iowan Old Style", Georgia, serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 2.2vw, 28px);
  --pad: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--crimson);
  accent-color: var(--crimson);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--crimson-ink); }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.012em; }
p { margin: 0 0 var(--s4); text-wrap: pretty; }
html { scrollbar-color: var(--ink-3) var(--paper-2); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; font-family: var(--sans); z-index: 10; }
.skip:focus { top: 8px; }
.skip:hover { color: var(--paper); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--crimson);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px;
  font: 700 .95rem/1 var(--sans); letter-spacing: .01em;
  color: #fff; background: var(--b); border: 1px solid var(--b);
  text-decoration: none; cursor: pointer; border-radius: 0;
  transition: background .2s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 1px 0 rgba(22, 20, 15, .25);
}
.btn:hover { color: #fff; background: #BF2243; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--ghost { color: var(--ink); background: transparent; border-color: var(--ink); box-shadow: none; }
.btn--ghost:hover { color: var(--paper); background: var(--ink); }
.btn--ink { --b: var(--ink); }
.btn--ink:hover { background: #000; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .875rem; }
.btn--block { width: 100%; }
.btn svg { flex: none; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.link { font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--ink); }

/* ---------- Masthead ---------- */
.masthead { border-bottom: 1px solid var(--ink); }
.masthead__notice {
  font: 500 .8125rem/1.45 var(--sans); color: var(--ink-2);
  padding-block: 10px; margin: 0;
}
.masthead__bar { border-bottom: 1px solid var(--rule-soft); }
.masthead__notice strong { color: var(--ink); font-weight: 700; }
.masthead__plate {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: var(--s4);
  padding-block: clamp(14px, 2.6vw, 26px) clamp(10px, 1.6vw, 16px);
  position: relative;
}
.masthead__plate::after {
  /* the double rule under the nameplate; draws once on load */
  content: ""; position: absolute; left: var(--pad); right: var(--pad); bottom: 0; height: 5px;
  border-top: 3px solid var(--crimson); border-bottom: 1px solid var(--ink);
  transform-origin: left; animation: rule-draw .9s var(--ease) both;
}
.masthead__date, .masthead__motto { margin: 0 0 6px; font: 500 .8125rem/1.3 var(--sans); color: var(--ink-3); }
.masthead__motto { text-align: right; }
.nameplate {
  font: 800 clamp(2rem, 5.4vw, 4.25rem)/.95 var(--serif);
  letter-spacing: -.035em; text-decoration: none; color: var(--ink);
  text-align: center; white-space: nowrap; padding-bottom: 14px;
  font-variation-settings: "opsz" 72;
}
.nameplate span { color: var(--crimson); }
.nameplate:hover { color: var(--ink); }
.nameplate--sm { font-size: 1.75rem; padding: 0; text-align: left; }

.masthead__nav { display: flex; align-items: center; gap: var(--s5); min-height: 60px; }
.navlist { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; flex: 1; }
.navlist a { font: 600 .95rem/1 var(--sans); text-decoration: none; padding: 8px 0; display: inline-block; border-bottom: 2px solid transparent; }
.navlist a[aria-current="page"] { border-bottom-color: var(--crimson); }
.navlist a:hover { color: var(--crimson-ink); }
.navlist__end { margin-left: auto; }
.navtoggle { display: none; }
.masthead__account { display: flex; align-items: center; gap: var(--s3); }
.masthead__hello { font: 500 .875rem/1 var(--sans); color: var(--ink-3); }

@media (max-width: 820px) {
  .masthead__plate { grid-template-columns: 1fr; text-align: center; }
  .masthead__date, .masthead__motto { display: none; }
  .nameplate { padding-bottom: 12px; }
  .masthead__nav { flex-wrap: wrap; gap: var(--s3); padding-block: 10px; }
  .navtoggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
    background: none; border: 1px solid var(--ink); font: 600 .9rem/1 var(--sans); color: var(--ink); cursor: pointer;
  }
  .navlist { order: 3; flex-basis: 100%; flex-direction: column; gap: 0; display: none; border-top: 1px solid var(--rule-soft); }
  .navlist.is-open { display: flex; }
  .navlist a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--rule-soft); }
  .navlist__end { margin: 0; }
  .masthead__account { margin-left: auto; }
  .masthead__hello { display: none; }
}

/* ---------- Section rules & headings ---------- */
.section { padding-block: var(--s8); }
.section--tight { padding-block: var(--s7); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
  border-top: 3px solid var(--ink); padding-top: var(--s3); margin-bottom: var(--s5);
}
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 750; }
.section-head p { margin: 0; font: 500 .9375rem/1.45 var(--sans); color: var(--ink-3); max-width: 52ch; }

/* ---------- Front page ---------- */
.front { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding-block: var(--s6) var(--s7); }
.lead { grid-column: 1 / span 5; padding-right: var(--gutter); border-right: 1px solid var(--ink); }
.lead h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.75rem); font-weight: 800; letter-spacing: -.03em; line-height: .98;
  font-variation-settings: "opsz" 72; margin-bottom: var(--s5);
}
.lead h1 em { font-style: italic; color: var(--ink); }
.lead__dek { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: 38ch; }
.lead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin: var(--s5) 0 var(--s6); }
.ladder { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: step; }
.ladder li {
  counter-increment: step; display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: var(--s3);
  padding: 14px 0; border-bottom: 1px solid var(--rule-soft);
  font-family: var(--sans); font-size: .9375rem;
}
.ladder li::before { content: counter(step); font: 800 1.5rem/1 var(--serif); color: var(--ink); }
.ladder b { font-weight: 700; }
.ladder span { color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board { grid-column: 6 / span 7; min-width: 0; }
.board__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s3); }
.board__head h2 { font-size: 1.375rem; font-weight: 750; }
.board__head p { margin: 0; font: 500 .875rem/1.3 var(--sans); color: var(--ink-3); }
.board__more { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding-top: var(--s4); font-family: var(--sans); font-size: .9375rem; color: var(--ink-3); }

@media (max-width: 980px) {
  .lead, .board { grid-column: 1 / -1; }
  .lead { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--ink); padding-bottom: var(--s6); }
}

/* ---------- Notification table ---------- */
.notices__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); }
.tab {
  font: 600 .875rem/1 var(--sans); color: var(--ink); background: transparent;
  border: 0; border-right: 1px solid var(--ink); padding: 0 14px; min-height: 40px; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.tab:last-child { border-right: 0; }
.tab:hover { background: var(--paper-2); }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: inset 0 2px 0 rgba(0,0,0,.6); }
.tab__n { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; margin-left: 2px; }
.search { position: relative; display: flex; align-items: center; flex: 1 1 240px; max-width: 360px; }
.search svg { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; min-height: 40px; padding: 0 12px 0 38px;
  font: 500 .9375rem/1 var(--sans); color: var(--ink);
  background: var(--paper-3); border: 1px solid var(--ink); border-radius: 0;
}
.search input::placeholder { color: var(--ink-3); }

.ntable { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.ntable thead th {
  font: 700 .75rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2);
  text-align: left; padding: 10px 10px 8px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.ntable td, .ntable tbody th { padding: 12px 10px; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: middle; font-weight: 500; }
.ntable .c-num { text-align: right; white-space: nowrap; }
.ntable thead .c-num { text-align: right; }
.ntable .c-fee { font-weight: 700; }
.ntable .c-go { width: 28px; color: var(--ink-3); padding-left: 0; }
.ntable .c-cat { color: var(--ink-2); }
.c-exam a { text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.c-exam a::after { content: ""; position: absolute; inset: 0; } /* whole row is the hit area */
.ntable tbody tr { position: relative; transition: background .18s var(--ease); }
.c-exam__name { font: 700 1.0625rem/1.25 var(--serif); color: var(--ink); }
.c-exam__abbr { font-size: .8125rem; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.c-lvl { white-space: nowrap; color: var(--ink-2); }
.c-lvl span:last-child { margin-left: 8px; }
.meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.meter i { width: 8px; height: 12px; border: 1px solid var(--ink); }
.meter i.on { background: var(--ink); }

/* only the active row lights */
.ntable tbody tr:hover, .ntable tbody tr:focus-within { background: var(--crimson-wash); }
.ntable tbody tr:hover .c-exam__name, .ntable tbody tr:focus-within .c-exam__name { color: var(--crimson-ink); }
.ntable tbody tr:hover .c-go, .ntable tbody tr:focus-within .c-go { color: var(--crimson); }
.ntable tbody tr:hover .meter i.on { background: var(--crimson); border-color: var(--crimson); }
.ntable tbody tr:hover .meter i { border-color: var(--crimson); }
.ntable a:focus-visible { outline: none; }
.ntable tbody tr:has(a:focus-visible) { outline: 2px solid var(--crimson); outline-offset: -2px; }

.ntable tbody tr[hidden] { display: none; }
.notices__empty { font-family: var(--sans); padding: var(--s5) 0; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .ntable tbody tr { animation: ink-in .7s var(--ease) both; animation-delay: calc(min(var(--i, 1), 14) * 40ms + 250ms); }
  .notices.is-refiltering tbody tr:not([hidden]) { animation: ink-in .5s var(--ease) both; animation-delay: calc(var(--n, 1) * 30ms); }
}
@keyframes ink-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rule-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 720px) {
  .ntable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ntable, .ntable tbody { display: block; }
  .ntable tbody tr {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "exam fee" "meta go";
    column-gap: var(--s3); row-gap: 4px; padding: 14px 4px; border-bottom: 1px solid var(--rule-soft);
  }
  .ntable tbody tr:first-child { border-top: 3px solid var(--ink); }
  .ntable td, .ntable tbody th { padding: 0; border: 0; }
  .ntable .c-exam { grid-area: exam; }
  .ntable .c-fee { grid-area: fee; align-self: start; font-size: 1rem; }
  .ntable .c-cat { display: none; }
  .ntable .c-lvl { grid-area: meta; font-size: .8125rem; }
  .ntable td.c-num:not(.c-fee) { display: none; }
  .ntable .c-go { grid-area: go; justify-self: end; }
  .ntable--compact .c-lvl { display: none; }
}

/* ---------- Plates (exam images) ---------- */
.plates { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--gutter)) / 3); gap: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s4); overscroll-behavior-x: contain; }
.plates > * { scroll-snap-align: start; }
.plate { margin: 0; }
.plate__img { display: block; border: 1px solid var(--ink); background: var(--paper-2); overflow: hidden; aspect-ratio: 16 / 9; }
.plate__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; filter: saturate(.92); }
.plate:hover .plate__img img { transform: scale(1.025); filter: saturate(1); }
.plate figcaption { border-bottom: 1px solid var(--ink); padding: 10px 0 12px; display: grid; gap: 4px; }
.plate__name { font: 700 1.0625rem/1.25 var(--serif); text-decoration: none; }
.plate__meta { font: 500 .8125rem/1.4 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.plate__meta strong { color: var(--ink); }
.plates-nav { display: flex; gap: 8px; }
.plates-nav button { width: 40px; height: 40px; border: 1px solid var(--ink); background: transparent; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.plates-nav button:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) { .plates { grid-auto-columns: 82%; } }

/* ---------- Editorial columns ---------- */
.editorial { columns: 3 260px; column-gap: calc(var(--gutter) * 2); column-rule: 1px solid var(--rule-soft); }
.editorial p { break-inside: avoid; font-size: 1rem; line-height: 1.65; color: var(--ink-2); }
.editorial p b:first-child { color: var(--ink); font-family: var(--serif); font-weight: 750; }
.editorial p b:first-child::after { content: ". "; }

/* ---------- Notice (exam page) ---------- */
.crumbs { font: 500 .8125rem/1.4 var(--sans); color: var(--ink-3); padding-top: var(--s5); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--ink-2); }

.notice { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding-block: var(--s4) var(--s7); }
.notice__title, .notice__main { grid-column: 1 / span 8; min-width: 0; }
.notice__side { grid-column: 9 / span 4; grid-row: 1 / span 2; }
.notice__no { margin: 0 0 var(--s3); font: 600 .8125rem/1.3 var(--sans); letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.notice__title { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); padding: var(--s4) 0 var(--s5); margin-bottom: 0; }
.notice__title h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 800; letter-spacing: -.028em; font-variation-settings: "opsz" 72; }
.notice__ref { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: var(--s3) 0 0; font: 600 .875rem/1.3 var(--sans); color: var(--ink-3); }
.notice__ref b { color: var(--ink); }
.notice__lede { font-size: 1.1875rem; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.notice__plate { margin: var(--s5) 0 var(--s6); }
.notice__plate .plate__img { aspect-ratio: auto; }
.notice__plate figcaption { font: 500 .8125rem/1.4 var(--sans); color: var(--ink-3); }

.article h2 { font-size: 1.5rem; font-weight: 750; margin: var(--s7) 0 var(--s3); padding-top: var(--s3); border-top: 1px solid var(--ink); }
.article p, .article li { max-width: 68ch; }
.article p, .article li { color: var(--ink-2); line-height: 1.7; }
.article ul, .article ol { padding-left: 1.2em; }
.article img { border: 1px solid var(--ink); margin-block: var(--s4); }
.article table { border-collapse: collapse; font-family: var(--sans); font-size: .9375rem; margin-block: var(--s4); }
.article th, .article td { border: 1px solid var(--rule-soft); padding: 8px 10px; text-align: left; }

/* fee box: the sticky summary on desktop */
.feebox { position: sticky; top: var(--s5); border: 1px solid var(--ink); background: var(--paper-3); }
.feebox__head { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.feebox__head span { font: 600 .8125rem/1.2 var(--sans); color: var(--ink-3); }
.feebox__head .feebox__price { font: 800 2.25rem/1 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.feebox dl { margin: 0; padding: var(--s2) var(--s5); font-family: var(--sans); font-size: .9rem; }
.feebox dl div { display: flex; justify-content: space-between; gap: var(--s3); padding: 9px 0; border-bottom: 1px solid var(--rule-soft); }
.feebox dl div:last-child { border-bottom: 0; }
.feebox dt { color: var(--ink-3); font-weight: 500; }
.feebox dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.feebox__actions { padding: var(--s4) var(--s5) var(--s5); display: grid; gap: var(--s3); border-top: 1px solid var(--ink); }
.feebox__note { font: 500 .8125rem/1.45 var(--sans); color: var(--ink-3); margin: 0; }

@media (max-width: 980px) {
  .notice__title, .notice__main, .notice__side { grid-column: 1 / -1; grid-row: auto; }
  .notice__main { order: 1; }
  .feebox { position: static; }
}

.faq details { border-bottom: 1px solid var(--rule-soft); }
.faq summary { cursor: pointer; padding: 14px 0; font: 700 1.0625rem/1.35 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-weight: 500; color: var(--ink); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); }

/* ---------- Page shells (about, contact, policies, forms) ---------- */
.page-title { padding-block: var(--s6) var(--s5); border-bottom: 1px solid var(--ink); margin-bottom: var(--s6); }
.page-title h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -.028em; font-variation-settings: "opsz" 72; }
.page-title p { margin: var(--s3) 0 0; font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; }
.two-col { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding-bottom: var(--s8); }
.two-col > :first-child { grid-column: 1 / span 7; }
.two-col > :last-child { grid-column: 9 / span 4; }
@media (max-width: 900px) { .two-col > :first-child, .two-col > :last-child { grid-column: 1 / -1; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; }
.field label, .field .label { font: 600 .875rem/1.2 var(--sans); color: var(--ink); }
.field .hint { font: 500 .8125rem/1.4 var(--sans); color: var(--ink-3); }
.input, .form input[type="text"], .form input[type="email"], .form input[type="tel"], .form input[type="password"], .form input[type="number"], .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: 500 1rem/1.3 var(--sans); color: var(--ink);
  background: var(--paper-3); border: 1px solid var(--ink); border-radius: 0;
  transition: box-shadow .15s, border-color .15s;
}
.form textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 3px var(--crimson-wash), inset 0 0 0 1px var(--crimson); }
.form input[aria-invalid="true"] { border-color: var(--crimson); }
.form ::placeholder { color: #8A857A; }
.alert { font: 500 .9375rem/1.45 var(--sans); padding: 12px 14px; border: 1px solid currentColor; margin: 0 0 var(--s4); }
.alert--error { color: var(--crimson-ink); background: var(--crimson-wash); }
.alert--ok { color: var(--ok); background: rgba(30, 107, 69, .07); }
.hp { position: absolute; left: -9999px; }

/* ---------- Auth (login / signup) ---------- */
.auth { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding-block: var(--s6) var(--s8); }
.auth__copy { grid-column: 1 / span 5; padding-right: var(--gutter); border-right: 1px solid var(--ink); }
.auth__copy h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-bottom: var(--s5); font-variation-settings: "opsz" 72; }
.auth__copy p { color: var(--ink-2); font-size: 1.0625rem; }
.auth__panel { grid-column: 7 / span 6; max-width: 520px; }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); margin-bottom: var(--s5); }
.auth__tabs button { min-height: 48px; font: 700 .95rem/1 var(--sans); background: transparent; border: 0; cursor: pointer; color: var(--ink); }
.auth__tabs button + button { border-left: 1px solid var(--ink); }
.auth__tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font: 500 .875rem/1.3 var(--sans); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.linkbtn:hover { color: var(--crimson-ink); }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 10px; background: none; border: 0; font: 600 .8125rem/1 var(--sans); color: var(--ink-2); cursor: pointer; }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 .8125rem/1.3 var(--sans); color: var(--ink-3); }
.checks li::before { content: "○ "; }
.checks li.ok { color: var(--ok); }
.checks li.ok::before { content: "● "; }
@media (max-width: 900px) {
  .auth__copy, .auth__panel { grid-column: 1 / -1; }
  .auth__copy { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--ink); padding-bottom: var(--s5); }
  .auth__copy .ladder { display: none; }
}

dialog.sheet { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 0; width: min(460px, calc(100% - 32px)); box-shadow: 0 24px 60px -20px rgba(22,20,15,.45); }
dialog.sheet::backdrop { background: rgba(22, 20, 15, .55); }
.sheet__head { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) var(--s5); border-bottom: 3px double var(--ink); }
.sheet__head h2 { font-size: 1.375rem; }
.sheet__head button { background: none; border: 0; font: 600 .875rem/1 var(--sans); cursor: pointer; min-height: 36px; color: var(--ink-2); }
.sheet__body { padding: var(--s5); }
.sheet__body [data-step][hidden] { display: none; }

/* ---------- Challan (checkout & receipt) ---------- */
.challan { max-width: 640px; margin: var(--s6) auto var(--s8); background: var(--paper-3); border: 1px solid var(--ink); position: relative; }
.challan__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); padding: var(--s5); border-bottom: 3px double var(--ink); }
.challan__head h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; }
.challan__head p { margin: 0; font: 600 .8125rem/1.3 var(--sans); color: var(--ink-3); text-align: right; }
.challan table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.challan th, .challan td { padding: 12px var(--s5); border-bottom: 1px solid var(--rule-soft); text-align: left; font-size: .9375rem; }
.challan th { width: 40%; color: var(--ink-3); font-weight: 500; }
.challan td { font-weight: 600; word-break: break-word; }
.challan tr.total th, .challan tr.total td { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 1.125rem; color: var(--ink); }
.challan tr.total td { font: 800 1.75rem/1 var(--serif); }
.challan__foot { padding: var(--s5); display: grid; gap: var(--s3); }
.challan__foot p { margin: 0; font: 500 .8125rem/1.5 var(--sans); color: var(--ink-3); }
.challan__status { margin: 0; padding: 12px var(--s5); border-bottom: 1px solid var(--ink); font: 500 .9375rem/1.3 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.challan__status b { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.challan__status--fail b { color: var(--crimson-ink); }
.notebox { margin: 0; padding: 12px var(--s4); border: 1px solid var(--ink); font: 600 .9375rem/1.45 var(--sans); color: var(--ink); }
.nowrap { white-space: nowrap; }

/* ---------- Wanted & footer ---------- */
.wanted-wrap { margin-top: var(--s7); }
.wanted {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s5);
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); padding-block: var(--s5);
}
.wanted__head { font: 800 1.75rem/1 var(--serif); letter-spacing: -.01em; padding-right: var(--s5); border-right: 1px solid var(--ink); }
.wanted__body { margin: 0; font-size: 1rem; color: var(--ink-2); max-width: 70ch; }
@media (max-width: 760px) { .wanted { grid-template-columns: 1fr; } .wanted__head { border-right: 0; } }

.colophon { margin-top: var(--s7); background: var(--ink); color: #D9D5CA; font-family: var(--sans); font-size: .875rem; }
.colophon a { color: #F3F1EA; text-decoration: none; }
.colophon a:hover { color: #fff; text-decoration: underline; }
.colophon__grid { display: grid; grid-template-columns: minmax(0, 1.4fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s6) var(--gutter); padding-block: var(--s7); }
@media (max-width: 820px) { .colophon__grid { grid-auto-flow: row; grid-template-columns: 1fr; } }
.colophon .nameplate { color: #F3F1EA; }
.colophon .nameplate span { color: #FF5A7A; }
.colophon__brand p { margin: var(--s3) 0; color: #BDB8AC; max-width: 34ch; line-height: 1.55; }
.colophon h2 { font: 700 .75rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: #F3F1EA; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #4A463E; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.colophon__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); padding-block: var(--s4) var(--s5); color: #A9A497;
  background: linear-gradient(#4A463E, #4A463E) no-repeat var(--pad) 0 / calc(100% - 2 * var(--pad)) 1px; }
.colophon__base p { margin: 0; }
.colophon__legal { display: flex !important; flex-wrap: wrap; gap: 6px 18px !important; }
.colophon :focus-visible { outline-color: #FF5A7A; }

/* ---------- Misc ---------- */
.lede { font-size: 1.1875rem; color: var(--ink-2); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font: 600 .9375rem/1.3 var(--sans);
  padding: 14px 18px; z-index: 20; max-width: calc(100% - 32px);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.5);
  animation: toast-in .4s var(--ease) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .masthead__nav, .wanted, .colophon, .btn { display: none !important; }
  body { background: #fff; }
}

.article h3 { font-size: 1.125rem; font-weight: 700; margin: var(--s5) 0 var(--s2); }
.policy > h2:first-child { margin-top: 0; }
.mt-5 { margin-top: var(--s5); }
.mt-0 { margin-top: 0 !important; }
