/* ══════════════════════════════════════════════════
   til.im — Design System
   ══════════════════════════════════════════════════ */

:root {
  /* Palette */
  --bg:          #151518;
  --bg-card:     rgba(30,30,36,0.85);
  --bg-card-h:   rgba(35,35,42,0.9);
  --border:      rgba(255,255,255,0.12);
  --border-h:    rgba(255,255,255,0.22);
  --text:        #e0ddd8;
  --text-2:      rgba(224,221,216,0.6);
  --text-3:      rgba(224,221,216,0.38);
  --accent-1:    #a18cd1;
  --accent-2:    #fbc2eb;
  --accent-red:  #ba043b;
  --green:       #4ade80;
  --green-bg:    rgba(74,222,128,0.1);
  --red:         #f87171;
  --red-bg:      rgba(248,113,113,0.1);

  /* Type */
  --font-display: 'Zing Rust Grunge1', serif;
  --font-body:    'IW', Georgia, serif;
  --font-ui:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Sizing */
  --nav-h:     60px;
  --max-w:     1100px;
  --radius:    16px;
  --radius-sm: 10px;
}

/* ── Fonts ── */

@font-face {
  font-family: 'Zing Rust Grunge1';
  src: url('../fonts/zrg1b.woff2') format('woff2'), url('../fonts/zrg1b.woff') format('woff');
  font-weight: 800; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'IW';
  src: url('../fonts/iw-roman.woff2') format('woff2'), url('../fonts/iw-roman.woff') format('woff');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IW';
  src: url('../fonts/iw-italic.woff2') format('woff2'), url('../fonts/iw-italic.woff') format('woff');
  font-weight: normal; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'IW';
  src: url('../fonts/iw-bold.woff2') format('woff2'), url('../fonts/iw-bold.woff') format('woff');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IW';
  src: url('../fonts/iw-bolditalic.woff2') format('woff2'), url('../fonts/iw-bolditalic.woff') format('woff');
  font-weight: bold; font-style: italic; font-display: swap;
}

@font-face {
  font-family: 'Kurale';
  src: url('../fonts/kurale.woff2') format('woff2'), url('../fonts/kurale.woff') format('woff');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ── Reset ── */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: url(/static/images/kumyk-pattern-subtle.svg) repeat, var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
mark { background: rgba(161,140,209,0.3); color: var(--text); border-radius: 2px; padding: 0 2px; }

/* ── Layout ── */

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.content-wrap { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.page { padding-top: calc(var(--nav-h) + 2rem + 50px); padding-bottom: 4rem; min-height: 100vh; }

/* ── Nav ── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(11,11,15,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0.05em;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: 0.9rem; color: var(--text-2); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-lang { display: flex; gap: 0.5rem; margin-left: 1rem; padding-left: 1rem; border-left: 1px solid var(--border); }
.nav-lang a { font-size: 0.8rem; color: var(--text-3); padding: 0.2rem 0.5rem; border-radius: 6px; transition: all 0.2s; }
.nav-lang a:hover { color: var(--text-2); }
.nav-lang a.active { color: var(--text); background: rgba(161,140,209,0.25); border: 1px solid rgba(161,140,209,0.4); }

/* Mobile nav */
.nav-burger { display: none; background: none; border: none; padding: 10px; cursor: pointer; -webkit-tap-highlight-color: rgba(255,255,255,0.1); }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text-2); margin: 5px 0; transition: 0.2s; pointer-events: none; }

@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .nav-burger { display: block; }
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(11,11,15,0.95); backdrop-filter: blur(12px);
    padding: 1rem; gap: 0.5rem; border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.5rem 0; font-size: 1rem; }
  .nav-lang { margin-left: 0; padding-left: 0; border-left: none; padding-top: 0.5rem; border-top: 1px solid var(--border); }
}

/* ── App banner (below nav) ── */

.site-banner {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 0.5rem 1.5rem;
  background: rgba(161,140,209,0.12); border-bottom: 1px solid rgba(161,140,209,0.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-display); font-size: 0.9rem; color: var(--text);
}
.store-badge { display: inline-flex; align-items: center; transition: opacity 0.2s; }
.store-badge:hover { opacity: 0.8; }
.store-badge img { height: 36px; }

