:root {
  --bg: #f4f1ea;
  --bg-elev: #fffcf7;
  --ink: #12110f;
  --ink-soft: #2a2824;
  --muted: #6f6a62;
  --line: #e4ddd2;
  --line-strong: #d2c9ba;
  --accent: #7a4e2d;
  --accent-soft: #b8956a;
  --accent-wash: #efe6d8;
  --danger: #9b3a2f;
  --radius: 2px;
  --radius-lg: 4px;
  --shadow: 0 1px 0 rgba(18, 17, 15, 0.04), 0 12px 32px rgba(18, 17, 15, 0.05);
  --shadow-hover: 0 1px 0 rgba(18, 17, 15, 0.05), 0 18px 40px rgba(18, 17, 15, 0.08);
  --font: "IBM Plex Sans", "Helvetica Neue", system-ui, sans-serif;
  --serif: "IBM Plex Serif", "Libre Baskerville", Georgia, "Times New Roman", serif;
  --max: 1120px;
  --article: 680px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(184, 149, 106, 0.08), transparent 60%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.page-enter { animation: pageIn 0.55s var(--ease) both; }
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color 0.2s var(--ease); }
a:hover { color: var(--ink); }
img, video { max-width: 100%; display: block; }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }


/* Header search — single-row compact pill (never stack) */
.header-search {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  flex: 0 1 220px;
  width: 220px;
  max-width: min(220px, 36vw);
  margin: 0;
  margin-left: 0.35rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.12rem 0.12rem 0.9rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  min-width: 0;
}
.header-search:focus-within {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.header-search input[type="search"] {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
  color: var(--ink);
  min-width: 0;
  width: auto;
  outline: none;
  padding: 0.35rem 0.35rem 0.35rem 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
.header-search input[type="search"]::-webkit-search-decoration,
.header-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.header-search input::placeholder { color: var(--muted); opacity: 0.85; }
.header-search button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.header-search button:hover { color: var(--ink); background: var(--accent-wash); }
.nav-search-mobile,
.nav-tip-mobile { display: none !important; }

/* Compact masthead (feed-first) */
.masthead {
  padding: 1.75rem 0 1.15rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.masthead h1 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  line-height: 1.08; margin: 0 0 0.55rem; letter-spacing: -0.035em; font-weight: 600;
}
.masthead .hero-lead { font-size: 1.02rem; max-width: 34rem; }

/* Card meta + read more */
.card-meta {
  margin-top: auto; padding-top: 0.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.card-date { margin-top: 0; padding-top: 0; }
.card-more {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent); white-space: nowrap;
}
.card:hover .card-more { color: var(--ink); }

/* Feed states */
.feed-end {
  text-align: center; color: var(--muted); padding: 1.5rem 0 0.5rem;
  font-size: 0.88rem; letter-spacing: 0.02em;
}
.feed-spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 0.35rem;
  border: 1.5px solid var(--line-strong); border-top-color: var(--accent);
  border-radius: 50%; vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Search page */
.search-page-form {
  display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 1rem 0 0.75rem; max-width: 36rem;
}
.search-page-form input[type="search"] {
  flex: 1; min-width: 200px; font: inherit; padding: 0.7rem 1rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-elev);
}
.search-page-form input[type="search"]:focus {
  outline: none; border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.search-meta { margin: 0.35rem 0 0; font-size: 0.92rem; }
.search-empty { text-align: center; padding: 2rem 0; }
.search-empty .btn { margin-top: 0.75rem; }
mark {
  background: rgba(184, 149, 106, 0.35);
  color: inherit; padding: 0 0.12em; border-radius: 2px;
}


/* FX ticker — desktop utility strip */
.fx-ticker {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.fx-ticker-inner {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 28px;
  padding: 0.15rem 0;
  flex-wrap: nowrap;
  overflow: hidden;
}
.fx-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-soft);
  font-size: 0.65rem;
}
.fx-item {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: 500;
}
.fx-item + .fx-item::before {
  content: "·";
  margin-right: 1.1rem;
  color: var(--line-strong, #cfc6b8);
  font-weight: 400;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  /* positioning context for mobile drawer */
  background: rgba(244, 241, 234, 0.82);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 252, 247, 0.92);
  box-shadow: 0 8px 24px rgba(18, 17, 15, 0.04);
}
.header-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1.15rem;
  min-height: var(--header-h);
  padding: 0.35rem 0;
}
.header-inner .logo { flex: 0 0 auto; }
.header-inner .site-nav {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  margin-right: 0.15rem;
}
.header-inner .header-search {
  flex: 0 1 220px;
  margin-left: 0;
  margin-right: 0;
}
.header-inner .nav-toggle { margin-left: 0; flex: 0 0 auto; }
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
}
.logo span { color: var(--accent); font-weight: 500; }
.site-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem 1.25rem;
  align-items: center;
  overflow: hidden;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.35rem 0;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--ink);
  transition: right 0.35s var(--ease);
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.active::after { right: 0; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 0.45rem;
  width: 42px; height: 42px; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 1.5px; background: var(--ink); border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

/* Hero */
.hero { padding: 3.25rem 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.72rem; color: var(--muted); font-weight: 600; margin: 0 0 0.85rem;
}
.hero h1, .page-head h1, .article-head h1, .legal-page h1 {
  font-family: var(--serif);
  font-size: clamp(2.35rem, 5.5vw, 3.65rem);
  line-height: 1.05; margin: 0 0 0.9rem; letter-spacing: -0.04em; font-weight: 600;
  color: var(--ink);
}
.hero-lead, .article-dek {
  font-size: 1.125rem; color: var(--muted); max-width: 36rem; margin: 0;
  font-weight: 400; line-height: 1.55;
}
.page-head { padding: 2.75rem 0 1.25rem; }

/* Tip / footer */
.tip-banner {
  background: var(--accent-wash);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
}
.tip-banner p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.tip-banner a { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(122, 78, 45, 0.35); }
.tip-banner a:hover { border-bottom-color: var(--ink); }

.section-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); margin: 0 0 1.1rem; font-weight: 600;
}
.featured-grid { padding: 0.5rem 0 2.5rem; }
.featured-wrap {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1.45fr 1fr;
}
.featured-main .card-title { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.feed-section { padding-bottom: 4rem; }
.section-head { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.35rem; }
.section-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  display: inline-flex; padding: 0.4rem 0.85rem; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 0.82rem; font-weight: 500;
  text-decoration: none; letter-spacing: 0.01em;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.chip.active, .chip:hover {
  color: var(--ink); border-color: var(--ink); background: var(--bg-elev); text-decoration: none;
}

/* Cards */
.feed-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}
.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card-link:hover { color: inherit; }
.card-cover {
  aspect-ratio: 16/10; background: #ddd6c8; overflow: hidden;
}
.card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.card:hover .card-cover img { transform: scale(1.035); }
.card-body { padding: 1.15rem 1.2rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-section {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 600; text-decoration: none;
}
.card-title {
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.28;
  margin: 0; letter-spacing: -0.025em; font-weight: 600;
}
.card-excerpt {
  color: var(--muted); font-size: 0.92rem; margin: 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-date { margin-top: auto; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; padding-top: 0.35rem; }
.feed-status { text-align: center; color: var(--muted); padding: 1.25rem; font-size: 0.9rem; }
.feed-sentinel { height: 1px; }

/* Reveal */
.reveal {
  /* Content must be available immediately; reveal JS is intentionally a no-op. */
  opacity: 1;
  transform: none;
  transition: none;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Article */
.article { padding: 2.5rem 0 4rem; max-width: var(--article); }
.article-head { margin-bottom: 1.75rem; }
.article-head .card-section { display: inline-block; margin-bottom: 0.75rem; }
.article-head time {
  display: block; color: var(--muted); font-size: 0.88rem;
  letter-spacing: 0.02em; margin: 0.75rem 0 1rem;
}
.article-dek { margin-bottom: 1.25rem !important; font-size: 1.15rem; }
.article-cover {
  margin: 0 0 2rem; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16/10;
  background: #ddd6c8;
}
.article-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.prose {
  font-size: 1.085rem; line-height: 1.75; color: var(--ink-soft);
  font-family: var(--serif);
}
.prose h2, .prose h3 {
  font-family: var(--serif); letter-spacing: -0.025em; margin-top: 2em;
  color: var(--ink); line-height: 1.2; font-weight: 600;
}
.prose h2 { font-size: 1.45rem; }
.prose h3 { font-size: 1.2rem; }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.15em; }
.prose li { margin: 0.35em 0; }
.prose a { text-decoration: underline; }
.prose img {
  border-radius: var(--radius-lg); margin: 1.75rem 0 0.5rem;
  border: 1px solid var(--line); width: 100%; height: auto;
}
.prose figcaption, .prose .img-caption {
  font-family: var(--font); font-size: 0.82rem; color: var(--muted);
  margin: 0 0 1.5rem; letter-spacing: 0.01em;
}
.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0; margin: 1.75rem 0;
  border-radius: var(--radius-lg); overflow: hidden; background: #111;
  border: 1px solid var(--line);
}
.video-embed iframe, .video-embed video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* Share */
.share-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.article-share-bottom {
  margin-top: 2.75rem; padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.share-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); font-weight: 600; margin: 0 0 0.85rem;
}
.share-btn {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(18, 17, 15, 0.03);
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.share-btn:hover,
.share-btn:focus-visible {
  background: var(--ink);
  color: #fffcf7;
  border-color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(18, 17, 15, 0.12);
  outline: none;
}
.share-btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-wash), 0 8px 18px rgba(18, 17, 15, 0.12);
}
.share-svg {
  width: 18px; height: 18px;
  display: block;
  flex-shrink: 0;
}
.share-tg .share-svg { width: 19px; height: 19px; }
.share-wa .share-svg { width: 18px; height: 18px; }
.share-vk .share-svg { width: 17px; height: 17px; }
.share-x .share-svg { width: 15px; height: 15px; }
.share-copy .share-svg { width: 17px; height: 17px; }
.share-copy .share-svg-check { display: none; }
.share-btn.is-copied {
  background: var(--accent-wash);
  border-color: var(--accent-soft);
  color: var(--accent);
  transform: none;
  box-shadow: none;
}
.share-btn.is-copied .share-svg-copy { display: none; }
.share-btn.is-copied .share-svg-check { display: block; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 3rem;
  margin-top: 1rem;
  background: linear-gradient(180deg, transparent, rgba(228, 221, 210, 0.35));
}
.footer-meta { color: var(--muted); font-size: 0.9rem; }
.footer-copy {
  margin: 0 0 0.35rem; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.01em;
}
.footer-tagline { margin: 0 0 1rem; font-size: 0.88rem; }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 0.65rem 1.25rem;
  padding-top: 0.25rem;
}
.footer-links a {
  color: var(--muted); text-decoration: none; font-size: 0.86rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.footer-links a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }

