/*!
 * ಅಕ್ಷರ ಸೇತು  (Akshara Setu) — a bridge of letters.
 *
 * Kannada typing, dictionary and legacy-script conversion.
 *
 * The identity is a manuscript one: warm parchment ground, a single deep red
 * voice, and heritage tones used sparingly. Kannada is the hero — it is set
 * larger than the Latin around it and in a serif face for display.
 *
 * TOKENS. The canonical names are the design-system ones (--bg, --text-primary,
 * --border, --space-*). The older site names (--paper, --ink, --rule ...) are
 * kept as aliases because a large amount of CSS -- including the whole legacy
 * converter -- is written against them. Aliasing rather than renaming means one
 * palette drives every page, which is the point: the UI must not differ between
 * sections.
 *
 * Class names are contracts with JavaScript: .typing-box, .suggest, .is-active,
 * .caret-mirror, .lc-* and the data-* hooks are all queried from app.js and
 * convert-ui.js. Rename nothing here without changing those too.
 */

:root {
  /* ---- ground and ink ---- */
  --bg:             #FBF8F1;
  --surface:        #FFFDF8;
  --surface-raised: #FFFFFF;
  --surface-sunk:   #F5F0E4;

  --text-primary:   #20201E;
  --text-secondary: #5A5750;
  --text-tertiary:  #8B867C;

  --border:         #E7DFCE;
  --border-strong:  #D3C7AC;

  /* ---- one loud voice ---- */
  --accent:         #A83232;
  --accent-hover:   #8E2828;
  --accent-wash:    #F9EFEA;

  /* ---- heritage tones, used sparingly ---- */
  --heritage-gold:      #B88A44;
  --heritage-gold-wash: #F7F0DF;
  --heritage-green:     #315D4B;
  --heritage-green-wash:#EAF1ED;
  --heritage-blue:      #243D58;

  --warning:      #9A6B1F;
  --warning-wash: #FBF3E2;
  --success:      #315D4B;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(32,32,30,.05), 0 1px 1px rgba(32,32,30,.03);
  --shadow-md: 0 2px 4px rgba(32,32,30,.05), 0 14px 30px -18px rgba(32,32,30,.28);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  --kn:         "Noto Sans Kannada", "Tunga", sans-serif;
  --kn-display: "Noto Serif Kannada", "Noto Sans Kannada", serif;
  --ui:         "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono:       ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* ---- aliases: older names, one palette ---- */
  --paper:     var(--bg);
  --surface-2: var(--surface-sunk);
  --ink:       var(--text-primary);
  --ink-2:     var(--text-secondary);
  --ink-3:     var(--text-tertiary);
  --rule:      var(--border);
  --rule-2:    var(--border-strong);
  --accent-ink:var(--accent-hover);
  --accent-bg: var(--accent-wash);
  --good:      var(--heritage-green);
  --good-bg:   var(--heritage-green-wash);
  --focus:     var(--accent);
  --display:   var(--ui);
  --radius:    var(--radius-lg);
  --radius-s:  var(--radius-sm);
  --shadow:    var(--shadow-sm);
  --shadow-lg: var(--shadow-md);

  --measure: 68ch;
  --gutter: var(--space-5);
}

/* Dark mode keeps the manuscript warmth: a lamplit page, not a cold screen.
   Only the tokens change; every component rule below is written against them. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:             #191714;
    --surface:        #211E1A;
    --surface-raised: #26221D;
    --surface-sunk:   #14120F;

    --text-primary:   #F2EDE3;
    --text-secondary: #C3BBAC;
    --text-tertiary:  #918878;

    --border:         #332E27;
    --border-strong:  #4A4238;

    --accent:         #E8756B;
    --accent-hover:   #F2938B;
    --accent-wash:    #2E1D1B;

    --heritage-gold:      #D8AC66;
    --heritage-gold-wash: #2A2114;
    --heritage-green:     #6FBF9E;
    --heritage-green-wash:#13251E;
    --heritage-blue:      #7EA3CC;

    --warning:      #D6A44A;
    --warning-wash: #2A2114;
    --success:      #6FBF9E;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 1px 1px rgba(0,0,0,.3);
    --shadow-md: 0 2px 4px rgba(0,0,0,.5), 0 14px 30px -18px rgba(0,0,0,.8);
  }
}

/* -------------------------------------------------------------- foundation */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Manuscript ground: ruled lines at the threshold of visibility. One of the
     four cultural signatures, and the only one that touches every page. */
  background-image: repeating-linear-gradient(
    0deg, rgba(184, 138, 68, .045) 0 1px, transparent 1px 7px);
}