@media (max-width: 600px) {
  .site-banner { flex-wrap: wrap; justify-content: center; gap: 0.4rem 0.8rem; padding: 0.5rem 1rem; font-size: 0.9rem; }
  .site-banner > span { width: 100%; text-align: center; }
  .store-badge img { height: 36px; }
}

/* ── Gradient text ── */

.grad-text {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-1));
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ── Buttons ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.8rem; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; border: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: var(--bg); }
.btn-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border-h); }
.btn-outline:hover { color: var(--text); border-color: var(--accent-1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Cards ── */

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-h); }

/* ── Section headings ── */

.section-title {
  font-family: var(--font-display); font-size: 2rem;
  margin-bottom: 1.5rem;
}
.section-title a { color: var(--accent-1); font-size: 0.9rem; font-family: var(--font-ui); margin-left: 1rem; }

/* ── Hero (Home) ── */

.hero { text-align: center; padding: 4rem 0 3rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: var(--text-2); max-width: 520px; margin: 0 auto 2rem; line-height: 1.7; }

.phones { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.phone-mockup { position: relative; width: 220px; flex-shrink: 0; }
.phone-mockup.center { width: 260px; z-index: 2; }
.phone-frame {
  border-radius: 28px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  background: #1a1a2e;
}
.phone-frame img { display: block; width: 100%; height: auto; }
.phone-label { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: var(--text-3); }

@media (max-width: 500px) {
  .phone-mockup.side { display: none; }
  .phone-mockup.center { width: 220px; }
}

/* ── Features grid ── */

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; text-align: center;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.85rem; color: var(--text-3); line-height: 1.6; }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }

/* ── Slovar (Dictionary) page ── */

.slovar-page {
  padding-top: calc(var(--nav-h) + 2rem + 50px);
}

.slovar-wrap {
  max-width: 800px; margin: 0 auto; padding: 0 1.5rem;
}

.slovar-input {
  width: 100%; padding: 1.1rem 1.4rem; border-radius: var(--radius);
  background: rgba(30,30,36,0.9); border: 1px solid var(--border-h);
  color: var(--text); font-size: 1.2rem; font-family: var(--font-display);
  outline: none; transition: border-color 0.2s;
  -webkit-appearance: none;
}
.slovar-input:focus { border-color: var(--accent-1); }
.slovar-input::placeholder { color: var(--text-3); }

/* ── Filter chips (collapsible) ── */

.filter-row {
  display: flex; gap: 0.5rem; margin-top: 0.8rem;
}

.filters {
  position: relative;
}

.filter-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1rem; border-radius: 20px;
  background: rgba(30,30,36,0.9); border: 1px solid rgba(161,140,209,0.3);
  color: var(--text); font-size: 0.85rem; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.filter-toggle:hover { background: rgba(35,35,42,0.95); }
.filter-toggle .arrow {
  display: inline-block; font-size: 0.65rem;
  transition: transform 0.3s ease;
}
.filters.open .filter-toggle .arrow { transform: rotate(180deg); }
.filters.open .filter-toggle {
  background: rgba(35,35,42,0.95); border-color: rgba(161,140,209,0.5);
}

.chip-drawer {
  display: none;
  position: absolute; top: calc(100% + 0.4rem); left: 0;
  z-index: 10;
  background: rgba(30,30,36,0.95); border: 1px solid var(--border-h);
  border-radius: var(--radius); padding: 0.6rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  min-width: 200px;
}
.filters.open .chip-drawer {
  display: block;
}

.chip-group {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}

.chip {
  padding: 0.35rem 0.8rem; border-radius: 20px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-3); font-size: 0.8rem; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.chip:hover { border-color: var(--border-h); color: var(--text-2); }
.chip.active {
  background: rgba(161,140,209,0.15); border-color: rgba(161,140,209,0.4);
  color: var(--text);
}

/* ── Copy button ── */

