/* FjaloriShqip — warm editorial style in Albanian red. No external fonts or frameworks. */

:root {
  --accent: #c8102e;
  --accent-hover: #a50d26;
  --accent-soft: #fcebee;
  --accent-ink: #ffffff;
  --bg: #faf7f3;
  --surface: #ffffff;
  --surface-2: #f4efe9;
  --text: #1f1b18;
  --muted: #6c645d;
  --border: #e7dfd6;
  --border-strong: #d6cbbf;
  --gheg: #b45309;
  --tosk: #1d6fa5;
  --ok: #15803d;
  --warn-bg: #fff7e6;
  --warn-border: #f0c36d;
  --shadow-sm: 0 1px 2px rgb(60 30 20 / 0.06);
  --shadow: 0 1px 3px rgb(60 30 20 / 0.06), 0 8px 24px rgb(60 30 20 / 0.06);
  --shadow-lg: 0 12px 40px rgb(60 30 20 / 0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Cambria, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #ff5468;
    --accent-hover: #ff7584;
    --accent-soft: #3a1a1f;
    --accent-ink: #1a0d0f;
    --bg: #131110;
    --surface: #1c1917;
    --surface-2: #26221f;
    --text: #f2ede7;
    --muted: #a69d94;
    --border: #322c28;
    --border-strong: #463e38;
    --gheg: #f0a050;
    --tosk: #6cb6ea;
    --ok: #4ade80;
    --warn-bg: #2d2412;
    --warn-border: #7a5a1c;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.03), 0 8px 24px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #ff5468;
  --accent-hover: #ff7584;
  --accent-soft: #3a1a1f;
  --accent-ink: #1a0d0f;
  --bg: #131110;
  --surface: #1c1917;
  --surface-2: #26221f;
  --text: #f2ede7;
  --muted: #a69d94;
  --border: #322c28;
  --border-strong: #463e38;
  --gheg: #f0a050;
  --tosk: #6cb6ea;
  --ok: #4ade80;
  --warn-bg: #2d2412;
  --warn-border: #7a5a1c;
  --shadow-sm: none;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.03), 0 8px 24px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

/* ── language switch: both languages are in the HTML ── */
[data-ui="en"] { display: none; }
html.en [data-ui="en"] { display: inline; }
html.en [data-ui="sq"] { display: none; }

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; overflow-x: clip; }
body { overflow-x: clip; } /* nothing may widen the page sideways on phones (clip keeps the sticky header working) */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-top: 28px; padding-bottom: 64px; outline: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.icon { flex: none; vertical-align: -0.2em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--accent-ink); }

