@font-face { font-family: "Noto Serif Tamil"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/noto-serif-tamil-tamil-500-normal.woff2") format("woff2"); unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Serif Tamil"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/noto-serif-tamil-tamil-600-normal.woff2") format("woff2"); unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Serif Tamil"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/noto-serif-tamil-tamil-700-normal.woff2") format("woff2"); unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Tamil"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/noto-sans-tamil-tamil-400-normal.woff2") format("woff2"); unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Tamil"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/noto-sans-tamil-tamil-600-normal.woff2") format("woff2"); unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+25CC; }
/* Tamil Knowledge > Thirukkural (thirukkural-ui.js). Tokens come from app.css. */
.tk { --tk-ink: #132B45; --tk-gold: #B8791A; --tk-gold-ink: #7A4B00; --tk-soft: #FFF8EC; }
.tk-ta, .tk-kural, .tk-line { font-family: "Noto Serif Tamil", "Latha", "Nirmala UI", "Tamil Sangam MN", serif; }

/* language selector */
.tk-langs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tk-lang { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; min-height: 40px; }
.tk-lang[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tk-lang:focus-visible, .tk-btn:focus-visible, .tk-x:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.tk-toolbar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; margin: 0 0 18px; }
.tk-toolbar .lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #5D6D7D); margin-right: 8px; }

/* buttons */
.tk-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--navy); background: #fff; color: var(--navy); border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 650; font-size: 15px; cursor: pointer; min-height: 44px; text-decoration: none; }
.tk-btn:hover { background: var(--soft); }
.tk-btn.primary { background: var(--navy); color: #fff; }
.tk-btn.primary:hover { background: #0b2540; }
.tk-btn[disabled] { opacity: .55; cursor: not-allowed; }
.tk-btn svg { width: 18px; height: 18px; flex: none; }
.tk-fav[aria-pressed="true"] { background: #FFF1D6; border-color: var(--tk-gold); color: #7A4B00; }

/* this week's Kural and the library */
.tk-feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--tk-soft); margin-bottom: 24px; }
.tk-feature .art { background: #FBE9C6; min-height: 220px; }
.tk-feature .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-feature .body { padding: 26px 28px; }
.tk-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tk-gold-ink); margin-bottom: 8px; }
.tk-kural { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.55; color: var(--tk-ink); margin: 6px 0 14px; font-weight: 600; }
.tk-kural span, .tk-line { display: block; }
.tk-kural .is-reading, .tk-line.is-reading { background: #FFE9B8; border-radius: 6px; box-shadow: 0 0 0 4px #FFE9B8; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.tk-card { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 18px 20px; text-decoration: none; color: inherit; position: relative; }
.tk-card:hover { border-color: var(--navy); box-shadow: 0 6px 18px rgba(19, 43, 69, .08); }
.tk-card .no { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--tk-gold-ink); text-transform: uppercase; }
.tk-card .tk-kural { font-size: 19px; margin: 2px 0 4px; }
.tk-card .mean { color: var(--muted, #5D6D7D); font-size: 14px; }
.tk-card .star { position: absolute; top: 14px; right: 16px; color: var(--tk-gold-ink); font-size: 18px; }
.tk-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.tk-filters select, .tk-filters input[type=search] { min-height: 44px; }

/* one Kural */
.tk-page { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tk-hero { background: var(--tk-soft); border: 1px solid #F0DDB5; border-radius: 18px; padding: 26px 28px; }
.tk-hero .tk-kural { font-size: clamp(26px, 4.2vw, 40px); }
.tk-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tk-read { margin: 14px 0 0; padding: 12px 14px; background: #fff; border: 1px dashed #E6CF9B; border-radius: 12px; }
.tk-read .tk-line { font-size: 17px; line-height: 1.6; }
.tk-read .rom { color: var(--muted, #5D6D7D); font-size: 14px; font-style: italic; }
.tk-art { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #FBE9C6; }
.tk-art img { width: 100%; display: block; }
.tk-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tk-panel { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 18px 20px; margin-bottom: 16px; }
.tk-panel h2 { font-size: 17px; margin: 0 0 8px; }
.tk-panel p { margin: 0 0 8px; }
.tk-note { font-size: 13px; color: #7A4B00; background: #FFF4DA; border-radius: 8px; padding: 6px 10px; display: inline-block; margin-top: 6px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-chip { background: #EAF1F8; color: var(--navy); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.tk-think { background: #EFF8F1; border-color: #BFE0C7; }
.tk-think textarea { width: 100%; min-height: 84px; }
.tk-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }

/* the pop-up: two designs of one component (data-design 1 = picture beside, 2 = picture above). A Kural is always two
   deliberate lines: each .tk-line is nowrap and tkFit() shrinks the type until a line fits, so it never wraps. */
.tk-overlay { position: fixed; inset: 0; background: rgba(10, 24, 40, .58); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; animation: tk-fade .25s ease both; }
.tk-pop { font-size: 16px; --ink: #132B45; --ink-2: #3F566E; --gold: #B8791A; --gold-ink: #7A4B00; --paper: #FFF9EE; --rule: #EAD9B4;
  position: relative; width: min(1120px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; background: var(--paper); color: var(--ink); border-radius: 24px;
  box-shadow: 0 40px 100px rgba(8, 20, 36, .45), 0 0 0 1px rgba(184, 121, 26, .18); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6.5fr); animation: tk-rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.tk-pop-art { position: relative; min-height: 27.5em; background: #EBD9B4; overflow: hidden; }
.tk-pop-art > svg, .tk-pop-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-pop-tag { position: absolute; left: 1.125em; bottom: 1em; display: inline-flex; align-items: center; gap: 0.5em; padding: 0.375em 0.75em 0.375em 0.625em; border-radius: 62.4375em; background: rgba(255, 249, 238, .92); color: var(--gold-ink); font-size: 0.75em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tk-pop-tag i { width: 0.375em; height: 0.375em; border-radius: 50%; background: var(--gold); display: block; }
.tk-pop-body { position: relative; overflow: clip; padding: 2.375em 2.75em 1.5em; display: flex; flex-direction: column; min-width: 0; background-image: radial-gradient(circle at 100% 100%, rgba(184, 121, 26, .09), transparent 46%); }
.tk-pop-body::after { content: ""; position: absolute; right: -1.625em; bottom: -1.625em; width: 190px; height: 190px; opacity: .10; background: var(--kolam) no-repeat center / contain; pointer-events: none; }
.tk-pop .tk-eyebrow { display: flex; align-items: center; gap: 0.75em; margin: 0 3em 1.125em 0; font-size: 0.75em; letter-spacing: .26em; color: var(--gold-ink); }
.tk-pop .tk-eyebrow::before { content: ""; width: 2.125em; height: 1.5px; background: var(--gold); flex: none; }
#tk-pop-kural { width: 100%; min-width: 0; }
.tk-pop-body > * { max-width: 100%; }
.tk-pop-ref { margin: 0 0 0.75em; font-size: 1.125em; color: var(--ink-2); }
.tk-pop-ref b { color: var(--ink); font-weight: 600; }
.tk-pop-ref .ch { color: var(--gold-ink); font-weight: 600; font-family: "Noto Serif Tamil", "Latha", "Nirmala UI", serif; }
.tk-pop .tk-kural { --fs: 2.125em; font-size: var(--fs); line-height: 1.62; margin: 0.25em 0 1.25em; font-weight: 600; color: var(--ink); letter-spacing: .005em; }

.tk-pop .tk-kural.rom { --fs: 1.0625em; font-style: italic; font-weight: 400; color: var(--ink-2); line-height: 1.5; margin: -0.5em 0 1.125em; font-family: Georgia, "Times New Roman", serif; }
.tk-pop .tk-kural .is-reading { background: #FFE9B8; border-radius: 0.5em; box-shadow: 0 0 0 5px #FFE9B8; }
.tk-seg { display: inline-flex; padding: 0.25em; gap: 0.125em; border: 1px solid var(--rule, #EAD9B4); border-radius: 62.4375em; background: #FFFDF8; align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.tk-seg button { border: 0; background: transparent; border-radius: 62.4375em; padding: 0.5em 1.125em; min-height: 2.5em; font: inherit; font-size: 0.9375em; font-weight: 600; color: #3F566E; cursor: pointer; transition: background .15s, color .15s; }
.tk-seg button:hover { color: #132B45; background: #F7ECD3; }
.tk-seg button[aria-selected="true"] { background: #132B45; color: #fff; box-shadow: 0 2px 8px rgba(19, 43, 69, .25); }
.tk-seg button:focus-visible, .tk-pop :focus-visible { outline: 3px solid #C2620A; outline-offset: 2px; }
.tk-pop-mean { margin: 0.875em 0 0.25em; min-height: 5.4em; font-size: 1.0625em; line-height: 1.7; color: var(--ink); }
.tk-pop-mean[lang="ta"], .tk-pop-mean[lang="ml"], .tk-pop-mean[lang="hi"] { font-family: "Noto Sans Tamil", "Nirmala UI", "Latha", sans-serif; }
.tk-pop-mean .tk-note { display: block; margin-top: 0.375em; }
.tk-tr-toggle { align-self: flex-start; border: 0; background: none; padding: 0.25em 0; min-height: 2em; font: inherit; font-size: 0.875em; font-weight: 600; color: var(--gold-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tk-audio { display: flex; align-items: center; gap: 0.875em; margin: 0.75em 0 1em; padding: 0.625em 1em 0.625em 0.625em; border: 1px solid var(--rule, #EAD9B4); border-radius: 1.125em; background: #FFFDF8; }
.tk-audio .play { flex: none; width: 3em; height: 3em; border-radius: 50%; border: 0; background: #132B45; color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .15s; padding: 0; }
.tk-audio .play:hover:not([disabled]) { background: #0b2540; transform: scale(1.05); }
.tk-audio .play[disabled] { background: #7B8A99; cursor: not-allowed; }
.tk-audio .play svg { width: 1.375em; height: 1.375em; }
.tk-audio .meta { flex: 1; min-width: 0; }
.tk-audio .lbl { font-size: 0.875em; font-weight: 600; color: #132B45; }
.tk-audio .bar { display: block; width: 100%; height: 6px; margin: 0.5em 0 0; -webkit-appearance: none; appearance: none; border-radius: 62.4375em; cursor: pointer; --p: 0%; background-color: #E7DFCC; background-image: linear-gradient(#132B45, #132B45); background-size: var(--p) 100%; background-repeat: no-repeat; }
.tk-audio .bar::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #132B45; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.tk-audio .bar::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #132B45; border: 3px solid #fff; }
.tk-audio .bar:disabled { cursor: default; }
.tk-audio .time { flex: none; font-size: 0.8125em; color: #3F566E; font-variant-numeric: tabular-nums; }
.tk-pop-cta { display: flex; flex-wrap: wrap; gap: 0.625em; }
.tk-pop-cta .tk-btn { min-height: 3.25em; border-radius: 0.875em; font-size: 1em; padding: 0.75em 1.375em; justify-content: center; }
.tk-pop-cta .tk-btn.primary { flex: 1 1 260px; background: linear-gradient(180deg, #F08A2C, #DE7416); border-color: #C2620A; color: #2A1500; box-shadow: 0 8px 18px rgba(222, 116, 22, .28); }
.tk-pop-cta .tk-btn.primary:hover { filter: brightness(1.05); }
.tk-pop-cta .tk-btn.ghost { border-color: var(--rule, #EAD9B4); background: #FFFDF8; color: #132B45; }
.tk-pop .tk-hide { margin: 0.875em 0 0; color: #3F566E; }
.tk-pop-foot { display: flex; align-items: center; gap: 0.875em; justify-content: space-between; margin-top: 1em; padding-top: 14px; border-top: 1px solid var(--rule, #EAD9B4); font-size: 0.8125em; color: #3F566E; }
.tk-pop-foot .wk { font-size: max(.75em, 10px); display: inline-flex; align-items: center; gap: 0.625em; white-space: nowrap; font-weight: 600; color: #7A4B00; }
.tk-pop-foot .wk i { display: block; width: 4.5em; height: 0.25em; background: #E7DFCC; border-radius: 6.1875em; overflow: hidden; }
.tk-pop-foot .wk i b { display: block; height: 100%; background: #B8791A; }
.tk-x { position: absolute; top: 0.875em; right: 0.875em; z-index: 3; width: 2.75em; height: 2.75em; border: 0; border-radius: 50%; background: rgba(255, 249, 238, .94); color: #132B45; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); padding: 0; }
.tk-x:hover { background: #fff; }
.tk-x svg { width: 1.25em; height: 1.25em; }
.tk-banner { background: #132B45; color: #fff; border-radius: 0.625em; padding: 0.5em 0.75em; font-size: 0.875em; font-weight: 600; margin-bottom: 12px; }
.tk-school { background: #F3EBD6; border-radius: 0.625em; padding: 0.5em 0.75em; font-size: 0.875em; margin: 0 0 0.75em; }
.tk-hide { display: flex; align-items: center; gap: 0.5em; font-size: 0.875em; margin-top: 0.875em; }
.tk-hide input { width: 1.25em; height: 1.25em; }
/* design 2: the picture runs across the top, the words are centred */
.tk-pop[data-design="2"] { width: min(640px, 100%); grid-template-columns: 1fr; }
.tk-pop[data-design="2"] .tk-pop-tag { bottom: auto; top: 0.875em; }
.tk-pop[data-design="2"] .tk-pop-art { min-height: 0; height: var(--art-h, 11.25em); margin: 0.875em 0.875em 0; border-radius: 1em; }
.tk-pop[data-design="2"] .tk-pop-body { padding: 1.375em 2.25em 1.375em; align-items: center; text-align: center; }
.tk-pop[data-design="2"] .tk-eyebrow { justify-content: center; margin-right: 0; }
.tk-pop[data-design="2"] .tk-eyebrow::after { content: ""; width: 2.125em; height: 1.5px; background: var(--gold); flex: none; }
.tk-pop[data-design="2"] .tk-kural { --fs: 1.875em; }
.tk-pop[data-design="2"] .tk-seg, .tk-pop[data-design="2"] .tk-tr-toggle { align-self: center; }
.tk-pop[data-design="2"] .tk-audio, .tk-pop[data-design="2"] .tk-pop-cta, .tk-pop[data-design="2"] .tk-pop-foot { width: 100%; }
.tk-pop[data-design="2"] .tk-audio { text-align: left; }
@keyframes tk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tk-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tk-overlay, .tk-pop { animation: none; } .tk-audio .play { transition: none; } }

/* studio */
.tk-studio .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tk-studio textarea { width: 100%; min-height: 70px; }
.tk-studio fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 16px; margin: 0 0 16px; }
.tk-studio legend { font-weight: 700; padding: 0 6px; }
.tk-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tk-checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.tk-tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tk-tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.tk-tile b { display: block; font-size: 26px; color: var(--navy); }
.tk-tile span { font-size: 13px; color: var(--muted, #5D6D7D); }

/* the library and one-Kural pages share the pop-up's look: two deliberate lines, warm paper, Noto Serif Tamil */
.tk-feature { border-color: #EAD9B4; border-radius: 24px; box-shadow: 0 18px 50px rgba(19, 43, 69, .10); background: #FFF9EE; position: relative; grid-template-columns: minmax(0, 6.5fr) minmax(0, 5fr); }
.tk-feature .body { padding: 34px 40px; position: relative; min-width: 0; }
.tk-feature .art { position: relative; min-height: 300px; background: #EBD9B4; }
.tk-feature .art > svg, .tk-feature .art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tk-feature .tk-eyebrow, .tk-hero .tk-eyebrow { display: flex; align-items: center; gap: 12px; letter-spacing: .24em; }
.tk-feature .tk-eyebrow::before, .tk-hero .tk-eyebrow::before { content: ""; width: 30px; height: 1.5px; background: var(--tk-gold); flex: none; }
.tk-kural, .tk-kural .tk-line { font-family: "Noto Serif Tamil", "Latha", "Nirmala UI", "Tamil Sangam MN", serif; }
.tk-kural .tk-line { display: block; white-space: nowrap; width: max-content; }
.tk-pop[data-design="2"] .tk-kural .tk-line { margin-inline: auto; }
.tk-feature .tk-kural { --fs: 32px; font-size: var(--fs); line-height: 1.6; }
.tk-hero { background: #FFF9EE; border-color: #EAD9B4; border-radius: 24px; padding: 34px 40px; background-image: radial-gradient(circle at 100% 100%, rgba(184, 121, 26, .10), transparent 46%); }
.tk-hero .tk-kural { --fs: 40px; font-size: var(--fs); line-height: 1.6; }
.tk-card { background: #FFF9EE; border-color: #EAD9B4; border-radius: 18px; }
.tk-card .tk-kural { --fs: 20px; font-size: var(--fs); line-height: 1.6; }
.tk-art { border-radius: 20px; border-color: #EAD9B4; position: relative; aspect-ratio: 8 / 5; }
.tk-art > svg, .tk-art > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-ta { font-family: "Noto Sans Tamil", "Noto Serif Tamil", "Nirmala UI", "Latha", sans-serif; }
.tk-kural-stage { margin: 4px 0 0; }
@media (max-width: 860px) {
  .tk-feature, .tk-page { grid-template-columns: 1fr; }
  .tk-feature .art { min-height: 0; height: 180px; order: -1; }
  .tk-feature .body, .tk-hero { padding: 22px 20px; }
  .tk-feature .tk-kural { --fs: 26px; }
  .tk-hero .tk-kural { --fs: 28px; }
}
@media (max-width: 860px) {
  .tk-pop[data-design="1"] { grid-template-columns: 1fr; width: min(640px, 100%); }
  .tk-pop[data-design="1"] .tk-pop-art { min-height: 0; height: 11.875em; }
  .tk-pop[data-design="1"] .tk-pop-body { padding: 1.625em 1.875em 1.25em; }
}
@media (max-width: 620px) {
  .tk-overlay { align-items: flex-end; padding: 0; }
  .tk-pop { border-radius: 1.5em 1.5em 0 0; max-height: 94vh; max-height: 94dvh; width: 100%; }
  .tk-pop .tk-pop-art { height: 9.375em !important; min-height: 0; margin: 0.875em 0.875em 0 !important; border-radius: 1em; }
  .tk-pop .tk-pop-body { padding: 1.125em !important; }
  .tk-pop .tk-kural { --fs: 1.625em; }
  .tk-pop-mean { min-height: 0; font-size: 1em; }
  .tk-pop .tk-seg { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; border-radius: 1.125em; }
  .tk-pop .tk-seg button { padding: 0.5em 0.125em; font-size: 0.875em; }
  .tk-pop .tk-eyebrow { letter-spacing: .14em; font-size: 0.6875em; margin-right: 0; }
  .tk-pop .tk-pop-cta .tk-btn { flex: 1 1 100%; }
  .tk-pop-foot { flex-direction: column; align-items: flex-start; gap: 0.5em; }
  .tk-x { top: 1.375em; right: 1.375em; }
}