.word-copy {
  background: none; border: none; color: var(--text-3); cursor: pointer;
  padding: 4px 6px; transition: color 0.15s; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
}
.word-copy:hover { color: var(--accent-1); background: rgba(255,255,255,0.05); }
.word-copy.copied { color: var(--green); }
.word-copy svg { width: 16px; height: 16px; }

/* ── Word list (Dictionary results) ── */

.word-list {
  list-style: none; padding: 1rem 1.5rem; margin-top: 2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
}

.word-item {
  border-bottom: 1px solid var(--border);
}
.word-item:last-child {
  border-bottom: none;
}

.word-item.no-results {
  padding: 2rem; text-align: center; color: var(--text-2); border-bottom: none;
}

.word-head {
  width: 100%; padding: 0.8rem 0; display: flex; align-items: center; gap: 0.5rem;
  background: none; border: none; color: var(--text); text-align: left; cursor: pointer;
  font-family: var(--font-body); font-size: 1.05rem; transition: color 0.15s;
}
.word-head:hover { color: var(--accent-1); }

.word-text { font-weight: bold; }
.wd-source { font-size: 0.9rem; color: var(--text-3); white-space: nowrap; }
.wd-link {
  color: var(--text-3); transition: color 0.15s; flex-shrink: 0;
  font-size: 1rem; padding: 0 2px;
}
.wd-link:hover { color: var(--accent-1); }

.wd {
  display: none; padding: 0.3rem 0 1rem 0;
  font-family: var(--font-body); font-size: 1rem; color: var(--text); line-height: 1.7;
}
.word-item.open .wd { display: block; }

.wd-desc { margin-bottom: 0.5rem; }
.wd-desc p { margin: 0; }
.wd-desc ol, .wd-desc ul { list-style: none; padding: 0; margin: 0; }
.wd-desc li { padding: 0; margin: 0; display: inline; }
.wd-example ol, .wd-example ul { list-style: none; padding: 0; margin: 0; }
.wd-example li { padding: 0; margin: 0; display: inline; }
.wd-example {
  font-style: italic; color: var(--text-2); margin-top: 0.5rem;
  padding-left: 1rem; border-left: 2px solid rgba(161,140,209,0.3);
}
.wd-example p { margin: 0; }
.wd-refs { font-size: 0.9rem; color: var(--accent-1); margin-top: 0.5rem; }

/* ── Bookshelf ── */

.bookshelf {
  display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 0; margin: 1rem 0 2.5rem;
}

.bookshelf-item {
  width: 260px; height: 130px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4); transition: transform 0.2s;
  display: flex; flex-direction: column; justify-content: flex-end;
  background-size: 100% 100%;
}
.bookshelf-item:hover { transform: translateY(-4px); }

.bookshelf-item .book-meta {
  padding: 1rem 1.4rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
}
.bookshelf-item h3 {
  font-family: var(--font-display); font-size: 1.1rem; line-height: 1.25; margin-bottom: 0.2rem;
  color: #fff;
}
.bookshelf-item p { font-size: 0.9rem; color: rgba(255,255,255,0.6); }

@media (max-width: 500px) {
  .bookshelf-item { width: 200px; height: 100px; }
}

/* ── Book detail ── */

.book-detail { max-width: 700px; }
.book-detail h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.5rem; }
.book-detail .book-author { color: var(--text-2); font-size: 1.1rem; margin-bottom: 1.5rem; }
.book-detail .book-desc { font-family: var(--font-body); color: var(--text-2); line-height: 1.7; margin-bottom: 2rem; }

/* ── News ── */

.news-list { display: flex; flex-direction: column; gap: 1.2rem; }
.news-card {
  padding: 1.2rem 1.5rem; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
}
.news-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.3rem; }
.news-card .news-date { font-size: 0.8rem; color: var(--text-3); margin-bottom: 0.5rem; }
.news-card p { color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }
.news-card a.more { color: var(--accent-1); font-size: 0.9rem; display: inline-block; margin-top: 0.8rem; }

/* ── Subscription ── */

.sub-plans { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }

