/* Sanjus Publications. Notebook palette: paper, ballpoint ink, margin red, highlighter. */
:root {
    --paper: #ffffff;
    --sheet: #f1f5fb;
    --ink: #141b4d;
    --ink-2: #4a527c;
    --rule: #cbd8f0;
    --line: #dde3f0;
    --margin: #e5354b;
    --hl: #ffe24a;
    --wa: #0f7a43;
    --ok-bg: #e3f5ea; --ok: #0d5c33;
    --bad-bg: #fde8ea; --bad: #9c1528;
    --c10: #1e8a4e; --c11: #d9650a; --c12: #d5283d;
    --font: "Anek Latin", "Anek Tamil", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 1180px;
    --pad: clamp(1rem, 4vw, 2rem);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 1.0625rem/1.55 var(--font); color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 750; font-stretch: 108%; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--margin); }
small { font-size: .85em; color: var(--ink-2); font-weight: 400; }
:focus-visible { outline: 3px solid var(--margin); outline-offset: 2px; border-radius: 2px; }
.ta { font-family: "Anek Tamil", var(--font); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--hl); padding: .6rem 1rem; z-index: 100; font-weight: 700; }
.skip:focus { left: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .55rem 1.15rem; font: 700 1rem/1.2 var(--font);
    border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn-hl { background: var(--hl); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { box-shadow: 3px 3px 0 var(--margin); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-small { min-height: 38px; padding: .35rem .8rem; font-size: .92rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: .4rem 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 38px; }

/* Header */
.site-header { border-bottom: 2px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 40; }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; text-decoration: none; }
.brand img { height: 48px; width: auto; display: block; }
.brand-footer img { height: 56px; }
.brand-office { flex-direction: column; align-items: flex-start; gap: .35rem; margin-bottom: 1.5rem; }
.brand-office img { height: 46px; }
.brand-portal { color: #c5cbea; font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
@media (max-width: 720px) { .brand img { height: 40px; } }
.wordmark { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; margin-right: auto; padding-left: .7rem; border-left: 3px solid var(--margin); }
.wordmark-main { font-weight: 800; font-stretch: 118%; font-size: 1.5rem; letter-spacing: -.02em; }
.wordmark-sub { font-size: .8rem; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.site-nav { display: flex; gap: .25rem; align-items: center; }
.site-nav a { padding: .55rem .7rem; text-decoration: none; font-weight: 600; border-radius: 6px; }
.site-nav a:hover, .site-nav a.is-current { background: var(--sheet); }
.cart-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .4rem .85rem; border: 2px solid var(--ink); border-radius: 6px; font-weight: 700; text-decoration: none; }
.lang-switch { display: inline-flex; align-items: center; gap: .25rem; min-height: 44px; padding: .3rem .6rem; border: 2px solid var(--ink); border-radius: 6px; background: var(--sheet); font-size: .88rem; font-weight: 750; }
.lang-btn { text-decoration: none; color: var(--ink-2); padding: .2rem .4rem; border-radius: 4px; transition: color .15s, background .15s; }
.lang-btn:hover { color: var(--ink); text-decoration: none; }
.lang-btn.is-active { background: var(--ink); color: #fff; }
.lang-sep { color: var(--rule); font-weight: 400; user-select: none; }
.cart-count { background: var(--hl); border-radius: 999px; min-width: 1.6rem; padding: 0 .4rem; text-align: center; font-variant-numeric: tabular-nums; }
.cart-count[data-empty] { background: var(--sheet); }
.menu-toggle { display: none; min-height: 44px; padding: .4rem .85rem; font: 700 1rem var(--font); background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; cursor: pointer; }

/* Flash */
.flash { margin: 1rem 0; padding: .8rem 1rem; border-left: 5px solid; border-radius: 4px; }
.flash p:last-child, .flash ul { margin-bottom: 0; }
.flash-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.flash-bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.flash-note { background: #fff8d6; border-color: #c79a00; }

/* Hero: a ruled notebook page with the answer-sheet finder */
.hero { position: relative; background-color: var(--sheet);
    background-image: linear-gradient(to bottom, transparent calc(100% - 1px), var(--rule) calc(100% - 1px)); background-size: 100% 2.4rem; border-bottom: 2px solid var(--ink); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-block: clamp(2rem, 5vw, 4rem); position: relative; }
.hero-grid::before { content: ""; position: absolute; left: calc(var(--pad) - .9rem); top: 0; bottom: 0; width: 2px; background: var(--margin); opacity: .75; }
.hero-copy h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-stretch: 112%; font-weight: 800; }
.hero-lede { font-size: 1.15rem; max-width: 34rem; }
.hero-ta { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--margin); margin-bottom: 1.4rem; }
.search label, .filters label, .field label { display: block; font-weight: 650; margin-bottom: .3rem; }
.search { position: relative; max-width: 34rem; }
.search-row { display: flex; gap: .5rem; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: .55rem .75rem; min-height: 46px; width: 100%; }
textarea { min-height: 0; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 1.25rem; height: 1.25rem; min-height: 0; padding: 0; accent-color: var(--ink); flex: none; }
input[type=file] { border-style: dashed; padding: .5rem; }
::placeholder { color: #7c84a8; opacity: 1; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; z-index: 30; box-shadow: 4px 4px 0 var(--ink); overflow: hidden; }
.suggest a { display: grid; grid-template-columns: 40px 1fr auto; gap: .7rem; align-items: center; padding: .55rem .75rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a:focus { background: var(--sheet); }
.suggest img, .suggest .suggest-ph { width: 40px; height: 54px; object-fit: cover; background: var(--sheet); border-radius: 2px; }
.suggest strong { display: block; line-height: 1.2; }
.suggest .price { font-weight: 800; }
.suggest-empty { padding: .8rem; margin: 0; }

.omr { background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 1.25rem 1.25rem 1.25rem 2.6rem; position: relative; box-shadow: 8px 8px 0 var(--ink); }
.omr::before { content: ""; position: absolute; left: .85rem; top: 1.3rem; bottom: 1.3rem; width: .7rem;
    background: repeating-linear-gradient(to bottom, var(--ink) 0 .42rem, transparent .42rem 1.15rem); }
.omr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: .6rem; }
.omr-head h2 { margin: 0; font-size: 1.5rem; }
.omr-head p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.omr-row { border: 0; border-bottom: 1.5px dashed var(--rule); margin: 0; padding: .85rem 0; display: flex; flex-wrap: wrap; gap: .4rem .5rem; }
.omr-row legend { float: left; width: 100%; font-weight: 750; font-size: .95rem; margin-bottom: .45rem; padding: 0; }
.bubble { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .7rem .4rem .45rem; min-height: 44px; border: 1.5px solid var(--rule); border-radius: 999px; cursor: pointer; font-weight: 600; line-height: 1.15; position: relative; }
.bubble input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bubble-dot { width: 1.5rem; height: 1.5rem; border: 2px solid var(--ink); border-radius: 50%; flex: none; background: radial-gradient(circle, var(--ink) 0 58%, transparent 60%) center / 0 0 no-repeat; transition: background-size .18s ease-out; }
.bubble:hover { border-color: var(--ink); }
.bubble:has(input:checked) { border-color: var(--ink); background: var(--hl); }
.bubble:has(input:checked) .bubble-dot { background-size: 100% 100%; }
.bubble:has(input:focus-visible) { outline: 3px solid var(--margin); outline-offset: 2px; }
.bubble[hidden] { display: none; }
.omr-result { padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; min-height: 4.4rem; }
.omr-hint { margin: 0; font-weight: 600; }
.omr-hint strong { display: block; font-size: 1.1rem; }

.hero-covers { display: flex; gap: 1rem; margin-top: 2.2rem; max-width: 34rem; }
.hero-covers a { flex: 1; border-left: 6px solid var(--cc); box-shadow: 5px 6px 0 rgba(20, 27, 77, .14); background: var(--paper); transition: transform .15s; }
.hero-covers a:hover { transform: translateY(-4px); }
@media (max-width: 960px) { .hero-covers { display: none; } }

/* Sections */
.section { padding-block: clamp(2.25rem, 5vw, 4rem); }
.section-tint { background: var(--sheet); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; max-width: 36rem; color: var(--ink-2); }
.section-head p a { color: var(--ink); font-weight: 650; }

/* Price register */
.register { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.register-class { border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--paper); }
.register-class header { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; color: #fff; background: var(--cc); }
.register-class h3 { margin: 0; font-size: 1.05rem; }
.register-class h3 a { color: #fff; }
.register-numeral { font-weight: 800; font-stretch: 120%; font-size: 2.6rem; line-height: 1; min-width: 3.2rem; }
.register-class ul { list-style: none; margin: 0; padding: 0; }
.register-class li { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .8rem 1rem; border-top: 1.5px dashed var(--rule); align-items: center; }
.register-class li:first-child { border-top: 0; }
.register-subject strong { display: block; font-size: 1.08rem; line-height: 1.2; }
.register-subject .ta { color: var(--ink-2); font-size: .95rem; }
.register-price { text-align: right; white-space: nowrap; }
.register-price s { color: var(--ink-2); font-size: .9rem; }
.register-links { grid-column: 1 / -1; display: flex; gap: .5rem; }
.register-links a { flex: 1; text-align: center; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--ink); border-radius: 6px; font-weight: 650; text-decoration: none; }
.register-links a:hover { background: var(--hl); }
.c10 { --cc: var(--c10); } .c11 { --cc: var(--c11); } .c12 { --cc: var(--c12); }

.price { font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; padding: 0 .25rem; background: linear-gradient(to top, var(--hl) 62%, transparent 62%); }
.price-line { margin: .3rem 0 .7rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.price-line s { color: var(--ink-2); font-size: .95rem; }
.price-line-big .price { font-size: 2.1rem; }
.saving { font-weight: 650; color: var(--ok); }

/* Book cards */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2rem 1.5rem; }
.book-card { display: flex; flex-direction: column; }
.book-card-cover { display: block; text-decoration: none; border-left: 7px solid var(--cc, var(--ink)); background: var(--sheet); box-shadow: 0 1px 0 var(--line), 5px 6px 0 rgba(20, 27, 77, .12); transition: transform .15s; }
.book-card:hover .book-card-cover { transform: translateY(-3px); }
.cover { width: 100%; aspect-ratio: 7 / 10; object-fit: cover; object-position: top; }
.cover-plain { display: flex; flex-direction: column; justify-content: space-between; padding: 8% 9%; color: #fff; background: var(--cc, var(--ink)); background-image: linear-gradient(to bottom, transparent calc(100% - 1px), rgba(255, 255, 255, .22) calc(100% - 1px)); background-size: 100% 12.5%; text-align: left; container-type: inline-size; }
.cover-plain-brand { font-weight: 700; font-size: 9cqw; opacity: .9; }
.cover-plain-class { font-weight: 800; font-stretch: 120%; font-size: 38cqw; line-height: .9; }
.cover-plain-subject { font-weight: 750; font-size: 13cqw; line-height: 1.1; }
.cover-plain-edition { font-weight: 600; font-size: 8cqw; opacity: .9; }
.book-card-body { padding-top: .8rem; display: flex; flex-direction: column; flex: 1; }
.book-card-facts { margin: 0 0 .35rem; display: flex; gap: .4rem; flex-wrap: wrap; font-size: .85rem; font-weight: 700; }
.class-tag { color: #fff; background: var(--cc, var(--ink)); padding: .1rem .5rem; border-radius: 4px; }
.medium-tag { border: 1.5px solid var(--ink); padding: 0 .5rem; border-radius: 4px; }
.m-tamil { background: var(--ink); color: #fff; }
.book-card h3 { margin: 0; font-size: 1.25rem; }
.book-card h3 a { text-decoration: none; }
.book-card h3 a:hover { text-decoration: underline; }
.book-card h3 .ta { display: block; font-size: .95rem; font-weight: 500; color: var(--ink-2); font-stretch: 100%; letter-spacing: 0; margin-top: .15rem; }
.book-card-edition { margin: .2rem 0 0; color: var(--ink-2); font-size: .92rem; }
.book-card form { margin-top: auto; }
.stock-out { font-weight: 650; color: var(--bad); }

/* Choose + steps */
.choose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem 4rem; align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.checklist li { padding: .9rem 0 .9rem 2.6rem; border-bottom: 1.5px dashed var(--rule); position: relative; font-size: 1.08rem; }
.checklist li::before { content: ""; position: absolute; left: .3rem; top: 1.05rem; width: 1.35rem; height: .7rem; border-left: 4px solid var(--margin); border-bottom: 4px solid var(--margin); transform: rotate(-48deg); }
.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: .9rem; }
.steps li::before { content: counter(step); display: block; font-weight: 800; font-stretch: 120%; font-size: 2.2rem; line-height: 1; color: var(--margin); margin-bottom: .5rem; }
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--ink-2); }
.bulk-strip { background: var(--ink); color: #fff; padding-block: 2.25rem; }
.bulk-strip-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.bulk-strip h2 { margin-bottom: .3rem; }
.bulk-strip p { margin: 0; opacity: .88; }
.bulk-strip .btn { border-color: var(--hl); }
.bulk-strip .btn:hover { box-shadow: 3px 3px 0 #fff; }

/* FAQ, posts, prose */
.faq-list { border-top: 2px solid var(--ink); max-width: 52rem; }
.faq-list details { border-bottom: 1.5px dashed var(--rule); }
.faq-list summary { cursor: pointer; padding: 1rem 2.2rem 1rem 0; font-weight: 700; font-size: 1.1rem; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: .3rem; top: .7rem; font-size: 1.6rem; font-weight: 500; color: var(--margin); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { max-width: 44rem; padding-bottom: .4rem; }
.faq-group { margin-bottom: 2.5rem; }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; }
.post-list-full { grid-template-columns: 1fr; }
.post-list article { border-top: 2px solid var(--ink); padding-top: .9rem; }
.post-list h2, .post-list h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.post-list p { color: var(--ink-2); margin: 0; }
.post-date { color: var(--ink-2); font-size: .92rem; }
.prose { max-width: 42rem; font-size: 1.1rem; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .4em; }

/* Inner pages */
.page { padding-block: 1.5rem 4rem; }
.page-narrow { max-width: 36rem; }
.page-mid { max-width: 54rem; }
.crumbs { font-size: .92rem; color: var(--ink-2); margin-bottom: 1rem; }
.lede { font-size: 1.13rem; max-width: 44rem; color: var(--ink-2); }
.lede a { color: var(--ink); }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: .8rem; align-items: end; margin: 1.25rem 0 2rem; padding: 1rem; background: var(--sheet); border: 1.5px solid var(--line); border-radius: 8px; }
.office .filters { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.filter-search { position: relative; }
.result-count { font-weight: 650; color: var(--ink-2); }
.empty { border: 2px dashed var(--rule); border-radius: 8px; padding: 2rem; text-align: left; max-width: 44rem; }
.empty-links { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0; }
.empty-inline { color: var(--ink-2); margin: .5rem 0; }

/* Product */
.product { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.product-cover { border-left: 10px solid var(--cc); box-shadow: 8px 9px 0 rgba(20, 27, 77, .14); }
.product-info h1 { margin-bottom: .2rem; }
.product-ta { font-size: 1.3rem; color: var(--ink-2); font-weight: 600; }
.match { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.2rem 0; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.match div { padding: .6rem .8rem; border-left: 1.5px solid var(--line); }
.match div:first-child { border-left: 0; background: var(--cc); color: #fff; }
.match div:first-child small { color: #fff; }
.match dt { font-size: .82rem; font-weight: 600; opacity: .8; }
.match dd { margin: 0; font-weight: 750; font-size: 1.15rem; line-height: 1.2; }
.buy { display: flex; align-items: end; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.buy label { width: 100%; font-weight: 650; margin-bottom: -.3rem; }
.buy input { width: 5.5rem; }
.buy-note, .twin { color: var(--ink-2); max-width: 36rem; }
.buy-note a, .twin a { color: var(--ink); font-weight: 650; }
.twin { border-top: 1.5px dashed var(--rule); padding-top: .9rem; }
.product-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--ink); }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: .55rem 0; border-bottom: 1.5px dashed var(--rule); vertical-align: top; }
.spec th { width: 34%; font-weight: 600; color: var(--ink-2); }

/* Cart, checkout, order */
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 2rem 3rem; align-items: start; }
.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.cart-lines li { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; padding: 1.1rem 0; border-bottom: 1.5px dashed var(--rule); }
.cart-cover { border-left: 5px solid var(--cc); align-self: start; }
.cart-info h2 { font-size: 1.15rem; margin-bottom: .15rem; }
.cart-info p { margin: 0 0 .6rem; color: var(--ink-2); }
.cart-actions { display: flex; gap: 1.2rem; align-items: end; flex-wrap: wrap; }
.qty-form { display: flex; gap: .5rem; align-items: end; }
.qty-form label { font-size: .85rem; font-weight: 650; align-self: center; }
.qty-form input { width: 5rem; min-height: 38px; padding: .3rem .5rem; }
.cart-amount { font-weight: 800; font-size: 1.15rem; margin: 0; font-variant-numeric: tabular-nums; }
.summary { border: 2px solid var(--ink); border-radius: 8px; padding: 1.25rem; background: var(--sheet); position: sticky; top: 84px; }
.summary h2 { font-size: 1.25rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; margin: 0 0 1.1rem; }
.summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary .total { font-weight: 800; font-size: 1.2rem; border-top: 2px solid var(--ink); padding-top: .6rem; }
.summary-lines { list-style: none; margin: 0 0 1rem; padding: 0 0 .8rem; border-bottom: 1.5px dashed var(--rule); }
.summary-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.summary-note { font-size: .92rem; color: var(--ink-2); margin: .7rem 0 0; }
.summary-back { display: inline-block; margin-top: .8rem; }
.form-card { border: 2px solid var(--ink); border-radius: 8px; padding: clamp(1rem, 3vw, 1.75rem); background: var(--paper); }
.form-card h2 { font-size: 1.25rem; margin-top: 1.4rem; }
.form-card h2:first-child { margin-top: 0; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 .9rem; cursor: pointer; }
.check input { margin-top: .2rem; }
.pay-options { display: grid; gap: .6rem; margin-bottom: 1.2rem; }
.pay-option { display: flex; gap: .8rem; padding: .9rem 1rem; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--ink); background: #fffbe0; }
.pay-option small { display: block; }
.placed { border: 2px solid var(--ink); border-radius: 8px; padding: clamp(1.1rem, 3vw, 2rem); background: var(--hl); margin-bottom: 2rem; box-shadow: 8px 8px 0 var(--ink); max-width: 48rem; }
.placed p { max-width: 38rem; font-size: 1.1rem; }
.placed-save { font-size: 1rem !important; margin-bottom: 0; }
.qr { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.progress { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 1.5rem 0 2rem; padding: 0; }
.progress li { border-top: 6px solid var(--line); padding: .5rem .4rem 0 0; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.progress li.done { border-color: var(--ink); color: var(--ink); }
.progress li.now { border-color: var(--margin); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 3rem; }
.order-grid h2 { font-size: 1.2rem; }
.lines { width: 100%; border-collapse: collapse; }
.lines th, .lines td { padding: .6rem .4rem .6rem 0; border-bottom: 1.5px dashed var(--rule); text-align: left; vertical-align: top; }
.lines thead th { border-bottom: 2px solid var(--ink); font-size: .9rem; }
.lines .num { text-align: right; padding-right: 0; }
.lines tfoot th { font-weight: 600; }
.lines .total th, .lines .total td { font-weight: 800; font-size: 1.12rem; border-bottom: 0; border-top: 2px solid var(--ink); }
.facts { display: grid; grid-template-columns: minmax(6rem, auto) 1fr; gap: .5rem 1.2rem; margin: 0 0 1.5rem; }
.facts dt { font-weight: 600; color: var(--ink-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: .5rem 0 .5rem 1rem; border-left: 3px solid var(--rule); }
.timeline time { display: block; font-size: .85rem; color: var(--ink-2); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3.5rem; align-items: start; }
.plain-list { padding-left: 1.2rem; max-width: 34rem; }
.plain-list li { margin-bottom: .6rem; }

/* Account + shared data UI */
.tabs { display: flex; gap: .25rem 1.2rem; flex-wrap: wrap; align-items: center; border-bottom: 2px solid var(--ink); margin: .5rem 0 1.5rem; }
.tabs a { padding: .6rem .1rem; font-weight: 650; text-decoration: none; border-bottom: 4px solid transparent; margin-bottom: -2px; }
.tabs a.is-current { border-color: var(--margin); }
.tabs form { margin-left: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tile { border: 2px solid var(--ink); border-radius: 8px; padding: .9rem 1rem; background: var(--paper); }
.tile-label { margin: 0; font-weight: 600; color: var(--ink-2); font-size: .95rem; }
.tile-value { margin: 0; font-weight: 800; font-stretch: 112%; font-size: 2rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile-value-text { font-size: 1.4rem; }
.tile-note { margin: .2rem 0 0; font-size: .95rem; }
.table-scroll { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; min-width: 560px; }
.data th, .data td { padding: .65rem .8rem .65rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data thead th { font-size: .88rem; color: var(--ink-2); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.data tbody th { font-weight: 600; }
.data .num { text-align: right; }
.pill { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .84rem; font-weight: 700; background: var(--sheet); border: 1.5px solid var(--rule); white-space: nowrap; }
.pill-new, .pill-awaiting { background: #fff4c2; border-color: #d9b100; }
.pill-paid, .pill-delivered, .pill-converted { background: var(--ok-bg); border-color: #7cc79b; color: var(--ok); }
.pill-confirmed, .pill-packed, .pill-shipped, .pill-contacted { background: #e2e9ff; border-color: #9aaef0; }
.pill-cancelled, .pill-refunded, .pill-closed { background: var(--bad-bg); border-color: #eea3ad; color: var(--bad); }
.pager { display: flex; gap: 1.2rem; align-items: center; margin: 1.2rem 0; }
.pager span { color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 2px solid var(--ink); background: var(--sheet); padding-top: 2.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
.site-footer h2 { font-size: 1rem; margin-bottom: .6rem; }
.site-footer nav a { display: block; padding: .3rem 0; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin-bottom: .5rem; color: var(--ink-2); }
.wordmark-footer { margin-bottom: 1rem !important; }
.footer-base { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem 1.5rem; border-top: 1px solid var(--rule); margin-top: 2rem; padding-block: 1rem 5rem; color: var(--ink-2); font-size: .92rem; }
.footer-base a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-base a:hover { color: var(--ink); }
.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .5rem 1rem; background: var(--wa); color: #fff; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(15, 122, 67, .35); }

/* Back office */
.office { background: var(--sheet); }
.office-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.office-side { background: var(--ink); color: #fff; padding: 1.25rem 1rem; }
.office-side .wordmark { color: #fff; margin-bottom: 1.5rem; }
.office-side .wordmark-sub { color: #c5cbea; }
.office-nav { display: flex; flex-direction: column; gap: .15rem; }
.office-nav a, .office-nav .link-btn { color: #fff; text-decoration: none; padding: .55rem .7rem; border-radius: 6px; font-weight: 600; text-align: left; width: 100%; }
.office-nav a:hover, .office-nav .link-btn:hover { background: rgba(255, 255, 255, .12); }
.office-nav a.is-current { background: var(--hl); color: var(--ink); }
.office-nav hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .25); margin: .8rem 0; width: 100%; }
.office-main { padding: clamp(1rem, 3vw, 2.25rem); max-width: 1280px; width: 100%; }
.office-main h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.office-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.panel h2 { font-size: 1.15rem; }
.panel h3 { margin-top: 1.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }
.panel-head h2 { margin: 0; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.title-row h1, .title-row p { margin: 0; }
.row-link { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.row-link:last-child { border-bottom: 0; }
.inline-form { display: flex; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.input-small { width: 6rem; min-height: 38px; padding: .3rem .5rem; }
.hint { color: var(--ink-2); font-size: .94rem; }
.cell-book { display: flex; gap: .7rem; align-items: center; }
.cell-book img { width: 36px; height: 48px; object-fit: cover; }
.thumb-none { width: 36px; height: 48px; background: var(--sheet); font-size: .6rem; display: grid; place-items: center; text-align: center; color: var(--ink-2); line-height: 1; }
.cover-preview { width: 110px; margin-bottom: .6rem; border: 1px solid var(--line); }
.group-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) 7rem auto auto auto; gap: .8rem; align-items: end; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.group-row .field { margin: 0; }
.group-row .check { margin: 0 0 .7rem; }
.group-row .pill, .group-row .link-btn { margin-bottom: .45rem; }
.group-row-new { border-bottom: 0; }
.price-table input { width: 5.5rem; }
.price-table th[scope=row] { min-width: 15rem; }
.gateway { border: 1.5px dashed var(--rule); border-radius: 8px; padding: .8rem 1rem; margin: 0 0 1rem; }
.gateway legend { font-weight: 750; padding: 0 .4rem; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: .92rem; }

@media (max-width: 960px) {
    .hero-grid, .choose, .product, .cart-grid, .order-grid, .split, .product-more, .office-cols { grid-template-columns: minmax(0, 1fr); }
    .register { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary { position: static; }
    .product-cover { max-width: 300px; }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters .filter-search { grid-column: 1 / -1; }
    .office-shell { grid-template-columns: minmax(0, 1fr); }
    .office-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: .7rem 1rem; }
    .office-side .wordmark, .office-side .brand-office { margin: 0; }
    .office-side .menu-toggle { display: inline-block; background: transparent; color: #fff; border-color: #fff; }
    .office-nav { display: none; width: 100%; padding-top: .8rem; }
    .office-nav.is-open { display: flex; }
    .group-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .menu-toggle { display: inline-block; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 2px solid var(--ink); flex-direction: column; align-items: stretch; padding: .5rem var(--pad) 1rem; }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: .8rem .5rem; border-bottom: 1px dashed var(--rule); border-radius: 0; }
    .header-row { gap: .6rem; }
    .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .9rem; }
    .book-card h3 { font-size: 1.08rem; }
    .field-row, .field-row-3, .post-list { grid-template-columns: minmax(0, 1fr); }
    .match { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .match div:nth-child(3) { border-left: 0; }
    .match div:nth-child(n+3) { border-top: 1.5px solid var(--line); }
    .progress { grid-template-columns: 1fr; gap: .2rem; }
    .progress li { border-top: 0; border-left: 6px solid var(--line); padding: .3rem 0 .3rem .7rem; }
    .cart-lines li { grid-template-columns: 64px 1fr; }
    .cart-amount { grid-column: 2; }
    .omr { box-shadow: 5px 5px 0 var(--ink); padding-left: 2.3rem; }
    .wa-float span { display: none; }
    .wa-float { padding: .5rem; width: 52px; height: 52px; justify-content: center; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .tabs form { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
