/* Bumi /learn + /tools — components from design/CONTENT_DESIGN.md, on the site.css tokens. */
:root { --measure: 680px; --tool-w: 880px; --ok-bg: #e3ecd6; --del-bg: #f6dcd3; --del-ink: #a3260c; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.section-h { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 22px; }
.link-arrow { font-weight: 600; text-decoration: underline; text-decoration-color: var(--tan-2); text-underline-offset: 5px; text-decoration-thickness: 1.5px; white-space: nowrap; }
.link-arrow:hover { text-decoration-color: var(--ink); }
.tag-sm { font-size: 13.5px; padding: 4px 12px 5px; text-decoration: none; }
.tag-mini { display: inline-block; font: 600 12px/1.3 var(--sans); padding: 3px 9px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; white-space: nowrap; }
.tag-mini.spoken { background: var(--saffron-soft); }
.count { font: 600 11px/1 var(--sans); vertical-align: super; margin-left: 3px; opacity: .7; }

/* ---------- 11a audio button ---------- */
.say { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); display: inline-grid; place-items: center; flex: none; cursor: pointer; padding: 0; vertical-align: middle; transition: background-color .15s; }
.say:hover { background: var(--saffron-soft); }
.say-sm { width: 32px; height: 32px; }
.say-sm::after { content: ""; position: absolute; inset: -6px; }
.say-sm svg { width: 15px; height: 15px; }
.say-lg { width: 56px; height: 56px; }
.say-lg svg { width: 24px; height: 24px; }
.say-xl { width: 96px; height: 96px; border-width: 2px; }
.say .eq { display: none; gap: 3px; align-items: center; height: 18px; }
.say .eq i { width: 3px; height: 100%; background: currentColor; border-radius: 2px; animation: eq .9s ease-in-out infinite; transform-origin: 50% 100%; }
.say .eq i:nth-child(2) { animation-delay: -.3s; } .say .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
.say.is-playing { background: var(--saffron); border-color: var(--ink); }
.say.is-playing .i-spk { display: none; } .say.is-playing .eq { display: inline-flex; }
.say.is-loading { opacity: .6; }
.say[hidden], .say.is-broken { display: none; }
.slab-dark .say, .quiz .say { background: transparent; border-color: rgba(251, 248, 242, .55); color: var(--on-dark); }
.slab-dark .say:hover { background: rgba(251, 248, 242, .1); }
.slab-dark .say.is-playing, .quiz .say.is-playing { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
@media (prefers-reduced-motion: reduce) { .say .eq i { animation: none; transform: scaleY(.7); } }

/* ---------- 11b pair ---------- */
.pair { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: center; }
.pair > .say { grid-row: 1 / span 4; }
.pair:not(:has(> .say)) { grid-template-columns: 1fr; }
.pair-ta { font: 600 20px/1.35 var(--ta-sans); color: var(--ink); }
.pair-tr { font: italic 400 17px/1.3 var(--serif); color: var(--muted); overflow-wrap: break-word; }
.pair-en { font: 400 15.5px/1.45 var(--sans); color: var(--ink-2); }
.pair-note { font-size: 14px; color: var(--muted); }
.pair-lg .pair-ta { font-size: 34px; font-family: var(--ta-serif); font-weight: 500; }
.pair-lg .pair-tr { font-size: 22px; }
.pair-lg .pair-en { font-size: 18px; }
.slab-dark .pair-ta { color: var(--on-dark); } .slab-dark .pair-tr { color: var(--tan); } .slab-dark .pair-en { color: var(--on-dark-muted); }
.pair-cell { gap: 0 10px; }
.pair-cell .pair-ta { font-size: 18px; } .pair-cell .pair-tr { font-size: 15.5px; } .pair-cell .pair-en { font-size: 14.5px; color: var(--muted); }
/* inline token in prose */
.tt { white-space: normal; }
.tt .say { margin-right: 4px; vertical-align: -9px; }
.tt [lang="ta"] { font-weight: 600; color: var(--ink); }
.tt-en { color: var(--muted); }

/* ---------- 11c phrase list ---------- */
.phrase-list { list-style: none; margin: 28px 0; padding: 0; border: 1.5px solid var(--line); border-radius: 20px; background: var(--paper); overflow: hidden; }
.phrase-list > li { padding: 14px 18px; border-top: 1px solid var(--line); }
.phrase-list > li:first-child { border-top: 0; }
.phrase-list > li.is-playing { background: var(--saffron-soft); }

/* ---------- 11d crumbs ---------- */
.crumbs { font: 500 14px/1.3 var(--sans); color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--tan-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-decoration-color: var(--tan-2); text-underline-offset: 3px; }
.crumbs li[aria-current] { color: var(--ink-2); max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs-back { display: none; text-decoration: none; font-weight: 600; }
@media (max-width: 639px) { .crumbs.has-short ol { display: none; } .crumbs.has-short .crumbs-back { display: inline-flex; gap: 6px; min-height: 32px; align-items: center; } }

/* ---------- 11e clips link ---------- */
.clips-link { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; border-radius: 20px; background: var(--slab); color: var(--on-dark); padding: 18px 20px; text-decoration: none; margin: 40px 0; }
@media (min-width: 520px) { .clips-link { grid-template-columns: auto 1fr auto; } }
.cl-thumb { width: 56px; height: 56px; border-radius: 14px; background: var(--ink-2); object-fit: contain; padding: 6px; }
.cl-copy { display: grid; gap: 2px; }
.cl-copy .kicker { font-size: 15px; margin: 0; }
.cl-line { font: 400 20px/1.25 var(--serif); }
.cl-arrow { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(251, 248, 242, .55); place-items: center; transition: background-color .15s, color .15s; }
@media (min-width: 520px) { .cl-arrow { display: grid; } }
.clips-link:hover .cl-arrow { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
.clips-wrap .clips-link { max-width: var(--measure); }
.prose .clips-link { color: var(--on-dark); text-decoration: none; } /* .prose a would paint it ink-on-slab */

/* ---------- 11f founding-member box ---------- */
.fm-box { margin-top: 72px; margin-bottom: 24px; padding: 64px 0; }
@media (min-width: 960px) { .fm-box { padding: 96px 0; } }
.fm-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .fm-grid { grid-template-columns: 1fr 440px; gap: 56px; } }
.fm-copy .display { font-size: clamp(36px, 4.8vw, 56px); max-width: 11em; }
.fm-copy .body-lg { margin-top: 18px; }
.fm-mascot { width: 120px; margin-top: 24px; }
@media (min-width: 640px) { .fm-mascot { width: 160px; } }
.fm-card { justify-self: center; }
.fm-card .checks { margin-top: 18px; }
.fm-card .micro { text-align: center; }
.fm-card .price-num { font-size: 84px; }

/* ---------- forms of chips ---------- */
.chip-light { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 15.5px/1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.chip-light:hover { background: var(--paper); }
.chip-light[aria-current="true"], .chip-light[aria-pressed="true"], .chip-light[aria-checked="true"] { background: var(--saffron); transform: rotate(-3deg); }
.chip-toggle[aria-pressed="false"] { text-decoration: line-through; text-decoration-color: var(--muted); }
.chip-toggle[aria-pressed] { transform: none; }
.filters { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px var(--gutter); margin: 0 calc(-1 * var(--gutter)) 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters > * { scroll-snap-align: start; flex: none; }

/* ---------- /learn index ---------- */
.learn-hero, .tools-hero { padding-top: 40px; padding-bottom: 32px; }
.lh-grid, .th-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .lh-grid { grid-template-columns: 1fr 220px; } .th-grid { grid-template-columns: 1fr 380px; } }
.learn-hero .display, .tools-hero .display, .tool-hero .display { font-size: clamp(40px, 6vw, 76px); max-width: 12em; }
.learn-hero .body-lg, .tools-hero .body-lg { margin-top: 20px; }
.lh-mascot { display: none; width: 200px; }
@media (min-width: 960px) { .lh-mascot { display: block; } }
.feature-post { display: grid; border-radius: var(--slab-r); overflow: hidden; text-decoration: none; color: var(--on-dark); margin-bottom: 44px; }
@media (min-width: 960px) { .feature-post { grid-template-columns: 1fr 1fr; } .feature-post .fp-art { order: 2; } }
.fp-art .post-art { aspect-ratio: 4 / 3; border-radius: 0; height: 100%; }
@media (min-width: 960px) { .fp-art .post-art { min-height: 360px; aspect-ratio: auto; } }
.fp-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px 24px; }
@media (min-width: 960px) { .fp-copy { padding: 48px; justify-content: center; } }
.fp-title { font: 400 clamp(30px, 3.6vw, 46px)/1.08 var(--serif); letter-spacing: -.018em; }
.fp-excerpt { color: var(--on-dark-muted); font-size: 17px; line-height: 1.55; }
.fp-meta { font-size: 14px; color: var(--on-dark-muted); }
.btn-on-dark { color: var(--on-dark); border-color: rgba(251, 248, 242, .65); }
.feature-post:hover .btn-on-dark { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
.post-grid { display: grid; gap: 32px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.post-card[hidden] { display: none; }
.post-art { display: grid; place-content: center; justify-items: center; aspect-ratio: 3 / 2; border-radius: 20px; overflow: hidden; transition: transform .2s ease; color: var(--ink); }
.post-card:hover .post-art { transform: translateY(-2px); }
.art-start { background: var(--tan); }
.art-spoken { background: var(--saffron-soft); }
.art-script { background: var(--cream-2); }
.art-family { background: #d6e2dc; }
.art-immersion { background: var(--slab); color: var(--saffron); }
.art-glyph { font: 500 clamp(44px, 7vw, 64px)/1.1 var(--ta-serif); }
.art-tr { font: italic 400 18px/1 var(--serif); color: var(--ink-2); opacity: .75; }
.post-art-big .art-glyph { font-size: clamp(72px, 12vw, 132px); }
.post-art-big.art-start, .post-art-big.art-spoken, .post-art-big.art-script, .post-art-big.art-family { background: radial-gradient(60% 50% at 18% 18%, rgba(240, 150, 70, .85), transparent 70%), radial-gradient(55% 60% at 88% 26%, rgba(46, 96, 104, .9), transparent 70%), radial-gradient(70% 55% at 40% 70%, rgba(150, 62, 30, .95), transparent 75%), #3a2219; color: var(--on-dark); }
.post-art-big .art-tr { color: var(--tan); }
.art-play { width: 64px; height: 64px; }
.pc-meta { font: 600 12.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.pc-title { font: 400 24px/1.15 var(--serif); letter-spacing: -.01em; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 2px; transition: text-decoration-color .15s; }
.post-card:hover .pc-title { text-decoration-color: var(--saffron); }
.pc-excerpt { font-size: 15.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty-pillar { margin-top: 24px; color: var(--muted); }
.tools-strip { background: var(--cream-2); padding: 56px 0; margin-top: 72px; }
.ts-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ts-head .section-h { margin: 0; }
.keep-reading { margin-top: 72px; }

/* ---------- tools index ---------- */
.promo-card { position: relative; display: grid; gap: 6px; padding: 28px 28px 24px; border-radius: 28px; text-decoration: none; color: var(--on-dark); overflow: hidden; }
.promo-card img { width: 110px; justify-self: end; margin: -8px -6px 0 0; }
.pc-k { font: italic 400 17px var(--serif); color: var(--tan-2); }
.pc-t { font: 400 26px/1.15 var(--serif); padding-right: 48px; }
.promo-card .circle-arrow { position: absolute; right: 22px; bottom: 22px; border-color: rgba(251, 248, 242, .55); }
.promo-card:hover .circle-arrow { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
.tool-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } .tool-card-feature { grid-column: span 2; } }
@media (min-width: 1100px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .tool-grid-3 .tool-card-feature { grid-column: auto; } }
.tool-card { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-height: 220px; padding: 24px 22px 20px; border: 1.5px solid var(--ink); border-radius: 24px; background: var(--paper); text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; min-width: 0; }
.tool-card:hover { box-shadow: 3px 4px 0 var(--ink); transform: translate(-1px, -2px); }
.badge-free { position: absolute; top: 18px; right: 18px; font: 650 12px/1.4 var(--sans); padding: 3px 10px; border-radius: 999px; background: #dfe9d8; color: var(--forest); }
.tc-icon { display: grid; place-items: center; min-width: 56px; width: fit-content; height: 56px; padding: 0 10px; border-radius: 16px; background: var(--saffron-soft); font: 500 24px/1 var(--ta-serif); }
.tc-name { font: 400 26px/1.1 var(--serif); letter-spacing: -.01em; padding-right: 48px; }
.tc-desc { font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.tc-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--cream); font-size: 22px; }
.tc-demo-in { font: italic 22px var(--serif); } .tc-demo-out { font: 600 24px var(--ta-sans); } .tc-demo-arrow { color: var(--muted); }
.tc-foot { display: flex; justify-content: space-between; align-items: center; }
.circle-arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); transition: background-color .15s; }
.tool-card:hover .circle-arrow { background: var(--saffron); }

/* ---------- post ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--saffron); z-index: 50; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .progress { display: none; } }
.post-hero { padding-top: 36px; padding-bottom: 8px; max-width: calc(1032px + 2 * var(--gutter)); }
.post-tag { margin: 4px 0 18px; }
.post-title { font-size: clamp(40px, 5.6vw, 68px); max-width: 14em; }
.post-dek { max-width: 34em; margin-top: 20px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.meta-by { display: inline-flex; align-items: center; gap: 8px; }
.meta-by img { width: 28px; height: 28px; border-radius: 50%; background: var(--cream-2); object-fit: contain; padding: 2px; }
.meta-by strong { color: var(--ink); font-weight: 600; }
.meta-rev { display: inline-flex; align-items: center; gap: 5px; color: var(--forest); font-weight: 600; }
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; margin-top: 36px; max-width: calc(1032px + 2 * var(--gutter)); }
@media (min-width: 960px) { .article { grid-template-columns: minmax(0, var(--measure)) 240px; gap: 56px; justify-content: space-between; } }
@media (min-width: 1100px) { .article { grid-template-columns: minmax(0, var(--measure)) 280px; gap: 72px; } }
.toc-rail { display: none; }
@media (min-width: 960px) { .toc-rail { display: block; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; } .toc-mobile { display: none; } }
.toc { border: 1.5px solid var(--line); border-radius: 18px; padding: 18px 18px 12px; background: var(--paper); }
.toc-title, .rail-h { font: 650 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol, .toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.toc a, .toc-mobile a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid transparent; font-size: 15px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--tan-2); }
.toc a.is-active { border-left-color: var(--saffron); color: var(--ink); font-weight: 600; }
.toc-mobile { border: 1.5px solid var(--line); border-radius: 16px; background: var(--paper); margin-bottom: 28px; }
.toc-mobile summary { cursor: pointer; padding: 14px 18px; font-weight: 600; min-height: 44px; }
.toc-mobile ol { padding: 0 12px 12px; }
.rail-h { margin-top: 28px; }
.rail-related { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rail-related a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-decoration: none; font: 400 16px/1.25 var(--serif); }
.rail-related a:hover span:last-child { text-decoration: underline; text-decoration-color: var(--saffron); }
.rail-related .post-art { width: 56px; height: 56px; aspect-ratio: 1; border-radius: 12px; }
.rail-related .art-glyph { font-size: 13px; white-space: nowrap; } .rail-related .art-tr { display: none; } .rail-related .art-play { width: 24px; height: 24px; }
.toc-tool { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--saffron-soft); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
.toc-tool:hover { box-shadow: 0 3px 0 var(--ink); }
.tt-ico { font: 500 17px var(--ta-serif); min-width: 28px; flex: none; white-space: nowrap; }

/* prose */
.prose { max-width: var(--measure); color: var(--ink-2); }
.prose > * + * { margin-top: 18px; }
.prose p, .prose li { font-size: 17px; line-height: 1.75; }
@media (min-width: 640px) { .prose p, .prose li { font-size: 18px; } }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.2vw, 32px); line-height: 1.15; letter-spacing: -.015em; color: var(--ink); margin: 56px 0 14px; scroll-margin-top: 96px; }
.prose h3 { font: 650 20px/1.3 var(--sans); color: var(--ink); margin: 32px 0 8px; scroll-margin-top: 96px; }
.prose h4 { font: 650 17px/1.3 var(--sans); color: var(--ink); margin: 24px 0 6px; }
.prose h2 + *, .prose h3 + * { margin-top: 0; }
.prose a { color: var(--ink); text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose strong { font-weight: 650; color: var(--ink); }
.prose [lang="ta"] { font-size: 1.06em; }
.prose blockquote { margin: 28px 0; padding: 6px 0 6px 18px; border-left: 3px solid var(--saffron); color: var(--ink); font-family: var(--serif); font-size: 20px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose code { font-size: .92em; background: var(--cream-2); padding: 1px 5px; border-radius: 6px; }
.prose img { border-radius: 20px; }
.table-wrap { margin: 28px 0; overflow-x: auto; border: 1.5px solid var(--line); border-radius: 18px; background: var(--paper); }
.table-wrap:focus-visible { outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose th { text-align: left; font: 650 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: var(--cream-2); }
.prose td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; min-width: 7em; }
.prose td:first-child:not(:has(.pair)) { min-width: 0; }
.prose td .pair-cell { min-width: 9em; }
.prose td [lang="ta"] { font-size: 1em; }
@media (max-width: 639px) { .prose table { font-size: 15px; } .prose th, .prose td { padding: 10px 12px; } }
.ex { border-left: 3px solid var(--saffron); padding: 6px 0 6px 18px; margin: 28px 0; }
.callout { position: relative; border-radius: 18px; padding: 16px 20px 16px 20px; font-size: 16px; line-height: 1.6; }
.callout-label { display: block; font: 700 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.callout-tip { background: var(--saffron-soft); }
.callout-note { background: var(--cream-2); }
.callout-warn { background: #f6e0d8; }
.pullquote { font: italic 400 clamp(28px, 4vw, 40px)/1.2 var(--serif); color: var(--ink); text-align: center; max-width: 22ch; margin: 56px auto; text-wrap: balance; }
.byline-card { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; margin-top: 56px; padding: 20px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--paper); font-size: 15px; line-height: 1.55; max-width: var(--measure); }
.byline-card img { width: 56px; height: 56px; border-radius: 50%; background: var(--cream-2); object-fit: contain; padding: 4px; }
.prose-after { margin-top: 40px; }
/* FAQ slab on learn/tool pages */
.learn-faq { margin-top: 88px; padding: 64px 0; }
@media (min-width: 960px) { .learn-faq { padding: 88px 0; } }
.faq-title-sm { font-size: clamp(38px, 5vw, 64px); line-height: 1; margin-bottom: 36px; }
.faq-one { max-width: 860px; grid-template-columns: 1fr !important; }

/* ---------- tool frame ---------- */
.tool-hero { padding-top: 36px; padding-bottom: 28px; }
.tool-hero .lede { margin-top: 18px; max-width: 34em; }
.benefits { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 0; padding: 0; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.benefits li { display: inline-flex; align-items: center; gap: 6px; }
.benefits svg { color: var(--forest); }
.tool-main { margin-top: 8px; }
.howto { margin-top: 80px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.steps li { counter-increment: s; position: relative; padding: 22px 20px 20px 20px; border-radius: 20px; background: var(--cream-2); display: grid; gap: 6px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--ink); font: 600 15px var(--sans); background: var(--paper); margin-bottom: 4px; }
.steps strong { font: 400 21px/1.2 var(--serif); color: var(--ink); }
.explainer { margin-top: 32px; }
.related-tools { margin-top: 72px; }
.tool-p { max-width: var(--measure); color: var(--ink-2); line-height: 1.7; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 14.5px; gap: 6px; }
.mini-btn { background: none; border: 0; padding: 6px 8px; min-height: 36px; font: 600 13.5px var(--sans); color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--tan-2); text-underline-offset: 4px; }
.mini-btn:hover { color: var(--ink); }
.soft-err { font-size: 14px; color: var(--muted); }
.soft-err[hidden] { display: none; }
.wrap-narrow { max-width: var(--tool-w); margin-left: auto; margin-right: auto; }
.copied-tag { position: absolute; top: -14px; right: 12px; animation: pop .25s ease-out both; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .copied-tag { animation: none; } }

.seg { display: inline-flex; gap: 2px; border: 1.5px solid var(--ink); border-radius: 12px; padding: 3px; background: var(--paper); max-width: 100%; }
.seg-btn { border: 0; background: transparent; border-radius: 9px; padding: 8px 14px; min-height: 40px; font: 600 14.5px/1.2 var(--sans); cursor: pointer; white-space: nowrap; color: var(--ink); }
.seg-btn:hover { background: var(--cream-2); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.seg-scroll { overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.keys { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: thin; }
.keys[hidden] { display: none; }
.key { flex: none; min-height: 44px; padding: 6px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); font: 600 15px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.key [lang="ta"] { font: 500 20px var(--ta-sans); }
.key:hover { border-color: var(--ink); }
.key[aria-pressed="true"] { background: var(--saffron-soft); border-color: var(--saffron); }

/* ---------- transliterator ---------- */
.tool-card-xl { max-width: var(--tool-w); margin: 0 auto; border: 1.5px solid var(--ink); border-radius: 28px; background: var(--paper); box-shadow: 4px 6px 0 var(--ink); padding: 14px; position: relative; }
.tl-head { padding: 4px 2px 12px; }
.tl-head .seg { display: flex; width: 100%; }
.tl-head .seg-btn { flex: 1; white-space: normal; }
@media (min-width: 640px) { .tl-head .seg { display: inline-flex; width: auto; } .tl-head .seg-btn { flex: none; } }
.io { display: grid; gap: 10px; }
@media (min-width: 760px) { .io { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; } }
.pane { border-radius: 20px; background: var(--cream); padding: 14px 16px 10px; display: flex; flex-direction: column; min-height: 190px; min-width: 0; }
@media (min-width: 760px) { .pane { min-height: 220px; } }
.pane-top, .pane-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; }
.pane-foot { margin-top: auto; padding-top: 6px; }
.pane-label { font: 650 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pane-actions { display: flex; gap: 2px; }
.pane textarea { flex: 1; width: 100%; min-height: 110px; border: 0; background: transparent; resize: vertical; color: var(--ink); padding: 4px 0; font: 500 24px/1.5 var(--ta-sans); }
.pane textarea.is-roman { font: italic 400 22px/1.45 var(--serif); }
.pane textarea:focus { outline: none; }
.pane:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.char-count { font-size: 13px; color: var(--muted); }
.tl-out { display: block; flex: 1; padding: 4px 0; font: italic 400 22px/1.45 var(--serif); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-out.is-tamil { font: 500 24px/1.5 var(--ta-sans); }
.pane-out.is-filled { background: var(--saffron-soft); }
.tl-out.is-ghost { color: var(--muted); opacity: .75; }
.swap { align-self: center; justify-self: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); display: grid; place-items: center; cursor: pointer; transition: transform .2s; color: var(--ink); }
.swap:hover { background: var(--saffron-soft); }
@media (min-width: 760px) { .swap svg { transform: rotate(90deg); } }
.swap.spin { transform: rotate(180deg); }
.tl-mixed { margin-top: 12px; }
.tl-mixed[hidden] { display: none; }
.scheme { margin-top: 18px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--paper); }
.scheme summary { cursor: pointer; padding: 14px 18px; font-weight: 600; min-height: 44px; }
.scheme .phrase-list { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; }
.scheme-row { display: grid; grid-template-columns: 70px 90px 1fr; gap: 6px 12px; align-items: baseline; font-size: 15px; }
@media (max-width: 520px) { .scheme-row { grid-template-columns: 56px 1fr; } .sch-note { grid-column: 1 / -1; } }
.sch-lat { font: italic 600 19px var(--serif); }
.sch-ta [lang="ta"] { font-size: 20px; margin-right: 6px; }
.sch-note { color: var(--muted); }
.wbw-wrap { max-width: var(--tool-w); margin: 40px auto 0; }
.wbw-wrap[hidden] { display: none; }
.wbw { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wbw-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 40px; align-items: center; gap: 8px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--paper); }
.wbw-row .w-ta { font: 500 22px/1.35 var(--ta-sans); overflow-wrap: anywhere; }
.wbw-row .w-la { font: italic 400 19px/1.3 var(--serif); overflow-wrap: anywhere; }
.wbw-row .w-arrow { color: var(--muted); text-align: center; }
.wbw-row.is-guess { border-style: dashed; }
.wbw-row .tag-mini { margin-left: 6px; font-style: normal; font-family: var(--sans); }
@media (max-width: 520px) { .wbw-row { grid-template-columns: 1fr 40px; } .wbw-row .w-arrow { display: none; } .wbw-row .w-la { grid-row: 2; } .wbw-row .say { grid-column: 2; grid-row: 1; } }

/* ---------- alphabet ---------- */
.alpha-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.alpha-bar .seg { max-width: 100%; }
.alpha-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alpha-actions .chip-light { min-height: 40px; padding: 6px 14px; font-size: 14.5px; }
.alpha-grid { display: grid; gap: 28px; }
@media (min-width: 960px) { .alpha-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.alpha-letters { min-width: 0; }
.lgroup[hidden] { display: none; }
.lgroup + .lgroup { margin-top: 44px; }
.grid-h { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; font: 400 26px/1.2 var(--serif); text-align: center; margin: 0 0 6px; }
.grid-h::before, .grid-h::after { content: ""; border-top: 1px solid var(--line); }
.grid-sub { text-align: center; font-size: 15px; color: var(--muted); margin: 0 auto 18px; max-width: 40em; }
.grid-h3 { font: 600 15px/1.4 var(--sans); color: var(--ink-2); margin: 22px 0 10px; }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
@media (max-width: 400px) { .letters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lt { position: relative; aspect-ratio: 1 / 1.05; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); display: grid; place-content: center; gap: 2px; box-shadow: 0 3px 0 var(--line); cursor: pointer; padding: 4px; color: var(--ink); min-width: 0; }
.lt:hover { border-color: var(--ink); }
.lt:active { transform: translateY(2px); box-shadow: none; }
.lt[aria-pressed="true"] { background: var(--saffron-soft); border-color: var(--saffron); box-shadow: 0 3px 0 var(--saffron); }
.lt.is-playing::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 7px; height: 3px; border-radius: 3px; background: var(--saffron); }
.lt-g { font: 500 34px/1.1 var(--ta-serif); }
@media (max-width: 400px) { .lt-g { font-size: 28px; } }
.lt-r { font: italic 14px/1.2 var(--serif); color: var(--muted); display: block; }
.umatrix-wrap { overflow: auto; max-height: 70vh; border: 1.5px solid var(--line); border-radius: 18px; background: var(--paper); }
.umatrix { border-collapse: separate; border-spacing: 4px; }
.umatrix th { position: sticky; background: var(--paper); font-weight: 500; z-index: 1; }
.umatrix thead th { top: 0; font: 500 20px var(--ta-serif); padding: 6px 2px; }
.umatrix tbody th { left: 0; font: 500 20px var(--ta-serif); padding: 0 8px; }
.umatrix thead th:first-child { left: 0; z-index: 2; }
.umatrix th .lt-r { font-size: 12px; }
.umatrix .lt { width: 62px; aspect-ratio: 1; }
@media (min-width: 960px) { .umatrix { border-spacing: 3px; } .umatrix .lt { width: 52px; } .umatrix .lt-g { font-size: 21px !important; } .umatrix tbody th { padding: 0 4px; } }
.umatrix .lt-g { font-size: 24px; } .umatrix .lt-r { font-size: 12px; }
.cons-pick { padding-top: 0; margin-bottom: 12px; }
.letters-pick[hidden], .cons-pick[hidden] { display: none; }
.is-picker .umatrix-wrap { display: none; }
.print-title { display: none; }
.letter-panel { display: none; }
@media (min-width: 960px) { .letter-panel { display: block; position: sticky; top: 96px; border-radius: 28px; background: var(--slab); color: var(--on-dark); padding: 28px; min-height: 320px; } }
.lp-empty { color: var(--on-dark-muted); font-size: 16px; }
.lp-glyph { font: 500 120px/1.1 var(--ta-serif); text-align: center; }
.lp-tr { font: italic 400 28px/1.2 var(--serif); color: var(--tan); text-align: center; }
.lp-play { display: flex; justify-content: center; margin: 14px 0; }
.lp-rows { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--slab-line); font-size: 15px; line-height: 1.5; color: var(--on-dark-muted); }
.lp-rows b { display: block; font: 650 11.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); }
.lp-rows span[lang="ta"] { color: var(--on-dark); }
.lp-ex { margin-top: 14px; }
.lp-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.lp-nav button { min-height: 40px; padding: 6px 14px; border-radius: 10px; border: 1.5px solid rgba(251, 248, 242, .5); background: transparent; color: var(--on-dark); font-weight: 600; cursor: pointer; }
.lp-nav button:hover { border-color: var(--on-dark); }
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 82dvh; border: 0; border-radius: 28px 28px 0 0; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--slab); color: var(--on-dark); overflow-y: auto; }
dialog.sheet::backdrop { background: rgba(42, 31, 26, .5); }
dialog.sheet .ph-handle { top: 10px; width: 44px; height: 5px; background: rgba(251, 248, 242, .35); }
dialog.sheet .modal-x { background: transparent; border-color: rgba(251, 248, 242, .4); color: var(--on-dark); }
dialog.sheet .lp-glyph { font-size: 88px; }

/* ---------- numbers ---------- */
.num-card { max-width: 640px; padding: 20px; display: grid; gap: 8px; z-index: 1; }
.num-input { font: 500 44px/1.1 var(--serif); border: 0; background: var(--cream); border-radius: 20px; padding: 18px 20px; width: 100%; color: var(--ink); min-width: 0; }
.num-input:focus { outline: none; box-shadow: 0 0 0 2px var(--ink); }
.num-card .keys { padding-top: 6px; }
.num-result { max-width: 640px; margin: -12px auto 0; border-radius: 0 0 28px 28px; padding: 36px 24px 26px; }
@media (min-width: 640px) { .num-result { padding: 40px 28px 28px; } }
.nr-label { font: 650 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }
.nr-hero { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; margin-top: 8px; }
.nr-hero .nr-say { grid-row: 1 / span 2; }
.nr-hero .nr-say:empty { display: none; }
.nr-hero:has(.nr-say:empty) { grid-template-columns: 1fr; }
.nr-ta { font: 600 clamp(28px, 5vw, 38px)/1.3 var(--ta-sans); overflow-wrap: anywhere; }
.nr-tr { font: italic 400 22px/1.3 var(--serif); color: var(--tan); overflow-wrap: anywhere; }
.nr-cells { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--slab-line); margin-top: 20px; }
@media (min-width: 560px) { .nr-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nr-cell { position: relative; padding: 14px 40px 12px 0; border-bottom: 1px solid var(--slab-line); min-width: 0; }
@media (min-width: 560px) { .nr-cell { border-bottom: 0; padding-right: 36px; } .nr-cell + .nr-cell { padding-left: 14px; border-left: 1px solid var(--slab-line); } }
.nr-v { font-size: 17px; margin-top: 4px; overflow-wrap: anywhere; }
.nr-numeral, .nr-trad { font: 500 26px/1.3 var(--ta-serif); }
.nr-formal [lang="ta"] { display: block; font: 600 17px/1.4 var(--ta-sans); }
.nr-sub { display: block; font: italic 15px var(--serif); color: var(--on-dark-muted); }
.copy-ico { position: absolute; top: 10px; right: 0; width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid rgba(251, 248, 242, .35); background: transparent; color: var(--on-dark); display: grid; place-items: center; cursor: pointer; }
.copy-ico::after { content: ""; position: absolute; inset: -6px; }
.copy-ico:hover { border-color: var(--on-dark); }
.copy-ico.done { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
.nr-note { margin-top: 14px; font-size: 14.5px; color: var(--on-dark-muted); }
.nr-note:empty { display: none; }
.numbers > .section-h { margin-top: 72px; }
.num-zero { margin-bottom: 8px; color: var(--ink-2); }
.num-h { font: 600 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 24px 0 10px; }
.num-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
@media (max-width: 400px) { .num-table { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.num-cell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; text-align: left; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--paper); cursor: pointer; color: var(--ink); min-width: 0; }
.num-cell:disabled { cursor: default; }
.num-cell:not(:disabled):hover { border-color: var(--ink); }
.num-cell.is-playing { background: var(--saffron-soft); border-color: var(--saffron); }
.nc-n { display: flex; align-items: baseline; gap: 8px; font: 400 26px/1 var(--serif); }
.nc-ta { font: 400 15px/1.4 var(--ta-serif); color: var(--muted); }
.nc-w { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.nc-w > [lang="ta"] { font: 600 16px/1.3 var(--ta-sans); overflow-wrap: break-word; }
.nc-tr { font: italic 14px/1.3 var(--serif); color: var(--muted); overflow-wrap: break-word; }
.nc-sp { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: break-word; }
.nc-sp [lang="ta"] { font-size: 13px; }
.numbers .callout { margin-top: 28px; max-width: var(--measure); }
.pair-row .pair-en { color: var(--muted); }

/* ---------- family words ---------- */
.rel-builder { max-width: var(--tool-w); margin: 0; }
.rel-sentence { font: 400 clamp(24px, 3.4vw, 32px)/1.3 var(--serif); margin-bottom: 18px; }
.rel-sentence u { text-decoration-color: var(--saffron); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.rel-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.rel-row-label { width: 100%; font: 650 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rel-row[hidden] { display: none; }
.rel-result { max-width: var(--tool-w); margin: 24px 0 0; border-radius: 28px; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 6px 0 var(--ink); padding: 28px 22px 22px; position: relative; }
@media (min-width: 640px) { .rel-result { padding: 32px 30px 26px; } }
.rel-result .tag { margin-bottom: 18px; }
.rel-forms { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15.5px; }
.rel-forms .tag-mini { margin-right: 8px; }
.rel-note { margin-top: 12px; color: var(--muted); font-size: 15px; }
.rel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.rel-browse { margin-top: 64px; }
.rel-tabs { margin-bottom: 18px; }
.rel-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.rel-grid[hidden], .rel-side-h[hidden] { display: none; }
@media (min-width: 640px) { .rel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .rel-grid { grid-template-columns: repeat(3, 1fr); } }
.rel-card { position: relative; border: 1.5px solid var(--ink); border-radius: 20px; background: var(--cream); padding: 16px 18px; display: grid; gap: 8px; min-width: 0; }
.rel-card[hidden] { display: none; }
.rel-card h3 { font: 400 21px/1.2 var(--serif); padding-right: 44px; }
.rel-card > .say { position: absolute; top: 14px; right: 14px; }
.rel-card .pair { grid-template-columns: 1fr; }
.rel-card .rel-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-card .rel-meta span { font-size: 13.5px; color: var(--muted); }

/* ---------- spoken vs written ---------- */
.sw-tools { max-width: var(--tool-w); margin: 0 auto 20px; display: grid; gap: 12px; }
.sw-search { font: inherit; font-size: 17px; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 1.5px solid #d6c8b3; background: var(--paper); color: var(--ink); width: 100%; }
.sw-search:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--saffron-soft); }
.sw-view { justify-self: start; }
.sw-list { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 18px; max-width: var(--tool-w); }
.sw-item[hidden] { display: none; }
.sw-en { font: 400 22px/1.25 var(--serif); margin-bottom: 10px; }
.sw-pair { display: grid; grid-template-columns: 1fr; border: 1.5px solid var(--ink); border-radius: 24px; overflow: hidden; background: var(--paper); }
@media (min-width: 700px) { .sw-pair { grid-template-columns: 1fr 1fr; } .sw-col + .sw-col { border-left: 1.5px solid var(--ink); } }
@media (max-width: 699px) { .sw-col + .sw-col { border-top: 1.5px solid var(--ink); } }
.sw-col { padding: 0 0 16px; min-width: 0; }
.sw-col-h { font: 650 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 10px 18px; background: var(--cream-2); margin-bottom: 12px; }
.sw-col-spoken .sw-col-h { background: var(--saffron-soft); }
.sw-col .pair { padding: 0 18px; }
.sw-col .pair-ta { font-size: 24px; } .sw-col .pair-tr { font-size: 18px; }
del.sw-gone { background: var(--del-bg); text-decoration: line-through; text-decoration-color: var(--del-ink); text-decoration-thickness: 1.5px; border-radius: 4px; padding: 0 2px; }
ins.sw-new { background: var(--ok-bg); text-decoration: none; border-bottom: 2px solid var(--forest); border-radius: 4px; padding: 0 2px; }
.sw-inline { display: none; padding: 16px 18px; }
.sw-mode-inline .sw-pair { display: none; } .sw-mode-inline .sw-inline { display: block; border: 1.5px solid var(--ink); border-radius: 24px; background: var(--paper); }
.sw-inline .pair-ta { font-size: 24px; }
.sw-why { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sw-why li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.sw-more { display: flex; justify-content: center; margin-top: 18px; }
.sw-empty { text-align: center; color: var(--muted); }

/* ---------- months & days ---------- */
.today { max-width: 720px; margin: 0 auto; border-radius: 28px; padding: 24px 18px; }
@media (min-width: 640px) { .today { padding: 28px; } }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.wk-day { display: grid; justify-items: center; gap: 2px; background: none; border: 0; color: var(--on-dark); cursor: pointer; padding: 6px 0; border-radius: 12px; min-width: 0; }
.wk-ab { display: none; font: 600 16px/1.2 var(--ta-sans); }
@media (max-width: 420px) { .wk-day .wk-ta, .wk-day .wk-tr { display: none; } .wk-day .wk-ab { display: block; } }
.wk-day:hover { background: rgba(251, 248, 242, .07); }
.wk-ta { font: 500 15px/1.2 var(--ta-sans); }
.wk-tr { font: italic 12px/1.2 var(--serif); color: var(--on-dark-muted); overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wk-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--slab-line); font: 600 15px var(--sans); margin-top: 4px; }
.wk-day[aria-current="date"] .wk-n { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.wk-day[aria-pressed="true"] .wk-n { border-color: var(--on-dark); }
.today-body { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--slab-line); display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.today-h { font: 400 clamp(28px, 4.6vw, 44px)/1.15 var(--serif); }
.today-h [lang="ta"] { font-family: var(--ta-sans); font-weight: 600; font-size: .82em; overflow-wrap: anywhere; }
.today-sub { font: italic 18px var(--serif); color: var(--tan); grid-column: 1; }
.today-body .say { grid-column: 2; grid-row: 1 / span 2; }
.today-month { margin-top: 18px; font-size: 16px; color: var(--on-dark-muted); }
.today-month strong { color: var(--on-dark); font-weight: 600; }
.today-note { margin-top: 12px; font-size: 14px; color: var(--on-dark-muted); border-top: 1px dashed var(--slab-line); padding-top: 12px; }
.md-section { margin-top: 64px; }
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
@media (max-width: 400px) { .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.month { position: relative; border-radius: 18px; background: var(--cream-2); padding: 14px 16px; display: grid; gap: 2px; min-width: 0; border: 1.5px solid transparent; }
.month.is-now { background: var(--saffron-soft); border-color: var(--saffron); }
.month .m-n { font: 600 12px var(--sans); color: var(--muted); letter-spacing: .08em; }
.month .m-ta { font: 600 19px/1.3 var(--ta-sans); overflow-wrap: anywhere; }
.month .m-tr { font: italic 16px var(--serif); color: var(--muted); }
.month .m-span { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.month .say { position: absolute; top: 10px; right: 10px; }
.month .tag-mini { justify-self: start; margin-top: 6px; background: var(--saffron); }
.day-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
@media (max-width: 560px) { .day-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } .day-row > .tag-mini { justify-self: start; margin-left: 54px; white-space: normal; max-width: calc(100% - 54px); } }

/* ---------- level check ---------- */
.quiz-wrap { max-width: 640px; margin: 0 auto; }
.quiz { border-radius: 32px; padding: 22px 20px 22px; color: var(--on-dark); }
@media (min-width: 640px) { .quiz { padding: 26px 26px 24px; } }
.q-step[hidden] { display: none; }
.q-top { display: flex; justify-content: space-between; align-items: center; font: 600 13px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); min-height: 32px; }
.q-exit { color: var(--on-dark-muted); text-decoration: none; text-transform: none; letter-spacing: 0; font-size: 14.5px; }
.q-exit:hover { color: var(--on-dark); }
.q-progress { display: flex; gap: 5px; margin: 10px 0 18px; }
.q-progress i { flex: 1; height: 5px; border-radius: 3px; background: rgba(251, 248, 242, .2); }
.q-progress i.done { background: var(--on-dark); } .q-progress i.cur { background: var(--saffron); }
.q-prompt { font: 400 28px/1.2 var(--serif); margin: 6px 0 10px; }
.q-prompt:focus { outline: none; }
.q-sub { color: var(--on-dark-muted); font-size: 16px; line-height: 1.55; margin-top: 10px; }
.q-head { display: flex; gap: 8px; align-items: center; }
.q-start { margin-top: 24px; }
.q-player { display: grid; justify-items: center; gap: 12px; margin-top: 8px; }
.q-video { position: relative; width: min(100%, 360px); aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #1a1411; }
.q-video.is-tall { width: min(62%, 220px); aspect-ratio: 9 / 16; }
.q-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.55); transform: scale(1.1); }
.q-yt-slot, .q-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.q-video iframe { pointer-events: none; }
.q-video.is-hidden-video iframe { opacity: 0; }
.q-play { margin-top: -60px; position: relative; z-index: 2; background: rgba(42, 31, 26, .85) !important; border-color: var(--on-dark) !important; }
.q-play.is-playing { background: var(--saffron) !important; color: var(--ink); border-color: var(--saffron) !important; }
.q-play:disabled { opacity: .6; cursor: default; }
.q-ctrl { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--on-dark-muted); }
.link-on-dark { color: var(--on-dark); text-decoration-color: rgba(251, 248, 242, .45); font-size: 15px; }
.link-on-dark:disabled { opacity: .45; cursor: default; }
.q-fallback { background: rgba(251, 248, 242, .08); border-radius: 14px; padding: 12px 14px; font-size: 15px; color: var(--on-dark-muted); text-align: center; }
.q-fallback [lang="ta"] { display: block; font: 600 22px/1.4 var(--ta-sans); color: var(--on-dark); }
.q-fallback .tr-in { display: block; color: var(--tan); }
.opts { list-style: none; display: grid; gap: 10px; margin: 24px 0 0; padding: 0; }
.opt { width: 100%; min-height: 56px; border-radius: 16px; border: 1.5px solid rgba(251, 248, 242, .4); background: transparent; color: var(--on-dark); text-align: left; padding: 12px 16px 12px 52px; position: relative; font: 500 17px/1.35 var(--sans); cursor: pointer; }
.opt:hover { border-color: var(--on-dark); background: rgba(251, 248, 242, .05); }
.opt-n { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 1.5px solid currentColor; border-radius: 8px; font-size: 13px; display: grid; place-items: center; }
.opt[aria-pressed="true"] { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
.opt-idk { font-style: italic; color: var(--on-dark-muted); }
.q-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.q-src { font-size: 12.5px; color: rgba(251, 248, 242, .6); text-align: right; }
.q-src a { color: var(--on-dark-muted); }
.level-result { border-radius: 26px; background: var(--saffron-soft); border: 1.5px solid var(--ink); color: var(--ink); padding: 32px 22px 24px; text-align: center; display: grid; justify-items: center; }
.lr-mascot { width: 120px; margin-bottom: 8px; }
.level-result .kicker { margin: 0; }
.lr-name { font-size: 48px; margin: 4px 0 12px; }
.lr-name:focus { outline: none; }
.lr-score-label { font: 650 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lr-score { font: 400 56px/1 var(--serif); margin: 4px 0 14px; }
.lr-rec { max-width: 30em; color: var(--ink-2); }
.lr-sources { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 22px; padding: 0; }
.lr-sources li { padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--ink); font-weight: 600; font-size: 14.5px; }
.level-result .btn + .btn { margin-top: 10px; }
.lr-more { margin-top: 12px; color: var(--muted); }
.lr-shared { display: block; font-size: 14px; color: var(--forest); font-weight: 600; min-height: 1em; }
.lr-review { margin-top: 12px; text-align: left; width: 100%; }
.lr-review summary { cursor: pointer; font-weight: 600; text-align: center; min-height: 44px; display: grid; place-items: center; }
.lr-lines { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; }
.lr-lines [lang="ta"] { display: block; font: 600 18px/1.4 var(--ta-sans); }

/* ---------- print (alphabet chart) ---------- */
@media print {
  .nav, .footer, .fm-box, .letter-panel, .alpha-bar, .tool-hero .benefits, .howto, .explainer, .clips-wrap, .learn-faq, .related-tools, .keep-reading, .crumbs, .skip, dialog, .progress, .cons-pick, .tool-hero .lede { display: none !important; }
  body { background: #fff; }
  .print-title { display: block; font: 600 13px var(--sans); margin-bottom: 8px; }
  .lgroup[hidden] { display: block !important; }
  .letters { grid-template-columns: repeat(6, 1fr) !important; }
  .lt { border: 1px solid #999; box-shadow: none; break-inside: avoid; aspect-ratio: auto; padding: 6px; }
  .umatrix-wrap { max-height: none; overflow: visible; border: 0; }
  .umatrix .lt { width: 44px; } .umatrix .lt-g { font-size: 18px; }
  .lgroup[data-group="combined"] { break-before: page; }
  .tool-hero { padding-top: 0; }
  .tool-hero .display { font-size: 28px; }
}

/* ---------- QA fixes ---------- */
.sw-why li { display: block; }
.sw-why li .tag-mini, .rel-forms .tag-mini { margin-right: 8px; }
.rel-card { align-content: start; }
.rel-card .rel-meta { flex-direction: column; align-items: flex-start; }
.rel-card .rel-meta .tag-mini { margin-right: 6px; }
.rel-card .rel-meta [lang="ta"] { margin-right: 4px; }
.wk-ta { font-size: clamp(11px, 3.1vw, 15px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wk-tr { white-space: nowrap; font-size: clamp(10px, 2.8vw, 12px); }
.rel-term .pair-lg { margin-top: 4px; }

/* Phones: 3+ column prose tables stack into one labelled card per row (no hidden sideways scroll) */
@media (max-width: 639px) {
  .table-stack { overflow-x: visible; }
  .table-stack table, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-stack tr { padding: 12px 14px; }
  .table-stack tr + tr { border-top: 1px solid var(--line); }
  .prose .table-stack td { border-top: 0; padding: 3px 0; min-width: 0; }
  .prose .table-stack td .pair-cell { min-width: 0; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font: 650 11px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .table-stack td:first-child::before { display: none; }
  .table-stack td:first-child { font-weight: 600; }
  .table-stack td:empty { display: none; }
}
/* keep rows aligned when one clip is hidden (flagged audio): reserve the button column */
.pair-row > .pair:not(:has(> .say)) { padding-left: 54px; }
/* combined-letter matrix: wide glyphs (கொ, கௌ, ஞை…) widen their own tile instead of spilling into neighbours */
.umatrix .lt { width: auto; min-width: 62px; height: 62px; aspect-ratio: auto; padding: 0 4px; }
.umatrix .lt-g { white-space: nowrap; }
@media (min-width: 960px) { .umatrix .lt { min-width: 48px; height: 50px; padding: 0 3px; } .umatrix .lt-g { font-size: 19px !important; } }