.plan-card {
  flex: 1 1 220px; max-width: 340px;
  border: 1px solid var(--border); border-radius: 20px;
  padding: 2.5rem 2rem; background: var(--bg-card);
  display: flex; flex-direction: column;
}
.plan-card.featured {
  border-color: rgba(161,140,209,0.4);
  background: var(--bg-card);
}
.plan-card.coming-soon { opacity: 0.5; }

.plan-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.3rem; }
.plan-price { font-size: 0.95rem; color: var(--text-3); margin-bottom: 2rem; line-height: 1.6; }

.plan-features { margin-bottom: 2rem; flex: 1; text-align: left; }
.plan-features li {
  position: relative; padding-left: 1.5rem; font-size: 0.95rem;
  color: var(--text-2); line-height: 1.6; margin-bottom: 0.6rem;
}
.plan-features li::before { content: '\2713'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.plan-features li.soon { color: var(--text-3); }
.plan-features li.soon::before { content: '\25E6'; color: var(--text-3); }

.period-selector { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.period-btn {
  flex: 1; padding: 0.6rem; border: 1px solid var(--border-h);
  border-radius: var(--radius-sm); background: transparent;
  color: var(--text-3); font-size: 0.8rem; text-align: center; transition: all 0.2s;
}
.period-btn.selected {
  border-color: rgba(161,140,209,0.5);
  background: rgba(161,140,209,0.1); color: var(--text);
}
.period-btn .pp { display: block; font-weight: 700; font-size: 1rem; margin-top: 0.2rem; }

.promo-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.promo-row input {
  flex: 1; padding: 0.6rem 0.8rem; border: 1px solid var(--border-h);
  border-radius: var(--radius-sm); background: transparent;
  color: var(--text); font-size: 0.9rem; text-transform: uppercase; outline: none;
}
.promo-row input:focus { border-color: var(--accent-1); }
.promo-row button {
  padding: 0.6rem 1rem; border: 1px solid var(--border-h);
  border-radius: var(--radius-sm); background: transparent;
  color: var(--text-2); font-size: 0.9rem; transition: all 0.2s;
}
.promo-row button:hover { border-color: var(--accent-1); color: var(--text); }

.promo-msg { font-size: 0.8rem; min-height: 1.2em; margin-bottom: 0.5rem; }
.promo-msg.ok { color: var(--green); }
.promo-msg.err { color: var(--red); }

.soon-badge {
  display: inline-block; padding: 0.25rem 0.7rem; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
  background: rgba(161,140,209,0.15); color: #c4a8e8; margin-bottom: 1rem;
}

.sub-status {
  display: none; border-radius: var(--radius-sm); padding: 1rem 1.5rem;
  margin-bottom: 2rem; max-width: 500px; width: 100%; text-align: center;
  font-size: 0.95rem; background: var(--green-bg); border: 1px solid rgba(74,222,128,0.3); color: var(--green);
}
.sub-status.active { display: block; }

.payment-result { display: none; border-radius: var(--radius-sm); padding: 1rem 1.5rem; margin-bottom: 2rem; max-width: 500px; width: 100%; text-align: center; font-size: 0.95rem; }
.payment-result.success { display: block; background: var(--green-bg); border: 1px solid rgba(74,222,128,0.3); color: var(--green); }
.payment-result.fail { display: block; background: var(--red-bg); border: 1px solid rgba(248,113,113,0.3); color: var(--red); }

/* ── Legal ── */

.legal {
  max-width: 700px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 2.5rem;
}
.legal h1 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.legal .legal-date { color: var(--text-3); font-size: 0.85rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.8rem; color: var(--text); }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; margin-bottom: 0.8rem; font-size: 0.95rem; }
.legal ol { padding-left: 1.2rem; }
.legal ol ol { margin-top: 0.4rem; }
.legal a { color: #c4a8e8; text-decoration: underline; text-underline-offset: 2px; }

/* ── Ses ── */

.ses-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.ses-list li {
  padding: 1rem 1.2rem; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
}
.ses-list a { font-family: var(--font-display); font-size: 1.2rem; transition: color 0.15s; }
.ses-list a:hover { color: var(--accent-1); }
.ses-list small { display: block; color: var(--text-3); font-size: 0.85rem; margin-top: 0.3rem; }

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border); padding: 2.5rem 1.5rem; text-align: center;
}
.footer p { font-size: 0.85rem; color: var(--text-3); line-height: 1.8; }
.footer a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.footer a:hover { color: var(--text); }

