/* ARCHHAS — site styles
   Palette: paper, ink, Kerala green, laterite red. Type: Fraunces (display) + Instrument Sans (text).
   Recurring motif: the arch (arched image frames, arched year plaques). */

:root {
    --paper: #f7f4ec;
    --paper-2: #efeadc;
    --card: #fffdf8;
    --ink: #17231d;
    --ink-2: #4b5850;
    --green: #0e4a38;
    --green-deep: #0a3327;
    --green-tint: #dfe9e1;
    --laterite: #a8402a;
    --line: #d8d1bd;
    --on-green: #f3efe3;
    --on-green-2: #b9cdc1;
    --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --wrap: 1160px;
    --gutter: clamp(18px, 4vw, 40px);
    --section: clamp(56px, 8vw, 104px);
    --arch: 999px 999px 6px 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font: 400 17px/1.65 var(--text);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--laterite); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--laterite); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 4px; }
.skip:focus { top: 12px; color: #fff; }
.icon { flex: none; vertical-align: -3px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 48px; padding: 11px 24px; border-radius: 999px;
    background: var(--green); color: var(--on-green); border: 1.5px solid var(--green);
    font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
    transition: background-color .18s, color .18s, border-color .18s;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .95rem; }
.btn-line { background: transparent; color: var(--green); }
.btn-line:hover { background: var(--green); color: var(--on-green); }
.btn-light { background: var(--on-green); color: var(--green-deep); border-color: var(--on-green); }
.btn-light:hover { background: #fff; border-color: #fff; color: var(--green-deep); }
.btn-ghost-light { background: transparent; color: var(--on-green); border-color: rgba(243, 239, 227, .5); }
.btn-ghost-light:hover { background: rgba(243, 239, 227, .12); border-color: var(--on-green); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.more { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.more:hover { text-decoration: underline; }

/* ---- Top bar + header ---- */
.topbar { background: var(--green-deep); color: var(--on-green-2); font-size: .86rem; }
.topbar-in { display: flex; justify-content: space-between; gap: 16px; padding-block: 7px; }
.topbar a { color: var(--on-green); text-decoration: none; white-space: nowrap; }
.topbar a:hover { text-decoration: underline; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 244, 236, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: 52px; border-radius: 50%; mix-blend-mode: multiply; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 1.5rem/1 var(--display); letter-spacing: .04em; }
.brand-sub { font-size: .72rem; color: var(--ink-2); letter-spacing: .02em; margin-top: 4px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav a:not(.btn):hover, .site-nav a:not(.btn)[aria-current] { border-bottom-color: var(--laterite); }
.nav-toggle { display: none; }

@media (max-width: 1120px) {
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
        background: none; border: 1.5px solid var(--line); border-radius: 50%; cursor: pointer; color: var(--ink);
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
    .nav-toggle-bars { position: relative; }
    .nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
    .nav-toggle-bars::before { top: -6px; }
    .nav-toggle-bars::after { top: 6px; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -18px rgba(23, 35, 29, .35); }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
    .site-nav a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
    .site-nav .btn { margin-top: 16px; width: 100%; }
}
@media (max-width: 520px) {
    .brand-sub { display: none; }
    .topbar-in span { display: none; }
    .topbar-in { justify-content: center; }
}

/* ---- Shared section furniture ---- */
.section { padding-block: var(--section); }
.section-tint { background: var(--paper-2); }
.section-green { background: var(--green); color: var(--on-green); }
.section-green h2, .section-green h3 { color: #fff; }
.section-green a:not(.btn) { color: #fff; }
.eyebrow { font: 600 .8rem/1.3 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--laterite); margin: 0 0 14px; }
.section-green .eyebrow { color: #e9b9a6; }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }
.section-green .lede { color: var(--on-green-2); }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }

/* ---- Home hero ---- */
.hero { padding-block: clamp(40px, 6vw, 84px) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--green); }
.hero .lede { margin-top: 20px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 400px); }
.hero-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--arch); }
.hero-art::before { content: ''; position: absolute; inset: -14px -14px 22px 22px; border: 1.5px solid var(--laterite); border-radius: var(--arch); z-index: -1; }
.hero-plaque {
    position: absolute; left: -28px; bottom: 28px; background: var(--green); color: var(--on-green);
    padding: 22px 20px 14px; border-radius: 999px 999px 4px 4px; text-align: center; width: 132px;
    box-shadow: 0 14px 30px -14px rgba(10, 51, 39, .7);
}
.hero-plaque b { display: block; font: 500 2.1rem/1 var(--display); color: #fff; }
.hero-plaque span { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-green-2); }
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { width: min(78%, 320px); margin-top: 8px; }
    .hero-plaque { left: -18px; }
}

/* ---- Heritage line: 1961 → 2003 → today ---- */
.heritage { border-block: 1px solid var(--line); background: var(--card); }
.heritage-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.heritage-item { padding: clamp(22px, 3vw, 36px) clamp(16px, 2.5vw, 32px); border-left: 1px solid var(--line); position: relative; }
.heritage-item:first-child { border-left: 0; padding-left: 0; }
.heritage-item b { display: block; font: 500 clamp(2.2rem, 4.6vw, 3.6rem)/1 var(--display); color: var(--green); letter-spacing: -.02em; }
.heritage-item span { display: block; margin-top: 10px; color: var(--ink-2); max-width: 30ch; }
@media (max-width: 720px) {
    .heritage-grid { grid-template-columns: 1fr; }
    .heritage-item { border-left: 0; border-top: 1px solid var(--line); padding-inline: 0; display: grid; grid-template-columns: 7.4rem 1fr; align-items: baseline; gap: 14px; }
    .heritage-item:first-child { border-top: 0; }
    .heritage-item span { margin: 0; }
}

/* ---- Pillar cards (the two main course families) ---- */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.pillar-img { aspect-ratio: 16 / 10; overflow: hidden; }
.pillar-img img { width: 100%; height: 100%; object-fit: cover; }
.pillar-body { padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; }
.pillar-body ul { list-style: none; padding: 0; margin: 4px 0 22px; border-top: 1px solid var(--line); }
.pillar-body li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; }
.pillar-body li span:last-child { color: var(--ink-2); font-size: .92rem; text-align: right; white-space: nowrap; }
.pillar-body .btn-row { margin-top: auto; }
@media (max-width: 800px) { .pillars { grid-template-columns: 1fr; } }