/* Legal */
.legal-page { padding: 2.5rem 0 4rem; max-width: 720px; }
.legal-body { font-family: var(--font); font-size: 1rem; }
.legal-body h2 { font-size: 1.15rem; margin-top: 1.75em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg-elev); color: var(--ink); padding: 0.65rem 1.15rem;
  font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { text-decoration: none; border-color: var(--ink); }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #2a2723; color: #fff; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; border-radius: 10px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); grid-column: 1 / -1; font-family: var(--font); }

/* Admin (keep functional, slightly refined) */
.admin-body { background: #f3f1ec; }
.admin-bar { background: #111; color: #fff; border-bottom: 0; }
.admin-bar .logo { color: #fff; }
.admin-bar .logo span { color: var(--accent-soft); }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }
.admin-nav a { color: #ddd; text-decoration: none; font-size: 0.95rem; }
.admin-nav a:hover { color: #fff; }
.admin-main { padding: 1.5rem 0 3rem; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}
.admin-head h1 { margin: 0; font-family: var(--serif); font-size: 1.8rem; }
.admin-login {
  max-width: 380px; margin: 10vh auto; padding: 1.75rem;
  background: var(--bg-elev); border-radius: 8px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stack-form { display: grid; gap: 0.85rem; }
.stack-form label, .edit-form label {
  display: grid; gap: 0.35rem; font-size: 0.9rem; font-weight: 600;
}
.stack-form input, .stack-form textarea, .stack-form select,
.edit-form input, .edit-form textarea, .edit-form select {
  font: inherit; padding: 0.65rem 0.75rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; width: 100%;
}
.form-error { color: var(--danger); font-weight: 600; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th, .admin-table td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.status-published { color: #2f6b3a; }
.status-draft { color: #8a6d1f; }
.badge {
  display: inline-block; margin-left: 0.4rem; font-size: 0.7rem;
  background: var(--accent-wash); color: var(--accent); padding: 0.1rem 0.4rem; border-radius: 999px;
}
.row-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.link-danger { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; padding: 0; }
.inline-form { margin: 0; }
.edit-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr) 300px; }
.edit-main, .edit-side, .card-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem;
}
.edit-side { display: grid; gap: 0.85rem; align-content: start; }
.check { display: flex !important; align-items: center; gap: 0.5rem; font-weight: 500 !important; }
.check input { width: auto; }
.quill-host { background: #fff; min-height: 280px; }
.cover-preview { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.cover-field { display: grid; gap: 0.65rem; }
.cover-hint {
  margin: 0; font-size: 0.78rem; font-weight: 400; color: var(--muted); line-height: 1.4;
}
.cover-cropper-wrap {
  width: 100%; max-height: 280px; overflow: hidden;
  border-radius: 8px; border: 1px solid var(--line); background: #1a1816;
}
.cover-cropper-wrap img { display: block; max-width: 100%; }
.cover-live-previews { display: grid; gap: 0.75rem; }
.cover-live-label {
  display: block; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.35rem; font-weight: 600;
}
.cover-live-card {
  aspect-ratio: 16/10; overflow: hidden; border-radius: 6px;
  border: 1px solid var(--line); background: #ddd6c8;
}
.cover-live-article {
  aspect-ratio: 16/10; overflow: hidden; border-radius: 6px;
  border: 1px solid var(--line); background: #ddd6c8;
}
.cover-live-card img, .cover-live-article img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.cover-current { display: grid; gap: 0.45rem; }
.cover-current.is-removed { opacity: 0.35; filter: grayscale(0.8); }
.cover-current.is-removed::after {
  content: "Будет удалена при сохранении";
  font-size: 0.75rem; color: #a33; font-weight: 600;
}
.cover-remove { margin-top: 0.15rem; }
.ql-editor img {
  max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 0.75rem 0;
}
.editor-tools { margin-top: 0.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.editor-tools-hint { font-size: 0.78rem; color: var(--muted); font-weight: 400; line-height: 1.35; }
.file-btn { cursor: pointer; }

/* Free-crop modal for body image inserts */
body.crop-modal-open { overflow: hidden; }
.crop-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(20, 16, 12, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.crop-modal[hidden] { display: none !important; }
.crop-modal-dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,0.28);
  padding: 1rem 1.1rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}
.crop-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.crop-modal-head h2 {
  margin: 0; font-size: 1.05rem; font-family: var(--serif); letter-spacing: -0.02em;
}
.crop-modal-close {
  font-size: 1.4rem; line-height: 1; padding: 0.15rem 0.5rem; min-width: auto;
}
.crop-modal-hint {
  margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.4;
}
.crop-modal-stage {
  width: 100%; max-height: 360px; overflow: hidden;
  border-radius: 8px; border: 1px solid var(--line); background: #1a1816;
}
.crop-modal-stage img { display: block; max-width: 100%; }
.crop-modal-preview-wrap { display: grid; gap: 0.35rem; max-width: 360px; }
.crop-modal-actions {
  display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap;
}
.sections-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.delete-inline { margin: -0.5rem 0 1rem; }

@media (max-width: 980px) {
  .header-inner .site-nav { display: none; }
  .header-inner .site-nav.open {
    display: flex;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.1rem;
    justify-content: flex-start;
    margin: 0;
    padding: 0.85rem 1.25rem 1.15rem;
    background: rgba(255, 252, 247, 0.98);
    border-bottom: 1px solid var(--line);
    overflow: visible;
    z-index: 60;
  }
  .nav-toggle { display: inline-flex; }
  .header-inner {
    justify-content: space-between;
    gap: 0.75rem;
  }
  .header-inner .header-search {
    margin-left: auto;
    flex: 0 1 200px;
    width: 200px;
    max-width: min(200px, 42vw);
  }
}

@media (max-width: 860px) {
  .container { width: min(100% - 1.5rem, var(--max)); }
  .featured-wrap { grid-template-columns: 1fr; }
  .edit-grid { grid-template-columns: 1fr; }
  .hero { padding: 2.25rem 0 1.25rem; }
  /* Mobile masthead: logo + burger only — search lives in the drawer */
  .header-search { display: none !important; }
  .fx-ticker { display: none !important; }
  .nav-search-mobile,
  .nav-tip-mobile { display: block !important; }
  .site-header { position: sticky; top: 0; }
  .header-inner {
    justify-content: space-between;
  }
  .header-inner .logo { margin-right: auto; }
  .share-row { gap: 0.5rem; }
  .share-btn { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  body.page-enter { animation: none; }
}
