/* =====================================================================
   Projnana — shared public styles (all screen sizes)
   mobile.css (< 768px) and desktop.css (>= 768px) layer on top.
   ===================================================================== */

:root {
  --ink: #1B2A4A;
  --ink-2: #2B3D63;
  --flame: #E0831A;
  --flame-text: #9E4F06;     /* flame tone with 4.5:1 contrast on white */
  --link: #24589E;
  --text: #1D2433;
  --muted: #5D6473;
  --line: #E3E6EC;
  --mist: #F4F6F9;
  --paper: #FFFFFF;
  --ok: #1E7A46;
  --err: #B3261E;

  --serif: "Source Serif 4", "Noto Serif Kannada", Georgia, "Tunga", "Kannada Sangam MN", serif;
  --sans: "Noto Sans", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", "Nirmala UI", "Tunga", "Kannada Sangam MN", Roboto, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(27, 42, 74, .06), 0 6px 18px rgba(27, 42, 74, .06);
  --wrap: 1240px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Kannada script needs more vertical room for stacked conjuncts (ottakshara) */
html[lang="kn"] { --lh-body: 1.85; --lh-head: 1.42; }
html:not([lang="kn"]) { --lh-body: 1.6; --lh-head: 1.2; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--sans); font-size: 1rem; line-height: var(--lh-body);
  color: var(--text); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
[lang="kn"] { line-height: var(--lh-body, 1.85); }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: var(--lh-head); color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; color: #fff; }
main:focus { outline: none; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-wide { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: 20px; }

/* ----- Brand ----- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; line-height: 1.05; letter-spacing: -.01em; color: var(--ink); }
.brand-tag { font-size: .72rem; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { flex: none; }

/* ----- Buttons & icon buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-sm); border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: background .15s var(--ease);
}
.btn:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--mist); color: var(--ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--mist); color: var(--ink); }

/* ----- Language switcher ----- */
.lang-switch { display: inline-flex; align-items: center; }
.lang-switch a { text-decoration: none; font-weight: 600; }
.lang-switch--pill { border: 1px solid var(--ink); border-radius: var(--r-sm); overflow: hidden; height: 32px; }
.lang-switch--pill a { display: grid; place-items: center; height: 100%; padding: 0 10px; font-size: .82rem; color: var(--ink); line-height: 1; }
.lang-switch--pill a[lang="kn"] { font-family: "Noto Sans Kannada", var(--sans); }
.lang-switch--pill a.is-active { background: var(--ink); color: #fff; }
.lang-switch--full { gap: 4px; font-size: .9rem; }
.lang-switch--full a { padding: 6px 10px; border-radius: var(--r-sm); color: var(--muted); }
.lang-switch--full a + a::before { content: ""; }
.lang-switch--full a.is-active { color: var(--ink); background: var(--mist); }

/* ----- Pills, chips, badges ----- */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.6;
  color: var(--pill, var(--ink)); background: var(--mist); text-decoration: none; white-space: nowrap;
  background: color-mix(in srgb, var(--pill, var(--ink)) 11%, white);
}
.pill:hover { color: var(--pill); background: color-mix(in srgb, var(--pill, var(--ink)) 18%, white); }
.lang-badge {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); line-height: 1.6; vertical-align: middle;
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem;
  white-space: nowrap;
}
.chip:hover { border-color: var(--c, var(--ink)); color: var(--c, var(--ink)); }
.chip.is-active { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: #fff; }

/* ----- Avatars ----- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--mist); }
.avatar-initials {
  display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  background: #E8ECF4; color: var(--ink); font-weight: 600; font-size: calc(var(--s) * .38); line-height: 1;
}

/* ----- Cards ----- */
.card { display: flex; background: var(--paper); min-width: 0; }
.card-img { display: block; overflow: hidden; border-radius: var(--r-md); background: var(--mist); flex: none; }
.card-img img, .card-img .img-fallback { width: 100%; height: 100%; object-fit: cover; }
.img-fallback {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: 80px;
  background: linear-gradient(135deg, #E9EDF5, #F6F1E8); color: var(--ink-2); font-family: var(--serif); font-size: 2rem;
}
.card-body { min-width: 0; display: flex; flex-direction: column; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; min-height: 22px; }
.card-title { font-size: 1.1rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-excerpt { color: var(--muted); font-size: .92rem; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: .82rem; min-width: 0; }
.card-author { color: var(--text); font-weight: 600; text-decoration: none; display: block; line-height: 1.3; }
.card-author:hover { text-decoration: underline; }
.card-sub { color: var(--muted); font-size: .8rem; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 2px; line-height: 1.5; }
.card-sub .icon { margin-right: 2px; }
.sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; margin: 0 7px; }

.card-row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; }
.card-row-img { display: block; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--mist); }
.card-row-img img, .card-row-img .img-fallback { width: 100%; height: 100%; object-fit: cover; min-height: 0; font-size: 1.2rem; }
.card-row-title { font-size: .98rem; margin: 0 0 2px; }
.card-row-title a { color: var(--ink); text-decoration: none; }
.card-row-title a:hover { text-decoration: underline; }

/* ----- Hero (featured) ----- */
.hero { position: relative; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-item { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.hero-slide { position: relative; overflow: hidden; background: var(--ink); color: #fff; height: 100%; }
.hero-media, .hero-media img, .hero-media .img-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 22, 40, .9) 0%, rgba(14, 22, 40, .45) 48%, rgba(14, 22, 40, 0) 78%); }
.hero-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; height: 100%; }
.hero-body .pill { background: var(--flame); color: #1B1205; }
.hero-body .lang-badge { color: #fff; border-color: rgba(255,255,255,.5); margin: 0 0 0 6px; }
.hero-title { color: #fff; margin: 12px 0 10px; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.hero-title a { color: inherit; text-decoration: none; }
.hero-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.hero-dek { color: rgba(255,255,255,.9); max-width: 46ch; }
.hero-body .card-meta { color: #fff; margin-top: 0; }
.hero-body .card-author { color: #fff; }
.hero-body .card-sub { color: rgba(255,255,255,.82); }
.hero-go { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--ink); }
.hero-go:hover { background: var(--flame); color: #1B1205; }
.hero-dots { display: flex; gap: 6px; justify-content: center; }
.hero-dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.hero-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: width .2s var(--ease), background .2s; }
.hero-dots button[aria-selected="true"]::before { width: 20px; border-radius: 4px; background: var(--ink); }

/* ----- Category strip ----- */
.cat-strip { position: relative; list-style: none; margin: 0; padding: 0; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text); text-align: center; }
.cat-ico {
  display: inline-grid; place-items: center; color: var(--c, var(--ink)); flex: none;
  background: color-mix(in srgb, var(--c, var(--ink)) 11%, white);
}
.cat-name { font-weight: 600; font-size: .86rem; line-height: 1.35; margin-top: 8px; }
.cat-count { font-size: .74rem; color: var(--muted); }

/* ----- Sections ----- */
.section { padding-block: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 1.45rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.cat-ico--sm { width: 32px; height: 32px; border-radius: 50%; }
.more-link { font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }
.card-grid { display: grid; gap: 24px; }
.side-panel { background: var(--mist); border-radius: var(--r-md); padding: 18px 20px; }
.side-h { font-family: var(--sans); font-size: .95rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.rank-list { list-style: none; counter-reset: rank; margin: 0; padding: 0; }
.rank-list li { counter-increment: rank; position: relative; padding: 10px 0 10px 38px; border-bottom: 1px solid var(--line); line-height: 1.4; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li::before { content: counter(rank); position: absolute; left: 0; top: 6px; font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--flame); line-height: 1.2; }
.rank-list a { display: block; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1rem; }
.rank-list a:hover { text-decoration: underline; }

.author-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.author-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.author-card h2, .author-card h3 { font-size: 1.05rem; margin: 0 0 2px; }
.author-card h2 a, .author-card h3 a { color: var(--ink); text-decoration: none; }
.author-card h2 a:hover, .author-card h3 a:hover { text-decoration: underline; }
.author-role { color: var(--flame-text); font-size: .85rem; font-weight: 600; margin: 0; }
.author-short { color: var(--muted); font-size: .9rem; margin: 4px 0; }

/* ----- Listing pages ----- */
.listing-head { padding-top: 24px; padding-bottom: 8px; }
.listing-head h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.listing-head .cat-ico { width: 48px; height: 48px; border-radius: 50%; }
.listing-dek { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.results-count { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.results { transition: opacity .2s; }
.results.is-loading { opacity: .45; }
.breadcrumb ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin: 0 8px; opacity: .6; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state h1, .empty-state h2 { color: var(--ink); }
.empty-state .chip-row { justify-content: center; }
.empty-state--page { padding-block: 12vh; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.inline-search { display: flex; gap: 8px; width: 100%; max-width: 480px; margin: 16px auto; }
.inline-search input { flex: 1; min-width: 0; }

.search-big { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 6px 6px 6px 16px; border: 1.5px solid var(--ink); border-radius: var(--r-md); background: var(--paper); max-width: 720px; }
.search-big .icon { color: var(--muted); flex: none; }
.search-big input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1.1rem; padding: 10px 0; background: transparent; }

/* ----- Pagination ----- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.pagination ol { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.pagination a, .pagination span[aria-current] { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 600; }
.pagination a:hover { background: var(--mist); }
.pagination span[aria-current] { background: var(--ink); color: #fff; }
.pagination .pg-edge { display: inline-flex; gap: 6px; border: 1px solid var(--line); }
.pg-gap { display: grid; place-items: center; min-width: 24px; color: var(--muted); }

/* ----- Forms (public) ----- */
input[type="text"], input[type="email"], input[type="search"], textarea {
  font: inherit; color: var(--text); background: var(--paper); border: 1px solid #C9CED8; border-radius: var(--r-sm);
  padding: 10px 12px; width: 100%; min-height: 44px;
}
input:focus, textarea:focus { border-color: var(--ink); outline: 2px solid color-mix(in srgb, var(--ink) 20%, transparent); }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* ----- Notices / toast ----- */
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-sm); background: var(--mist); font-size: .92rem; margin: 0 0 16px; line-height: 1.5; flex-wrap: wrap; }
.notice .icon { flex: none; margin-top: 2px; color: var(--link); }
.notice a { font-weight: 600; }
.notice--ok { background: #E7F4EC; color: #12512E; }
.notice--error { background: #FBE9E7; color: #8C1D18; }
.preview-bar { position: sticky; top: 0; z-index: 60; background: #FFF4D6; color: #5A4300; padding: 10px 20px; text-align: center; font-size: .92rem; border-bottom: 1px solid #F1D88E; }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); }
.sw-update { position: fixed; left: 16px; right: 16px; bottom: 84px; z-index: 91; max-width: 420px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: #fff; padding: 10px 12px 10px 16px; border-radius: var(--r-md); box-shadow: var(--shadow); font-size: .92rem; }
.sw-update button { background: var(--flame); color: #1B1205; border: 0; border-radius: var(--r-sm); padding: 8px 14px; font-weight: 700; cursor: pointer; }
.sw-update[hidden], .toast[hidden], .install-btn[hidden] { display: none; }
.install-btn { position: fixed; right: 16px; bottom: 84px; z-index: 89; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px; background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); cursor: pointer; }

/* =====================================================================
   Article
   ===================================================================== */
.article-head { padding-top: 20px; }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.article-title { font-size: clamp(1.85rem, 5vw, 3rem); letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; margin-bottom: 12px; }
html[lang="kn"] .article-title, .article[lang="kn"] .article-title { letter-spacing: 0; }
.article-dek { font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); line-height: 1.5; margin-bottom: 20px; }
.byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-block: 1px solid var(--line); margin-bottom: 24px; }
.byline-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.4; }
.byline-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.byline-name:hover { text-decoration: underline; }
.byline-role { font-size: .85rem; color: var(--flame-text); font-weight: 600; }
.article-hero { margin: 0 auto 28px; }
.article-hero img { width: 100%; height: auto; border-radius: var(--r-md); }
.article-hero figcaption, .prose figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }

.prose { font-family: var(--serif); font-size: 1.16rem; line-height: 1.75; color: #1F2532; overflow-wrap: break-word; word-break: normal; }
.prose[lang="kn"], .article[lang="kn"] .prose { font-size: 1.1rem; line-height: 1.95; }
.prose > * { max-width: 100%; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.6rem; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 1.1rem; margin: 1.4em 0 .4em; font-family: var(--sans); }
.prose a { color: var(--link); overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--flame); font-style: italic; color: var(--ink-2); font-size: 1.2em; }
.prose[lang="kn"] blockquote, .article[lang="kn"] .prose blockquote { font-style: normal; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em auto; width: 40%; }
.prose img { height: auto; border-radius: var(--r-sm); }
.prose figure { margin: 1.8em 0; }
.prose figure img { width: 100%; }
.prose figure.align-left { float: left; width: 45%; margin: .3em 1.4em 1em 0; }
.prose figure.align-right { float: right; width: 45%; margin: .3em 0 1em 1.4em; }
.prose figure.align-center { margin-inline: auto; }
.prose figure.w-25 { width: 25%; } .prose figure.w-50 { width: 50%; } .prose figure.w-75 { width: 75%; } .prose figure.w-100 { width: 100%; }
.prose figure.align-center.w-25, .prose figure.align-center.w-50, .prose figure.align-center.w-75 { margin-inline: auto; }
.prose::after { content: ""; display: table; clear: both; }
.prose pre, .prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
.prose pre { background: var(--mist); padding: 14px; border-radius: var(--r-sm); overflow-x: auto; white-space: pre; }
.prose code { background: var(--mist); padding: .1em .35em; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.table-wrap { position: relative; overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--r-sm); -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .92rem; line-height: 1.5; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 100px; }
.prose th { background: var(--mist); font-weight: 600; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }

.toc { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 24px; }
.toc summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.toc ol, .toc-side ol { list-style: none; margin: 8px 0 0; padding: 0; font-size: .92rem; line-height: 1.45; }
.toc li, .toc-side li { padding: 4px 0; }
.toc .toc-l3, .toc-side .toc-l3 { padding-left: 14px; font-size: .88rem; }
.toc a, .toc-side a { color: var(--text); text-decoration: none; }
.toc a:hover, .toc-side a:hover, .toc-side a.is-current { color: var(--link); text-decoration: underline; }

.tag-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--mist); color: var(--ink-2); text-decoration: none; font-size: .85rem; }
.tag-list a:hover { background: #E7EBF2; }
.share-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 28px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.share-label { font-weight: 700; font-size: .9rem; margin-right: 6px; color: var(--ink); }
.share-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; }
.share-btn:hover { border-color: var(--ink); color: var(--ink); }
.author-box { display: flex; gap: 16px; padding: 20px; background: var(--mist); border-radius: var(--r-md); margin: 24px 0; }
.author-box-label { font-size: .78rem; color: var(--muted); margin: 0; font-weight: 600; }
.author-box-name { font-size: 1.2rem; margin: 0 0 4px; }
.author-box-name a { color: var(--ink); text-decoration: none; }
.author-box p:last-child { margin: 0; font-size: .95rem; color: var(--text); }
.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.adj { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); min-width: 0; }
.adj:hover { border-color: var(--ink); color: var(--ink); }
.adj-next { text-align: right; align-items: flex-end; }
.adj-label { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.adj-title { font-family: var(--serif); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }

.comments { padding-block: 32px 48px; border-top: 1px solid var(--line); margin-top: 16px; }
.comments h2 .count { font-family: var(--sans); font-size: .9rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-body { overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 14px; margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); }
.comment-form h3 { margin: 0; font-size: 1.15rem; }
.comment-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.comment-form .form-row { display: grid; gap: 14px; }
.comment-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Author page */
.author-hero { padding-top: 24px; }
.author-hero-inner { display: flex; gap: 24px; align-items: center; }
.author-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; flex: none; }
.author-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 4px; }
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.author-links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .88rem; }
.author-links a:hover { border-color: var(--ink); }
.author-bio { margin-top: 20px; max-width: 70ch; font-size: 1.05rem; }