/* ---- Course rows (index of programmes) ---- */
.rows { border-top: 1.5px solid var(--ink); }
.row { display: grid; grid-template-columns: 150px minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: clamp(14px, 2.5vw, 32px); align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line); }
.row-level { font: 600 .78rem/1.5 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--laterite); padding-top: 5px; }
.row h3 { margin: 0; font-size: 1.3rem; }
.row h3 a { color: var(--ink); text-decoration: none; }
.row h3 a:hover { color: var(--green); text-decoration: underline; }
.row p { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) {
    .row { grid-template-columns: 1fr; gap: 6px; }
    .row-level { padding-top: 0; }
    .row .more { margin-top: 6px; }
}

/* ---- Split layout + checklist ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.split-wide { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 860px) { .split, .split-wide { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 14px 0 14px 34px; border-bottom: 1px solid var(--line); }
.checks li:first-child { border-top: 1px solid var(--line); }
.checks li::before { content: ''; position: absolute; left: 4px; top: 21px; width: 14px; height: 8px; border-left: 2px solid var(--laterite); border-bottom: 2px solid var(--laterite); transform: rotate(-45deg); }
.checks b { display: block; font-weight: 600; }
.section-green .checks li { border-color: rgba(243, 239, 227, .22); }
.section-green .checks li::before { border-color: #e9b9a6; }
.cols-2 { columns: 2; column-gap: 40px; }
.cols-2 li { break-inside: avoid; }
@media (max-width: 640px) { .cols-2 { columns: 1; } }

.arch-img { border-radius: var(--arch); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.arch-frame { max-width: 380px; justify-self: center; width: 100%; }

/* ---- Inner page hero ---- */
.page-hero { padding-block: clamp(28px, 4vw, 48px) clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 18ch; }
.page-hero .lede { margin-top: 16px; }
.crumbs { font-size: .88rem; color: var(--ink-2); margin-bottom: clamp(20px, 3vw, 36px); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }

