/* =====================================================================
   Shirish Joshi — "Kaavi on lime-wash"
   Fresh British palette (lime-wash white, duck-egg, sage, heath ink)
   with Karnataka folk art: Kaavi Kale red-earth linework, Hase Chittara
   motifs, gurige turmeric dots — and one royal teak book cabinet.
   ===================================================================== */
/* His name in Kannada, set in Tiro Kannada Italic — a calligraphic, pen-drawn face
   (Kannada letters only, stored with the site so it works offline). */
@font-face {
  font-family: "SJ Name";
  src: url("../fonts/tiro-kannada-italic-name.woff2") format("woff2");
  font-display: swap;
}

:root {
  --paper: #fcf8ee;        /* light ivory: a bright English cream */
  --duck: #e3ece9;         /* duck-egg         */
  --duck-dk: #cfdcd8;
  --sage: #d3dfcc;         /* meadow sage      */
  --sage-dk: #b7c8ae;
  --ink: #1f2d27;          /* heath ink        */
  --ink-2: #3c4a43;
  --ink-soft: #5d6a63;
  --kaavi: #b24a2c;        /* kemmannu red earth: LINES and small accents only */
  --kaavi-dk: #8e3a22;
  --turmeric: #d6a12a;     /* gurige yellow: dots */
  --teak: #65432a;
  --teak-dk: #47301e;
  --teak-lt: #8a6040;
  --error: #a3261b;
  --ok: #2f6b3a;
  --focus: #1f2d27;

  --f-display: "DM Serif Display", Georgia, "Noto Serif Kannada", serif;
  --f-body: "Alegreya Sans", "Segoe UI", "Noto Sans Kannada", sans-serif;
  --f-kn: "Noto Sans Kannada", "Alegreya Sans", sans-serif;
  --f-kn-display: "Noto Serif Kannada", "DM Serif Display", serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --t-fast: 160ms; --t-med: 280ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.6, 0, .25, 1);
  --wrap: 1200px;
  --r-card: 22px;
  --r-ctl: 10px;

  /* Hase Chittara band: white lines on red earth (used thinly) */
  --chittara: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='40' viewBox='0 0 64 40'%3E%3Crect width='64' height='40' fill='%23b24a2c'/%3E%3Cg fill='none' stroke='%23fbfaf6' stroke-width='1.4'%3E%3Cpath d='M0 3.5h64M0 36.5h64'/%3E%3Cpath d='M16 9l11 11-11 11L5 20z'/%3E%3Cpath d='M16 14l6 6-6 6-6-6z'/%3E%3Cpath d='M33 31l7-20 7 20 7-20 7 20'/%3E%3C/g%3E%3Cg fill='%23fbfaf6'%3E%3Ccircle cx='4' cy='7' r='1'/%3E%3Ccircle cx='12' cy='7' r='1'/%3E%3Ccircle cx='20' cy='7' r='1'/%3E%3Ccircle cx='28' cy='7' r='1'/%3E%3Ccircle cx='36' cy='7' r='1'/%3E%3Ccircle cx='44' cy='7' r='1'/%3E%3Ccircle cx='52' cy='7' r='1'/%3E%3Ccircle cx='60' cy='7' r='1'/%3E%3Ccircle cx='4' cy='33' r='1'/%3E%3Ccircle cx='12' cy='33' r='1'/%3E%3Ccircle cx='20' cy='33' r='1'/%3E%3Ccircle cx='28' cy='33' r='1'/%3E%3Ccircle cx='36' cy='33' r='1'/%3E%3Ccircle cx='44' cy='33' r='1'/%3E%3Ccircle cx='52' cy='33' r='1'/%3E%3Ccircle cx='60' cy='33' r='1'/%3E%3C/g%3E%3Ccircle cx='16' cy='20' r='2' fill='%23d6a12a'/%3E%3Ccircle cx='40' cy='27' r='1.6' fill='%23d6a12a'/%3E%3Ccircle cx='54' cy='27' r='1.6' fill='%23d6a12a'/%3E%3C/svg%3E");
  /* Kaavi ornament for section hand-overs: red line motif on white */
  --kaavi-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='28' viewBox='0 0 120 28'%3E%3Cg fill='none' stroke='%23b24a2c' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M60 2l12 12-12 12-12-12z'/%3E%3Cpath d='M60 8l6 6-6 6-6-6z'/%3E%3Cpath d='M44 14l-8-7v14zM76 14l8-7v14z'/%3E%3Cpath d='M2 14h28M90 14h28'/%3E%3C/g%3E%3Ccircle cx='60' cy='14' r='1.8' fill='%23d6a12a'/%3E%3Ccircle cx='24' cy='14' r='1.6' fill='%23d6a12a'/%3E%3Ccircle cx='96' cy='14' r='1.6' fill='%23d6a12a'/%3E%3C/svg%3E");
  /* block-print buti for the cabinet's sage silk */
  --buti: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='%23fbfaf6' opacity='.35'%3E%3Cpath d='M11 5c2 3 2 5 0 7-2-2-2-4 0-7zM11 19c-2-3-2-5 0-7 2 2 2 4 0 7zM4 12c3-2 5-2 7 0-2 2-4 2-7 0zM18 12c-3 2-5 2-7 0 2-2 4-2 7 0z'/%3E%3Ccircle cx='33' cy='33' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }

/* Big screens: show the whole site a little smaller, the way it looks at 80% browser zoom.
   Phones and tablets stay at full size. --z lets screen-height sizes undo the shrink. */
:root { --z: 1; }
@media (min-width: 1100px) { html { zoom: .9; } :root { --z: .9; } }
@media (min-width: 1440px) { html { zoom: .8; } :root { --z: .8; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 1.1875rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--kaavi); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--kaavi-dk); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; color: var(--ink); letter-spacing: -.005em; }
h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
p { margin: 0 0 var(--s-4); }
[lang="kn"] { font-family: var(--f-kn); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-6); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: var(--s-4); top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4); border-radius: var(--r-ctl); }
.skip:focus { top: var(--s-4); }

/* ---------- Kannada mode ---------- */
html[lang="kn"] body { font-family: var(--f-kn); font-size: 1.06rem; line-height: 1.85; }
html[lang="kn"] h2, html[lang="kn"] h3 { font-family: var(--f-kn-display); font-weight: 800; line-height: 1.35; letter-spacing: 0; }
html[lang="kn"] h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
html[lang="kn"] .btn, html[lang="kn"] .chip, html[lang="kn"] .tab, html[lang="kn"] .vt-btn, html[lang="kn"] .link-btn { font-family: var(--f-kn); }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-6); border-radius: var(--r-ctl); border: 1.5px solid transparent;
  font: 700 1.02rem/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2d4239; color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 44px; padding: 0 var(--s-5); font-size: .97rem; }
.btn[disabled] { opacity: .55; cursor: progress; }

.link-btn {
  background: none; border: 0; padding: var(--s-2) 0; cursor: pointer; min-height: 44px;
  font: 700 1rem var(--f-body); color: var(--kaavi);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.link-btn:hover { color: var(--kaavi-dk); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: var(--s-6) 0 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s-3);
  border: 1px solid rgba(31, 45, 39, .28); border-radius: 8px; background: rgba(252, 248, 238, .7);
  font: 500 .95rem/1 var(--f-body); color: var(--ink-2); cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
button.chip:hover { border-color: var(--kaavi); color: var(--kaavi-dk); background: var(--paper); }
.chip-static { cursor: default; }

/* =====================================================================
   HEADER
   ===================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50; background: rgba(252, 248, 238, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: box-shadow var(--t-med);
}
.topbar.scrolled { box-shadow: 0 1px 0 rgba(178, 74, 44, .35); }
.topbar-inner { display: flex; align-items: center; gap: var(--s-6); min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 26px; height: 26px; background: var(--kaavi-motif) center / 120px 28px no-repeat; background-position: 50% 50%; background-size: 108px 26px; border-radius: 0; }
.brand-kn { font: 400 1.45rem/1 "SJ Name", var(--f-kn-display); }
.nav { list-style: none; display: flex; gap: var(--s-6); margin: 0; padding: 0; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 1.02rem; padding: var(--s-2) 0; border-bottom: 1.5px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--kaavi); }
.nav .nav-cta { color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--r-ctl); padding: var(--s-2) var(--s-4); }
.nav .nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lang-switch { display: inline-flex; background: var(--duck); border-radius: 999px; padding: 3px; }
.lang-btn { min-height: 36px; min-width: 44px; padding: 0 var(--s-3); border: 0; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ink-2); font: 500 .95rem var(--f-body); }
.lang-btn[lang="kn"] { font-family: var(--f-kn); }
.lang-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

@media (max-width: 480px) {
  .wrap { padding: 0 var(--s-4); }
  .brand-mark { display: none; }
  .nav .nav-cta { padding: var(--s-2) var(--s-3); font-size: .92rem; }
  .lang-btn { padding: 0 var(--s-2); font-size: .88rem; }
}

/* =====================================================================
   HERO CARD — text left, portrait fading in from the right
   ===================================================================== */
.hero { padding-top: var(--s-5); padding-bottom: var(--s-7); }
.hero-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: 600px; border-radius: var(--r-card);
  background: linear-gradient(110deg, var(--duck) 0%, var(--duck) 45%, #d9e6e1 100%);
}
.hero-art {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 64%; max-width: 760px; height: auto; z-index: -1;
  color: var(--kaavi); opacity: .22;
}
.hero-text { padding: var(--s-9) var(--s-8) var(--s-8); align-self: center; position: relative; z-index: 2; }
.hero-kn { font: 400 clamp(1.7rem, 2.8vw, 2.3rem)/1.3 "SJ Name", var(--f-kn-display); color: var(--kaavi); margin-bottom: var(--s-2); letter-spacing: .01em; }
.hero-title { font-size: clamp(3.2rem, 7.4vw, 6.2rem); line-height: .98; color: var(--ink); letter-spacing: -.015em; }
.hero-line { max-width: 34ch; margin: var(--s-5) 0 var(--s-6); font-size: clamp(1.15rem, 1.6vw, 1.32rem); color: var(--ink-2); line-height: 1.5; }
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

.hero-photo { position: relative; margin: 0; z-index: 1; }
.hero-photo img {
  position: absolute; right: 4%; bottom: 0; height: min(78%, 460px); width: auto; max-width: none;
  filter: contrast(1.04);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 88%, transparent 100%), linear-gradient(to top, transparent 0%, #000 10%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 88%, transparent 100%), linear-gradient(to top, transparent 0%, #000 10%);
}
.hero-photo figcaption {
  position: absolute; right: var(--s-6); bottom: var(--s-5); text-align: right; z-index: 2;
  color: var(--ink); text-shadow: 0 0 10px rgba(252, 248, 238, .95), 0 0 2px rgba(252, 248, 238, .9);
  display: flex; flex-direction: column; line-height: 1.25;
}
.hero-photo figcaption strong { font: 700 1.12rem var(--f-body); }
.hero-photo figcaption span { font-size: .95rem; color: var(--ink-2); }
/* Kannada mode: the Kannada name becomes the headline */
html[lang="kn"] .hero-kn { font-family: "SJ Name", var(--f-kn-display); font-weight: 400; font-size: clamp(3.2rem, 7.6vw, 6.4rem); line-height: 1.22; color: var(--ink); margin: 0 0 var(--s-2) -0.04em; letter-spacing: .005em; }
html[lang="kn"] .hero-title { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--kaavi); letter-spacing: 0; }