/* ── buttons, chips, pills ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: 0.875rem; }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.chip { display: inline-block; padding: 4px 12px; margin: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1rem; transition: all 0.15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.pos-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.8rem; font-weight: 650; letter-spacing: 0.01em; }
.lang-badge { display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; vertical-align: 0.15em; margin-right: 6px; font-family: var(--sans); }
.lang-badge.sq { border-color: var(--accent); color: var(--accent); }
.tag { display: inline-block; padding: 0 8px; margin-right: 4px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.info-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.875rem; font-weight: 600; }
.info-pill .icon { color: var(--ok); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 24px; }
.dialect-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0.1em; background: var(--muted); }
.dialect-dot.gheg { background: var(--gheg); }
.dialect-dot.tosk { background: var(--tosk); }
.ipa { font-family: var(--serif); color: var(--muted); font-size: 1.05rem; }

/* ── cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.card > :last-child { margin-bottom: 0; }
.card-warn { background: var(--warn-bg); border-color: var(--warn-border); }
.stack { display: grid; gap: 18px; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.95rem; }

/* ── header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 1.2rem; letter-spacing: -0.01em; flex: none; }
.logo:hover { color: var(--text); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.15); }
.logo-text { font-family: var(--serif); font-weight: 500; }
.logo-text b { color: var(--accent); font-weight: 700; }
.header-search { flex: 1; max-width: 420px; }
.header-spacer { flex: 1; }
.main-nav { display: flex; gap: 2px; }
.main-nav a { padding: 8px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: 0.95rem; white-space: nowrap; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: 700 0.78rem var(--sans); letter-spacing: 0.04em; padding: 6px 9px; border-radius: 7px; cursor: pointer; }
html:not(.en) .lang-switch [data-lang="sq"], html.en .lang-switch [data-lang="en"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: inline; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .when-dark { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .when-light { display: none; }
}
.menu-toggle { display: none; }

@media (max-width: 980px) {
  .menu-toggle { display: inline-grid; }
  .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; font-size: 1rem; }
  .header-search { max-width: none; }
}
@media (max-width: 640px) {
  .header-inner { gap: 10px; flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .logo-text { display: none; }
  .header-search { order: 5; flex-basis: 100%; }
  .header-spacer { display: none; }
  .header-actions { margin-left: auto; }
  .main-nav { top: 100%; }
  .slash-hint { display: none; }
}

/* ── search ── */
.search { position: relative; }
.search-field { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 999px; padding: 0 6px 0 14px; transition: border-color 0.15s, box-shadow 0.15s; }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search-icon { color: var(--muted); display: inline-flex; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: 9px 0; outline: none; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search-big .search-field { padding: 6px 6px 6px 20px; box-shadow: var(--shadow); }
.search-big input { font-size: 1.15rem; padding: 12px 0; }
.search-submit { border: 0; background: var(--accent); color: var(--accent-ink); font: 650 1rem var(--sans); padding: 12px 22px; border-radius: 999px; cursor: pointer; }
.search-submit:hover { background: var(--accent-hover); }
.letter-keys { display: inline-flex; gap: 4px; }
.key { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 1rem var(--serif); cursor: pointer; padding: 0; }
.key:hover { border-color: var(--accent); color: var(--accent); }
.search-small .key { width: 26px; height: 26px; font-size: 0.9rem; }
.slash-hint { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; color: var(--muted); font-size: 0.75rem; margin-right: 6px; }
.search-small .letter-keys { display: none; }
.search-small:focus-within .letter-keys { display: inline-flex; }
.search-small:focus-within .slash-hint { display: none; }
@media (max-width: 520px) { .search-submit { padding: 12px 16px; } .search-big .search-field { padding-left: 14px; } .search-big .search-icon { display: none; } }

.suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 70vh; overflow-y: auto; text-align: left; }
.suggestions li a { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.suggestions li a b { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
.suggestions li a small { color: var(--accent); font-size: 0.75rem; font-weight: 650; justify-self: start; }
.suggestions li a span { grid-column: 1 / -1; color: var(--muted); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions li.active a, .suggestions li a:hover { background: var(--accent-soft); }
.suggestions .sugg-foot a { display: block; padding: 8px 12px; font-size: 0.85rem; color: var(--accent); border-top: 1px solid var(--border); margin-top: 4px; border-radius: 0 0 9px 9px; }

.try { margin: 16px 0 0; color: var(--muted); font-size: 0.92rem; }

/* ── home ── */
.hero { position: relative; text-align: center; padding: 56px 0 40px; max-width: 760px; margin: 0 auto; }
.hero::before { content: ""; position: absolute; top: -40px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; background: radial-gradient(60% 70% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); pointer-events: none; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08; margin-bottom: 18px; }
.hero h1 .accent { color: var(--accent); font-style: italic; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 600px; margin: 0 auto 28px; }

.featured { display: grid; gap: 18px; grid-template-columns: 1.4fr 1fr; grid-template-areas: "day hour" "day dialect"; margin-top: 20px; }
.feature-day { grid-area: day; }
.feature-hour { grid-area: hour; }
.feature-dialect { grid-area: dialect; }
@media (max-width: 820px) { .featured { grid-template-columns: 1fr; grid-template-areas: "day" "hour" "dialect"; } }
.feature-card { display: flex; flex-direction: column; gap: 10px; transition: box-shadow 0.2s, border-color 0.2s; }
.feature-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.feature-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.feature-card .card-body { display: flex; flex-direction: column; flex: 1; }
.feature-date { color: var(--muted); font-size: 0.85rem; }
.feature-day { background: linear-gradient(160deg, var(--surface) 55%, var(--accent-soft)); }
.feature-word { display: inline-block; font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.15; overflow-wrap: anywhere; }
.feature-day .feature-word { font-size: clamp(2.6rem, 6vw, 3.6rem); }
.feature-word:hover { color: var(--accent); }
.feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 6px 0 12px; }
.feature-gloss { font-size: 1.08rem; }
.feature-day .feature-gloss { font-size: 1.2rem; }
.feature-example { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.feature-example small { display: block; font-family: var(--sans); font-style: normal; color: var(--muted); font-size: 0.875rem; margin-top: 2px; }
.feature-more { margin-top: auto; font-weight: 600; font-size: 0.92rem; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.dialect-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; margin: 8px 0 12px; }
.dialect-pair .side { display: grid; gap: 2px; }
.dialect-pair .side small { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.dialect-pair .side.gheg small { color: var(--gheg); }
.dialect-pair .side.std small { color: var(--muted); }
.dialect-pair .side a, .dialect-pair .side b { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.dialect-pair .side a:hover { color: var(--accent); }
.dialect-pair .arrow { color: var(--muted); font-size: 1.3rem; }
.skeleton { height: 120px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.random-band { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; margin: 28px 0 8px; color: var(--muted); }
.random-band p { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 40px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stats > div { padding: 22px 18px; text-align: center; border-left: 1px solid var(--border); }
.stats > div:first-child { border-left: 0; }
.stats b { display: block; font-family: var(--serif); font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; color: var(--accent); line-height: 1.1; }
.stats span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } .stats > div:nth-child(3) { border-left: 0; } .stats > div:nth-child(n + 3) { border-top: 1px solid var(--border); } }

.section { margin: 48px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 16px; }
.section-head h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: 0; }
.section-head p { margin: 0; }
.tile-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature-tile { display: block; text-decoration: none; color: var(--text); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.feature-tile:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.feature-tile h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.feature-tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }

.open-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 30px; background: linear-gradient(120deg, var(--accent-soft), var(--surface) 70%); }
.open-cta h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.open-cta p { margin: 0; max-width: 620px; color: var(--muted); }
.cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── letters ── */
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.letters a { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; transition: all 0.15s; }
.letters a:hover { border-color: var(--accent); color: var(--accent); }
.letters a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.letters-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.letters-tiles a { height: auto; padding: 12px 6px; display: grid; gap: 2px; }
.letters-tiles .l { font-size: 1.5rem; line-height: 1.1; }
.letters-tiles small { font-family: var(--sans); font-weight: 500; font-size: 0.75rem; color: var(--muted); }

.letter-head { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.letter-head h1 { margin: 0; }
.letter-head p { margin: 2px 0 0; }
.big-letter { display: grid; place-items: center; min-width: 84px; height: 84px; padding: 0 14px; border-radius: 22px; background: var(--accent); color: #fff; font-family: var(--serif); font-size: 2.8rem; font-weight: 700; box-shadow: var(--shadow); margin: 0; }

.word-grid { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.word-grid a { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; height: 100%; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.word-grid a:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.wc-word { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.wc-pos { font-size: 0.75rem; font-weight: 650; color: var(--accent); white-space: nowrap; }
.wc-gloss { grid-column: 1 / -1; color: var(--muted); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-form { display: inline-block; font-size: 0.72rem; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 0 8px; margin-left: 6px; font-family: var(--sans); font-weight: 600; vertical-align: 0.15em; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.pager a { display: inline-grid; place-items: center; min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── breadcrumbs ── */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 0; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 600; }

/* ── word page ── */
.word-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .word-layout { grid-template-columns: 1fr; } }
.word-main { display: grid; gap: 18px; min-width: 0; }
.word-main > * { min-width: 0; }
.word-hero { padding: 6px 0 4px; }
.word-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.word-title h1 { font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1.05; margin: 0; overflow-wrap: anywhere; }
.copy-btn .copied { display: none; color: var(--ok); }
.copy-btn.done > .icon { display: none; }
.copy-btn.done .copied { display: inline; }
.word-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 0; }
.word-summary { margin: 14px 0 0; font-size: 1.2rem; max-width: 60ch; }
.variant-note { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 14px 8px 0 0; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.95rem; }
.variant-note a { font-family: var(--serif); font-weight: 650; font-size: 1.05rem; }

.entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.entry-head .pos-pill { font-size: 0.9rem; padding: 4px 14px; }
.entry-head .gender { color: var(--muted); font-size: 0.92rem; font-style: italic; }
.entry h2.sub { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 0 10px; }
.entry h2.sub:first-of-type { margin-top: 0; }
.entry h2.sub a { text-transform: none; letter-spacing: 0; font-family: var(--serif); font-size: 1rem; }
.senses { margin: 0; padding: 0; list-style: none; counter-reset: sense; }
.senses > li { position: relative; counter-increment: sense; padding: 10px 0 10px 40px; border-bottom: 1px dashed var(--border); }
.senses > li:last-child { border-bottom: 0; }
.senses > li::before { content: counter(sense); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.sense-line { font-size: 1.05rem; }
.examples { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.examples li { border-left: 3px solid var(--accent-soft); padding: 2px 0 2px 12px; }
.ex-sq { display: block; font-family: var(--serif); font-style: italic; font-size: 1.02rem; }
.ex-en { display: block; color: var(--muted); font-size: 0.9rem; }

details > summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; display: inline-block; transition: transform 0.15s; font-size: 1.2em; line-height: 1; }
details[open] > summary::before { transform: rotate(90deg); }
.etym, .allforms, .more-tenses { margin-top: 14px; }
.etym p { color: var(--muted); font-size: 0.95rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 8px 0; -webkit-overflow-scrolling: touch; }
table.forms { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
table.forms th, table.forms td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.forms thead th { background: var(--surface-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
table.forms tbody th { position: sticky; left: 0; z-index: 1; font-weight: 600; font-size: 0.85rem; color: var(--muted); background: var(--surface-2); white-space: normal; min-width: 120px; box-shadow: 1px 0 0 var(--border); }
table.forms td { font-family: var(--serif); font-size: 1.02rem; }
table.forms tbody tr:last-child > * { border-bottom: 0; }
table.forms tbody tr:hover td { background: var(--accent-soft); }
.nonfinite { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.nonfinite div { padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.nonfinite dt { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.nonfinite dd { margin: 2px 0 0; font-family: var(--serif); font-size: 1.08rem; }
.formlist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.formlist b { font-family: var(--serif); font-weight: 600; }
.formlist small { color: var(--muted); }

.attribution { padding: 16px 20px; border-radius: var(--radius); background: var(--surface-2); font-size: 0.9rem; }
.attribution h2 { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.attribution ul { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 2px; }
.attribution a { text-decoration: none; }
.attribution a:hover { text-decoration: underline; }
.attribution p { margin: 0; }

.word-side { display: grid; gap: 16px; position: sticky; top: 86px; }
@media (max-width: 900px) { .word-side { position: static; } }
.side-card { padding: 18px 20px; }
.side-card h2 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.side-card p { margin-bottom: 10px; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: baseline; }
.facts dt { color: var(--muted); font-size: 0.875rem; }
.facts dd { margin: 0; font-weight: 550; }
.facts dd a { font-family: var(--serif); font-size: 1.05rem; font-weight: 650; }
.code-line { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; overflow-x: auto; }
.code-line code { font-size: 0.8rem; white-space: nowrap; }
.neighbour-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.neighbour-links a { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-family: var(--serif); font-weight: 600; min-width: 0; }
.neighbour-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neighbour-links a[rel="next"] { justify-content: flex-end; text-align: right; }
.neighbour-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ── info pages ── */
.page-head { max-width: 760px; margin: 12px 0 28px; }
.page-head .lead { font-size: 1.12rem; color: var(--muted); }
.source-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.source-head h2 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin: 0; }
.licence-pill { padding: 3px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-weight: 700; font-size: 0.82rem; text-decoration: none; }
.meta { display: grid; gap: 6px; margin: 0 0 14px; }
.meta div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
.meta dt { color: var(--muted); font-size: 0.9rem; }
.meta dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .meta div, .facts div { grid-template-columns: 1fr; gap: 0; } }

.endpoints { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.endpoints li { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 6px 18px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); }
.endpoints li:last-child { border-bottom: 0; }
.endpoints code { overflow-wrap: anywhere; }
.endpoints span { color: var(--muted); font-size: 0.95rem; }
.method { display: inline-block; padding: 0 6px; margin-right: 6px; border-radius: 5px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 700; font-size: 0.75rem; }
@media (max-width: 700px) { .endpoints li { grid-template-columns: 1fr; } }
pre.code { font-size: 0.85rem; }


.prose { max-width: 760px; font-size: 1.05rem; }
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; max-width: 760px; }
.roadmap li { position: relative; display: grid; padding: 14px 18px 14px 58px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); counter-increment: step; }
.roadmap li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.roadmap li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.roadmap span { color: var(--muted); font-size: 0.95rem; }

/* ── search page / 404 ── */
.search-page { max-width: 900px; margin: 12px auto 0; }
.search-title { font-size: 1.5rem; margin: 30px 0 16px; }
.search-title:empty { display: none; }
.search-count { color: var(--muted); font-family: var(--sans); font-size: 1rem; font-weight: 400; margin-left: 8px; }
.not-found { text-align: center; max-width: 640px; margin: 40px auto; }
.not-found .big-letter { display: inline-grid; margin-bottom: 18px; font-size: 2.2rem; }
.not-found .lead { color: var(--muted); }

/* ── footer ── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
.footer-brand p { color: var(--muted); max-width: 320px; margin-top: 12px; }
.site-footer h2 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer ul a { color: var(--text); text-decoration: none; }
.site-footer ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ── toast ── */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow-lg); transition: all 0.2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .word-side, .breadcrumbs, .copy-btn { display: none !important; }
  .word-layout { display: block; }
}

/* ── unverified words and usage ── */
.unverified { border-color: var(--warn-border); background: var(--warn-bg); }
.unverified h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; color: var(--text); }
.unverified h2 .icon { color: var(--accent); }
.no-meaning { color: var(--muted); font-style: italic; opacity: 0.8; }
.usage { display: inline-flex; align-items: center; gap: 8px; }
.usage-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.usage-bars i { display: block; width: 4px; border-radius: 2px; background: var(--border-strong); }
.usage-bars i:nth-child(1) { height: 5px; }
.usage-bars i:nth-child(2) { height: 8px; }
.usage-bars i:nth-child(3) { height: 11px; }
.usage-bars i:nth-child(4) { height: 14px; }
.usage-bars i.on { background: var(--accent); }

/* ── search: translations first, then related words ── */
.results-sub { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: 8px 0 12px; }
.results-sub small { font-family: var(--sans); font-size: 0.85rem; font-weight: 400; margin-left: 6px; }
.word-grid.direct a { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: linear-gradient(160deg, var(--surface) 60%, var(--accent-soft)); }
.word-grid.direct .wc-word { font-size: 1.3rem; }
.direct-tag { color: var(--ok); }
.also { color: var(--text); font-weight: 600; }

/* ── same meaning: synonyms and dialect forms ── */
.same-meaning h2 { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; }
.same-meaning h2 .icon { color: var(--accent); }
.syn-row + .syn-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.syn-row h3 { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.syn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.syn-chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 7px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color 0.15s, background 0.15s; max-width: 100%; }
a.syn-chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.syn-chip .w { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; line-height: 1.2; }
.syn-chip small { color: var(--muted); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.syn-chip.also { background: var(--surface); }

/* ── approximate meanings ── */
.approx { display: inline-block; padding: 0 8px; margin-right: 6px; border-radius: 999px; background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--text); font-size: 0.75rem; font-weight: 700; cursor: help; }
.sense-approx .gloss { color: var(--muted); }
.sense-approx .gloss a { font-family: var(--serif); font-weight: 650; }

/* ── borrowed words and usage labels ── */
.loan-label, .word-label { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; border: 1px dashed var(--border-strong); color: var(--muted); background: var(--surface); }
.word-label { border-style: solid; }
.albanian-instead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; padding: 8px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--border)); font-size: 0.98rem; }
.albanian-instead .icon { color: var(--ok); }
.albanian-instead a { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; }
.albanian-row { background: color-mix(in srgb, var(--ok) 7%, transparent); margin: -6px -10px 0; padding: 10px; border-radius: 12px; }
.albanian-row h3 small { font-weight: 400; margin-left: 4px; }
.albanian-row .syn-chip { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: var(--surface); }
.loan-tag { color: var(--muted); font-style: italic; }

/* ── Albanian descriptions ── */
.word-desc { margin: 14px 0 0; font-size: 1.22rem; max-width: 62ch; font-family: var(--serif); line-height: 1.5; }
.word-desc + .word-summary { margin-top: 6px; font-size: 1.02rem; color: var(--muted); }
.ai-note { display: inline-block; font-family: var(--sans); font-size: 0.72rem; font-weight: 600; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 0 8px; vertical-align: 0.2em; cursor: help; }
.feature-desc { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 4px; }
.feature-desc + .feature-gloss { color: var(--muted); font-size: 1rem; }