/* ---- Fact sheet ---- */
.facts { margin: 0; border-top: 1.5px solid var(--ink); background: var(--card); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.facts dt { font: 600 .78rem/1.6 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }
.facts dd { margin: 0; }
.facts dd b { font-family: var(--display); font-weight: 500; font-size: 1.2rem; }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* ---- Numbered modules ---- */
.modules { list-style: none; padding: 0; margin: 0; counter-reset: m; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.modules li { counter-increment: m; padding: 20px 20px 22px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; }
.modules li::before { content: counter(m, decimal-leading-zero); font: 500 1.05rem/1 var(--display); color: var(--laterite); min-width: 1.7em; }
@media (max-width: 860px) { .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .modules { grid-template-columns: 1fr; } }

/* ---- Level ladder (Diploma → PG Diploma → Master Diploma) ---- */
.ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); align-items: end; }
.rung { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 6px; padding: clamp(20px, 2.6vw, 30px); scroll-margin-top: 110px; }
.rung:nth-child(2) { padding-top: clamp(34px, 4.4vw, 54px); }
.rung:nth-child(3) { padding-top: clamp(48px, 6.2vw, 78px); border-top-color: var(--laterite); }
.rung-step { font: 600 .78rem/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.rung p { color: var(--ink-2); }
@media (max-width: 860px) { .ladder { grid-template-columns: 1fr; } .rung:nth-child(n) { padding-top: clamp(20px, 2.6vw, 30px); } }

/* ---- Steps ---- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.steps li { counter-increment: s; border-top: 1.5px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(s); font: 500 2.2rem/1 var(--display); color: var(--laterite); display: block; margin-bottom: 12px; }
.steps b { display: block; font-weight: 600; margin-bottom: 4px; }
.steps span { color: var(--ink-2); }

/* ---- Tags ---- */
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 15px; font-size: .95rem; }

/* ---- Service blocks ---- */
.service { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 5vw, 72px); padding-block: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.service:first-of-type { border-top: 1.5px solid var(--ink); }
.service h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
@media (max-width: 800px) { .service { grid-template-columns: 1fr; gap: 8px; } }
.inset { background: var(--paper-2); border-left: 3px solid var(--green); padding: 18px 20px; border-radius: 0 6px 6px 0; margin-bottom: 14px; }
.inset h3 { font-size: 1.15rem; margin-bottom: 4px; }
.inset p { margin: 0; color: var(--ink-2); }

/* ---- FAQ ---- */
.faq { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font: 500 1.2rem/1.35 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 400 1.7rem/1 var(--text); color: var(--laterite); }
.faq details[open] summary::after { content: '–'; }
.faq-a { padding: 0 44px 20px 0; color: var(--ink-2); max-width: 70ch; }
.faq-a p:last-child { margin: 0; }

/* ---- CTA band + footer ---- */
.cta-band { background: var(--green); color: var(--on-green); padding-block: clamp(44px, 6vw, 72px); }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-in > div:first-child { max-width: 600px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--on-green-2); margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.site-footer { background: var(--green-deep); color: var(--on-green-2); font-size: .95rem; padding-top: clamp(44px, 6vw, 72px); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr 1fr; gap: clamp(24px, 4vw, 48px); }
.site-footer h2 { font: 600 .78rem/1.4 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--on-green); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--on-green-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-name { font: 600 1.5rem/1 var(--display); letter-spacing: .04em; color: #fff; }
.footer-legal { border-top: 1px solid rgba(243, 239, 227, .16); margin-top: clamp(32px, 4vw, 52px); padding-block: 20px; font-size: .86rem; }
.footer-legal p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Mobile action bar ---- */
.mobile-bar { display: none; }
@media (max-width: 720px) {
    .mobile-bar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(23, 35, 29, .3);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mobile-bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 54px; font-weight: 600; font-size: .95rem; color: var(--green); text-decoration: none; border-left: 1px solid var(--line); }
    .mobile-bar a:first-child { border-left: 0; }
    .mobile-bar .mobile-bar-primary { background: var(--green); color: var(--on-green); }
    body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
}