/* one orchestrated page-load moment */
.hero-text > * { opacity: 0; animation: rise .8s var(--ease-out) forwards; }
.hero-text > :nth-child(1) { animation-delay: .05s; }
.hero-text > :nth-child(2) { animation-delay: .15s; }
.hero-text > :nth-child(3) { animation-delay: .28s; }
.hero-text > :nth-child(4) { animation-delay: .4s; }
.hero-text > :nth-child(5) { animation-delay: .52s; }
.hero-photo img { opacity: 0; animation: fade 1.2s .2s var(--ease-out) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* =====================================================================
   ABOUT — flows straight on from the hero
   ===================================================================== */
.about { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: var(--s-9); padding-bottom: var(--s-8); }
.about-text { max-width: 66ch; }
.about-text h2 { margin-bottom: var(--s-5); }
.lede { font-size: 1.36rem; line-height: 1.5; color: var(--ink); }
html[lang="kn"] .lede { font-size: 1.18rem; }
.about-text p:not(.lede) { color: var(--ink-2); }
.about-text em { font-style: italic; color: var(--ink); background: linear-gradient(transparent 62%, rgba(214, 161, 42, .3) 62%); }
.glance { align-self: start; position: sticky; top: 104px; border-left: 2px solid var(--kaavi); padding-left: var(--s-6); }
.glance h3 { font-size: 1.5rem; margin-bottom: var(--s-4); }
.glance dl { margin: 0; display: grid; gap: var(--s-4); }
.glance dt { font-size: .92rem; color: var(--ink-soft); }
.glance dd { margin: 0; font-size: 1.06rem; color: var(--ink); font-weight: 500; }

/* ---------- Kaavi ornament between sections (keeps the page flowing) ---------- */
.kaavi-rule { display: flex; align-items: center; justify-content: center; height: 28px; margin-top: var(--s-6); margin-bottom: var(--s-6); }
.kaavi-rule::before, .kaavi-rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(178, 74, 44, .45)); }
.kaavi-rule::after { background: linear-gradient(90deg, rgba(178, 74, 44, .45), transparent); }
.kaavi-rule span { width: 120px; height: 28px; background: var(--kaavi-motif) center / 120px 28px no-repeat; margin: 0 var(--s-4); }

/* =====================================================================
   LIBRARY
   ===================================================================== */
.library { overflow-x: clip; padding: var(--s-6) 0 var(--s-8); }
.library-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-5); }
.library-hint { color: var(--ink-soft); margin: var(--s-2) 0 0; }
.view-toggle { display: inline-flex; background: var(--duck); border-radius: var(--r-ctl); padding: 3px; }
.vt-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4); background: transparent; border: 0; border-radius: 8px; cursor: pointer; color: var(--ink-2); font: 500 .97rem var(--f-body); }
.vt-btn svg { width: 18px; height: 18px; fill: currentColor; }
.vt-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 45, 39, .18); }

.shelf-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.tab {
  min-height: 40px; padding: 0 var(--s-4); cursor: pointer; border-radius: 999px;
  border: 1px solid rgba(31, 45, 39, .25); background: transparent; color: var(--ink-2); font: 500 1rem var(--f-body);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tab .n { opacity: .7; margin-left: var(--s-1); font-size: .9em; }
.shelf-count { color: var(--ink-soft); font-size: 1rem; margin-bottom: var(--s-6); }

/* ---------- the painted oak cabinet (built from the shelf picture) ----------
   Picture is 1568 units wide: 44 left rail + 1480 shelves + 44 right rail. */
.cabinet { position: relative; filter: drop-shadow(0 26px 28px rgba(31, 45, 39, .16)); }
.cab-top, .cab-base { display: block; width: 100%; height: auto; }
.cab-top { margin-bottom: -1px; }
.cab-base { margin-top: -1px; }
.cab-body { display: flex; align-items: stretch; }
.rail { flex: 0 0 calc(100% * 44 / 1568); background-repeat: repeat-y; background-size: 100% auto; }
.rail-left  { background-image: url("../images/shelf/shelf-rail-left.webp"); }
.rail-right { background-image: url("../images/shelf/shelf-rail-right.webp"); }

.bookcase {
  --row: 250px; --plank: 26px; --period: calc(var(--row) + var(--plank));
  flex: 1 1 auto; min-width: 0; position: relative; padding: 0 var(--s-4);
  background: #dde4c9 url("../images/shelf/shelf-row.webp") 0 0 / 100% var(--period) repeat-y;
}
.bookcase[data-view="shelf"] {
  display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-end;
  row-gap: var(--plank); column-gap: 3px; padding-bottom: var(--plank); min-height: var(--period);
}
.slot { height: var(--row); display: flex; align-items: flex-end; }
.spine {
  --h: 220px; --w: 42px; --c: #555;
  position: relative; height: var(--h); width: var(--w); border: 0; padding: 0; cursor: pointer;
  border-radius: 2px 2px 1px 1px; color: var(--ink-on, #fcf8ee);
  background: linear-gradient(90deg, rgba(0,0,0,.42) 0, rgba(255,255,255,.18) 18%, rgba(255,255,255,.05) 40%, rgba(0,0,0,.12) 70%, rgba(0,0,0,.48) 100%), var(--c);
  box-shadow: 0 -1px 0 rgba(255,255,255,.12) inset, 2px 0 3px rgba(0,0,0,.3);
  transform-origin: bottom center; transition: transform var(--t-med) var(--ease-out), filter var(--t-med);
}
.spine::before, .spine::after { content: ""; position: absolute; left: 4px; right: 4px; height: 2px; background: rgba(240, 199, 102, .85); box-shadow: 0 4px 0 rgba(240, 199, 102, .5); }
.spine::before { top: 14px; } .spine::after { bottom: 20px; }
.spine-title {
  position: absolute; inset: 30px 0 32px; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; text-orientation: mixed; font: 600 .92rem/1.15 var(--f-kn);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 2px;
}
.spine-tip {
  position: absolute; bottom: calc(100% + 18px); left: 50%; transform: translate(-50%, 6px);
  background: var(--paper); color: var(--ink); white-space: nowrap; font: 500 .92rem var(--f-body);
  padding: 6px 10px; border-radius: 8px; border-bottom: 2px solid var(--kaavi);
  pointer-events: none; opacity: 0; transition: opacity var(--t-fast), transform var(--t-fast); z-index: 5;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
html[lang="kn"] .spine-tip { font-family: var(--f-kn); }
.spine:hover, .spine:focus-visible { transform: translateY(-14px) rotate(-1.5deg); filter: brightness(1.1); z-index: 4; }
.spine:hover .spine-tip, .spine:focus-visible .spine-tip { opacity: 1; transform: translate(-50%, 0); }
.spine.leaning { transform: rotate(4deg) translateX(6px); }
.spine.leaning:hover, .spine.leaning:focus-visible { transform: translateY(-14px) rotate(0); }

.bookcase[data-view="covers"] {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-6) var(--s-5); padding: var(--s-6) var(--s-5);
  background: #dde4c9;
}
.cover-card { border: 0; padding: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); display: flex; flex-direction: column; gap: var(--s-2); }
.cover-card .cv { aspect-ratio: 2 / 3; width: 100%; overflow: hidden; border-radius: 1px 3px 3px 1px; box-shadow: -3px 0 0 rgba(0,0,0,.3) inset, 0 14px 24px -12px rgba(0,0,0,.7); background: var(--teak-dk); transition: transform var(--t-med) var(--ease-out); margin-bottom: var(--s-1); }
.cover-card img { width: 100%; height: 100%; object-fit: cover; }
.cover-card:hover .cv, .cover-card:focus-visible .cv { transform: translateY(-6px); }
.cover-card .ct { font: 600 1rem/1.35 var(--f-kn); }
.cover-card .ce { font-size: .92rem; color: var(--ink-2); line-height: 1.35; }
html[lang="kn"] .cover-card .ce { font-family: var(--f-kn); }
.noscript { padding: var(--s-6); color: var(--ink); }
.bookcase .noscript { color: var(--ink); }

/* =====================================================================
   HONOURS — a real timeline on a Kaavi red line
   ===================================================================== */
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--s-6); border-left: 2px solid var(--kaavi); }
.timeline li { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s-5); padding: var(--s-3) 0 var(--s-5); }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--s-6) - 7px); top: 22px; width: 12px; height: 12px;
  background: var(--paper); border: 2px solid var(--kaavi); transform: rotate(45deg);
}
.timeline li::after { content: ""; position: absolute; left: calc(-1 * var(--s-6) - 3px); top: 26px; width: 4px; height: 4px; background: var(--turmeric); border-radius: 50%; }
.t-year { font: 400 1.6rem/1.2 var(--f-display); color: var(--kaavi); }
.t-name { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.t-by { margin: var(--s-1) 0 0; color: var(--ink-soft); font-size: 1rem; }

/* =====================================================================
   CONTACT — stays on the same paper, no heavy block
   ===================================================================== */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-9); padding-top: var(--s-6); padding-bottom: var(--s-9); }
