/* Hallmark · shape: Index-led board · genre: playful · theme: brand (PGTOTO navy and the four TOTO letter colours, from ../1/css/style.css and logo-pgtoto.png)
 * paper: oklch(17.5% 0.06 270) · accent: oklch(80% 0.12 212) · display: Poppins 700 · body: Open Sans 400 · hero: Index, the featured market's last number set large beside the head · nav: slab · footer: mast · signature: every result set large in white Poppins tabular figures, centred in its panel
 * axes: dark/figures/chromatic-violet · posture: navy paper, cyan action, white result figures, brand colours stay in the logo · job: check a result · imagery: none (the board is the picture) · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: P, a result board invites chasing numbers; the FAQ says past draws predict nothing and the footer names the 18+ rule */
/* Hallmark · waive 1 · --font-display: Poppins, declared in ../1/css/style.css · the brand's own heading face, shared across the PGTOTO sites */
@import url("./tokens.css");
@import url("./base.css");

/* Skip link */
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); border-radius: var(--radius-inner); }
.skip:focus-visible { top: var(--space-md); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-lg); border: 1px solid var(--color-accent); border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font: 600 var(--text-md)/1 var(--font-display); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-accent-2); border-color: var(--color-accent-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn--quiet { background: transparent; color: var(--color-ink); border-color: var(--color-rule); }
.btn--quiet:hover { background: var(--color-paper-2); border-color: var(--color-muted); }
.btn--small { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }

/* Nav: slab */
.nav { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper-2); border-bottom: var(--rule-hair) solid var(--color-rule); }
.nav__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: var(--nav-h); }
.nav__brand { display: inline-flex; flex-shrink: 0; border-radius: var(--radius-inner); }
.nav__brand img { width: 150px; }
.nav__brand:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.nav__links { display: flex; align-items: center; gap: var(--space-lg); margin: 0; padding: 0; list-style: none; }
.nav__links a:not(.btn) { color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); white-space: nowrap; transition: color var(--dur-short) var(--ease-out); }
.nav__links a:not(.btn):hover { color: var(--color-ink); text-decoration: underline; }
.nav__links a:not(.btn):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: 2px; }
@media (max-width: 60rem) { .nav__links li:not(:last-child) { display: none; } .nav__brand img { width: 124px; } }

/* Result figures: the signature */
.digits { display: inline-flex; font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1; color: var(--color-tile-on); font-variant-numeric: tabular-nums; }
.digits > span { width: var(--cell, 0.78em); text-align: center; }
.digits--xl { font-size: clamp(3.5rem, 12cqi, 5.5rem); }
.digits--md { font-size: clamp(2.25rem, 13cqi, 3rem); }
.digits--lg { font-size: var(--fs); }
.read__labels li { color: var(--color-ink-2); }

/* Hero: Index posture */
.hero { padding-block: var(--space-2xl) var(--space-3xl); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: center; }
.hero__text { display: grid; gap: var(--space-lg); align-content: center; }
.hero h1 { max-width: 12ch; }
.hero .lead { color: var(--color-ink-2); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xs); }
.sample-note { max-width: 40ch; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); background: var(--color-notice); color: var(--color-notice-ink); font-size: var(--text-sm); font-weight: 600; }

.feature { display: grid; gap: var(--space-lg); margin: 0; padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); container-type: inline-size; }
.feature__chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip { min-height: 40px; min-width: 56px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 600; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.chip:hover { color: var(--color-ink); border-color: var(--color-muted); }
.chip:active { transform: translateY(1px); }
.chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.chip[aria-pressed="true"] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.feature__head { display: grid; gap: var(--space-2xs); }
.feature__name { font-size: var(--text-2xl); max-width: none; }
.feature__date { color: var(--color-muted); font-size: var(--text-sm); }
.feature__tiles { min-height: 6.5rem; display: flex; align-items: center; justify-content: center; }
.feature__next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs) var(--space-lg); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }
.feature__next strong { color: var(--color-ink); font-weight: 600; }
.feature__noscript { color: var(--color-ink-2); }

/* Loading skeletons and states */
.skeleton { border-radius: var(--radius-inner); background: var(--color-paper-3); animation: pulse 1.4s ease-in-out infinite; }
.skeleton--tiles { width: 100%; height: 5rem; }
.skeleton--card { min-height: 260px; border-radius: var(--radius-card); }
@keyframes pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.state { color: var(--color-muted); font-size: var(--text-sm); max-width: 44ch; }
.state--error { grid-column: 1 / -1; padding: var(--space-lg); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); color: var(--color-ink); }

/* Sections */
.section { padding-block: var(--space-3xl); }
.section--band { background: var(--color-paper-2); color: var(--color-ink); }
.section__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-columns); align-items: end; margin-bottom: var(--space-xl); }
.section__head p { color: var(--color-ink-2); max-width: 46ch; }

/* Board */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.card { display: grid; gap: var(--space-md); align-content: start; padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); border: var(--rule-hair) solid var(--color-rule); container-type: inline-size; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); }
.card__head h3 { font-size: var(--text-xl); }
.card__code { color: var(--color-muted); font-size: var(--text-sm); font-weight: 600; }
.card__date { color: var(--color-muted); font-size: var(--text-sm); margin-top: calc(-1 * var(--space-sm)); }
.card .digits { justify-self: center; padding-block: var(--space-xs); }
.card__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md); margin: 0; padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); }
.card__foot dt { color: var(--color-muted); }
.card__foot dd { margin: 0; color: var(--color-ink); font-weight: 600; }
.card__foot div:last-child { text-align: right; }
.card__link { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--color-accent); font-size: var(--text-sm); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; transition: color var(--dur-short) var(--ease-out); }
.card__link:hover { color: var(--color-accent-2); }
.card__link:active { transform: translateY(1px); }
.card__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }

/* Tabs and ledger */
.tabs { display: flex; gap: var(--space-2xs); overflow-x: auto; margin-bottom: var(--space-lg); padding-bottom: var(--space-2xs); scrollbar-width: thin; }
.tab { flex-shrink: 0; min-height: 44px; padding: 0 var(--space-lg); border: var(--rule-hair) solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink-2); font-weight: 600; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.tab:hover { color: var(--color-ink); background: var(--color-paper-3); }
.tab:active { transform: translateY(1px); }
.tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tab[aria-selected="true"] { background: var(--color-ink); color: var(--color-paper); }
.ledger { border-radius: var(--radius-card); background: var(--color-paper); border: var(--rule-hair) solid var(--color-rule); overflow-x: auto; }
.ledger:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.ledger__table, .sched { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.ledger__table th, .ledger__table td, .sched th, .sched td { padding: var(--space-sm) var(--space-lg); text-align: left; border-bottom: var(--rule-hair) solid var(--color-rule); white-space: nowrap; }
.ledger__table thead th, .sched thead th { color: var(--color-muted); font-weight: 600; }
.ledger__table tbody tr:last-child td { border-bottom: 0; }
.ledger__table .ledger__no { text-align: right; }
.ledger__digits { font: 700 var(--text-lg)/1 var(--font-display); letter-spacing: 0.12em; color: var(--color-ink); }
.ledger__table tr.is-latest td { background: var(--color-paper-3); }
.ledger__table tr.is-latest .ledger__digits { color: var(--color-tile-on); }
.ledger__state { color: var(--color-muted); white-space: normal !important; padding-block: var(--space-xl) !important; }

/* How to read */
.read { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: center; }
.read__text { display: grid; gap: var(--space-lg); }
.read__text > p { color: var(--color-ink-2); }
.read__terms { display: grid; gap: var(--space-sm); margin: 0; }
.read__terms div { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--space-md); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
.read__terms dt { font: 700 var(--text-md)/1.5 var(--font-display); color: var(--color-ink); }
.read__terms dd { margin: 0; color: var(--color-ink-2); }
.read__demo { --fs: clamp(3rem, 6vw, 4.5rem); --cell: calc(var(--fs) * 0.85); justify-self: center; display: grid; gap: var(--space-lg); padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); }
.read__labels { display: grid; grid-template-columns: repeat(4, var(--cell)); margin: 0; padding: 0; list-style: none; justify-items: center; white-space: nowrap; font: 600 var(--text-sm)/1.2 var(--font-body); }

/* About and schedule */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: start; }
.about__text { display: grid; gap: var(--space-lg); }
.about__text p { color: var(--color-ink-2); }
.about__table { display: grid; gap: var(--space-md); }
.about__table h3 { font-size: var(--text-xl); }
.sched { border-radius: var(--radius-card); background: var(--color-paper); }
.sched tbody th { color: var(--color-ink); font-weight: 600; }
.sched tbody tr:last-child th, .sched tbody tr:last-child td { border-bottom: 0; }
.about__table { overflow-x: auto; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: start; }
.faq__list { display: grid; }
.faq details { border-top: var(--rule-hair) solid var(--color-rule); }
.faq details:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); min-height: 56px; padding-block: var(--space-sm); font: 600 var(--text-lg)/1.35 var(--font-display); cursor: pointer; list-style: none; transition: color var(--dur-short) var(--ease-out); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; color: var(--color-accent); font-size: var(--text-xl); transition: transform var(--dur-short) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--color-accent-2); }
.faq summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }
.faq details p { padding-bottom: var(--space-lg); color: var(--color-ink-2); }

/* Footer: mast */
.footer { padding-block: var(--space-2xl); border-top: var(--rule-hair) solid var(--color-rule); }
.footer__inner { display: grid; gap: var(--space-lg); }
.footer__logo { width: min(100%, 360px); }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin: 0; padding: 0; list-style: none; }
.footer__links a { display: inline-flex; min-height: 44px; align-items: center; color: var(--color-ink-2); font-size: var(--text-sm); text-decoration: none; transition: color var(--dur-short) var(--ease-out); }
.footer__links a:hover { color: var(--color-ink); text-decoration: underline; }
.footer__links a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }
.footer__note { color: var(--color-ink-2); max-width: 60ch; }
.footer__meta { color: var(--color-muted); font-size: var(--text-xs); }

/* Responsive */
@media (max-width: 64rem) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid, .read, .about, .faq { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .section__head { grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
}
@media (max-width: 40rem) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .feature, .read__demo { padding: var(--space-lg); }
  .hero { padding-block: var(--space-xl) var(--space-2xl); }
  .section { padding-block: var(--space-2xl); }
  .ledger__table th, .ledger__table td, .sched th, .sched td { padding-inline: var(--space-sm); }
}
@media (prefers-reduced-motion: reduce) { .btn, .chip, .tab, .card__link, .faq summary::after { transition-duration: 0.01ms; } }