/* ── App banner ── */

.app-banner {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  padding: 1rem 1.5rem; margin: 1.5rem 0;
  background: rgba(161,140,209,0.08); border: 1px solid rgba(161,140,209,0.2);
  border-radius: var(--radius);
}
.app-banner span { font-family: var(--font-display); font-size: 1.1rem; }
.app-banner .btn { padding: 0.5rem 1.5rem; font-size: 0.85rem; }

/* ── Article content ── */

.article-content {
  font-family: var(--font-body); color: var(--text); line-height: 1.4;
  font-size: 1.2rem;
}
.article-content p { text-indent: 20px; margin-bottom: 0.8em; text-align: justify; }
.article-content h2 { font-family: var(--font-display); font-size: 1.6rem; margin-top: 2rem; margin-bottom: 0.8rem; text-indent: 0; color: var(--text); }
.article-content h3 { font-size: 1.3rem; margin-top: 1.5rem; margin-bottom: 0.5rem; text-indent: 0; color: var(--text); }
.article-content em { color: var(--accent-1); }
.article-content a { color: var(--accent-1); text-decoration: underline; }


/* Article TOC */
.article-toc {
  margin-bottom: 2rem; text-align: center;
}
.article-toc-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); margin-bottom: 0.8rem;
}
.article-toc ul { list-style: none; padding: 0; margin: 0; }
.article-toc li { padding: 0.3rem 0; font-size: 1.1rem; }
.article-toc a {
  font-style: italic; color: var(--accent-1); text-decoration: none;
  border-bottom: 1px solid rgba(161,140,209,0.3); transition: border-color 0.15s;
}
.article-toc a:hover { border-color: var(--accent-1); }

/* ── Utility ── */

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ══════════════════════════════════════
   Mobile — max 600px
   ══════════════════════════════════════ */

@media (max-width: 600px) {
  .page, .slovar-page { padding-top: calc(var(--nav-h) + 2rem + 80px); }

  /* Slovar */
  .slovar-wrap { padding: 0 0.5rem; }
  .slovar-input { font-size: 1.15rem; padding: 1rem 1.2rem; }

  /* Filters */
  .filter-toggle { font-size: 0.78rem; padding: 0.35rem 0.8rem; }
  .chip { font-size: 0.72rem; padding: 0.3rem 0.6rem; }
  .chip-drawer { min-width: 180px; }

  /* Word list */
  .word-list { padding: 0.7rem 1rem; }
  .word-head { font-size: 0.95rem; gap: 0.3rem; }
  .wd { font-size: 0.9rem; }
  .word-copy { width: 24px; height: 24px; }
  .word-copy svg { width: 14px; height: 14px; }

  /* Books */
  .bookshelf { gap: 1rem; }
  .bookshelf-item { width: 100%; height: auto; min-height: 80px; }
  .bookshelf-item .book-meta { padding: 0.6rem 0.8rem; }
  .bookshelf-item h3 { font-size: 0.95rem; }

  /* Subscription */
  .sub-plans { flex-direction: column; align-items: center; }
  .plan-card { max-width: 100%; flex: 1 1 100%; }
  .period-selector { flex-direction: column; }

  /* News / Ses */
  .news-card { padding: 0.8rem 1rem; }
  .news-card h3 { font-size: 1.1rem; }
  .ses-list li { padding: 0.7rem 0.8rem; }

  /* Article content */
  .article-content { font-size: 1.05rem; }
  .article-toc li { font-size: 0.95rem; }

  /* Content wrap */
  .content-wrap { padding: 0 0.8rem; }

  /* Section title */
  .section-title { font-size: 1.5rem; }

  /* Footer */
  .footer { padding: 1.5rem 1rem; }
  .footer p { font-size: 0.75rem; }

  /* Legal */
  .legal { padding: 1.2rem 1rem; }
  .legal h1 { font-size: 1.3rem; }
  .legal h2 { font-size: 1rem; }
}