/* Kannada is the hero: the script needs more size than Latin to read easily. */
.kn { font-family: var(--kn); font-size: 1.08em; }

/* Hoysala star band — rotated squares on a hairline. A section divider, and
   nothing else; it stops being a signature if it appears everywhere. */
.band { display: flex; align-items: center; gap: 6px; margin: var(--space-6) 0; }
.band::before, .band::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--border-strong));
}
.band::after { background: linear-gradient(90deg, var(--border-strong), transparent); }
.band i { width: 5px; height: 5px; transform: rotate(45deg); background: var(--border-strong); }
.band i:nth-child(2) { width: 7px; height: 7px; background: var(--accent); }

/* Kasuti corner — cross-stitch geometry as a corner tick. One component only. */
.kasuti { position: relative; }
.kasuti::before {
  content: ""; position: absolute; top: 0; right: 0; width: 26px; height: 26px;
  background:
    linear-gradient(45deg, transparent 46%, var(--heritage-gold) 46% 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, var(--heritage-gold) 46% 54%, transparent 54%);
  background-size: 9px 9px; opacity: .5; pointer-events: none;
}


a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

main { max-width: 780px; margin: 0 auto; padding: 40px var(--gutter) 72px; }

/* ------------------------------------------------------------------ header */

.site-head {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 14px var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 30;
}

.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 8px;
}
.brand .mark {
  font-family: var(--kn);
  font-size: 1.35rem;
  color: var(--accent);
  line-height: 1;
}

.site-nav {
  margin-left: auto;
  display: flex; align-items: center; gap: 18px;
}
.site-nav a {
  font-size: .92rem; color: var(--ink-2); text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }

.search { display: flex; gap: 8px; }
.search input {
  font: inherit; font-size: .92rem;
  padding: 7px 11px; min-width: 190px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-s);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px var(--accent-bg); }
.search button {
  font: inherit; font-size: .9rem; font-weight: 600;
  padding: 7px 14px; cursor: pointer;
  color: #fff; background: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius-s);
}
.search button:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

/* -------------------------------------------------------------------- hero */

.hero { margin-bottom: 56px; }

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  margin: 0 0 12px;
  text-wrap: balance;
}

.hero .lede {
  font-size: 1.05rem; color: var(--ink-2);
  max-width: 52ch; margin: 0 0 24px;
}

/* The writing surface. Deliberately the largest, calmest thing on the page. */
.typing-box {
  display: block; width: 100%;
  padding: 20px 22px;
  font-family: var(--kn);
  font-size: 1.3rem;
  line-height: 1.9;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.typing-box::placeholder { font-family: var(--ui); font-size: 1rem; color: var(--ink-3); }
.typing-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow), 0 0 0 4px var(--accent-bg);
}

/* Mode indicator sits with the field, not in the page furniture. */
.hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .88rem; color: var(--ink-3);
  margin: 0 0 10px;
}
.hint strong,
[data-translit-status] {
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .82rem;
  letter-spacing: .01em;
}
kbd {
  font-family: var(--mono); font-size: .78rem;
  padding: 2px 6px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--rule-2);
  color: var(--ink-2);
}

/* ------------------------------------------------------------ suggestions */

.suggest {
  position: absolute; z-index: 60;
  margin: 0; padding: 5px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 300px; overflow-y: auto;
  min-width: 200px;
}

.suggest li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  cursor: pointer;
  font-family: var(--kn);
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink);
}
.suggest li:hover { background: var(--surface-2); }

.suggest li.is-active {
  background: var(--accent);
  color: #fff;
}

.suggest .num {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-3);
  min-width: 1.2em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.suggest li.is-active .num { color: rgba(255, 255, 255, .75); }

/* Marks a suggestion that is a real dictionary word rather than merely a
   plausible spelling. */
.suggest .in-dict {
  margin-left: auto;
  font-family: var(--ui);
  font-size: .72rem;
  color: var(--good);
}
.suggest li.is-active .in-dict { color: rgba(255, 255, 255, .9); }