.contact-intro h2 { margin-bottom: var(--s-4); }
.contact-intro p { color: var(--ink-2); max-width: 38ch; }
.contact-form { display: grid; gap: var(--s-5); background: var(--duck); border-radius: var(--r-card); padding: var(--s-7); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.field label { display: block; font-weight: 700; margin-bottom: var(--s-2); font-size: 1rem; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; font: 1.06rem/1.5 var(--f-body); color: var(--ink); background: var(--paper);
  border: 1.5px solid rgba(31, 45, 39, .22); border-radius: var(--r-ctl); padding: 11px 14px; min-height: 48px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
html[lang="kn"] .field input, html[lang="kn"] .field textarea { font-family: var(--f-kn); }
.field textarea { resize: vertical; min-height: 150px; }
.field input:hover, .field textarea:hover { border-color: rgba(31, 45, 39, .45); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 45, 39, .14); }
.field.invalid input, .field.invalid textarea { border-color: var(--error); }
.field-hint { margin: var(--s-1) 0 0; font-size: .92rem; color: var(--ink-soft); }
.field-error { margin: var(--s-1) 0 0; font-size: .95rem; color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.form-status { margin: 0; font-size: 1.02rem; }
.form-status.ok { color: var(--ok); font-weight: 700; }
.form-status.err { color: var(--error); }

/* =====================================================================
   FOOTER + POWERED BY
   ===================================================================== */
.footer { background: var(--duck); color: var(--ink-2); font-size: .98rem; }
.footer-band { height: 14px; background: var(--chittara) repeat-x center / 22.4px 14px; }
.footer-inner { display: flex; gap: var(--s-5); justify-content: space-between; align-items: center; flex-wrap: wrap; padding-top: var(--s-6); padding-bottom: var(--s-6); }
.footer p { margin: 0; }
.footer a { color: var(--ink); }
.footer-kn { font: 400 1.5rem "SJ Name", var(--f-kn-display); color: var(--ink); }

.powered { background: var(--paper); border-top: 1px solid var(--duck-dk); }
.powered-inner { display: flex; align-items: center; justify-content: center; gap: var(--s-4); padding-top: var(--s-6); padding-bottom: var(--s-6); text-align: left; }
.powered-mark {
  flex: 0 0 auto; width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center;
  background: var(--ink); box-shadow: inset 0 0 0 2px rgba(214, 161, 42, .9);
}
.powered-mark img { width: 72px; height: 72px; }
.powered-text { margin: 0; display: flex; flex-direction: column; line-height: 1.2; }
.powered-label { font-size: .98rem; color: var(--ink-soft); }
.powered-name {
  font: 400 clamp(1.45rem, 3vw, 2rem)/1.15 var(--f-display); color: var(--ink);
  text-decoration: underline; text-decoration-color: rgba(178, 74, 44, .55); text-decoration-thickness: 1.5px; text-underline-offset: 6px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.powered-name:hover { color: var(--kaavi-dk); text-decoration-color: var(--kaavi); }

/* =====================================================================
   HERO STAGE + SARASWATI CURTAIN
   On every visit the closed curtain rises: main.js lifts it strip by strip
   into the floral valance, which then stays above the stage like a
   proscenium. The hero card sits just below the valance's centre swag.
   ===================================================================== */
.hero-stage {
  --valance-h: calc(min(42vw, max(28vw, 30svh)) / var(--z));
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh / var(--z) - 72px); display: flex; align-items: center;
  padding-top: calc(var(--valance-h) * .36);
}
.hero-stage > .hero { width: 100%; position: relative; z-index: 1; }
.curtain-valance { position: absolute; left: 0; top: 0; width: 100%; height: var(--valance-h); z-index: 2; pointer-events: none;
  object-fit: fill; filter: drop-shadow(0 3px 3px rgba(48, 65, 41, .25)); }
.curtain-cloth, .curtain-cover { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.curtain-cloth { display: block; }
.curtain-cloth[hidden] { display: none; }
.curtain-cover { display: none; background: #dfeedd url("../images/curtain.webp") center / cover no-repeat; }
html.intro .curtain-cover { display: block; }
.curtain-cover[hidden] { display: none !important; }
/* the hero waits behind the closed curtain, then animates in as it opens */
html.intro .hero-text > *, html.intro .hero-photo img { animation-play-state: paused; }
html.intro.intro-open .hero-text > *, html.intro.intro-open .hero-photo img { animation-play-state: running; }

/* =====================================================================
   OPEN BOOK DIALOG
   ===================================================================== */
.book-dialog { width: min(980px, calc(94vw / var(--z))); max-height: calc(92vh / var(--z)); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.book-dialog::backdrop { background: rgba(31, 45, 39, .55); backdrop-filter: blur(4px); }
.book-dialog[open] .bd-inner { animation: dlg-in var(--t-med) var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.bd-inner {
  position: relative; display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: var(--s-7);
  background: var(--paper); border-radius: var(--r-card); overflow: auto; max-height: calc(92vh / var(--z));
  padding: calc(var(--s-7) + 14px) var(--s-7) var(--s-7); box-shadow: 0 40px 80px -24px rgba(31, 45, 39, .5);
}
.bd-inner::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--chittara) repeat-x center / 22.4px 14px; }
.bd-close { position: absolute; top: 28px; right: var(--s-4); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 1px solid rgba(31, 45, 39, .25); cursor: pointer; color: var(--ink); }
.bd-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.bd-close:hover { background: var(--duck); }
.bd-book-col { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); perspective: 1600px; }
.book3d { position: relative; width: 100%; aspect-ratio: 2 / 3; padding: 0; border: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform 700ms var(--ease-io); }
.book3d[disabled] { cursor: default; }
.book3d.flipped { transform: rotateY(180deg); }
.b-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 2px 6px 6px 2px; overflow: hidden; background: var(--teak-dk); box-shadow: inset 6px 0 10px -4px rgba(0,0,0,.5), 0 30px 50px -20px rgba(31, 45, 39, .6); }
.b-face img { width: 100%; height: 100%; object-fit: cover; }
.b-back { transform: rotateY(180deg); border-radius: 6px 2px 2px 6px; }
.bd-info { align-self: center; padding-right: var(--s-5); }
.bd-shelf { color: var(--kaavi); font-size: 1rem; font-weight: 700; margin-bottom: var(--s-3); }
.bd-kn { font: 800 clamp(1.8rem, 3.6vw, 2.7rem)/1.3 var(--f-kn-display); color: var(--ink); margin-bottom: var(--s-2); }
.bd-en { font-family: var(--f-display); font-size: 1.45rem; color: var(--ink-2); margin-bottom: var(--s-4); }
.bd-gloss { font-size: 1.18rem; color: var(--ink); }
.bd-credit { color: var(--ink-soft); font-style: italic; }
.bd-note { color: var(--ink-2); border-left: 2px solid var(--kaavi); padding-left: var(--s-4); }
.bd-credit:empty, .bd-note:empty { display: none; }
.bd-nav { display: flex; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 960px) {
  .hero-card { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding: var(--s-8) var(--s-6) var(--s-5); }
  .hero-photo { height: 360px; }
  .hero-photo img { height: 92%; right: 50%; transform: translateX(50%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(to bottom, transparent 0%, #000 22%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%); mask-composite: intersect; }
  .hero-art { width: min(520px, 92%); right: 50%; top: auto; bottom: -30px; transform: translateX(50%); }
  .about, .honours, .contact { grid-template-columns: 1fr; gap: var(--s-6); }
  .glance, .honours-intro { position: static; }
  .bd-inner { grid-template-columns: 1fr; padding: calc(var(--s-6) + 14px) var(--s-5) var(--s-6); gap: var(--s-5); }
  .bd-book-col { max-width: 260px; margin: 0 auto; width: 100%; }
  .bd-info { padding-right: 0; }
}
@media (max-width: 560px) {
  body { font-size: 1.08rem; }
  .hero { padding-top: var(--s-3); padding-bottom: var(--s-7); }
  .hero-text { padding: var(--s-7) var(--s-5) var(--s-4); }
  .hero-photo { height: 300px; }
  .contact-form { padding: var(--s-5); }
  .field-row { grid-template-columns: 1fr; }
  .bookcase { --row: 190px; --plank: 20px; padding: 0 var(--s-1); }
  .spine-title { font-size: .8rem; }
  .bookcase[data-view="covers"] { grid-template-columns: repeat(2, 1fr); padding: var(--s-4); gap: var(--s-5) var(--s-4); }
  .timeline { padding-left: var(--s-5); }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .timeline li::before { left: calc(-1 * var(--s-5) - 7px); }
  .timeline li::after { left: calc(-1 * var(--s-5) - 3px); }
  .powered-mark { width: 56px; height: 56px; }
  .powered-mark img { width: 48px; height: 48px; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .spine:hover, .spine:focus-visible { transform: none; }
}

/* =====================================================================
   GOLDEN LINE DRAWINGS (traced from his book covers) — very light, behind content
   ===================================================================== */
.has-art { position: relative; isolation: isolate; }
.bg-art {
  position: absolute; z-index: -1; pointer-events: none; user-select: none;
  width: clamp(240px, 28vw, 420px); height: auto; opacity: .2; top: 6%;
}
.art-right { right: -9%; }
.art-left  { left: -9%; }
.art-low   { top: auto; bottom: 4%; }
.art-top   { top: 2%; }
.library .art-left  { left: 1%; }
.library .art-right { right: 1%; }
.journey .art-left  { left: 1%; top: 2%; opacity: .16; }

/* =====================================================================
   JOURNEY — interactive timeline of books and awards
   ===================================================================== */
.journey { padding: var(--s-6) 0 var(--s-6); overflow-x: clip; }
.journey-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-6); flex-wrap: wrap; }
.journey-intro { max-width: 60ch; }
.journey-intro h2 { margin-bottom: var(--s-3); }
.journey-intro p { color: var(--ink-2); margin: 0; }
.jr-readout { text-align: right; display: flex; flex-direction: column; align-items: flex-end; min-width: 200px; }
.jr-year { font: 400 clamp(3.4rem, 7vw, 5.4rem)/1 var(--f-display); color: var(--kaavi); font-variant-numeric: tabular-nums; transition: color var(--t-fast); }
html[lang="kn"] .jr-year.is-text { font: 800 clamp(1.4rem, 3vw, 2rem)/1.3 var(--f-kn-display); }
.jr-year.is-text { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.jr-count { color: var(--ink-soft); font-size: 1rem; min-height: 1.5em; }

.jr-toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-5); margin-bottom: var(--s-4); }
.jr-filters, .jr-decades { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.jr-filter, .jr-dec {
  min-height: 40px; padding: 0 var(--s-4); border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(31, 45, 39, .25); background: var(--paper); color: var(--ink-2); font: 500 .98rem var(--f-body);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
html[lang="kn"] .jr-filter, html[lang="kn"] .jr-dec { font-family: var(--f-kn); }
.jr-filter:hover, .jr-dec:hover { border-color: var(--ink); color: var(--ink); }
.jr-filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jr-dec.is-current { border-color: var(--kaavi); color: var(--kaavi-dk); }

.jr-viewport {
  position: relative; overflow-x: auto; overflow-y: hidden; cursor: grab;
  padding: var(--s-3) calc(50vw - 88px) var(--s-4) max(var(--s-6), calc((100vw - var(--wrap)) / 2 + var(--s-6)));
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.jr-viewport::-webkit-scrollbar { display: none; }
.jr-viewport.is-dragging { cursor: grabbing; user-select: none; }
.jr-viewport.is-dragging * { pointer-events: none; }
.jr-viewport:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

.jr-track { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; width: max-content; position: relative; min-height: 330px; }
.jr-line { position: absolute; left: 0; right: 0; top: 70px; height: 2px; background: rgba(178, 74, 44, .22); pointer-events: none; }
.jr-line::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--jr-progress, 0px); background: var(--kaavi); transition: width 120ms linear; }

.jr-col { position: relative; flex: 0 0 auto; min-width: 176px; display: flex; flex-direction: column; align-items: center; padding: 0 var(--s-3); transition: opacity var(--t-med); }
.jr-col.is-gap { min-width: 0; width: 64px; padding: 0; }
.jr-col.is-gap .jr-label { color: var(--ink-soft); font-size: 1rem; letter-spacing: .2em; }
.jr-col.is-dim { opacity: .3; }
.jr-label { height: 52px; display: flex; align-items: flex-end; font: 400 1.6rem/1 var(--f-display); color: var(--ink-2); transition: color var(--t-fast), transform var(--t-med) var(--ease-out); transform-origin: bottom center; }
.jr-col.is-undated .jr-items { flex-wrap: nowrap; }
.jr-col.is-undated .jr-label { font: 700 1rem/1.25 var(--f-body); text-align: center; color: var(--ink-soft); max-width: 150px; }
html[lang="kn"] .jr-col.is-undated .jr-items { flex-wrap: nowrap; }
.jr-col.is-undated .jr-label { font-family: var(--f-kn); }
.jr-node { width: 14px; height: 14px; margin: 11px 0 20px; transform: rotate(45deg); border: 2px solid var(--kaavi); background: var(--paper); transition: background-color var(--t-fast), transform var(--t-med) var(--ease-out); }
.jr-col.is-gap .jr-node { width: 6px; height: 6px; margin: 15px 0 24px; border-width: 0; background: rgba(178, 74, 44, .5); }
.jr-col.is-undated .jr-node { border-style: dashed; }
.jr-col.is-active .jr-label { color: var(--kaavi); transform: scale(1.18); }
.jr-col.is-active .jr-node { background: var(--kaavi); transform: rotate(45deg) scale(1.25); box-shadow: 0 0 0 4px rgba(214, 161, 42, .35); }

.jr-items { display: flex; flex-direction: row; align-items: flex-start; justify-content: center; gap: var(--s-4); }
.jr-book, .jr-ghost { width: 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.jr-book { border: 0; padding: 0; background: none; cursor: pointer; color: var(--ink); }
.jr-cover { display: block; width: 96px; aspect-ratio: 2 / 3; border-radius: 1px 3px 3px 1px; overflow: hidden; background: var(--duck);
  transform: rotate(var(--r, 0deg)); box-shadow: -2px 0 0 rgba(0,0,0,.25) inset, 0 10px 18px -10px rgba(31, 45, 39, .55);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.jr-cover img { width: 100%; height: 100%; object-fit: cover; }
.jr-book:hover .jr-cover, .jr-book:focus-visible .jr-cover { transform: rotate(0) translateY(-6px) scale(1.06); box-shadow: 0 18px 26px -12px rgba(31, 45, 39, .6); }
.jr-col.is-active .jr-cover { transform: rotate(0) scale(1.04); }
.jr-t { font: 600 .9rem/1.3 var(--f-kn); color: var(--ink); }
.jr-s { font-size: .82rem; line-height: 1.3; color: var(--ink-soft); }
html[lang="kn"] .jr-s { font-family: var(--f-kn); }
.jr-ghost-cover { width: 96px; aspect-ratio: 2 / 3; display: grid; place-items: center; padding: var(--s-2); border: 1.5px dashed rgba(178, 74, 44, .55); border-radius: 3px; background: rgba(252, 248, 238, .7); font: 600 .85rem/1.35 var(--f-kn); color: var(--kaavi-dk); }
.jr-award { width: 156px; display: flex; gap: var(--s-2); align-items: flex-start; text-align: left; padding: var(--s-2) var(--s-3); background: var(--duck); border-radius: 10px; border-left: 3px solid var(--turmeric); }
.jr-award-ico { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 6px; transform: rotate(45deg); background: var(--kaavi); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--turmeric); }
.jr-award .jr-s { display: block; margin-top: 2px; line-height: 1.35; }
.jr-award-name { display: block; font-weight: 700; font-size: .88rem; line-height: 1.3; color: var(--ink); }
html[lang="kn"] .jr-award-name { font-family: var(--f-kn); }
.jr-track[data-filter="books"] .jr-award { display: none; }
.jr-track[data-filter="awards"] .jr-book, .jr-track[data-filter="awards"] .jr-ghost { display: none; }

.jr-controls { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.jr-step { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--paper); border: 1.5px solid var(--ink); color: var(--ink); transition: background-color var(--t-fast), color var(--t-fast); }
.jr-step svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jr-step:hover { background: var(--ink); color: var(--paper); }
.jr-step:disabled { opacity: .35; cursor: default; background: var(--paper); color: var(--ink); }
.jr-slider { flex: 1 1 auto; width: 100%; accent-color: var(--kaavi); height: 32px; cursor: pointer; }

/* =====================================================================
   IN THE NEWS — newspaper clippings pinned to the page
   ===================================================================== */
.press { padding-top: var(--s-7); padding-bottom: var(--s-8); }
.press-list {
  list-style: none; padding: 0; margin: var(--s-7) 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--s-8); align-items: start;
}
.clip { transform: rotate(var(--tilt, 0deg)); transition: transform var(--t-med) var(--ease-out); }
.clip:nth-child(even) { margin-top: var(--s-6); }
.clip:hover, .clip:focus-within { transform: rotate(0deg) translateY(-4px); }

.clip-paper {
  --news: #f3eddc;
  position: relative; display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-6) var(--s-6) calc(var(--s-6) + 10px);
  color: #2b2620; text-decoration: none;
  background-color: var(--news);
  /* newsprint grain + faint yellowing at the edges */
  background-image:
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(170, 140, 80, .14) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .2 0 0 0 0 .12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 18px 30px -16px rgba(60, 45, 20, .45);
  transition: box-shadow var(--t-med);
}
.clip-paper:hover { box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 26px 40px -18px rgba(60, 45, 20, .5); color: #2b2620; }
.clip-paper:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
/* torn bottom edge */
.clip-paper::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background:
    linear-gradient(135deg, var(--news) 33.33%, transparent 33.33%) 0 0 / 14px 10px repeat-x,
    linear-gradient(225deg, var(--news) 33.33%, transparent 33.33%) 0 0 / 14px 10px repeat-x;
  filter: drop-shadow(0 3px 2px rgba(60, 45, 20, .18));
}
/* a strip of tape holding the clipping */
.clip-tape {
  position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(225, 214, 170, .62); box-shadow: 0 1px 2px rgba(0,0,0,.08);
  -webkit-mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent calc(100% - 3px));
          mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent calc(100% - 3px));
}
.clip:nth-child(even) .clip-tape { transform: translateX(-50%) rotate(4deg); left: 42%; }

.clip-head { display: flex; justify-content: center; align-items: center; min-height: 52px; }
.clip-masthead { max-height: 40px; width: auto; max-width: 92%; mix-blend-mode: multiply; filter: grayscale(.15) contrast(1.05); }
.clip-masthead-text { font: 400 2rem/1 var(--f-display); color: #1b1814; letter-spacing: .01em; }
.clip-rule { display: block; height: 5px; border-top: 2px solid #2b2620; border-bottom: 1px solid #2b2620; margin: var(--s-1) 0 var(--s-1); }
.clip-dateline { font: italic 400 .9rem/1.3 Georgia, "Noto Serif Kannada", serif; color: #6b6253; }
.clip-headline { font: 400 clamp(1.45rem, 2.4vw, 1.9rem)/1.15 var(--f-display); color: #16130f; margin-bottom: var(--s-2); }
.clip-headline[lang="kn"] { font: 800 clamp(1.25rem, 2.1vw, 1.6rem)/1.4 var(--f-kn-display); }

.clip-photo { margin: var(--s-1) 0 var(--s-2); }
.clip-photo img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  filter: grayscale(.35) sepia(.18) contrast(1.05) brightness(.98); mix-blend-mode: multiply;
}
.clip-photo.is-contain img { object-fit: contain; background: rgba(200, 190, 160, .25); }
.clip-photo figcaption { font: italic .82rem/1.35 Georgia, "Noto Serif Kannada", serif; color: #6b6253; margin-top: var(--s-1); padding-bottom: var(--s-1); border-bottom: 1px solid rgba(43, 38, 32, .3); }

.clip-body {
  font: 400 1rem/1.6 Georgia, "Noto Serif Kannada", serif; color: #2b2620;
  column-count: 2; column-gap: var(--s-5); column-rule: 1px solid rgba(43, 38, 32, .25);
  text-align: left; hyphens: auto;
}
.clip-body::first-letter { float: left; font: 400 3rem/.8 var(--f-display); padding: 4px 6px 0 0; color: #16130f; }
html[lang="kn"] .clip-body { font-family: "Noto Serif Kannada", Georgia, serif; line-height: 1.75; text-align: left; }
html[lang="kn"] .clip-body::first-letter { float: none; font: inherit; padding: 0; }
.clip-read {
  align-self: flex-start; margin-top: var(--s-3); font: 700 .98rem var(--f-body); color: var(--kaavi);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
html[lang="kn"] .clip-read { font-family: var(--f-kn); }
.clip-paper:hover .clip-read { color: var(--kaavi-dk); }

/* ---------- footer actions / install ---------- */
.footer-actions { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.install-btn { background: var(--paper); }

/* =====================================================================
   PHONES & TABLETS
   ===================================================================== */
/* notch / home-bar safe areas when installed as an app */
.topbar { padding-top: env(safe-area-inset-top); }
.powered-inner { padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); }

/* tablets (portrait and small laptops) */
@media (max-width: 1100px) {
  .bg-art { width: clamp(200px, 30vw, 320px); opacity: .16; }
  .art-right { right: -12%; } .art-left { left: -12%; }
  .hero-text { padding: var(--s-8) var(--s-6) var(--s-7); }
  .about { gap: var(--s-7); }
}
@media (max-width: 960px) {
  .press-list { grid-template-columns: 1fr; gap: var(--s-8); }
  .clip:nth-child(even) { margin-top: 0; }
  .jr-readout { align-items: flex-start; text-align: left; }
  .journey-head { align-items: flex-start; }
  .library-head { align-items: flex-start; }
}
/* phones */
@media (max-width: 600px) {
  .bg-art { width: 62vw; opacity: .12; }
  .art-right { right: -22%; } .art-left { left: -22%; }
  .library .art-left, .library .art-right { display: none; }
  .jr-toolbar { flex-direction: column; align-items: flex-start; }
  .jr-col { min-width: 132px; padding: 0 var(--s-2); }
  .jr-book, .jr-ghost { width: 108px; }
  .jr-cover, .jr-ghost-cover { width: 84px; }
  .jr-award { width: 136px; }
  .jr-track { min-height: 300px; }
  .shelf-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--s-4)); margin-right: calc(-1 * var(--s-4)); padding: 0 var(--s-4) var(--s-1); }
  .shelf-tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .view-toggle { align-self: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
  .powered-inner { gap: var(--s-3); }
  .bd-nav .btn { flex: 1 1 0; }
  .clip-paper { padding: var(--s-5) var(--s-4) calc(var(--s-5) + 10px); }
  .clip-body { column-count: 1; }
  .clip { transform: rotate(calc(var(--tilt, 0deg) * .5)); }
  .hero-title { font-size: clamp(2.8rem, 13vw, 3.6rem); }
}
/* landscape phones: keep the curtain and hero from being cramped */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-card { min-height: 0; }
  .hero-photo img { height: 88%; }
}

/* =====================================================================
   STAGE, SCREEN AND RADIO — a playbill
   ===================================================================== */
.stage-sec { padding: var(--s-6) 0 var(--s-8); overflow-x: clip; }
.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: var(--s-8); align-items: start; }
.stage-intro h2 { margin-bottom: var(--s-4); }
.stage-intro .lede { color: var(--ink-2); max-width: 46ch; }
.spot { margin: var(--s-6) 0 var(--s-5); border-radius: var(--r-card); overflow: hidden; background: #14110f; position: relative; }
.spot img { width: 100%; height: auto; display: block; filter: saturate(.92) contrast(1.04); }
.spot::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 75% at 70% 42%, transparent 55%, rgba(20, 17, 15, .55) 100%); }
.spot figcaption { position: absolute; left: var(--s-4); bottom: var(--s-3); z-index: 1; color: #f3ead9; font-size: .92rem; letter-spacing: .01em; }
.stage-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s-4) var(--s-5); margin: 0; }
.stage-stats div { border-top: 2px solid var(--kaavi); padding-top: var(--s-2); }
.stage-stats dt { font: 400 2.4rem/1.1 var(--f-display); color: var(--kaavi); font-variant-numeric: tabular-nums; }
.stage-stats dd { margin: 0; color: var(--ink-2); font-size: .98rem; line-height: 1.35; }

.playbill { position: relative; background: var(--paper); border: 1px solid rgba(101, 67, 42, .22); border-radius: var(--r-card);
  padding: calc(14px + var(--s-6)) var(--s-6) var(--s-6); box-shadow: 0 1px 0 rgba(31, 45, 39, .04), 0 18px 40px -28px rgba(71, 48, 30, .45); overflow: hidden; }
.playbill::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--chittara) repeat-x center / 22.4px 14px; }
.pb-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.pb-tab {
  min-height: 40px; padding: 0 var(--s-4); border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(31, 45, 39, .25); background: var(--paper); color: var(--ink-2); font: 500 .98rem var(--f-body);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
html[lang="kn"] .pb-tab { font-family: var(--f-kn); }
.pb-tab:hover { border-color: var(--ink); color: var(--ink); }
.pb-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pb-panel:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; border-radius: 6px; }
.pb-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.pb-group + .pb-group, .pb-two + .pb-group { margin-top: var(--s-6); }
.pb-two .pb-group + .pb-group { margin-top: 0; }
.pb-h { font: 400 1.3rem/1.3 var(--f-display); color: var(--ink); margin: 0 0 var(--s-3); display: flex; align-items: center; gap: var(--s-2); }
html[lang="kn"] .pb-h { font: 700 1.12rem/1.5 var(--f-kn-display); }
.pb-h::before { content: ""; width: 9px; height: 9px; flex: 0 0 9px; background: var(--kaavi); transform: rotate(45deg); }
.pb-list { list-style: none; margin: 0; padding: 0; }
.pb-cols .pb-list { columns: 2; column-gap: var(--s-6); }
.pb-row { display: flex; align-items: baseline; gap: var(--s-3); padding: 9px 0; border-bottom: 1px dotted rgba(101, 67, 42, .35); break-inside: avoid; }
.pb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pb-t { font-weight: 600; color: var(--ink); line-height: 1.35; font-size: 1.08rem; }
html[lang="kn"] .pb-t { font-family: var(--f-kn); font-weight: 700; }
.pb-kn { font-family: var(--f-kn); font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.pb-by { font-size: 1rem; color: var(--ink-2); line-height: 1.4; }
.pb-y { flex: 0 0 auto; font: 400 1.15rem var(--f-display); color: var(--kaavi); font-variant-numeric: tabular-nums; }
.pb-row.is-award .pb-by { color: var(--kaavi-dk); font-weight: 600; }
.pb-row.is-award .pb-t::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f6dc8c, var(--turmeric) 55%, #9c6f14); vertical-align: -1px; }
.pb-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pb-chips li { padding: 4px 12px; border-radius: 999px; background: var(--duck); color: var(--ink); font-size: .97rem; }
.pb-note { margin: var(--s-4) 0 0; color: var(--ink-soft); font-style: italic; }

/* =====================================================================
   HONOURS — the 3D award spiral
   ===================================================================== */
.honours { padding: var(--s-6) 0 var(--s-8); overflow-x: clip; }
.aw-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-6); flex-wrap: wrap; }
.aw-intro { max-width: 62ch; }
.aw-intro h2 { margin-bottom: var(--s-3); }
.aw-intro p { color: var(--ink-2); margin: 0; }
.aw-tally { display: flex; flex-direction: column; align-items: flex-end; margin: 0; color: var(--ink-soft); text-align: right; }
.aw-tally-n { font: 400 clamp(3.4rem, 7vw, 5.4rem)/1 var(--f-display); color: var(--kaavi); }

