/* Thamizh.ai — five-tiṇai theme. Black and white base; colour comes from
   the landscapes. Red never sits next to black. */
:root {
  --ink: #161616;
  --ink-2: #3A3A3A;
  --muted: #5E5E5E;
  --line: #DDDDD8;
  --rule: #EDEDEA;
  --ground: #F7F7F5;
  --card: #FFFFFF;
  --tint: #EFEFEC;
  --soft: #F1F1EE;
  --gold: #E8C26A;      /* on black only */
  --ochre: #8A5A00;     /* highlights */
  --kurinci: #4B3F8F;
  --mullai: #2F6B3A;
  --marutam: #8A5A00;
  --neytal: #1F5F8B;
  --palai: #A8321F;
  --ui: Inter, Catamaran, system-ui, sans-serif;
  --ta: 'Noto Serif Tamil', serif;
  --ta-ui: Catamaran, Inter, sans-serif;
  --wrap: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ui); color: var(--ink); background: var(--ground); line-height: 1.5; }
a { color: var(--ink); }
a:hover { color: #444; }
img, svg { display: block; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
[lang="ta"] { font-family: var(--ta); }
.ta-ui { font-family: var(--ta-ui); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hidden { display: none !important; }

/* five-colour band */
.band { display: flex; height: 8px; }
.band span { flex: 1 1 0; }
.band .k { background: var(--kurinci); } .band .m { background: var(--mullai); }
.band .r { background: var(--marutam); } .band .n { background: var(--neytal); }
.band .p { background: var(--palai); }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--ground); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 38px; height: 38px; border-radius: 9px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--ta); font-size: 22px; font-weight: 700; }
.brand .name { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.crumbs { margin: 0; flex: 1 1 auto; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs strong { color: var(--ink); }
.navlinks { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 15px; font-weight: 500; }
.navlinks a { color: var(--ink-2); text-decoration: none; padding: 12px 0; display: inline-block; }
.navlinks a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: var(--muted); }
.site-footer a { color: var(--muted); }

/* type */
h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.07; font-weight: 800; letter-spacing: -.03em; }
h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
h3 { margin: 0; font-size: 19px; font-weight: 700; }
p { margin: 0; }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 600px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
.btn:hover { color: #fff; background: #333; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--tint); color: var(--ink); }
.iconbtn { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #C4C4C0; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.iconbtn[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.cards > * { flex: 1 1 280px; }
a.card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
a.card:hover { border-color: #B8B8B2; color: var(--ink); }
.pill { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--ink-2); }
section.block { padding-top: 56px; padding-bottom: 56px; }

/* home */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 64px; }
.hero > div { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.quote { flex: 1 1 380px; min-width: 0; margin: 0; background: var(--ink); color: #F7F7F5; border-radius: 16px; border-top: 8px solid var(--ochre); padding: 36px; display: flex; flex-direction: column; gap: 18px; }
.quote .eyebrow { color: var(--gold); }
.quote blockquote { margin: 0; font-family: var(--ta); font-size: 36px; line-height: 1.4; font-weight: 600; }
.quote .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quote .chips span { font-size: 13px; padding: 6px 10px; border-radius: 6px; background: #2A2A2A; }
.quote figcaption { border-top: 1px solid #333; padding-top: 16px; font-size: 15px; color: #C8C8C8; }
.door .who { font-size: 13px; font-weight: 600; color: var(--muted); }
.tinai-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.tinai-strip > div { flex: 1 1 170px; color: #fff; border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.tinai-strip .ta { font-family: var(--ta); font-size: 22px; font-weight: 700; }

/* library */
.book { margin-top: 36px; }
.book-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.book-head .ta { font-family: var(--ta); font-size: 26px; font-weight: 700; }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.chapters a { display: flex; gap: 12px; align-items: baseline; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.chapters a:hover { border-color: #B8B8B2; }
.chapters .num { font-size: 13px; color: var(--muted); min-width: 26px; }
.chapters .ta { font-family: var(--ta); font-size: 17px; font-weight: 600; }
.chapters .tr { font-size: 13px; color: var(--muted); }

/* chapter */
.couplets { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.couplets a { display: flex; gap: 20px; align-items: flex-start; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.couplets a:hover { border-color: #B8B8B2; }
.couplets .num { font-weight: 700; min-width: 44px; padding-top: 3px; }
.couplets .ta { font-family: var(--ta); font-size: 19px; line-height: 1.6; font-weight: 600; }
.couplets .tr { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 4px; }

/* reader */
.reader { max-width: 1000px; margin: 0 auto; padding: 32px 24px 0; display: flex; flex-direction: column; gap: 20px; }
.presets, .layers { display: flex; flex-wrap: wrap; gap: 8px; }
.presets button { min-height: 44px; padding: 10px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 15px; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.presets button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.layers { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; gap: 4px; }
.layers button { flex: 1 1 130px; min-height: 52px; border: none; border-radius: 10px; cursor: pointer; padding: 8px 12px; display: flex; align-items: center; gap: 10px; text-align: left; font-weight: 600; font-size: 14px; background: #fff; color: var(--muted); }
.layers button .dot { width: 24px; height: 24px; border-radius: 999px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--rule); color: var(--muted); }
.layers button.on { color: var(--ink); }
.layers button.on .dot { background: var(--ink); color: #fff; }
.layers button[aria-current="step"] { background: var(--tint); }
.layer { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.layer.dark { background: var(--ink); color: #F7F7F5; border: none; }
.layer.dark .eyebrow { color: var(--gold); }
.layer .meaning { font-size: 22px; line-height: 1.45; font-weight: 600; }
.pending { font-size: 15px; color: var(--muted); }
.layer.dark .pending { color: #C8C8C8; }
.roman { font-size: 22px; line-height: 1.6; font-weight: 500; }
.letters-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.letters-lines { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.letters-line { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lw { display: flex; gap: 3px; }
.lt { min-width: 44px; height: 54px; padding: 0 6px; border-radius: 8px; cursor: pointer; font-family: var(--ta); font-size: 24px; font-weight: 600; background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.lt.n { background: var(--ink); color: #fff; }
.lt.o, .lt.a { border-style: dashed; border-color: #8E8E8E; color: var(--muted); }
.lt[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ochre); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.letter-info { flex: 1 1 220px; min-width: 0; background: var(--soft); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.letter-info .big { font-family: var(--ta); font-size: 52px; font-weight: 700; line-height: 1.15; }
.letter-info .tr { font-size: 20px; font-weight: 700; }
.letter-info .kind { font-size: 15px; font-weight: 600; }
.letter-info .note { font-size: 13px; line-height: 1.5; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 8px; }
.words { display: flex; flex-wrap: wrap; gap: 10px; }
.word { flex: 1 1 130px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.word .ta { font-family: var(--ta); font-size: 19px; font-weight: 600; }
.word .tr { font-size: 13px; color: var(--muted); font-style: italic; }
.metrical { font-family: var(--ta); font-size: 22px; line-height: 1.7; font-weight: 600; }
.feet { display: flex; flex-direction: column; gap: 10px; }
.feet-line { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.foot { width: 168px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 7px; }
.foot .ta { font-family: var(--ta); font-size: 20px; font-weight: 600; }
.foot .tr { font-size: 13px; color: var(--muted); font-style: italic; }
.acai { display: flex; gap: 4px; }
.acai span { flex: 1 1 0; text-align: center; font-size: 12px; font-weight: 600; padding: 5px 2px; border-radius: 5px; border: 1.5px solid var(--ink); }
.acai .ner { background: var(--ink); color: #fff; }
.acai .nirai { background: #fff; color: var(--ink); }
.foot .name { font-size: 14px; font-weight: 700; }
.link { display: flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--mullai); writing-mode: vertical-rl; transform: rotate(180deg); }
.link.bad { color: var(--ochre); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.checks li { display: flex; gap: 10px; }
.checks .ok { color: var(--mullai); font-weight: 700; }
.checks .no { color: var(--ochre); font-weight: 700; }
.verdict { font-size: 22px; font-weight: 800; }
.notes { font-size: 14px; color: var(--ink-2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mono { border-bottom: 3px solid var(--ochre); }
.etu { background: var(--tint); border-radius: 4px; }

/* letters primer */
.vowels { display: flex; flex-wrap: wrap; gap: 8px; }
.vowels button { flex: 1 1 64px; min-height: 64px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #fff; color: var(--ink); border: 2px solid #C4C4C0; }
.vowels button .g { font-family: var(--ta); font-size: 24px; font-weight: 700; }
.vowels button .t { font-size: 12px; font-weight: 500; }
.vowels button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.primer { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.primer .glyph { flex: 1 1 280px; align-items: center; justify-content: center; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.primer .glyph .g { font-family: var(--ta); font-size: 120px; font-weight: 700; line-height: 1; }
.primer .glyph .t { font-size: 28px; font-weight: 700; }
.primer .line { flex: 2 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.primer .line .ta { font-family: var(--ta); font-size: 38px; line-height: 1.35; font-weight: 600; }
.primer .line .ta b { color: var(--ochre); font-weight: 700; }

@media (max-width: 640px) {
  .hero { padding-top: 40px; gap: 32px; }
  .quote blockquote { font-size: 28px; }
  .foot { width: calc(50% - 30px); }
  .lt { min-width: 40px; height: 50px; font-size: 21px; }
  .primer .glyph .g { font-size: 90px; }
  .primer .line .ta { font-size: 30px; }
}

/* recitation */
.listen { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 14px; margin-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.listen .play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--mullai); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.listen .play:focus-visible, .voice button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.listen .bar { flex: 1 1 140px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); }
.listen .bar i { display: block; height: 4px; width: 0; border-radius: 2px; background: #7FBF8A; }
.listen .time { font-size: 13px; color: #BDBDB8; font-variant-numeric: tabular-nums; }
.voice { display: flex; align-items: center; gap: 10px; }
.voice > span { font-size: 14px; font-weight: 600; }
.voice div { display: flex; border: 2px solid #fff; border-radius: 10px; overflow: hidden; }
.voice button { border: 0; padding: 9px 16px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; background: transparent; color: #fff; }
.voice button + button { border-left: 2px solid #fff; }
.voice button[aria-checked="true"] { background: #fff; color: var(--ink); }
.light .voice div, .light .voice button + button { border-color: var(--ink); }
.light .voice button { color: var(--ink); }
.light .voice button[aria-checked="true"] { background: var(--ink); color: #fff; }

/* suggestions */
.linkbtn { border: 0; background: none; padding: 8px 0; font: inherit; font-size: 14px; color: #1F5F8B; text-decoration: underline; cursor: pointer; }
.layer.dark .linkbtn { color: var(--gold); }
.sug { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.sug label, .sug .flabel { font-size: 14px; font-weight: 600; margin-top: 6px; }
.sug input, .sug textarea { width: 100%; box-sizing: border-box; border: 1px solid #C4C4C0; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.sug input[lang="ta"] { font-family: var(--ta-ui); font-size: 17px; }
.sug .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sug .part { display: grid; grid-template-columns: 1.1fr 1fr 1.4fr 36px; gap: 8px; align-items: center; }
.sug .part.hd { font-size: 12px; color: var(--muted); font-weight: 600; }
.sug .x { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); }
.sug .actions { display: flex; gap: 16px; align-items: center; margin-top: 6px; }
.sug .hint { font-size: 13px; color: var(--muted); }
.sug .chk { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.sug .chk label { font-weight: 400; margin: 0; display: flex; gap: 6px; align-items: center; }
.sug .chk input { width: auto; }
.joincheck { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.joincheck.ok { background: #EAF2EA; border: 1px solid #B5D0B8; }
.joincheck.ok b { color: var(--mullai); }
.joincheck.no { background: #FBF3E2; border: 1px solid #E6CF9C; }
.joincheck.no b { color: var(--ochre); }
.msg.ok { color: var(--mullai); font-weight: 600; }
.msg.err { color: #8A2A18; font-weight: 600; }
.reviewed { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #EAF2EA; color: var(--mullai); }
.word .fix { border: 0; background: none; padding: 4px 0 0; font: inherit; font-size: 13px; color: #1F5F8B; text-decoration: underline; cursor: pointer; text-align: left; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 640px) { .sug .row2 { grid-template-columns: 1fr; } .sug .part { grid-template-columns: 1fr 1fr; } .sug .part .g { grid-column: 1 / 2; } }

/* Caṅkam anthologies */
.tchip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--ink-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 16px; }
.filter { border: 1.5px solid var(--c, var(--ink)); color: var(--c, var(--ink)); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--c, var(--ink)); color: #fff; }
.filter[aria-pressed="true"] .muted { color: rgba(255,255,255,.8); }
.prows { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.prow { display: grid; grid-template-columns: 64px minmax(0,2.2fr) minmax(0,1.3fr) 120px minmax(0,1.3fr); gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.prow:hover { background: var(--soft); color: var(--ink); }
.prow.hd { border-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
.prow .num { font-weight: 700; }
.prow .first { font-size: 17px; }
@media (max-width: 760px) { .prow { grid-template-columns: 48px 1fr; } .prow > :nth-child(n+3) { grid-column: 2; } .prow.hd { display: none; } }
.poem-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .poem-grid { grid-template-columns: 1fr; } }
.poem-main { display: flex; flex-direction: column; gap: 16px; }
.pager { display: flex; gap: 8px; }
.pager a { width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; text-decoration: none; }
.pager a:hover { background: rgba(255,255,255,.12); color: #fff; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs [role=tab] { border: 0; background: none; padding: 12px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs [role=tab][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.foot { display: inline-flex; flex-direction: column; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.facts { margin: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.tinai-card { position: sticky; top: 16px; }
.lands { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin: 24px 0; }
@media (max-width: 760px) { .lands { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.land { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 14px; border-radius: 12px; border: 2px solid var(--c); background: #fff; color: var(--c); cursor: pointer; }
.land[aria-pressed="true"] { background: var(--c); color: #fff; }
.tinai-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .tinai-grid { grid-template-columns: 1fr; } }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.opts button { border: 1.5px solid var(--ink); background: #fff; border-radius: 8px; padding: 10px 14px; font-weight: 600; cursor: pointer; }
.opts button.right { background: #EAF2EA; border-color: var(--mullai); color: var(--mullai); }
.opts button.wrong { background: #FBF3E2; border-color: var(--ochre); color: var(--ochre); }
.opts button:disabled { cursor: default; }
.verdict { font-size: 16px; line-height: 1.5; }

/* the word being recited */
.rw { border-radius: 5px; padding: 0 2px; transition: background-color .08s, color .08s; }
.rw.on { background: #E8C26A; color: #161616; }
.layer.dark .rw.done { color: #BDBDB8; }
#list .rw.done { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .rw { transition: none; } }

/* letter sounds */
.hear { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); background: #fff; border-radius: 8px; padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; margin-top: 10px; }
.hear.playing, .spk.playing { background: var(--ink); color: #fff; }
.spk { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; cursor: pointer; font-size: 16px; flex: none; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.ccard { display: flex; flex-direction: column; gap: 8px; }
.crow { display: flex; align-items: center; gap: 10px; }
.crow .g { font-family: var(--ta); font-size: 34px; font-weight: 700; width: 52px; }
.crow .w { font-family: var(--ta-ui); font-size: 18px; margin-left: auto; }

/* consonant + vowel grid */
.gpanel { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.gbig { font-family: var(--ta); font-size: 84px; font-weight: 700; line-height: 1; min-width: 120px; text-align: center; }
.gsum { font-family: var(--ta-ui); font-size: 24px; }
.gwrap { overflow-x: auto; }
.ugrid { border-collapse: separate; border-spacing: 4px; }
.ugrid th { font-family: var(--ta); font-size: 18px; padding: 2px 6px; }
.ugrid th .tr { display: block; font-family: Inter, sans-serif; font-size: 11px; color: var(--muted); font-weight: 400; }
.ucell { width: 58px; height: 50px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-family: var(--ta); font-size: 20px; font-weight: 600; }
.ucell:hover { border-color: var(--ink); }
.ucell.playing { background: #E8C26A; border-color: #E8C26A; }

/* today's verses */
.vtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.vtabs button { border: 1px solid #444; background: transparent; color: #E0E0DC; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.vtabs button[aria-selected="true"] { background: #F7F7F5; color: var(--ink); border-color: #F7F7F5; }
.quote .vlines { font-size: 28px; line-height: 1.55; }
.live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.live b { color: var(--ink); }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mullai); display: inline-block; }
.live-pill { background: #EAF2EA; color: var(--mullai); }
.quote .vlines.poem { font-size: 21px; line-height: 1.6; }
.quote .clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hero:has(#todays) { align-items: flex-start; }
.quote [id^="vlisten-"] p.small { display: none; }
.quote .listen { margin-top: 0; padding-top: 0; border-top: 0; }
.pmhead { white-space: pre-wrap; font-size: 13px; line-height: 1.5; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pm-credit { font-size: 14px; color: var(--muted); border-left: 3px solid var(--line); padding: 4px 0 4px 12px; }
.nowword { min-height: 52px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.07); font-size: 17px; }
.nowword .nw b { font-family: var(--ta-ui); font-size: 20px; color: #E8C26A; margin-right: 4px; }
.nowword .muted { color: #BDBDB8; font-size: 15px; }

/* home, round 2 */
.quick { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 6px; }
.quick a { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.quick a:hover { background: var(--soft); }
.quick .who { font-size: 13px; font-weight: 600; color: var(--muted); grid-column: 1; }
.quick b { font-size: 17px; grid-column: 1; }
.quick .go { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--muted); font-size: 20px; }
.tinai-strip a { flex: 1 1 170px; color: #fff; border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.tinai-strip a:hover { filter: brightness(1.08); color: #fff; }
.tinai-strip .n { font-size: 13px; opacity: .85; margin-top: 6px; }
.card.soon { background: transparent; border-style: dashed; }
.quote .nowword[hidden] { display: none; }
.quote .listen { flex-wrap: nowrap; }
.quote .voice > span { display: none; }
.quote .voice button { padding: 7px 11px; font-size: 14px; }
@media (max-width: 640px) { .quote .listen { flex-wrap: wrap; } }
.quote .voice button { white-space: nowrap; }
.cards.four { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

/* home headline in Tamil */
.hero h1.ta-head { font-family: 'Noto Serif Tamil', serif; font-weight: 700; line-height: 1.4; font-size: clamp(24px, 6.6vw, 50px); }
@media (min-width: 900px) { .hero h1.ta-head { font-size: clamp(30px, 3.3vw, 42px); } }
.hero .tagline { font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; margin: 4px 0; }

/* Today's reel */
#reel { padding: 24px; }
.reelbox { display: grid; grid-template-columns: minmax(0, 240px) 1fr; gap: 28px; align-items: start; }
.reelbox video { width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #161616; display: block; }
.reelside { display: flex; flex-direction: column; gap: 12px; }
.reelside .eyebrow, .reelside h2, .reelside p { margin: 0; }
.reelside h2 { font-size: 26px; }
.reelbtns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.reelbtns .btn { display: inline-flex; gap: 8px; align-items: center; }
@media (max-width: 600px) { .reelbox { grid-template-columns: 1fr; } .reelbox video { max-width: 260px; margin: 0 auto; } }

.approvebar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.approve { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 600; padding: 5px 14px; border-radius: 999px; cursor: pointer; border: 1.5px solid currentColor; background: none; color: #1F5F8B; }
.layer.dark .approve { color: #F4F1EA; }
.approve.on, .layer.dark .approve.on { background: #2E6B3A; border-color: #2E6B3A; color: #fff; }
.approve:disabled { cursor: default; opacity: 1; }
.approve:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* a long poem's sections (Pattuppāṭṭu) */
.secstrip { display: flex; gap: 3px; width: 100%; }
.secstrip a { min-width: 0; flex-basis: 0; height: 30px; border-radius: 5px; border: 1px solid rgba(255,255,255,.3); color: #BDBDB8; font-size: 12px; text-decoration: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.secstrip a:hover { border-color: #fff; color: #fff; }
.secstrip a[aria-current="page"] { background: #fff; color: var(--ink); border-color: #fff; font-weight: 700; }
.secnext { display: inline-block; margin-top: 18px; color: #fff; font-weight: 600; }
/* Tolkāppiyam: a chapter's sūtras, and the chips the poem pages cite them with */
.sutras { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }
.sutra { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 10px; border-radius: 10px; scroll-margin-top: 90px; }
.sutra.cited { background: #FFF6DE; box-shadow: inset 4px 0 0 #C9A23A; }
.sutra .snum { font-weight: 700; color: var(--muted, #6b6b66); text-decoration: none; padding-top: 4px; }
.sutra .sl { font-family: 'Noto Serif Tamil', serif; font-size: 19px; line-height: 1.55; }
.sutra .str { margin-bottom: 4px; }
.cite { display: inline-block; line-height: 1.4; padding: 4px 10px; border-radius: 999px; border: 1px solid #D9D3C3; background: #FBF8F0; font-size: 13px; text-decoration: none; color: inherit; }
.cite:hover { border-color: #C9A23A; }
.cite b { font-weight: 600; }
.cards.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