/* ---- Floating WhatsApp button ---- */
.wa-float {
    position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 55;
    width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #25d366; color: #fff; box-shadow: 0 8px 22px -6px rgba(23, 35, 29, .45); transition: transform .15s ease;
}
.wa-float:hover, .wa-float:focus-visible { transform: scale(1.07); color: #fff; }
.wa-float:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wa-float svg { width: 32px; height: 32px; }
@media (max-width: 720px) { .wa-float { right: 14px; bottom: calc(54px + 14px + env(safe-area-inset-bottom)); width: 54px; height: 54px; } }
@media print { .wa-float { display: none; } }

/* ---- News ---- */
.news-cert { margin: 24px 0 0; max-width: 200px; }
.news-cert img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.news-cert figcaption { font-size: .85rem; color: var(--ink-2); margin-top: 6px; }

/* ---- Contact + form ---- */
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; border-top: 1.5px solid var(--ink); }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.contact-list span:first-child { font: 600 .78rem/1.9 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.contact-list a { font-weight: 600; }
.contact-list .big { font: 500 1.5rem/1.2 var(--display); text-decoration: none; }

.form { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: clamp(22px, 3.4vw, 40px); scroll-margin-top: 100px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
    width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 6px;
    padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.field .err { color: var(--laterite); font-size: .9rem; margin-top: 5px; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--laterite); }
.hp { position: absolute; left: -9999px; }
.notice { border-radius: 8px; padding: 18px 20px; margin-bottom: 22px; border: 1px solid; }
.notice-ok { background: var(--green-tint); border-color: #b5cdbd; color: var(--green-deep); }
.notice-bad { background: #f6e4dd; border-color: #e2b9aa; color: #7a2c1b; }
.notice p { margin: 0; }
.form .btn { width: 100%; }

.error-page { padding-block: clamp(64px, 12vw, 140px); text-align: center; }
.error-page .lede { margin-inline: auto; }
.error-page .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
@media print {
    .topbar, .site-header, .mobile-bar, .cta-band, .site-footer nav { display: none; }
    body { background: #fff; }
}

/* ---- Guides (articles) ---- */
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 960px) { .guide-grid { grid-template-columns: minmax(0, 1fr); } }
.prose { max-width: 70ch; min-width: 0; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-top: 1.7em; }
.prose > h2:first-child, .prose > .eyebrow + h2 { margin-top: 0; }
.prose h3 { margin-top: 1.5em; font-size: 1.25rem; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--laterite); }
.prose .faq { margin-top: 18px; }
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border-top: 1.5px solid var(--ink); }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .96rem; background: var(--card); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose thead th { font: 600 .78rem/1.5 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.prose tbody th { font-weight: 600; }
.callout { background: var(--paper-2); border-left: 3px solid var(--green); padding: 18px 20px; border-radius: 0 6px 6px 0; margin: 1.5em 0; }
.callout p:last-child { margin: 0; }
.guide-side { display: grid; gap: 20px; position: sticky; top: 104px; }
@media (max-width: 960px) { .guide-side { position: static; } }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.side-card h2 { font-size: 1.2rem; }
.side-card ul { list-style: none; padding: 0; margin: 0 0 4px; }
.side-card li { padding: 9px 0; border-top: 1px solid var(--line); font-size: .96rem; }
.side-card-green { background: var(--green); border-color: var(--green); color: var(--on-green-2); }
.side-card-green h2 { color: #fff; }
.side-card-green a:not(.btn) { color: #fff; }
.side-card-green li { border-color: rgba(243, 239, 227, .22); }
.side-card-green .btn { width: 100%; margin-top: 14px; }
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.guide-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.guide-card:hover { border-top-color: var(--laterite); color: var(--ink); }
.guide-card h3 { font-size: 1.25rem; }
.guide-card p { color: var(--ink-2); margin-bottom: 16px; }
.guide-card .more { margin-top: auto; color: var(--green); }
@media (min-width: 1121px) and (max-width: 1400px) { .brand-sub { display: none; } }

/* ---- Guides index: jump links ---- */
.guide-jump { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.guide-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-weight: 600; font-size: .95rem; }
.guide-jump a:hover { border-color: var(--green); color: var(--green); }
.guide-jump span { font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---- Puzzles ---- */
.puzzle { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--laterite); border-radius: 8px; padding: clamp(18px, 3vw, 28px); margin: 2em 0; max-width: 720px; }
.puzzle:not(.is-ready) > script { display: none; }
.puzzle-section .puzzle { margin: 0; }
.puzzle-kind { font: 600 .78rem/1.3 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--laterite); margin: 0 0 8px; }
.puzzle .puzzle-title { font-size: 1.35rem; margin: 0 0 .5em; }
.puzzle-prompt { margin: 0 0 16px; }
.puzzle-count { font-size: .86rem; color: var(--ink-2); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.puzzle button { font: inherit; cursor: pointer; }
.puzzle button:disabled { cursor: default; }
.puzzle-options { display: grid; gap: 10px; }
.puzzle-option, .puzzle-chip { text-align: left; width: 100%; min-height: 48px; padding: 11px 16px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); border-radius: 8px; transition: border-color .15s, background-color .15s; }
.puzzle-option:hover:not(:disabled), .puzzle-chip:hover:not(:disabled) { border-color: var(--green); }
.puzzle .is-right { border-color: var(--green); background: var(--green-tint); color: var(--green-deep); }
.puzzle .is-wrong { border-color: var(--laterite); background: #f6e3dc; color: #7a2a18; }
.puzzle-option:disabled:not(.is-right):not(.is-wrong) { opacity: .6; }
.puzzle-order { list-style: none; counter-reset: po; padding: 0; margin: 0; display: grid; gap: 8px; }
.puzzle-step { counter-increment: po; display: flex; align-items: center; gap: 12px; margin: 0; padding: 8px 8px 8px 14px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; }
.puzzle-step::before { content: counter(po); font: 500 1.15rem/1 var(--display); color: var(--laterite); min-width: 1.2em; }
.puzzle-step-text { flex: 1; min-width: 0; }
.puzzle-step-ctl { display: flex; gap: 6px; flex: none; }
.puzzle-move { width: 44px; height: 44px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--green); font-size: 1.1rem; line-height: 1; }
.puzzle-move:hover:not(:disabled) { border-color: var(--green); background: var(--green-tint); }
.puzzle-move:disabled { opacity: .35; }
.puzzle-match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.puzzle-col { display: grid; gap: 10px; align-content: start; }
.puzzle-chip { font-size: .96rem; padding: 10px 12px; }
.puzzle-chip.is-picked { border-color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.puzzle-badge { display: inline-block; min-width: 1.5em; margin-right: 8px; padding: 1px 6px; border-radius: 999px; background: var(--green); color: var(--on-green); font-size: .78rem; font-weight: 600; text-align: center; }
.puzzle-card { font: 500 1.3rem/1.3 var(--display); background: var(--paper); border: 1.5px dashed var(--line); border-radius: 8px; padding: 22px 18px; margin: 0 0 14px; text-align: center; min-height: 3.2em; }
.puzzle-card:empty { display: none; }
.puzzle-bins { display: flex; flex-wrap: wrap; gap: 10px; }
.puzzle-bin { flex: 1 1 160px; }
.puzzle-note { margin: 14px 0 0; font-size: .96rem; }
.puzzle-note:empty { display: none; }
.puzzle-note.is-good { color: var(--green); }
.puzzle-note.is-bad { color: var(--laterite); }
.puzzle-slots, .puzzle-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.puzzle-slot, .puzzle-tile { width: 44px; height: 48px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font: 600 1.15rem/1 var(--text); }
.puzzle-slot { border: 1.5px dashed var(--line); background: var(--paper); }
.puzzle-tile { border: 1.5px solid var(--green); background: var(--card); color: var(--green-deep); }
.puzzle-tile.is-placed { background: var(--green-tint); }
.puzzle-tile:disabled:not(.is-placed) { opacity: .25; }
.puzzle-calc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.puzzle-input { width: 140px; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: 600 1.1rem/1.2 var(--text); }
.puzzle-unit { color: var(--ink-2); }
.puzzle-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 20px; border-radius: 999px; background: var(--green); color: var(--on-green); border: 1.5px solid var(--green); font-weight: 600; }
.puzzle-btn:hover:not(:disabled) { background: var(--green-deep); border-color: var(--green-deep); }
.puzzle-btn-line { background: transparent; color: var(--green); }
.puzzle-btn-line:hover:not(:disabled) { background: var(--green); color: var(--on-green); }
.puzzle-btn:disabled { opacity: .5; }
.puzzle-status { margin: 16px 0 0; font-weight: 600; min-height: 1.6em; }
.puzzle-status:empty { min-height: 0; margin: 0; }
.puzzle-status.is-good { color: var(--green); }
.puzzle-status.is-bad { color: var(--laterite); }
.puzzle-status.is-info { color: var(--ink-2); }
.puzzle-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.puzzle-foot:empty { display: none; }
.puzzle-explain { flex: 1 1 100%; margin: 0 0 4px; padding: 14px 16px; background: var(--paper-2); border-left: 3px solid var(--green); border-radius: 0 6px 6px 0; }
.puzzle-section-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px); gap: clamp(24px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .puzzle-section-in { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .puzzle-match { gap: 8px; } .puzzle-chip { font-size: .9rem; padding: 9px 10px; } .puzzle-slot, .puzzle-tile { width: 38px; height: 44px; } }
@media print { .puzzle, .puzzle-section { display: none; } }