.aw-stage {
  --cw: 226px; --ch: 290px;
  position: relative; height: 640px; margin-top: var(--s-5);
  perspective: 1600px; perspective-origin: 50% 34%;
  overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  outline: none;
}
.aw-stage.is-dragging { cursor: grabbing; }
.aw-stage:focus-visible::after { content: ""; position: absolute; inset: 8px; border: 2px solid var(--focus); border-radius: var(--r-card); pointer-events: none; }
.aw-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 34% 58% at 50% 46%, rgba(214, 161, 42, .16), transparent 70%); }
.aw-floor { position: absolute; left: 50%; bottom: 26px; width: min(760px, 86%); height: 60px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(71, 48, 30, .22), transparent 70%); }
.aw-helix { position: absolute; left: 50%; top: 44%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.aw-pole { position: absolute; left: 0; top: 0; width: 10px; border-radius: 6px; transform-style: flat;
  background: linear-gradient(90deg, var(--teak-dk), var(--teak-lt) 45%, var(--teak) 70%, var(--teak-dk)); opacity: .32; }

.plaque {
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch);
  margin-left: calc(var(--cw) / -2); margin-top: calc(var(--ch) / -2);
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink);
  transform-style: preserve-3d; -webkit-tap-highlight-color: transparent;
}
.pl-face, .pl-back { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pl-face, .pl-back { opacity: var(--fade, 1); }
.pl-face {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 18px 20px; text-align: center; overflow: hidden;
  background: linear-gradient(150deg, var(--teak-lt), var(--teak) 42%, var(--teak-dk));
  box-shadow: 0 14px 28px -14px rgba(31, 22, 14, .65);
}
.pl-face::before { content: ""; position: absolute; inset: 10px; border-radius: 8px; background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(214, 161, 42, .7), inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(178, 74, 44, .35); }
.pl-face > * { position: relative; }
.pl-back { transform: rotateY(180deg); background: linear-gradient(210deg, var(--teak-lt), var(--teak) 50%, var(--teak-dk)); }
.pl-back::after { content: ""; position: absolute; inset: 0; background: var(--kaavi-motif) no-repeat center / 70% auto; opacity: .45; filter: brightness(1.6); }
.pl-shade { position: absolute !important; inset: 0; background: #1f1a14; opacity: calc((1 - var(--lit, 1)) * .55); pointer-events: none; border-radius: 14px; }

.pl-medal { position: relative; width: 78px; height: 78px; margin-top: 10px; isolation: isolate; }
.pl-medal::before, .pl-medal::after { content: ""; position: absolute; top: -20px; width: 16px; height: 34px; background: var(--kaavi); }
.pl-medal::before { left: 20px; transform: skewX(16deg); }
.pl-medal::after { right: 20px; transform: skewX(-16deg); background: var(--kaavi-dk); }
.pl-medal-y { position: absolute; inset: 0; z-index: 1; border-radius: 50%; display: grid; place-items: center;
  font: 400 1.32rem/1 var(--f-display); color: #4a3407; text-shadow: 0 1px 0 rgba(255, 240, 200, .6);
  background: radial-gradient(circle at 34% 30%, #fbe7a6, #e3b54a 42%, #b78519 75%, #8a6210);
  box-shadow: 0 3px 0 #7a560e, 0 8px 14px -6px rgba(71, 48, 30, .6), inset 0 0 0 4px rgba(255, 245, 210, .35); }
.is-milestone .pl-medal-y { background: radial-gradient(circle at 34% 30%, #ffffff, #d9e2dc 45%, #a9b8af 80%); box-shadow: 0 3px 0 #8d9c93, 0 8px 14px -6px rgba(31, 45, 39, .5); }
.is-milestone .pl-medal::before, .is-milestone .pl-medal::after { background: var(--sage-dk); }
.is-milestone .pl-medal-y { color: var(--ink); }

.pl-photo { width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(101, 67, 42, .3); }
.pl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pl-year { font: 400 1.15rem/1 var(--f-display); color: var(--kaavi); }
.pl-name { font: 400 1.14rem/1.25 var(--f-display); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
html[lang="kn"] .pl-name { font: 700 1.06rem/1.45 var(--f-kn); -webkit-line-clamp: 3; }
.has-photo .pl-name { -webkit-line-clamp: 2; font-size: 1.02rem; }
html[lang="kn"] .has-photo .pl-name { -webkit-line-clamp: 2; font-size: .98rem; }
.pl-cam { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--ink-2); }
.pl-cam svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pl-badge { position: absolute !important; top: 16px; right: -32px; transform: rotate(38deg); width: 128px; padding: 3px 0; z-index: 2;
  background: var(--turmeric); color: #3d2a05; font: 700 .7rem/1.2 var(--f-body); text-align: center; letter-spacing: .02em; }
html[lang="kn"] .pl-badge { font: 700 .66rem/1.3 var(--f-kn); }
.is-state .pl-face { background: linear-gradient(150deg, #c99a3a, #9c6f14 45%, #6b4a0c); }
.is-milestone .pl-badge { background: var(--sage); color: var(--ink); }
.plaque.is-active .pl-face { box-shadow: 0 0 0 3px var(--turmeric), 0 22px 40px -16px rgba(31, 22, 14, .75); }
.plaque:focus-visible .pl-face { outline: 3px solid var(--focus); outline-offset: 3px; }

.aw-help { color: var(--ink-soft); font-size: .95rem; text-align: center; margin: 0 auto var(--s-3); }
.aw-bar { display: flex; align-items: center; gap: var(--s-4); }
.aw-detail { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-6); align-items: start;
  margin-top: var(--s-5); padding: var(--s-5) 0 0; border-top: 2px solid var(--kaavi); min-height: 150px; }
.ad-year { margin: 0; font: 400 clamp(3rem, 6vw, 4.4rem)/1 var(--f-display); color: var(--kaavi); font-variant-numeric: tabular-nums; }
.ad-kind { margin: 0 0 var(--s-1); color: var(--kaavi-dk); font-weight: 700; font-size: .95rem; }
.ad-name { margin: 0 0 var(--s-2); font: 400 clamp(1.5rem, 2.6vw, 2rem)/1.25 var(--f-display); }
html[lang="kn"] .ad-name { font: 800 clamp(1.3rem, 2.4vw, 1.75rem)/1.45 var(--f-kn-display); }
.ad-by { margin: 0; color: var(--ink-2); font-size: 1.08rem; }
.ad-count { margin: 0; color: var(--ink-soft); white-space: nowrap; }
.ad-photos { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.ad-thumb { width: 92px; height: 68px; padding: 0; border: 2px solid var(--paper); border-radius: 8px; overflow: hidden; cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(101, 67, 42, .35), 0 6px 14px -8px rgba(31, 22, 14, .6); background: var(--duck); }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad-thumb:hover { box-shadow: 0 0 0 2px var(--kaavi), 0 6px 14px -8px rgba(31, 22, 14, .6); }
.ad-photos-label { color: var(--ink-soft); font-size: .95rem; }

/* award gallery */
.aw-gallery-wrap { margin-top: var(--s-8); }
.aw-gallery-wrap h3 { font: 400 clamp(1.6rem, 2.8vw, 2.1rem)/1.2 var(--f-display); margin: 0 0 var(--s-2); }
html[lang="kn"] .aw-gallery-wrap h3 { font: 800 clamp(1.4rem, 2.6vw, 1.9rem)/1.4 var(--f-kn-display); }
.aw-gallery-wrap > p { color: var(--ink-2); margin: 0 0 var(--s-5); max-width: 60ch; }
.aw-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-5); }
.ag-btn { display: flex; flex-direction: column; gap: var(--s-2); width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; color: var(--ink); font: inherit; }
.ag-img { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--duck);
  box-shadow: 0 0 0 1px rgba(101, 67, 42, .2), 0 14px 28px -20px rgba(31, 22, 14, .6); }
.ag-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease-out); }
.ag-certificate .ag-img img { object-position: top; }
.ag-btn:hover .ag-img img { transform: scale(1.03); }
.ag-btn:focus-visible { outline: none; }
.ag-btn:focus-visible .ag-img { outline: 3px solid var(--focus); outline-offset: 3px; }
.ag-tag { color: var(--kaavi-dk); font-weight: 700; font-size: .92rem; }
.ag-cap { color: var(--ink-2); font-size: 1rem; line-height: 1.4; }

/* photo viewer */
.photo-dialog { width: min(1100px, calc(94vw / var(--z))); max-height: calc(94vh / var(--z)); padding: 0; border: 0; background: transparent; overflow: visible; color: var(--ink); }
.photo-dialog::backdrop { background: rgba(20, 17, 15, .78); backdrop-filter: blur(3px); }
.pd-inner { position: relative; background: var(--paper); border-radius: var(--r-card); padding: var(--s-5); max-height: calc(94vh / var(--z)); overflow: auto; }
.photo-dialog[open] .pd-inner { animation: dlg-in var(--t-med) var(--ease-out); }
.pd-close { top: var(--s-3); right: var(--s-3); z-index: 2; }
.pd-figure { margin: 0; }
.pd-figure img { display: block; margin: 0 auto; max-width: 100%; max-height: calc(74vh / var(--z)); width: auto; height: auto; border-radius: 10px; }
.pd-figure figcaption { margin-top: var(--s-3); color: var(--ink-2); text-align: center; font-size: 1.02rem; padding: 0 var(--s-7); }
.pd-nav { display: flex; justify-content: center; align-items: center; gap: var(--s-4); margin-top: var(--s-4); }
.pd-nav [hidden] { display: none; }
.pd-count { color: var(--ink-soft); min-width: 4ch; text-align: center; }

@media (max-width: 960px) {
  .stage-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .aw-stage { height: 540px; }
  .aw-detail { grid-template-columns: auto minmax(0, 1fr); }
  .ad-count { grid-column: 1 / -1; }
  .aw-tally { align-items: flex-start; text-align: left; }
}
@media (max-width: 640px) {
  .pb-two { grid-template-columns: 1fr; }
  .pb-cols .pb-list { columns: 1; }
  .playbill { padding: calc(14px + var(--s-5)) var(--s-4) var(--s-5); }
  .aw-stage { height: 440px; perspective: 1100px; }
  .pl-face { padding: 18px 14px 16px; gap: 8px; }
  .pl-medal { width: 62px; height: 62px; }
  .pl-medal-y { font-size: 1.1rem; }
  .pl-medal::before, .pl-medal::after { top: -16px; height: 28px; width: 13px; }
  .pl-name { font-size: .92rem; }
  html[lang="kn"] .pl-name { font-size: .86rem; }
  .aw-detail { grid-template-columns: 1fr; gap: var(--s-2); }
  .aw-tally { align-items: flex-start; text-align: left; }
  .pd-inner { padding: var(--s-4) var(--s-3); }
  .pd-figure figcaption { padding: 0 var(--s-2); }
}
@media (prefers-reduced-motion: reduce) {
  .ag-img img { transition: none; }
}

/* =====================================================================
   THE RANGE OF HIS WORK — below the About section
   ===================================================================== */
.range { margin-top: var(--s-7); }
.range-title { font: 400 clamp(1.4rem, 2.4vw, 1.8rem)/1.3 var(--f-display); margin: 0 0 var(--s-4); }
html[lang="kn"] .range-title { font: 800 clamp(1.25rem, 2.2vw, 1.6rem)/1.45 var(--f-kn-display); }
.range-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--s-5); }
.range-list a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--s-3); align-items: baseline;
  padding: var(--s-4) 0; border-top: 1px solid rgba(101, 67, 42, .25); color: var(--ink); text-decoration: none; height: 100%; }