/* Hidden text-metrics twin used to find the caret. Never visible. */
.caret-mirror {
  position: absolute; visibility: hidden; z-index: -1000;
  top: 0; left: 0;
  white-space: pre-wrap; word-wrap: break-word; overflow: hidden;
  pointer-events: none;
}

/* ------------------------------------------------------------------ pitch */

.pitch {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
}
.card h2 {
  font-family: var(--ui);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.card .figure {
  font-family: var(--display);
  font-size: 1.9rem; font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}
.card p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.card a { font-size: .92rem; }

/* ------------------------------------------------------------- word pages */

.word { max-width: var(--measure); }

.word h1.kn {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}

.phonetic {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-2);
  margin: 0 0 4px;
}

.origin { font-size: .9rem; color: var(--ink-3); margin: 0 0 24px; }

.word h2 {
  font-family: var(--ui);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 34px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.defs { margin: 0; padding-left: 1.4em; }
.defs li { margin-bottom: 12px; padding-left: 4px; }
.defs li::marker { color: var(--ink-3); font-size: .85em; }

.pos {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--good);
  background: var(--good-bg);
  padding: 2px 7px; border-radius: 4px;
  margin-right: 8px;
  vertical-align: 1px;
}

.try .typing-box { font-size: 1.15rem; padding: 14px 16px; }
.try p { font-size: .95rem; color: var(--ink-2); }