.static-page { padding-block: 32px 64px; }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { background: var(--ink); color: #C9D1E2; margin-top: 48px; padding-top: 40px; }
.site-footer a { color: #E6EBF5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: #AEB8CC; }
.site-footer .brand-mark { --lamp: #fff; }
.footer-grid { display: grid; gap: 28px; padding-bottom: 28px; }
.footer-brand p { margin-top: 12px; max-width: 36ch; font-size: .92rem; }
.footer-h { font-family: var(--sans); font-size: .9rem; color: #fff; margin-bottom: 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.footer-social { display: flex; gap: 6px; }
.footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); padding-block: 16px; font-size: .85rem; }
.footer-base .lang-switch--full a { color: #C9D1E2; }
.footer-base .lang-switch--full a.is-active { color: #fff; background: rgba(255,255,255,.1); }

/* Offline page */
.offline { max-width: 560px; margin: 12vh auto; padding: 24px; text-align: center; }
.offline h1 { font-size: 1.5rem; margin-top: 16px; }
.offline-actions { margin: 20px 0; }
.offline-saved { text-align: left; margin-top: 28px; }
.offline-saved h2 { font-size: 1.05rem; font-family: var(--sans); }
.offline-saved ul { padding-left: 1.2em; }

/* =====================================================================
   Motion & print
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .m-header, .d-header, .bottom-nav, .site-footer, .share-bar, .article-side, .comments, .related-mobile, .adjacent, .toc, .install-btn, .sw-update, .toast, .breadcrumb, .share-native, .skip-link { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .prose { font-size: 12pt; }
  .article-layout { display: block !important; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; }
  .article-hero img { max-height: 9cm; width: auto; }
}