.range-list li:nth-child(-n + 4) a { border-top: 2px solid var(--kaavi); }
.rg-n { grid-row: 1 / 3; font: 400 clamp(2.4rem, 4vw, 3.2rem)/1 var(--f-display); color: var(--kaavi); font-variant-numeric: tabular-nums; min-width: 1.4ch; }
.rg-l { font-weight: 700; line-height: 1.3; }
.rg-d { color: var(--ink-soft); font-size: .93rem; line-height: 1.4; margin-top: 2px; }
.range-list a:hover .rg-l { text-decoration: underline; text-decoration-color: var(--kaavi); text-underline-offset: 3px; }
.range-list a:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 1000px) { .range-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .range-list li:nth-child(-n + 4) a { border-top-width: 1px; border-top-color: rgba(101, 67, 42, .25); } .range-list li:nth-child(-n + 2) a { border-top: 2px solid var(--kaavi); } }
@media (max-width: 520px) { .range-list { grid-template-columns: 1fr; } .range-list li:nth-child(2) a { border-top: 1px solid rgba(101, 67, 42, .25); } }

/* =====================================================================
   GALLERY — the hall of memories (a curved wall of framed photographs)
   ===================================================================== */
.gallery { padding: var(--s-6) 0 var(--s-8); overflow-x: clip; }
.gal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-5); }
.gal-intro { max-width: 60ch; }
.gal-intro h2 { margin-bottom: var(--s-3); }
.gal-intro p { color: var(--ink-2); margin: 0; }
.gal-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.gal-f[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.gal-room {
  position: relative; height: 620px; overflow: hidden; isolation: isolate;
  perspective: 1150px; perspective-origin: 50% 44%;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; outline: none;
}
.gal-room.is-dragging { cursor: grabbing; }
.gal-room:focus-visible::after { content: ""; position: absolute; inset: 6px; border: 2px solid var(--focus); border-radius: 12px; pointer-events: none; z-index: 5; }
/* the room: a sage wall with soft panelling, a Chittara frieze, a spotlight and a teak floor */
.gal-wall { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .0) 0 118px, rgba(31, 45, 39, .035) 118px 120px),
    linear-gradient(180deg, #dfe8de 0%, #e9efe6 48%, #dde6da 78%); }
.gal-frieze { position: absolute; left: 0; right: 0; top: 34px; height: 14px; background: var(--chittara) repeat-x center / 22.4px 14px; opacity: .85; }
.gal-frieze::after { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 3px; background: linear-gradient(90deg, var(--teak-dk), var(--teak-lt), var(--teak-dk)); opacity: .7; }
.gal-light { position: absolute; left: 50%; top: 0; width: 760px; height: 100%; transform: translateX(-50%);
  background: radial-gradient(ellipse 46% 40% at 50% 42%, rgba(255, 244, 214, .85), rgba(255, 244, 214, 0) 70%),
              conic-gradient(from 180deg at 50% -6%, transparent 158deg, rgba(255, 240, 200, .32) 172deg, rgba(255, 240, 200, .32) 188deg, transparent 202deg); }
.gal-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 17%;
  background: linear-gradient(180deg, #a3774d 0%, #8a6038 40%, #6f4b2b 100%);
  box-shadow: inset 0 3px 0 rgba(255, 230, 190, .35), inset 0 10px 18px -8px rgba(40, 25, 12, .5); }
.gal-floor::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 86px, rgba(40, 25, 12, .18) 86px 88px), radial-gradient(ellipse 40% 60% at 50% 0%, rgba(255, 236, 200, .28), transparent 70%); }