/* Related words and search results share the chip treatment. */
.related ul, .results {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.related a {
  display: inline-block;
  font-family: var(--kn);
  font-size: 1.02rem;
  padding: 6px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  text-decoration: none;
}
.related a:hover { border-color: var(--accent); color: var(--accent); }

/* ----------------------------------------------------------- search results */

.results { flex-direction: column; gap: 2px; }
.results li {
  display: flex; align-items: baseline; gap: 14px;
  padding: 11px 12px;
  border-radius: var(--radius-s);
  border-bottom: 1px solid var(--rule);
}
.results li:hover { background: var(--surface); }
.results a { font-family: var(--kn); font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.results a:hover { color: var(--accent); }
.results .phonetic { font-size: .9rem; margin: 0; }

.count { color: var(--ink-3); font-size: .92rem; }

/* --------------------------------------------------------------- credits */

.prose { max-width: var(--measure); }
.prose h1 {
  font-family: var(--display); font-weight: 600;
  font-size: 2rem; letter-spacing: -.02em; margin: 0 0 20px;
}
.prose h2 {
  font-family: var(--ui); font-size: .75rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
  margin: 32px 0 10px;
}
.prose p { margin: 0 0 14px; color: var(--ink-2); }
.prose dl { margin: 0; }
.prose dt { font-weight: 600; margin-top: 16px; color: var(--ink); }
.prose dd { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }

/* ------------------------------------------------------------------ footer */

/* Deliberately quiet. Attribution lives on its own page; the licences require
   credit, not prominence. */
.site-foot {
  max-width: 780px; margin: 0 auto;
  padding: 20px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center;
}
.site-foot p { margin: 0; font-size: .78rem; color: var(--ink-3); }
.site-foot a { color: var(--ink-3); }
.site-foot a:hover { color: var(--accent); }

/* ------------------------------------------------------------------- misc */

@media (max-width: 560px) {
  main { padding-top: 28px; }
  .site-head { gap: 12px; }
  .search input { min-width: 0; flex: 1; }
  .site-nav { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ==========================================================================
   Legacy converter (/convert)
   --------------------------------------------------------------------------
   From the Claude Design deliverable, namespaced lc-*. Its preview-only token
   block was removed on merge: the real tokens are defined at the top of this
   file and carry the dark-mode overrides, so these rules inherit both.
   ========================================================================== */

/* =====================================================
       DELIVERABLE STYLESHEET — merge into the existing site's CSS.
       Everything below references only the host's custom properties.
       ===================================================== */

    /* Page card — thin banded edge, sandal-paper ground */
    .lc-main{ position:relative; max-width:780px; margin:0 auto; padding:0 26px 26px; background:var(--paper); color:var(--ink); font-family:var(--ui);
      border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow-lg); overflow:hidden; }
    .lc-main::before{ content:""; position:absolute; inset:0 0 auto; height:5px;
      background:repeating-linear-gradient(90deg, var(--accent) 0 14px, color-mix(in oklab, var(--accent) 42%, var(--paper)) 14px 22px); }

    /* Intro — centred masthead with Kannada script line and diamond rule */
    .lc-intro{ text-align:center; padding:34px 0 0; }
    .lc-intro h1{ font-family:var(--display); font-weight:600; font-size:31px; line-height:1.15; margin:0; color:var(--ink); letter-spacing:-.01em; }
    .lc-intro__kn{ display:block; font-family:var(--kn); font-size:19px; font-weight:500; line-height:1.5; color:var(--accent-ink); margin-top:8px; }
    .lc-intro p{ margin:14px auto 0; font-size:15px; line-height:1.6; color:var(--ink-2); max-width:52ch; text-wrap:pretty; }
    .lc-privacy{ margin-top:10px; font-size:13px; color:var(--ink-3); }
    .lc-ornament{ display:flex; align-items:center; justify-content:center; gap:9px; margin:22px 0 4px; }
    .lc-ornament::before,.lc-ornament::after{ content:""; height:1px; flex:1 1 auto; max-width:180px; background:linear-gradient(90deg, transparent, var(--rule-2)); }
    .lc-ornament::after{ background:linear-gradient(90deg, var(--rule-2), transparent); }
    .lc-ornament span{ width:6px; height:6px; transform:rotate(45deg); background:var(--rule-2); }
    .lc-ornament span:nth-child(2){ width:8px; height:8px; background:var(--accent); }

    /* Direction control */
    .lc-direction{ margin:20px 0 0; border:0; padding:0; text-align:center; }
    .lc-direction legend{ display:block; width:100%; font-size:11.5px; font-weight:600; color:var(--ink-3); text-transform:uppercase; letter-spacing:.08em; padding:0 0 8px; }
    .lc-segmented{ display:inline-flex; background:var(--surface-2); border:1px solid var(--rule); border-radius:999px; padding:3px; gap:2px; }
    .lc-segmented input{ position:absolute; opacity:0; pointer-events:none; }
    .lc-segmented label{ font-size:13.5px; font-weight:500; color:var(--ink-2); padding:7px 14px; border-radius:999px; cursor:pointer; line-height:1.2; white-space:nowrap; }
    .lc-segmented input:checked + label{ background:var(--surface); color:var(--ink); box-shadow:var(--shadow); font-weight:600; }
    .lc-segmented input:focus-visible + label{ outline:2px solid var(--accent); outline-offset:2px; }

    /* File drop */
    .lc-drop{ margin-top:18px; border:1.5px dashed var(--rule-2); border-radius:var(--radius); background:var(--surface); padding:16px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
    .lc-drop-text{ font-size:13.5px; color:var(--ink-2); }
    .lc-drop-text strong{ color:var(--ink); }
    .lc-filebtn{ position:relative; display:inline-block; flex:0 0 auto; white-space:nowrap; font:600 13.5px var(--ui); color:var(--ink); background:var(--surface-2); border:1px solid var(--rule-2); border-radius:var(--radius-s); padding:8px 14px; cursor:pointer; }
    .lc-filebtn input{ position:absolute; inset:0; opacity:0; cursor:pointer; }
    .lc-filebtn:focus-within{ outline:2px solid var(--accent); outline-offset:2px; }
    .lc-filechip{ display:flex; align-items:center; gap:10px; width:100%; }
    .lc-filechip__icon{ width:34px; height:34px; flex:none; border-radius:var(--radius-s); background:var(--surface-2); border:1px solid var(--rule); }
    .lc-filechip__name{ font-size:13.5px; font-weight:600; color:var(--ink); word-break:break-all; }
    .lc-filechip__meta{ font-size:12.5px; color:var(--ink-3); }
    .lc-filechip__note{ font-size:12.5px; color:var(--good); margin-top:2px; }
    .lc-refuse{ width:100%; display:flex; gap:12px; align-items:flex-start; }
    .lc-refuse__mark{ flex:none; width:22px; height:22px; margin-top:1px; border-radius:6px; background:var(--accent-bg); border:1.5px solid var(--accent); position:relative; }
    .lc-refuse__mark::before{ content:"!"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font:700 13px var(--ui); color:var(--accent-ink); }
    .lc-refuse__title{ font-size:14px; font-weight:700; color:var(--ink); margin:0 0 3px; }
    .lc-refuse__body{ font-size:13.5px; color:var(--ink-2); line-height:1.5; margin:0; }
    .lc-refuse__retry{ margin-top:10px; }

    /* Panes */
    .lc-panes{ margin-top:22px; display:grid; grid-template-columns:1fr 1fr; gap:16px; }
    .lc-pane__head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:6px; }
    .lc-pane__label{ font-size:12px; font-weight:600; color:var(--ink-3); text-transform:uppercase; letter-spacing:.04em; }
    .lc-pane__count{ font-size:11.5px; color:var(--ink-3); font-family:var(--mono); }
    .lc-pane__label::before{ content:""; display:inline-block; width:5px; height:5px; margin-right:7px; transform:rotate(45deg) translateY(-1px); background:var(--accent); }
    .lc-textarea{ width:100%; box-sizing:border-box; min-height:200px; resize:vertical; background:var(--surface); border:1px solid var(--rule-2); border-radius:var(--radius); padding:14px 16px; color:var(--ink); box-shadow:var(--shadow); }
    .lc-textarea:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
    .lc-textarea--legacy{ font-family:var(--mono); font-size:14px; line-height:1.6; }
    .lc-textarea--kn{ font-family:var(--kn); font-size:16.4px; line-height:1.7; }
    .lc-textarea--dim{ color:var(--ink-3); background:var(--surface-2); }
    .lc-textarea[readonly]{ background:var(--surface-2); }

    .lc-example{ margin:0 0 10px; padding:12px 14px; background:var(--surface-2); border:1px solid var(--rule); border-radius:var(--radius-s); }
    .lc-example__label{ display:block; font-size:11.5px; color:var(--ink-3); margin-bottom:8px; }
    .lc-example__row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
    .lc-example__legacy{ font-family:var(--mono); font-size:13.5px; color:var(--ink-2); }
    .lc-example__arrow{ color:var(--ink-3); }
    .lc-example__kn{ font-family:var(--kn); font-size:15.5px; color:var(--ink); }

    .lc-outactions{ display:flex; gap:8px; margin-top:8px; }
    .lc-btn{ white-space:nowrap; flex:0 0 auto; font:600 13px var(--ui); border-radius:var(--radius-s); padding:9px 14px; cursor:pointer; border:1px solid var(--rule-2); background:var(--surface); color:var(--ink); box-shadow:var(--shadow); }
    .lc-btn--primary{ background:var(--accent); border-color:var(--accent-ink); color:var(--surface); }
    .lc-btn--primary:hover{ background:var(--accent-ink); }
    .lc-btn[disabled]{ box-shadow:none; color:var(--ink-3); background:var(--surface-2); cursor:not-allowed; }
    .lc-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
    .lc-btn--ghost{ background:transparent; }

    /* Options */
    .lc-options{ margin-top:18px; display:flex; gap:20px; flex-wrap:wrap; }
    .lc-check{ display:flex; flex:0 0 auto; white-space:nowrap; align-items:center; gap:8px; font-size:13.5px; color:var(--ink-2); }
    .lc-check input{ width:16px; height:16px; accent-color:var(--accent); }
    .lc-check input:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

    /* Confidence readout */
    .lc-confidence{ position:relative; margin-top:24px; padding:20px 20px 20px 22px; border-radius:var(--radius); background:var(--good-bg); border:1px solid color-mix(in oklab, var(--good) 30%, var(--good-bg)); overflow:hidden; }
    .lc-confidence::before{ content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--good); }
    .lc-confidence--low::before{ background:var(--accent); }
    .lc-confidence--empty::before{ display:none; }
    .lc-confidence--low{ background:var(--accent-bg); border-color:color-mix(in oklab, var(--accent) 28%, var(--accent-bg)); }
    .lc-confidence--empty{ background:var(--surface); border:1px dashed var(--rule-2); color:var(--ink-3); font-size:13px; }
    .lc-confidence__head{ margin:0 0 4px; font-family:var(--display); font-size:19px; font-weight:600; color:var(--good); }
    .lc-confidence--low .lc-confidence__head{ color:var(--accent-ink); }
    .lc-confidence__sub{ margin:0 0 12px; font-size:13.5px; color:var(--ink-2); line-height:1.5; max-width:56ch; }
    .lc-texture{ display:flex; flex-wrap:wrap; gap:3px; margin:10px 0 14px; }
    .lc-dot{ width:9px; height:9px; border-radius:2px; background:var(--good); }
    .lc-dot--off{ background:transparent; border:1.5px solid var(--accent); }
    .lc-confidence--low .lc-dot{ background:var(--ink-3); }
    .lc-facts{ margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:5px; }
    .lc-facts li{ font-size:13px; color:var(--ink); display:flex; gap:8px; align-items:baseline; }
    .lc-facts li::before{ content:"—"; color:var(--ink-3); }

    /* Progress + status */
    .lc-progresswrap{ margin-top:18px; padding:14px; background:var(--surface); border:1px solid var(--rule); border-radius:var(--radius); }
    .lc-progresswrap__label{ font-size:13px; color:var(--ink-2); margin:0 0 8px; }
    .lc-progress{ width:100%; height:8px; -webkit-appearance:none; appearance:none; border:none; border-radius:999px; overflow:hidden; background:var(--surface-2); }
    .lc-progress::-webkit-progress-bar{ background:var(--surface-2); border-radius:999px; }
    .lc-progress::-webkit-progress-value{ background:var(--accent); border-radius:999px; }
    .lc-progress::-moz-progress-bar{ background:var(--accent); border-radius:999px; }

    .lc-status{ margin-top:14px; font-size:13px; color:var(--ink-2); min-height:1em; }
    .lc-vh{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

    @media (max-width:620px){
      .lc-panes{ grid-template-columns:1fr; }
    }
    @media (max-width:400px){
      .lc-main{ padding:16px; }
      .lc-segmented label{ font-size:12.5px; padding:7px 10px; }
      .lc-intro h1{ font-size:23px; }
      .lc-options{ gap:12px; }
    }

/* Kannada display face for headings that carry the name. */
.hero__kn, .lc-intro__kn {
  display: block;
  font-family: var(--kn-display);
  font-weight: 600;
  font-size: .42em;
  color: var(--accent);
  margin-top: var(--space-3);
  letter-spacing: 0;
}

/* ------------------------------------------------------- nav current page */

/* Which tool you are in should be obvious without reading the URL. */
.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* The footer now carries attribution and nothing else, so it recedes. */
.site-foot { justify-content: center; padding-top: var(--space-4); }
.site-foot p { font-size: .74rem; }

/* The hero is the whole page now that the cards are gone; give it room to
   breathe rather than leaving a gap where they were. */
.hero { margin-bottom: var(--space-6); }

/* --------------------------------------------------------- dictionary page */

/* The page's own search field, the primary one here. Sized to be the obvious
   thing to do on arrival -- the header field is a shortcut, not the entry. */
.lookup {
  display: flex; gap: var(--space-2);
  margin: var(--space-5) 0 var(--space-4);
}
.lookup__input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1.15rem;
  font-family: var(--kn);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.lookup__input::placeholder {
  font-family: var(--ui); font-size: .95rem; color: var(--text-tertiary);
}
.lookup__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-sm), 0 0 0 4px var(--accent-wash);
}
.lookup__go {
  font: inherit; font-weight: 600;
  padding: var(--space-3) var(--space-5);
  cursor: pointer; white-space: nowrap;
  color: #fff; background: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius-md);
}
.lookup__go:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.lookup__hint { color: var(--text-secondary); font-size: .95rem; }
.lookup__try {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 var(--space-3);
}

/* Sample words: a way in for someone who does not yet know what to type. */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }
.chips a {
  display: inline-block;
  font-size: 1.05rem;
  padding: var(--space-2) var(--space-4);
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  text-decoration: none;
}
.chips a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }

@media (max-width: 480px) {
  .lookup { flex-wrap: wrap; }
  .lookup__go { width: 100%; }
}

/* ------------------------------------------------------------------- brand */

/* The logo replaces the text wordmark. width/height are on the <img> so the
   header does not reflow when it loads. */
.brand { display: inline-flex; align-items: center; }
.brand__logo {
  display: block;
  height: 38px;
  width: auto;
  max-width: 100%;
}
@media (max-width: 560px) { .brand__logo { height: 30px; } }

/* Visitor count in the footer: present, but never competing for attention. */
.site-foot__views {
  display: inline-flex; align-items: baseline; gap: var(--space-2);
  color: var(--text-tertiary);
}
.site-foot__views strong {
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