.gal-ring { position: absolute; left: 50%; top: 42%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; transition: opacity .18s ease; }
.gal-ring.is-swapping { opacity: 0; }
.gf {
  position: absolute; left: 0; top: 0; width: var(--w); height: var(--h);
  margin-left: calc(var(--w) / -2); margin-top: calc(var(--h) / -2);
  padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; -webkit-tap-highlight-color: transparent;
}
.gf-frame { position: absolute; inset: 0; display: block; padding: 10px; border-radius: 3px;
  background: linear-gradient(135deg, #8a5a32, #c49a5c 22%, #7a4c27 48%, #b9894c 74%, #6b4222);
  box-shadow: 0 24px 34px -18px rgba(40, 25, 12, .75), 0 2px 0 rgba(255, 230, 180, .4) inset, 0 0 0 1px rgba(60, 36, 16, .6);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease-out), box-shadow .3s; }
.gf-mount { display: block; width: 100%; height: 100%; padding: 8px; background: #f7f2e6; box-shadow: inset 0 0 0 1px rgba(101, 67, 42, .25), inset 0 2px 6px rgba(60, 36, 16, .25); }
.gf-mount img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gf-honour .gf-mount img[src*="citation"] { object-fit: contain; background: #fff; }
.gf-plaque { position: absolute; left: 50%; bottom: -36px; transform: translateX(-50%); padding: 3px 12px; border-radius: 3px;
  font: 400 .95rem/1.2 var(--f-display); color: #3d2a05; letter-spacing: .04em;
  background: linear-gradient(180deg, #f3d98d, #d6a12a 60%, #b58313); box-shadow: 0 2px 4px rgba(40, 25, 12, .4); white-space: nowrap; }
.gf-shade { display: none; }
.gf { filter: brightness(calc(.58 + .42 * var(--lit, 1))) saturate(calc(.7 + .3 * var(--lit, 1))); }
.gf.is-active .gf-frame { box-shadow: 0 34px 44px -20px rgba(40, 25, 12, .8), 0 2px 0 rgba(255, 230, 180, .5) inset, 0 0 0 1px rgba(60, 36, 16, .6), 0 0 60px rgba(255, 228, 160, .45); }
.gf:focus-visible .gf-frame { outline: 3px solid var(--focus); outline-offset: 6px; }

.gal-bar { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-4); }
.gal-plate { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-4); align-items: center;
  padding: var(--s-3) var(--s-5); border-top: 2px solid var(--kaavi); border-bottom: 1px solid rgba(101, 67, 42, .25); min-height: 76px; }
.gp-year { font: 400 clamp(2rem, 3.4vw, 2.7rem)/1 var(--f-display); color: var(--kaavi); font-variant-numeric: tabular-nums; }
.gp-text { display: flex; flex-direction: column; min-width: 0; }
.gp-kind { color: var(--kaavi-dk); font-weight: 700; font-size: .92rem; }
.gp-cap { color: var(--ink); line-height: 1.45; }
.gp-count { color: var(--ink-soft); white-space: nowrap; }
.gal-help { color: var(--ink-soft); font-size: .95rem; text-align: center; margin: var(--s-3) auto 0; }

@media (max-width: 960px) { .gal-room { height: 540px; } }
@media (max-width: 560px) {
  .gal-room { height: 440px; perspective-origin: 50% 42%; }
  .gal-frieze { top: 20px; }
  .gf-frame { padding: 7px; }
  .gf-mount { padding: 5px; }
  .gf-plaque { bottom: -32px; font-size: .85rem; }
  .gal-plate { grid-template-columns: auto minmax(0, 1fr); padding: var(--s-3) var(--s-2); }
  .gp-count { grid-column: 1 / -1; }
  .gal-bar { gap: var(--s-2); }
}
@media (prefers-reduced-motion: reduce) { .gf-frame, .gal-ring { transition: none; } }

/* gallery slideshow button */
.gal-play .i-play { display: none; }
.gal-play.is-paused .i-pause { display: none; }
.gal-play.is-paused .i-play { display: block; }
.gal-play .i-play path { fill: currentColor; stroke: none; }

/* =====================================================================
   IN THE NEWS — three clippings to a row (shorter page)
   ===================================================================== */
.press-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-6); margin-top: var(--s-6); }
.press-list .clip:nth-child(even) { margin-top: 0; }
.press-list .clip:nth-child(3n + 2) { margin-top: var(--s-5); }
.press-list .clip-paper { padding: var(--s-5) var(--s-5) calc(var(--s-5) + 10px); gap: var(--s-1); }
.press-list .clip-head { min-height: 40px; }
.press-list .clip-masthead { max-height: 30px; }
.press-list .clip-masthead-text { font-size: 1.55rem; }
.press-list .clip-headline { font-size: clamp(1.15rem, 1.5vw, 1.4rem); }
.press-list .clip-headline[lang="kn"] { font-size: clamp(1.05rem, 1.35vw, 1.25rem); }
.press-list .clip-photo img { aspect-ratio: 3 / 2; }
.press-list .clip-body { column-count: 1; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.press-list .clip-body::first-letter { font-size: 2.4rem; }
@media (max-width: 1100px) {
  .press-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .press-list .clip:nth-child(3n + 2) { margin-top: 0; }
  .press-list .clip:nth-child(even) { margin-top: var(--s-5); }
}
@media (max-width: 640px) {
  .press-list { grid-template-columns: 1fr; gap: var(--s-6); }
  .press-list .clip:nth-child(even) { margin-top: 0; }
}

/* ---------- award details on the plaques ---------- */
.pl-face { gap: 7px; }
.pl-medal { width: 64px; height: 64px; margin-top: 12px; }
.pl-medal-y { font-size: 1.15rem; }
.pl-name { -webkit-line-clamp: 3; font-size: 1.08rem; }
.pl-for { font: italic 400 .9rem/1.3 var(--f-body); color: var(--kaavi-dk); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-from { font: 400 .84rem/1.3 var(--f-body); color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[lang="kn"] .pl-for { font: 600 .84rem/1.45 var(--f-kn); font-style: normal; }
html[lang="kn"] .pl-from { font: 400 .8rem/1.45 var(--f-kn); }
.has-photo .pl-for { -webkit-line-clamp: 1; }
@media (max-width: 640px) {
  .pl-medal { width: 50px; height: 50px; margin-top: 10px; }
  .pl-medal-y { font-size: .95rem; }
  .pl-from { display: none; }
  .pl-for { -webkit-line-clamp: 2; font-size: .8rem; }
}

/* "For" and "Given by" */
.aw-facts { margin: var(--s-2) 0 0; display: grid; gap: var(--s-2); }
.aw-facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: var(--s-3); align-items: baseline; }
.aw-facts dt { color: var(--kaavi-dk); font-weight: 700; font-size: .95rem; }
.aw-facts dd { margin: 0; color: var(--ink); font-size: 1.08rem; line-height: 1.45; }
.ad-more { margin-top: var(--s-4); padding: 0; border: 0; background: none; color: var(--kaavi-dk); font: 700 1rem var(--f-body);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html[lang="kn"] .ad-more { font-family: var(--f-kn); }
.ad-more:hover { color: var(--kaavi); }

/* ---------- the award card ---------- */
.award-dialog { width: min(640px, calc(94vw / var(--z))); max-height: calc(94vh / var(--z)); padding: 0; border: 0; background: transparent; overflow: visible; color: var(--ink); }
.award-dialog::backdrop { background: rgba(31, 45, 39, .6); backdrop-filter: blur(3px); }
.award-dialog[open] .awd-inner { animation: dlg-in var(--t-med) var(--ease-out); }
.awd-inner { position: relative; background: var(--paper); border-radius: var(--r-card); padding: var(--s-5); max-height: calc(94vh / var(--z)); overflow: auto; }
.awd-inner .bd-close { top: var(--s-3); right: var(--s-3); z-index: 2; }
.awd-card { position: relative; text-align: center; padding: calc(18px + var(--s-6)) var(--s-6) var(--s-6);
  border: 2px solid var(--kaavi); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px rgba(178, 74, 44, .45); border-radius: 6px; }
.awd-card::before { content: ""; position: absolute; left: 10px; right: 10px; top: 10px; height: 14px; background: var(--chittara) repeat-x center / 22.4px 14px; }
.awd-medal { position: relative; width: 96px; height: 96px; margin: 26px auto var(--s-3); isolation: isolate; }
.awd-medal::before, .awd-medal::after { content: ""; position: absolute; top: -26px; width: 20px; height: 44px; background: var(--kaavi); }
.awd-medal::before { left: 26px; transform: skewX(16deg); }
.awd-medal::after { right: 26px; transform: skewX(-16deg); background: var(--kaavi-dk); }
.awd-medal span { position: absolute; inset: 0; z-index: 1; border-radius: 50%; display: grid; place-items: center;
  font: 400 1.6rem/1 var(--f-display); color: #4a3407;
  background: radial-gradient(circle at 34% 30%, #fbe7a6, #e3b54a 42%, #b78519 75%, #8a6210);
  box-shadow: 0 3px 0 #7a560e, 0 10px 18px -8px rgba(71, 48, 30, .6), inset 0 0 0 5px rgba(255, 245, 210, .35); }
.awd-medal.is-milestone span { background: radial-gradient(circle at 34% 30%, #ffffff, #d9e2dc 45%, #a9b8af 80%); color: var(--ink); box-shadow: 0 3px 0 #8d9c93; }
.awd-kind { display: inline-block; margin: 0 0 var(--s-2); padding: 2px 12px; border-radius: 999px; background: var(--turmeric); color: #3d2a05; font-weight: 700; font-size: .9rem; }
.awd-year { margin: 0; color: var(--kaavi); font: 400 1.2rem var(--f-display); }
.awd-name { margin: var(--s-1) 0 var(--s-5); font: 400 clamp(1.6rem, 3.4vw, 2.2rem)/1.2 var(--f-display); }
html[lang="kn"] .awd-name { font: 800 clamp(1.4rem, 3vw, 1.9rem)/1.45 var(--f-kn-display); }
.awd-card .aw-facts { text-align: left; max-width: 30em; margin: 0 auto; padding-top: var(--s-4); border-top: 1px solid rgba(101, 67, 42, .25); }
.awd-card .aw-facts dd { font-size: 1.15rem; }
.awd-photos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }
.awd-book { margin-top: var(--s-5); }
.award-dialog .pd-nav { margin-top: var(--s-4); }
.glance-link { color: inherit; text-decoration: underline; text-decoration-color: var(--kaavi); text-underline-offset: 3px; }
.glance-link:hover { color: var(--kaavi-dk); }
@media (max-width: 560px) {
  .awd-card { padding: calc(18px + var(--s-5)) var(--s-4) var(--s-5); }
  .aw-facts div { grid-template-columns: 1fr; gap: 0; }
}

/* plaques: the work it honoured reads clearly, and every plaque says it can be opened */
.pl-face { justify-content: flex-start; padding-top: 26px; }
.pl-name { -webkit-line-clamp: 3; }
.pl-for { font: 700 .98rem/1.3 var(--f-body); font-style: normal; color: var(--kaavi-dk); -webkit-line-clamp: 2; }
html[lang="kn"] .pl-for { font: 700 .92rem/1.45 var(--f-kn); }
.pl-from { -webkit-line-clamp: 1; }
.pl-more { margin-top: auto; padding: 3px 12px; border-radius: 999px; border: 1px solid rgba(178, 74, 44, .5);
  color: var(--kaavi-dk); font: 700 .8rem/1.4 var(--f-body); background: rgba(252, 248, 238, .8); }
html[lang="kn"] .pl-more { font-family: var(--f-kn); }
.plaque.is-active .pl-more { background: var(--kaavi); border-color: var(--kaavi); color: #fff8ee; }
.plaque:hover .pl-more { border-color: var(--kaavi); }
@media (max-width: 640px) {
  .pl-face { padding-top: 20px; }
  .pl-for { font-size: .82rem; }
  html[lang="kn"] .pl-for { font-size: .78rem; }
  .pl-more { font-size: .72rem; padding: 2px 9px; }
}
@media (max-width: 640px) { .pl-from.is-only { display: -webkit-box; -webkit-line-clamp: 2; font-size: .78rem; } }

/* =====================================================================
   PREVIOUS / NEXT — bare, bold arrows (books, awards, photos)
   ===================================================================== */
.chev { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink);
  display: inline-grid; place-items: center; cursor: pointer; transition: color var(--t-fast), background-color var(--t-fast); }
.chev svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.chev:hover { color: var(--kaavi); background: rgba(178, 74, 44, .08); }
.chev:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chev:disabled { opacity: .3; cursor: default; background: none; color: var(--ink); }
.chev[hidden] { display: none; }
.jr-step svg { stroke-width: 2.8; }

/* =====================================================================
   TOP OF PAGE — an open book in the corner, with the contents on hover
   ===================================================================== */
.toc-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s ease, transform .25s var(--ease-out); }
.toc-fab.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.toc-fab[hidden] { display: none; }
.toc-book { position: relative; display: block; width: 148px; height: 97px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 8px 10px rgba(71, 48, 30, .35)); transition: transform .2s var(--ease-out); }
.toc-book:hover, .toc-fab.is-open .toc-book { transform: translateY(-3px); }
.toc-book:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.toc-book svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tb-cover { fill: var(--teak); }
.tb-page { fill: #fffaf0; stroke: rgba(101, 67, 42, .35); stroke-width: 1; }
.tb-spine { stroke: rgba(101, 67, 42, .55); stroke-width: 1.5; }
.tb-arrow { fill: none; stroke: var(--kaavi); stroke-width: 3; stroke-linecap: round; }
.tb-l, .tb-r { position: absolute; top: 42%; width: 40%; text-align: center; font: 400 1.12rem/1.05 var(--f-display); color: var(--kaavi-dk); pointer-events: none; }
.tb-l { left: 8%; transform: rotate(-5deg); }
.tb-r { right: 8%; transform: rotate(5deg); }
html[lang="kn"] .tb-l, html[lang="kn"] .tb-r { font: 700 .98rem/1.2 var(--f-kn); }

.toc-menu { position: absolute; right: 0; bottom: calc(100% + 12px); width: 250px; padding: calc(14px + var(--s-4)) var(--s-4) var(--s-3);
  background: var(--paper); border: 1px solid rgba(101, 67, 42, .3); border-radius: 10px; box-shadow: 0 18px 40px -16px rgba(71, 48, 30, .5);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, transform .18s var(--ease-out), visibility .18s; overflow: hidden; }
.toc-menu::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--chittara) repeat-x center / 19.2px 12px; }
.toc-menu::after { content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px; }   /* keeps the hover alive across the gap */
.toc-fab.is-open .toc-menu { opacity: 1; visibility: visible; transform: none; }
.toc-title { margin: 0 0 var(--s-2); font: 400 1.25rem/1.2 var(--f-display); color: var(--ink); }
html[lang="kn"] .toc-title { font: 800 1.1rem/1.4 var(--f-kn-display); }
.toc-menu ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc-menu li { counter-increment: toc; }
.toc-menu li:first-child { counter-increment: none; border-bottom: 1px solid rgba(101, 67, 42, .2); margin-bottom: 4px; }
.toc-menu a { display: flex; align-items: baseline; gap: 6px; padding: 6px 2px; color: var(--ink); text-decoration: none; font-size: 1rem; line-height: 1.3; }
.toc-menu li + li a::after { content: counter(toc); order: 3; color: var(--ink-soft); font: 400 .95rem var(--f-display); }
.toc-menu li + li a::before { content: ""; order: 2; flex: 1 1 auto; border-bottom: 1.5px dotted rgba(101, 67, 42, .4); transform: translateY(-4px); }
.toc-menu a:hover, .toc-menu a:focus-visible { color: var(--kaavi-dk); }
.toc-menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 3px; }
.toc-menu a[data-toc-top] { font-weight: 700; color: var(--kaavi-dk); }
.toc-menu a.is-here { font-weight: 700; color: var(--kaavi); }
@media (max-width: 640px) {
  .toc-fab { right: 12px; bottom: 12px; }
  .toc-book { width: 112px; height: 74px; }
  .tb-l, .tb-r { font-size: .86rem; }
  html[lang="kn"] .tb-l, html[lang="kn"] .tb-r { font-size: .74rem; }
}
@media (prefers-reduced-motion: reduce) { .toc-fab, .toc-menu, .toc-book { transition: none; } }


/* =====================================================================
   BURGER MENU — tablets and phones (up to 1180px wide)
   ===================================================================== */
.burger { display: none; }
/* compact header: JS adds .is-compact when the full menu does not fit (always on tablets and phones) */
.topbar.is-compact .topbar-inner { gap: var(--s-3); min-height: 64px; }
.topbar.is-compact .burger { display: inline-grid; place-content: center; gap: 5px; width: 46px; height: 46px; padding: 0; border: 1.5px solid rgba(31, 45, 39, .3);
border-radius: 10px; background: var(--paper); cursor: pointer; order: 3; }
.topbar.is-compact .burger span { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.topbar.is-compact.menu-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.topbar.is-compact.menu-open .burger span:nth-child(2) { opacity: 0; }
.topbar.is-compact.menu-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.topbar.is-compact .burger:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.topbar.is-compact .lang-switch { order: 2; }
.topbar.is-compact .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper);
border-top: 1px solid rgba(178, 74, 44, .3); box-shadow: 0 18px 30px -18px rgba(71, 48, 30, .45);
max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .28s var(--ease-out), visibility .28s; }
.topbar.is-compact.menu-open .main-nav { max-height: calc(100svh - 64px); overflow-y: auto; visibility: visible; }
.topbar.is-compact .main-nav .nav { flex-direction: column; align-items: stretch; gap: 0; padding: var(--s-2) var(--s-5) var(--s-5); max-width: 640px; margin: 0 auto; }
.topbar.is-compact .main-nav .nav li { display: block !important; }
.topbar.is-compact .main-nav .nav a { display: block; padding: 14px 4px; font-size: 1.12rem; color: var(--ink); border-bottom: 1px solid rgba(101, 67, 42, .15); }
.topbar.is-compact .main-nav .nav a:hover { border-bottom-color: var(--kaavi); color: var(--kaavi-dk); }
.topbar.is-compact .main-nav .nav .nav-cta-li { margin-top: var(--s-4); }
.topbar.is-compact .main-nav .nav .nav-cta { text-align: center; border: 1.5px solid var(--ink); border-radius: var(--r-ctl); padding: 12px; }
.topbar.is-compact html[lang="kn"] .main-nav .nav a { font-size: 1.05rem; }
@media (prefers-reduced-motion: reduce) { .main-nav, .burger span { transition: none; } }

/* tablets and phones: the card starts below the valance tails */
@media (max-width: 1099px) {
  .hero-stage { padding-top: calc(var(--valance-h) * .9); padding-bottom: var(--s-6); --valance-h: calc(100vw / 3.4);
    align-items: flex-start; min-height: 0; }
}

/* menu labels never wrap onto two lines */
.nav a, .nav .nav-cta, .brand-kn, .lang-btn { white-space: nowrap; }
.topbar-inner { flex-wrap: nowrap; }
.topbar:not(.is-compact) .nav { gap: clamp(14px, 1.6vw, 32px); }
