/* Shanraq design system — editorial "Steppe" theme.
   One unified, self-hosted style (no external CDN). Light + dark. */

:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f4f2;
  --ink: #454545;
  --ink-soft: #454545;
  --muted: #8c8c8c;
  --line: #dddddd;
  --line-strong: #dad7d1;
  --gold: #d32f2f;         /* brand red — life, community, circulation */
  --gold-strong: #b71c1c;
  --teal: #2e7d32;         /* positive: up-votes, karma */
  --clay: #c62828;         /* negative / danger */
  --danger: #c62828;
  --ok: #2e7d32;
  --focus: rgba(211, 47, 47, 0.3);

  --serif: "Georgia", "Noto Serif", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: 0.83rem;
  --step-0: 1.02rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.7rem;
  --step-5: 3.4rem;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  --maxw: 1180px;
  --readw: 700px;
}

:root[data-theme="dark"] {
  --paper: #2e2e2e;
  --surface: #262626;
  --surface-2: #34332f;
  --ink: #d8d6d2;
  --ink-soft: #bebbb6;
  --muted: #8f8c86;
  --line: #454545;
  --line-strong: #4a4844;
  --gold: #ef5350;
  --gold-strong: #ff7a72;
  --teal: #66bb6a;
  --clay: #ef5350;
  --danger: #ef5350;
  --ok: #66bb6a;
  --focus: rgba(239, 83, 80, 0.35);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #2e2e2e;
    --surface: #262626;
    --surface-2: #34332f;
    --ink: #d8d6d2;
    --ink-soft: #bebbb6;
    --muted: #8f8c86;
    --line: #3a3937;
    --line-strong: #4a4844;
    --gold: #ef5350;
    --gold-strong: #ff7a72;
    --teal: #66bb6a;
    --clay: #ef5350;
    --danger: #ef5350;
    --ok: #66bb6a;
    --focus: rgba(239, 83, 80, 0.35);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--gold-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.18; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* kicker: uppercase category/section label */
.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-strong);
}

/* ---------- info bar (date · weather · rates · social) ---------- */
.infobar { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 0.8rem; color: var(--ink-soft); }
.infobar__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 10px; padding: 6px 22px; }
.infobar__cell { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.infobar__cell:nth-child(3) { justify-content: center; }
.infobar__cell:nth-child(4) { justify-content: flex-end; }
.infobar__ic { font-size: 0.95rem; line-height: 1; }
.infobar__muted { color: var(--muted); }
.infobar__rates { gap: 14px; font-variant-numeric: tabular-nums; }
.infobar__rates .rate { font-weight: 600; }
.rate__cur { color: var(--gold-strong); font-weight: 700; }   /* currency symbol — red */
.rate__num { color: var(--ink); }                             /* digits — black on light, white on dark */
.rate__arr.rate--up { color: var(--teal); }
.rate__arr.rate--down { color: var(--danger); }
.wx__temp { color: var(--ink); }                              /* temperature digits — black/white */
.wx__press { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-variant-numeric: tabular-nums; } /* atmospheric pressure (barometer icon + value) */
.wx__pval { color: var(--ink); } /* pressure digits — same bright colour as the temperature */
.infobar__social { gap: 13px; }
.infobar__social .soc { display: inline-flex; color: var(--gold-strong); }
.infobar__social .soc:hover { color: var(--gold); }
.infobar__social .soc svg { width: 17px; height: 17px; display: block; }
@media (max-width: 640px) {
  /* On a vertical phone the four cells fold into 2×2 column-major: the left
     column keeps the date over the weather, the right column the rates over
     the social icons, so each column aligns to its own outer edge. */
  .infobar { font-size: 0.72rem; }
  .infobar__grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 3px 10px; padding: 5px 16px; }
  .infobar__cell:nth-child(1) { grid-area: 1 / 1; }
  .infobar__cell:nth-child(2) { grid-area: 2 / 1; }
  .infobar__cell:nth-child(3) { grid-area: 1 / 2; justify-content: flex-end; }
  .infobar__cell:nth-child(4) { grid-area: 2 / 2; justify-content: flex-end; }
  .infobar__rates { gap: 8px; }
  /* drop the last digit of each rate on narrow phones to save width */
  .rate__last { display: none; }
}

/* ---------- top strip (scrolls away on scroll) ---------- */
.topstrip {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.topstrip__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 20px 0;
}
.topstrip__side { display: flex; align-items: center; gap: 10px; }
.topstrip__side--right { justify-content: flex-end; }
.topstrip__side a:not(.btn) { color: var(--ink-soft); font-size: var(--step--1); font-weight: 600; }
.topstrip__side a:not(.btn):hover { color: var(--gold-strong); text-decoration: none; }
.linkbtn { background: none; border: none; padding: 0; font: inherit; font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.linkbtn:hover { color: var(--gold-strong); }
.topstrip__tag {
  text-align: center;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--step--1);
  font-style: italic;
  font-family: var(--serif);
}
.wordmark { display: inline-flex; align-items: center; justify-self: center; }
.wordmark:hover { text-decoration: none; }
.wordmark__mark { width: 64px; height: 64px; }
/* Theme-aware assets: show red logo on light, white on dark — mirrors the theme
   resolution (explicit data-theme, else OS preference unless forced light). */
.theme-dark-only { display: none; }
.theme-light-only { display: inline-block; }
:root[data-theme="dark"] .theme-light-only { display: none; }
:root[data-theme="dark"] .theme-dark-only { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
  :root:not([data-theme="light"]) .theme-dark-only { display: inline-block; }
}

/* ---------- sticky menu bar (only this sticks) ---------- */
/* Red bar: the same brand red (#d32f2f) in both themes; the dark-theme red
   (#ef5350) came out too light here. Menu/subbar text is white-on-red. */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #e50000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.25);
}

/* language switch */
.langs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.langs a { padding: 2px 8px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); border-right: 1px solid var(--line); text-transform: lowercase; }
.langs a:last-child { border-right: none; }
.langs a:hover { color: var(--ink); text-decoration: none; }
.langs a.is-active { background: var(--gold); color: #fff; }
:root[data-theme="dark"] .langs a.is-active { color: #fff; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; }
.icon-btn:hover { background: var(--surface-2); }
/* Theme switch: brand red outline and glyph. --gold is #d32f2f on light and
   #ef5350 on dark, so the button follows the active theme without a second
   rule. The icon itself swaps via .theme-light-only / .theme-dark-only. */
.icon-btn--theme { border-color: var(--gold); color: var(--gold); }
.icon-btn--theme:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); border-color: var(--gold-strong); color: var(--gold-strong); }
.icon-btn--theme .theme-light-only,
.icon-btn--theme .theme-dark-only { line-height: 0; }
.icon-btn--theme .ic { width: 17px; height: 17px; }
a.icon-btn, a.icon-btn:hover { text-decoration: none; color: var(--ink-soft); }

/* main menu (categories) — white text on the red bar */
.menu {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0;
}
.menu__item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 12px 0;
  white-space: nowrap;
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 2px solid transparent;
}
/* navbar icons follow the item's text color (white on the red bar, red on the
   active white subbar chip) — not the global red. */
.menu__item .ic, .subbar__item .ic { color: currentColor; font-size: 1.15em; }
.menu__item:hover { color: #fff; text-decoration: none; }
.menu__item.is-active { color: #fff; border-bottom-color: #fff; }
/* the real-estate rubric uses the shanyrak brand mark (white variant) rather
   than a line icon — the logo already stands for the hearth/home. */
.menu__logo { height: 1.7em; width: auto; margin-right: 2px; flex: none; }

/* subcategory bar (submenu of the active category) — chips on the red bar */
.subbar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
/* Default (on a light page, e.g. the listings filter): dark chip text. */
.subbar__item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 0.78rem; font-weight: 600; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line);
}
.subbar__item:hover { color: var(--gold-strong); text-decoration: none; border-color: var(--line-strong); }
.subbar__item.is-active {
  background: var(--gold);
  color: #fff;
  border-color: transparent;
}
/* count badge inside a filter chip (real-estate categories) */
.subbar__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--line); color: var(--ink-soft);
  font-size: 0.66rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.subbar__item:hover .subbar__badge { background: var(--line-strong); }
.subbar__item.is-active .subbar__badge { background: rgba(255, 255, 255, 0.3); color: #fff; }
/* Navbar context: white chips on the red bar. */
.navbar .subbar { border-top-color: rgba(255, 255, 255, 0.3); }
.navbar .subbar__item { color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.14); border-color: transparent; }
.navbar .subbar__item:hover { color: #fff; background: rgba(255, 255, 255, 0.26); }
.navbar .subbar__item.is-active {
  background: rgba(255, 255, 255, 0.85);
  color: #b71c1c;
}
a.kicker:hover { text-decoration: none; color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600; font-size: var(--step--1);
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold); color: #fff; }
:root[data-theme="dark"] .btn--primary { color: #fff; }
.btn--primary:hover { background: var(--gold-strong); }
.btn--teal { background: var(--teal); color: #fff; }
:root[data-theme="dark"] .btn--teal { color: #fff; }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn--danger:hover { background: #a5281c; }
.btn--sm { padding: 6px 12px; font-size: 0.78rem; }

/* ---------- home layout ---------- */
/* minmax(0,…) lets the content column shrink to the viewport instead of
   ballooning to the intrinsic width of the inner .posts grid (which would
   overflow the page horizontally on phones). */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; padding: 34px 0 60px; }
@media (min-width: 900px) { .layout { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); } }

/* ad carousel (replaces the featured hero) */
.adcarousel { position: relative; height: 300px; border-radius: var(--radius); overflow: hidden; margin-bottom: 34px; }
/* Slides live in a horizontal track that slides right-to-left between them. */
.carousel__track { display: flex; height: 100%; transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
.adslide {
  position: relative; flex: 0 0 100%; display: flex; flex-direction: column; justify-content: center;
  padding: 36px; color: #fff;
}
.adslide--left { align-items: flex-start; text-align: left; background: linear-gradient(120deg, #b71c1c, #7a1414); }
.adslide--center { align-items: center; text-align: center; background: linear-gradient(120deg, #37474f, #1c262b); }
.adslide--right { align-items: flex-end; text-align: right; background: linear-gradient(120deg, #2e7d32, #17401b); }
.adslide__badge {
  align-self: flex-start; /* hug the text instead of stretching full width */
  width: fit-content;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.adslide__body { max-width: 62%; }
.adslide--center .adslide__body { max-width: 74%; }
.adslide__text { font-family: var(--serif); font-size: var(--step-3); font-weight: 700; line-height: 1.2; margin: 0 0 16px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
/* fixed dark-red label so it stays legible on the white button in any theme */
.adslide .btn--primary,
:root[data-theme="dark"] .adslide .btn--primary {
  background: rgba(255, 255, 255, 0.85);
  color: #b71c1c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.adslide .btn--primary:hover { background: #fff; }
.adcarousel__dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.adcarousel__dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.5); cursor: pointer; padding: 0; }
.adcarousel__dots button.is-active { background: #fff; }

/* sidebar variant of the ad carousel */
.adcarousel--side { height: 280px; margin-bottom: 0; }
.adcarousel--side .adslide { padding: 22px; }
.adcarousel--side .adslide__text { font-size: var(--step-1); }
.adcarousel--side .adslide__body,
.adcarousel--side .adslide--center .adslide__body { max-width: 100%; }

/* hero (featured) */
.hero {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 34px; margin-bottom: 34px;
  position: relative; overflow: hidden;
}
/* cover media (hero + cards + article) */
.hero__media, .post__media { display: block; overflow: hidden; }
.hero__media { margin: -34px -34px 22px; height: 300px; }
.post__media { height: 180px; border-radius: var(--radius-sm); margin-bottom: 2px; position: relative; }
/* card photo carousel: stacked slides, a full-cover link, dots on top */
.post__media .gallery__item { position: absolute; inset: 0; }
.post__media .gallery__item img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
/* the card slot has its own fixed height, so no aspect-ratio here */
.post__media-link { position: absolute; inset: 0; z-index: 2; }
.post__media .adcarousel__dots { bottom: 10px; z-index: 3; }
.post__media .badge-top { z-index: 3; }
/* flag + city in the card meta */
.loc { display: inline-flex; align-items: center; gap: 6px; }
.flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex: none; }
.hero__media img, .post__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--gold) 12%, var(--surface-2)));
}
.media-ph img { width: 84px; height: 84px; opacity: 0.4; }
.post__media .media-ph img { width: 56px; height: 56px; }
/* Single red logo; turn it white on dark theme via filter (no dual image). */
:root[data-theme="dark"] .media-ph img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .media-ph img { filter: brightness(0) invert(1); }
}
.article__media { margin: 0 0 20px; border-radius: var(--radius-sm); overflow: hidden; }
.article__media img { width: 100%; height: auto; display: block; }
.hero__title { font-size: var(--step-4); margin: 12px 0 14px; }
.hero__title a { color: var(--ink); }
.hero__title a:hover { color: var(--gold-strong); text-decoration: none; }
.hero__lead { font-family: var(--serif); font-size: var(--step-1); color: var(--ink-soft); margin: 0 0 18px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: var(--step--1); }
.byline .dot { opacity: 0.6; }
.byline b { color: var(--gold-strong); font-weight: 700; }
.author { color: var(--ink-soft); font-weight: 600; }

/* stream of cards */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin: 8px 0 22px;
}
.section-head h2 { font-size: var(--step-2); }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 30px 34px; }
.post {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-bottom: 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.post__title {
  font-size: var(--step-2);
  margin: 2px 0;
  padding: 0 10px;
}
.post__title a { color: var(--ink); }
.post__title a:hover { color: var(--gold-strong); text-decoration: none; }
.post__excerpt {
  color: var(--ink-soft);
  padding: 0 10px;
  margin: 0;
}
.post__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px; color: var(--muted);
  font-size: var(--step--1);
  padding: 5px 10px;
}
.score { font-weight: 700; }
.score.pos { color: var(--teal); }
.score.neg { color: var(--clay); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; }
.tag--ai { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); }

/* sidebar */
.aside { display: flex; flex-direction: column; gap: 26px; }
@media (min-width: 900px) { .aside { position: sticky; top: 92px; align-self: start; } }
.aside__block { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface-2); }
.aside__title { font-size: var(--step-1); margin-bottom: 8px; }
.aside__text { color: var(--ink-soft); font-size: var(--step--1); margin: 0; }
/* newsletter card — red gradient banner (same as the hero carousel) with an
   attached input-group: the field and button share one rounded white pill. */
.aside__block--subscribe {
  background: linear-gradient(120deg, #ef5350, #aa0000);
  border-color: transparent;
  color: #fff;
}
.aside__block--subscribe .aside__title { color: #fff; }
.aside__block--subscribe .aside__text { color: rgba(255, 255, 255, 0.9); }
.aside__ok { font-weight: 600; }
.subgroup { display: flex; align-items: stretch; border-radius: 999px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.subgroup:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45); }
.subgroup__input { flex: 1 1 auto; min-width: 0; padding: 10px 16px; border: none; background: transparent; color: #1a1a1a; font: inherit; font-size: var(--step--1); }
.subgroup__input::placeholder { color: #8a8a8a; }
.subgroup__input:focus { outline: none; }
.subgroup__btn { flex: none; padding: 10px 18px; border: none; background: #e50000; color: #fff; font: inherit; font-weight: 700; font-size: var(--step--1); cursor: pointer; white-space: nowrap; transition: background 0.15s ease; }
.subgroup__btn:hover { background: #c00000; }
.aside__list { list-style: none; margin: 0; padding: 0; }
.aside__list li { border-top: 1px solid var(--line); padding: 12px 0; }
.aside__list li:first-child { border-top: none; padding-top: 0; }
.aside__list a { color: var(--ink); font-family: var(--serif); font-weight: 600; }
.aside__list a:hover { color: var(--gold-strong); text-decoration: none; }
.aside__list small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 3px; }
.aside__links { display: flex; gap: 10px; flex-wrap: wrap; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- article ---------- */
.article {
  max-width: 760px;
  margin: 0;
  padding: 10px 0 10px;
}
.article__head { margin-bottom: 22px; }
.article__title { font-size: var(--step-5); margin: 12px 0 16px; line-height: 1.1; }
.article__lead { font-family: var(--serif); font-size: var(--step-2); color: var(--ink-soft); font-style: italic; margin: 0 0 20px; }
.prose { font-size: 1.09rem; line-height: 1.78; color: var(--ink); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: var(--step-2); margin-top: 1.9em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.5em; }
.prose a { color: var(--gold-strong); text-decoration: underline; }
.prose blockquote { border-left: 3px solid var(--gold); margin: 1.5em 0; padding: 2px 0 2px 22px; color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 1.15em; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.96em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); font-weight: 700; }
.prose tr:last-child td { border-bottom: none; }
.notice { background: color-mix(in srgb, var(--teal) 10%, transparent); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); color: var(--ink-soft); border-radius: var(--radius-sm); padding: 11px 15px; font-size: var(--step--1); }

/* rating widget */
.rating { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 6px; background: var(--surface); }
.rating form { display: inline-flex; margin: 0; }
.rating__btn { border: none; background: none; cursor: pointer; font-size: 1.05rem; line-height: 1; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); transition: background 0.12s ease, color 0.12s ease; }
.rating__btn:hover { background: var(--surface-2); color: var(--ink); }
.rating__btn .ic { font-size: 1.05rem; }
.rating__btn.is-up, .rating__btn.is-down { background: color-mix(in srgb, var(--gold) 14%, transparent); }
/* active vote = solid (filled) red thumb; inactive = outline */
.rating__btn.is-up .ic, .rating__btn.is-down .ic { fill: currentColor; }
.rating__score { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; min-width: 28px; text-align: center; }
.rating__score.pos { color: var(--teal); }
.rating__score.neg { color: var(--clay); }
.rating--readonly { color: var(--muted); }

/* ---------- studio ---------- */
.studio { padding: 34px 0 70px; }
.studio__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.studio__head h1 { font-size: var(--step-3); }
/* Account actions relocated from the header (keeps the header short on phones). */
.acct-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.acct-nav__item { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.acct-nav__item:hover { border-color: var(--gold); color: var(--gold-strong); text-decoration: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat__label { font-size: var(--step--1); color: var(--muted); margin: 0 0 6px; }
.stat__value { font-family: var(--serif); font-size: var(--step-3); font-weight: 700; margin: 0; color: var(--gold-strong); }
.stat__sub { font-size: 0.76rem; color: var(--muted); }
.badge-lang { font-weight: 700; color: var(--gold-strong); font-size: 0.85em; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 10px 0;
}
table.list { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
table.list th, table.list td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); }
table.list tr:last-child td { border-bottom: none; }
table.list td.title { white-space: normal; max-width: 380px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.pill--draft { background: var(--surface-2); color: var(--muted); }
.pill--published { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill--archived { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.dot { color: var(--muted); }

/* ---------- forms ---------- */
.form { max-width: 820px; margin: 0 auto; }
.field { margin-bottom: 5px; }
.field label { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.input, .textarea, .select {
  width: 100%;
  padding: 4px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink); font: inherit;
}
.textarea { 
  min-height: 98px; 
  resize: vertical; 
  font-family: var(--mono); 
  font-size: 0.94rem; 
  line-height: 1.6; 
}
.field__label { display: block; font-weight: 600; margin-bottom: 6px; }
/* Neutral input-group: a field and its trailing button joined into one control
   with squared inner corners and a shared edge — for phone+send and link+copy.
   min-width:0 lets the field shrink so the pair stays on one row on a phone
   instead of the button dropping below and touching the field. */
.igroup { display: flex; align-items: stretch; }
.igroup .input {
  flex: 1 1 auto; min-width: 0; margin: 0;
  border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.igroup .btn {
  flex: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border: 1px solid var(--gold); border-left: none; white-space: nowrap;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--focus); }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }

/* Field help: a "?" icon that reveals a code-driven tooltip on hover/focus/tap. */
.fhelp { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; margin-left: 2px; border: 1px solid var(--line-strong); border-radius: 50%; background: none; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; }
.fhelp:hover, .fhelp:focus-visible { color: #fff; background: var(--gold); border-color: var(--gold); outline: none; }
.fhelp__tip { position: absolute; left: 0; top: calc(100% + 7px); z-index: 20; width: max-content; max-width: min(260px, calc(100vw - 28px)); padding: 8px 11px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 0.78rem; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal; box-shadow: 0 6px 20px rgba(0,0,0,.22); opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .12s ease, transform .12s ease; pointer-events: none; }
.fhelp__tip::before { content: ""; position: absolute; left: 5px; bottom: 100%; border: 5px solid transparent; border-bottom-color: var(--ink); }
.fhelp--right .fhelp__tip { left: auto; right: 0; }
.fhelp--right .fhelp__tip::before { left: auto; right: 5px; }
.fhelp:hover .fhelp__tip, .fhelp:focus-visible .fhelp__tip, .fhelp.is-open .fhelp__tip { opacity: 1; visibility: visible; transform: translateY(0); }
.editor-langs__h { font-size: var(--step-0); margin: 18px 0 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-bottom: 20px; }
.tab { padding: 9px 18px; border: none; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.is-active { color: var(--gold-strong); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.ai-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ai-draft { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.input--sm { padding: 6px 10px; font-size: var(--step--1); min-width: 200px; }

/* ---------- auth ---------- */
.auth-wrap {
  max-width: 400px;
  margin: 60px auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.auth-wrap h1 { font-size: var(--step-2); margin-bottom: 4px; }
.auth-wrap p.sub { color: var(--muted); margin: 0 0 22px; font-size: var(--step--1); }
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: var(--step--1); margin-bottom: 16px; }
.alert--error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

/* ---------- footer ---------- */
/* Footer: black in both themes, light text tuned for the dark ground. */
.site-footer { 
  border-top: 1px solid rgba(255, 255, 255, 0.1); 
  padding: 32px 0; 
  margin-top: 10px; 
  color: rgba(255, 255, 255, 0.6); 
  font-size: var(--step--1); 
  background: #444; 
}
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: rgba(255, 255, 255, 0.82); }
.site-footer a:hover { color: #ef5350; text-decoration: none; }
.foot-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-nav a { font-weight: 600; }

/* Disabled entry point: a link/button to a service the admin turned off. Rendered
   as a <span> (no href, so it can't navigate); the title shows why it's off. */
.is-disabled {
  opacity: 0.8;
  cursor: not-allowed;
  text-decoration: none;
  pointer-events: auto; /* keep the hover tooltip working */
  filter: grayscale(0.6);
}
.is-disabled::after { 
  content: " 🛠";
  color: #fff;
  font-size: 0.85em; 
}

/* ---- User cabinet: two-column layout with a sidebar ---- */
.cabinet { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; align-items: start; }
.cabinet__content { min-width: 0; }
.cab-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px; }
.cab-side__me {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 8px;
  padding: 16px;
  margin-top: 20px;
  border: 1px solid var(--line); 
  border-radius: 14px; 
  background: var(--paper);
}
.cab-side__ava { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.cab-side__ava--empty { display: flex; align-items: center; justify-content: center; background: rgba(127,127,127,.12); font-size: 2.4rem; }
.cab-side__editava { font-size: .85rem; font-weight: 600; }
.cab-side__nav { display: flex; flex-direction: column; gap: 2px; }
.cab-side__link { padding: 9px 12px; border-radius: 9px; color: inherit; text-decoration: none; white-space: nowrap; }
.cab-side__link:hover { background: rgba(127,127,127,.10); }
.cab-side__link.is-active { background: var(--gold); color: #fff; font-weight: 600; }
.cab-side__foot { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.cab-side__back { padding: 9px 12px; }
.cab-side__logout { background: none; border: none; text-align: left; padding: 9px 12px; cursor: pointer; color: inherit; font: inherit; }

.cab-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; background: var(--paper); margin-bottom: 18px; }
.cab-card h2 { margin: 0 0 6px; font-size: var(--step-1); }
.cab-card--danger { border-color: #e5b4b1; background: rgba(220,53,53,.04); }

.prof-ava { display: flex; align-items: center; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.prof-ava__img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.prof-ava__img--empty { display: flex; align-items: center; justify-content: center; background: rgba(127,127,127,.12); font-size: 2.6rem; }
.prof-ava__actions { display: flex; flex-direction: column; gap: 10px; }
.prof-ava__form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-biolang { display: block; margin: 12px 0 4px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft, inherit); }
.prof-biolang:first-of-type { margin-top: 6px; }
.prof-del { display: block; max-width: 320px; margin: 6px 0 14px; }
.prof-del span { display: block; margin-bottom: 4px; font-weight: 600; }

@media (max-width: 900px) {
  .cabinet { grid-template-columns: 1fr; }
  .cab-side { position: static; }
  .cab-side__nav { flex-direction: row; flex-wrap: wrap; }
  .cab-side__me { flex-direction: row; }
  .cab-side__ava { width: 56px; height: 56px; }
}
/* real-estate sidebar banners (paid listing slots, sticky with .aside) */
.rebanner {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; margin-bottom: 16px; position: relative;
  text-decoration: none; color: inherit; transition: box-shadow 0.15s ease;
}
.rebanner:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12); }
/* "Ad" marker, required on every paid placement: tilted 45° into the top-left
   corner so it reads as a stamp on the creative rather than as part of it.
   Kept inside the card's rounded clip, hence the offsets rather than 0/0. */
.rebanner__label {
  position: absolute;
  top: 10px;
  left: -22px;
  z-index: 2;
  padding: 3px 15px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  transform: rotate(-45deg);
}
.rebanner__img {
  display: block;
  height: 180px;
  overflow: hidden;
  background: var(--surface-2);
}
.rebanner__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rebanner__body { display: block; padding: 12px 14px 14px; }
.rebanner__title { display: block; color: var(--ink); font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.rebanner__price { display: block; color: var(--gold-strong); font-weight: 800; }
.rebanner__meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--ink-soft); font-size: var(--step--1); }
.rebanner--promo { padding: 34px 14px 16px; text-align: center; border-style: dashed; }
.rebanner__promo { color: var(--ink-soft); font-size: var(--step--1); margin: 0 0 12px; }
.badge-banner { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; background: var(--gold); color: #fff; }
.mylist__banner { display: flex; gap: 6px; align-items: center; }
.select--xs { padding: 5px 8px; font-size: 0.78rem; width: auto; }

/* advertiser cabinet */
.adv-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface-2);
  margin-bottom: 20px;
}
.adv-card__title { font-size: var(--step-1); margin: 0 0 14px; }
.adv-subhead { font-size: var(--step-0); margin: 18px 0 8px; }
.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 5px 10px;
  margin-bottom: 14px;
}
/* Generic two-column form row that collapses to one column on narrow screens. */
.form-grid { display: grid; gap: 4px 14px; margin-bottom: 6px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-grid--2 { grid-template-columns: 1fr; } }
.adv-company { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.adv-edit summary { list-style: none; cursor: pointer; }
.adv-edit summary::-webkit-details-marker { display: none; }
.adv-split { color: var(--ink-soft); font-size: var(--step--1); margin: 6px 0 16px; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.adv-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.adv-status--pending_payment { background: #fff3cd; color: #7a5c00; }
.adv-status--active { background: #d7f5dd; color: #1a7a34; }
.adv-status--rejected { background: #fde2e1; color: #b71c1c; }
/* moderation ledger: an action's colour says what happened at a glance */
.adv-status--hide { background: #fde2e1; color: #b71c1c; }
.adv-status--reject { background: #fde2e1; color: #b71c1c; }
.adv-status--warn { background: #fff3cd; color: #7a5c00; }
.adv-status--restore { background: #d7f5dd; color: #1a7a34; }
.adv-status--approve { background: #d7f5dd; color: #1a7a34; }
.modrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.modrow--queue { display: block; padding: 14px 0; border-top: 1px solid var(--line); }
.modrow__type, .modrow__date { color: var(--ink-soft); font-size: var(--step--1); }
.modrow__title { font-weight: 700; margin: 4px 0; }
.modrow__reason, .modrow__note { color: var(--ink-soft); font-size: var(--step--1); margin: 2px 0; }
.modrow__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.modrow__actions .input { flex: 1 1 220px; }
/* per-rule findings returned to the author */
.findings { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.finding { border-left: 3px solid var(--line-strong); padding: 6px 0 6px 12px; }
.finding--block { border-left-color: var(--danger); }
.finding--warn { border-left-color: var(--gold); }
.finding__sev { margin-left: 8px; font-size: var(--step--1); color: var(--ink-soft); }
.finding__quote { margin: 6px 0; padding: 6px 12px; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--ink-soft); font-size: var(--step--1); }
.finding__note { margin: 4px 0 0; font-size: var(--step--1); }
/* the two statuses an author now meets between draft and published */
.pill--review { background: #fff3cd; color: #7a5c00; }
.pill--needswork { background: #fde2e1; color: #b71c1c; text-decoration: none; }
.pill--needswork:hover { text-decoration: underline; }
/* Every deep page names its way out. Browser "back" is not enough: a reader
   who arrived from a search result or a shared link has no history to return
   to, and on a phone the gesture is easy to miss. */
.backlink { margin: 18px 0 0; }
.backlink a {
  text-decoration: none;
  margin-bottom: 10px;
}
/* the section you are already in should not look like somewhere to go */
.acct-nav__item.is-active { background: var(--gold); color: #fff; border-color: var(--gold); }
.adv-total { font-size: var(--step-2); font-weight: 800; color: var(--brand); line-height: 1.9; }
/* per-surface picker: a grid of checkable tiles, each showing its own price */
.surf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 6px 0 10px; }
@media (min-width: 900px) { .surf-grid { grid-template-columns: repeat(4, 1fr); } }
.surf { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.surf:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.surf input { flex: none; }
.surf__name { flex: 1 1 auto; }
.surf__price { color: var(--ink-soft); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.surf-actions { display: flex; gap: 8px; margin-bottom: 6px; }
/* banner-format picker: radio tiles with a little shape preview of each size */
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 6px 0 16px; }
@media (min-width: 900px) { .fmt-grid { grid-template-columns: repeat(4, 1fr); } }
.fmt { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.fmt:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.fmt input { grid-row: 1 / 3; }
.fmt__box { grid-row: 1 / 3; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.fmt__box::before { content: ""; background: var(--gold); border-radius: 2px; }
.fmt__box--horizontal::before { width: 30px; height: 9px; }
.fmt__box--vertical::before { width: 12px; height: 30px; }
.fmt__box--square::before { width: 22px; height: 22px; }
.fmt__box--rectangle::before { width: 26px; height: 18px; }
.fmt__name { font-weight: 600; }
.fmt__size { color: var(--ink-soft); font-size: var(--step--1); font-variant-numeric: tabular-nums; text-align: right; }
.fmt__slots { grid-column: 2 / 4; color: var(--ink-soft); font-size: var(--step--1); }
.surf__price { color: var(--ink-soft); font-size: var(--step--1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.charcount { display: block; margin-top: 4px; color: var(--ink-soft); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.adv-rates td b { white-space: nowrap; }
.adv-avail { display: flex; flex-wrap: wrap; gap: 8px; }
.adv-avail__item {
  padding: 5px 12px;
  border-radius: 999px;
  background: #d7f5dd;
  color: #1a7a34;
  font-size: var(--step--1);
  font-weight: 600;
}
.adv-avail__item.is-full { background: #fde2e1; color: #b71c1c; }

/* booking calendar: which days still have a free slot in the chosen zone */
.adv-cal {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  background: var(--surface);
}
.adv-cal__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.adv-cal__hint { color: var(--ink-soft); font-size: var(--step--1); }
.adv-cal__legend { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: var(--step--1); }
.adv-cal__dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.adv-cal__dot--free { background: #7fd699; }
.adv-cal__dot--busy { background: #f0a6a3; margin-left: 10px; }
.adv-cal__grid { display: flex; flex-direction: column; gap: 12px; }
.adv-cal__month { font-weight: 700; font-size: var(--step--1); margin-bottom: 6px; }
.adv-cal__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.adv-cal__day {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 6px 0 4px;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  color: var(--ink);
  line-height: 1.2;
}
.adv-cal__day small { display: block; font-size: 0.6rem; color: var(--ink-soft); }
.adv-cal__day.is-free { background: #eaf9ef; border-color: #b9e6c6; }
.adv-cal__day.is-busy { background: #fdeceb; border-color: #f3c6c4; color: #b71c1c; cursor: not-allowed; }
.adv-cal__day.is-sel { outline: 2px solid var(--brand); outline-offset: -2px; font-weight: 800; }
.adv-cal__day.is-range { box-shadow: inset 0 -3px 0 var(--brand); }
.adv-cal__pad { visibility: hidden; }
/* centered row of social icons on its own line in the footer */
.foot-social { flex-basis: 100%; display: flex; justify-content: center; gap: 18px; margin-top: 10px; }
.foot-social .soc { display: inline-flex; color: rgba(255, 255, 255, 0.6); transition: color 0.15s ease; }
.foot-social .soc:hover { color: #ef5350; }
.foot-social .soc svg { width: 20px; height: 20px; display: block; }

/* info pages (about / guide / support) */
.page { max-width: 760px; margin: 0 auto; padding: 34px 0 70px; }
.page__title { font-size: var(--step-4); margin-bottom: 22px; line-height: 1.1; }

@media (max-width: 640px) {
  /* Hide right-side text links; keep the language switch and the icon-only
     account entry (the header carries just the account icon + "Sign out"). */
  .topstrip__side--right a:not(.btn):not(.icon-btn) { display: none; }
  /* the footer reads as one centred column rather than a ragged left edge */
  .site-footer { text-align: center; }
  .site-footer .container { justify-content: center; }
  .foot-nav { justify-content: center; }
  .wordmark__mark { width: 52px; height: 52px; }
  .hero__media { height: 200px; }
  .post__media { height: 160px; }
  .adcarousel { height: 210px; }
  .adslide { padding: 22px; }
  .adslide__text { font-size: var(--step-2); }
  .adslide__body, .adslide--center .adslide__body { max-width: 84%; }
  .hero__title { font-size: var(--step-3); }
  .article__title { font-size: var(--step-4); }
}

/* ---- Real-estate listings ---- */
.grid-2, .grid-3 { display: grid; gap: 14px 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.post__price {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold-strong, var(--gold));
  margin: 2px 0 6px;
  padding: 0 10px;
}
.listing__price {
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--step-3);
  color: var(--gold-strong, var(--gold));
  margin: 8px 0 18px;
}
table.spec { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
table.spec th, table.spec td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th { width: 38%; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: none; }
.listing__desc { white-space: pre-wrap; margin: 20px 0; }
.listing__contact {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

/* ---- Listings marketplace: two-column grid + ad line ---- */
.posts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; }
@media (max-width: 560px) { .posts--two { grid-template-columns: 1fr; } }

.adline__head { padding-bottom: 4px; }
.adline__badge { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); }
.adline__note { font-size: 0.86rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }

/* A second, legacy .rebanner design (flex gradient CTA card with
   .rebanner__badge/.rebanner__cta/.rebanner--1..3) once lived here and silently
   overrode the image-card banner above with flex/white-text/serif rules. It was
   unused by any template, so it was removed to leave the image-card + promo the
   single source of truth. */

/* ---- Media uploader ---- */
.uploader { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.uploader__btn { cursor: pointer; margin: 0; }
.uploader__status { font-size: 0.95rem; color: var(--muted); min-width: 1em; }

/* ---- Listing photo gallery (carousel) ---- */
/* Photo galleries cross-fade between frames rather than cutting. Every frame
   is absolutely positioned, so the container carries the height itself — the
   images used to supply it via their own aspect-ratio. */
.gallery { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; background: var(--surface-2); }
.gallery__item {
  position: absolute; inset: 0; display: block;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.gallery__item.is-active { opacity: 1; pointer-events: auto; }
.gallery__item img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .gallery__item { transition: none; } }

/* ---- Location cascade (listing form) ---- */
.geo-cascade { display: flex; flex-direction: column; gap: 10px; }
.geo-cascade .select { max-width: 340px; }

/* ---- Listings search ("Найти недвижимость") ---- */
.re-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.re-search {
  display: none;
  margin: 4px 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.re-search.is-open { display: block; }
.re-search__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
}
.re-search__loc { grid-column: span 2; }
.re-search__actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
/* amenity filters row in advanced search */
.re-search__amen { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.re-search__amen-title { display: block; font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.re-search__count { color: var(--muted); font-size: 0.92rem; margin-left: auto; }
@media (max-width: 760px) { .re-search__grid { grid-template-columns: 1fr 1fr; } .re-search__loc { grid-column: span 2; } }
@media (max-width: 480px) { .re-search__grid { grid-template-columns: 1fr; } .re-search__loc { grid-column: auto; } }

/* ---- Listings map (self-hosted region bubble map) ---- */
.re-map { display: none; margin: 4px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.re-map.is-open { display: block; }
.re-map__hint { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
.map-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.map-tab { padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-soft); font-weight: 700; cursor: pointer; font-size: 0.8rem; }
.map-tab.is-active { background: var(--gold); color: #fff; border-color: var(--gold); }
.map-holder { width: 100%; overflow-x: auto; }
/* Leaflet needs an explicit height; the container is also the scroll-lock
   surface, so keep it comfortably tall on a phone without eating the page. */
.map-holder--leaflet { height: 420px; border-radius: 12px; overflow: hidden; z-index: 0; }
.map-holder--leaflet .leaflet-container { height: 100%; width: 100%; background: var(--surface-2); font: inherit; }
.map-holder--leaflet .leaflet-popup-content { margin: 10px 12px; line-height: 1.4; }
.map-holder--leaflet .leaflet-popup-content a { font-weight: 700; }
@media (max-width: 640px) { .map-holder--leaflet { height: 300px; } }
.re-map__svg { width: 100%; height: auto; display: block; background: var(--surface-2); border-radius: 12px; }
.map-bubble { fill: var(--gold); fill-opacity: 0.75; stroke: #fff; stroke-width: 1.5; transition: fill-opacity 0.12s ease; }
:root[data-theme="dark"] .map-bubble { stroke: rgba(255, 255, 255, 0.4); }
.map-bubble.is-empty { fill: var(--muted); fill-opacity: 0.22; }
.map-count { fill: #fff; font-size: 13px; font-weight: 700; font-family: var(--sans); pointer-events: none; }
g[data-region]:hover .map-bubble { fill-opacity: 0.98; }

/* ---- Listing lifecycle: promotion / highlight / management ---- */
.post { position: relative; }
/* Highlighted listing: a soft elevation shadow (replaces the old red outline). */
.post--featured {
  border-radius: 12px;
  border: 1.5px solid var(--gold);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
:root[data-theme="dark"] .post--featured { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); }
/* Corner ribbon: a diagonal banner folded across the top-left corner, text at
   45°. The card media clips its ends (overflow:hidden). */
.badge-top {
  position: absolute; top: 15px; left: -36px; z-index: 4;
  width: 140px; text-align: center;
  background: var(--gold); color: #fff; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 0;
  transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* inline variant (e.g. lists) keeps the old pill look */
.badge-top--inline {
  position: static; width: auto; transform: none; box-shadow: none;
  padding: 3px 9px; border-radius: 999px; letter-spacing: 0.06em; font-size: 0.68rem;
}
.badge-feat {
  display: inline-block; background: var(--teal); color: #fff; font-size: 0.68rem;
  font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
}
/* "Agent" attribution. On a card it sits as a pill in the top-right corner
   (top-left is the promoted ribbon); its inline variant sits in the tag row. */
.agent-badge {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  display: inline-flex; align-items: center; gap: 4px;
  background: #3949ab; color: #fff; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px;
  border-radius: 999px; text-decoration: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.agent-badge:hover { background: #2c3a90; text-decoration: none; }
.agent-line {
  display: inline-block; margin: 2px 0 2px; color: #3949ab; font-weight: 700;
  font-size: 0.86rem; text-decoration: none;
}
.agent-line:hover { text-decoration: underline; }
.badge-agent {
  display: inline-block; background: #3949ab; color: #fff; font-size: 0.68rem;
  font-weight: 800; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px;
  text-decoration: none;
}
.badge-agent:hover { background: #2c3a90; text-decoration: none; }
/* Public agent page header card */
.agentcard {
  display: flex; gap: 18px; align-items: flex-start; margin: 18px 0 26px;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.agentcard__avatar {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #eef1fb; color: #3949ab; font-size: 28px;
}
.agentcard__role { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #3949ab; }
.agentcard__name { margin: 4px 0 2px; font-size: 1.5rem; }
.agentcard__agency { color: var(--muted); margin: 0 0 6px; }
.agentcard__phone { font-weight: 700; margin: 6px 0; }
.agentcard__about { color: var(--ink-soft); line-height: 1.55; margin: 8px 0 0; white-space: pre-line; }
.section-h { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; }
.listing__tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.listing__owner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 0.9rem;
}

.mylist { display: flex; flex-direction: column; gap: 12px; }
.mylist__row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  flex-wrap: wrap;
}
.mylist__row.is-featured { border-color: var(--gold); }
.mylist__title { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.mylist__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.mylist__status { font-size: 0.85rem; color: var(--teal); font-weight: 600; margin-top: 4px; }
.mylist__status.is-expired { color: var(--danger); }
.mylist__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mylist__actions form { margin: 0; }

/* ---- AI columnist (AI Dake) ---- */
.ai-badge {
  display: inline-block; background: var(--gold); color: #fff;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
.ai-badge:hover { background: var(--gold-strong); text-decoration: none; }
.notice--ai { border-left: 3px solid var(--gold); background: var(--surface-2); color: var(--ink-soft); font-style: italic; }
.author-hero {
  display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap;
  margin: 28px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.author-hero__mark img { width: 72px; height: 72px; }
/* real author photo (when set): same footprint as the initials circle */
.author-hero__photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
/* project leadership badge next to the author name */
.team-badge {
  display: inline-block; background: var(--ink, #1a1a1a); color: #fff;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
/* human-author avatar fallback: initials in a brand-tinted circle */
.author-hero__initials {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--gold); color: #fff; font-weight: 800; font-size: 1.7rem; letter-spacing: 0.02em;
}
/* author byline link inside feed cards — inherits colour, underlines on hover */
.byline-link { color: inherit; text-decoration: none; }
.byline-link:hover { color: var(--gold-strong); text-decoration: underline; }
.author-hero__body { flex: 1; min-width: 240px; }
.author-hero__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.author-hero__role { color: var(--gold-strong); font-weight: 700; margin: 2px 0 8px; }
.author-hero__bio { 
  color: var(--ink-soft); 
  margin: 0; 
}

/* ---- Author profile analytics showcase ---- */
.author-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.author-stat { border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; background: var(--surface); }
.author-stat b { display: block; font-family: var(--serif); font-size: var(--step-3); color: var(--gold-strong); }
.author-stat span { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.author-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.author-cat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.author-cat b { color: var(--gold-strong); }
.author-cat:hover { border-color: var(--gold); text-decoration: none; }
@media (max-width: 640px) { .author-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- Comments ---- */
.comments { margin: 32px 0 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.comments__title { font-size: var(--step-2); margin-bottom: 16px; }
.comments__form { margin-bottom: 22px; display: flex; flex-direction: column; gap: 10px; }
.comments__login { color: var(--muted); }
.comments__review { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--ink); font-size: var(--step--1); }
.comments__empty { color: var(--muted); font-style: italic; }
.comments__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.comment { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.comment__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.comment__author { font-weight: 700; }
.comment__date { color: var(--muted); font-size: 0.82rem; }
.comment__body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ================= Admin dashboard (standalone layout) ================= */
.adm-body { margin: 0; background: var(--surface-2); }
.adm { display: flex; min-height: 100vh; }

.adm__side {
  width: 248px; flex-shrink: 0; position: sticky; top: 0; align-self: flex-start;
  height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); border-right: 1px solid var(--line-strong); padding: 18px 14px;
}
.adm__brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--ink); padding: 4px 8px 16px; }
.adm__brand:hover { text-decoration: none; }
.adm__mark { width: 34px; height: 34px; }
.adm__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adm__navlink { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.adm__navlink:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.adm__navlink.is-active { background: var(--gold); color: #fff; }
:root[data-theme="dark"] .adm__navlink.is-active { color: #fff; }
.adm__side-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.adm__sidelink { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.adm__sidelink:hover { color: var(--gold-strong); text-decoration: none; }

.adm__main { flex: 1; min-width: 0; padding: 24px 28px 60px; max-width: 1200px; }
.adm__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.adm__top h1 { font-size: var(--step-3); }
.adm__user { color: var(--muted); font-size: 0.9rem; }
.adm-notice { background: color-mix(in srgb, var(--teal) 14%, var(--paper)); border: 1px solid var(--teal); color: var(--teal); border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; font-weight: 600; }
.adm-section { margin-bottom: 26px; scroll-margin-top: 20px; }

/* Two-column dashboard: blocks flow into two masonry columns (variable heights,
   no row gaps). The overview KPI strip spans both columns at the top. */
/* Dashboard layout: full-width thematic bands stacked in reading order, each
   with its own internal grid. A page-wide masonry balanced by height instead of
   by meaning, which left one column empty whenever a section grew; sections that
   own their grid can never do that. */
.adm-flow > .adm-section { margin: 0 0 22px; }

/* The moderation cards (queue, appeals, log, analysis) get their own isolated
   two-column masonry so they split evenly instead of stacking in one column. */
.adm-cards2 { columns: 2; column-gap: 22px; }
.adm-cards2 > .adv-card { break-inside: avoid; margin: 0 0 22px; }
@media (max-width: 1000px) { .adm-cards2 { columns: 1; } }

.adm-section__h { font-size: var(--step-1); margin: 0 0 14px; }
.adm-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 15px;
}
/* Fill the whole row regardless of card count (no empty space on wide screens):
   cards stretch to equal widths and wrap on narrow screens. */
.adm-kpis--fill { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.adm-kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.adm-kpi__ic { font-size: 1.2rem; color: var(--gold); opacity: 0.7; }
.adm-kpi b { 
  font-family: var(--serif); 
  font-size: var(--step-3); 
  color: var(--ink); 
  line-height: 1.1; 
}
.adm-kpi span:last-child { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.adm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.adm-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.adm-panel h2 { font-size: var(--step-1); margin-bottom: 14px; }
.adm-hint { color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }

.adm-chart { display: flex; flex-direction: column; gap: 9px; }
.adm-bar { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 10px; font-size: 0.9rem; }
.adm-bar__label { color: var(--ink-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-bar__label:hover { color: var(--gold-strong); }
.adm-bar__track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.adm-bar__fill { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.adm-bar__fill--teal { background: var(--teal); }
.adm-bar__val { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }

.adm-tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.adm-tbl td { padding: 8px 8px; border-bottom: 1px solid var(--line); }
.adm-tbl td:nth-child(2) { text-align: right; color: var(--muted); white-space: nowrap; }
.adm-tbl__score { text-align: right; color: var(--teal); white-space: nowrap; }
.adm-tbl tr:last-child td { border-bottom: none; }

.adm-roleform { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-roleform .input { flex: 1; min-width: 180px; }
/* Service switches flow across the full width — auto-fill keeps the row packed
   whatever the count, so adding a service never creates a tall lonely column. */
.adm-svc { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 12px; align-items: start; }
.adm-svc__row { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
/* The trilingual notice is secondary: collapsed by default to keep cards short. */
.adm-svc__more > summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; }
.adm-svc__more > summary::-webkit-details-marker { display: none; }
.adm-svc__more > summary::before { content: "▸ "; }
.adm-svc__more[open] > summary::before { content: "▾ "; }
.adm-svc__more[open] > summary { margin-bottom: 8px; }
.adm-svc__top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.adm-svc__name { display: flex; gap: 10px; align-items: center; }
.adm-svc__state { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.adm-svc__state--on { color: #0a7d33; border-color: #9bd8b0; background: rgba(16,161,74,0.08); }
.adm-svc__state--maintenance { color: #9a6a00; border-color: #e6c884; background: rgba(217,164,32,0.10); }
.adm-svc__state--invite_only { color: #3949ab; border-color: #b9c0e8; background: rgba(57,73,171,0.08); }
.adm-svc__state--off { color: #a33; border-color: #e3a7a7; background: rgba(200,60,60,0.08); }
.adm-svc__msgs { display: grid; grid-template-columns: 1fr; gap: 8px; }
.adm-svc__msgs label { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.adm-svc__foot { display: flex; justify-content: flex-end; }
.input--sm, .select--sm { padding: 6px 10px; font-size: 14px; }
.adm-site { margin-bottom: 16px; border-width: 2px; }
.adm-site--maintenance, .adm-site--off { border-color: #e3a7a7; background: rgba(200,60,60,0.05); }
.adm-site__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adm-site__head > div { display: flex; align-items: center; gap: 12px; }
.adm-site__timer { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.adm-site__timer .select { max-width: 180px; }
.adm-site__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }

/* Global maintenance page */
.maint-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); margin: 0; }
.maint { max-width: 520px; padding: 40px 24px; text-align: center; }
.maint__mark { width: 140px; height: 140px; margin-bottom: 4px; }
.maint__icon { font-size: 40px; margin: 4px 0 4px; }
.maint__title { font-size: 26px; margin: 8px 0 12px; }
.maint__msg { color: var(--muted); font-size: 16px; line-height: 1.6; }
.maint__timer { margin-top: 24px; }
.maint__timer-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.maint__count { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink); }
.adm-comments { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.adm-comments li { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.adm-comments__head { font-size: 0.85rem; color: var(--muted); margin-bottom: 5px; }
.adm-comments p { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .adm { flex-direction: column; }
  .adm__side { width: auto; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line-strong); }
  .adm__brand { padding: 4px 8px; }
  .adm__nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; order: 3; }
  .adm__side-foot { border-top: none; padding-top: 0; }
  .adm-kpis { 
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 15px;
  }
  .adm-cols { grid-template-columns: 1fr; }
  .adm__main { padding: 18px; }
}

/* ---- Sidebar "latest news" carousel (replaces the old ad slots) ---- */
.adslide--news {
  background: linear-gradient(135deg, #ef5350, #aa0000);
}
.adslide--news:hover { text-decoration: none; }
.adslide--news .adslide__text {
  font-size: var(--step-1); font-weight: 700; line-height: 1.28; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.adslide--news .adslide__badge {
  background: rgba(255, 255, 255, 0.22);
}

/* ---- Home hero "latest news" carousel ---- */
.newshero__slide { background: linear-gradient(135deg, var(--gold-strong), #7a1414); background-size: cover; background-position: center; }
.newshero__slide:hover { text-decoration: none; }
.newshero .adslide__badge { background: rgba(255, 255, 255, 0.2); }
.newshero .adslide__text {
  font-size: var(--step-3); font-weight: 800; color: #fff; line-height: 1.18;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- Favorites (bookmarks) ---- */
.favform { display: inline-block; margin: 0; }
.favbtn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: var(--step--1); font-weight: 600;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.favbtn:hover { border-color: var(--gold); color: var(--gold-strong); }
.favbtn__heart { display: inline-flex; font-size: 1.05rem; line-height: 1; }
.favbtn.is-on { border-color: var(--gold); color: var(--gold-strong); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.favbtn.is-on .favbtn__heart .ic { fill: currentColor; }
.article__head .favform { vertical-align: middle; margin-left: 10px; }
.article__head .rating { vertical-align: middle; }
.listing__headrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.listing__headrow .listing__price { margin: 0; }
.fav-group {
  font-family: var(--serif); font-size: 1.15rem; margin: 26px 0 12px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.fav-group:first-of-type { margin-top: 6px; }

/* ---- Listing photo gallery uploader ---- */
.galup { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.galup__items { display: flex; flex-wrap: wrap; gap: 10px; }
.galup__item { position: relative; width: 96px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface-2); }
.galup__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galup__rm {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0;
}
.galup__rm:hover { background: var(--gold-strong); }
.galup__add { white-space: nowrap; }
.galup__status { font-size: var(--step--1); color: var(--muted); }
.checkline { display: flex; gap: 9px; align-items: flex-start; margin-top: 10px; font-size: var(--step--1); color: var(--ink-soft); cursor: pointer; line-height: 1.5; }
.checkline input { margin-top: 3px; flex: none; }
.notice--warn {
  border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 7%, transparent);
  color: var(--ink-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: var(--step--1); margin-top: 12px; line-height: 1.5;
}

/* ---- Listing report (misleading photos) ---- */
.listing__report { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.reportbtn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit;
  font-size: var(--step--1); font-weight: 600; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
}
.reportbtn:hover { border-color: var(--danger); color: var(--danger); }
.listing__report .hint { font-size: var(--step--1); }
.notice--ok {
  border-left: 3px solid var(--teal); background: color-mix(in srgb, var(--teal) 8%, transparent);
  color: var(--ink-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: var(--step--1); margin: 16px 0 0;
}

/* ---- Listing contact reveal + stats ---- */
.listing__contact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contact-val { font-weight: 600; color: var(--ink); }
.contact-val--masked { letter-spacing: .04em; color: var(--muted); font-family: var(--mono); }
.contact-reveal { display: inline-block; margin: 0; }
.listing__stats { margin: 8px 0 0; font-size: var(--step--1); color: var(--muted); }

/* ---- Article table of contents ---- */
/* sidebar ad carousel (demo car placements above the TOC) — red gradient
   banner in the brand style, with the car on a framed light photo panel. */
.adcarousel--ad {
  height: auto;
  background: linear-gradient(120deg, #ef5350, #aa0000);
  border-color: transparent;
}
.adcarousel--ad .adslide {
  flex-direction: column; justify-content: flex-start; align-items: stretch;
  text-align: left; padding: 0 0 46px; color: #fff; background: transparent;
}
.adcarousel--ad .adslide:hover { text-decoration: none; }
.ad__label {
  position: absolute;
  top: 10px;
  left: -22px;
  z-index: 2;
  padding: 3px 15px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  transform: rotate(-45deg);
}
.ad__img {
  position: relative;
  display: block;
  margin: 2px 2px 10px;
  padding: 6px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2f7, #dbe4ef);
  /* The tilted "Ad" ribbon is positioned past this box's left edge. Without a
     clip here it hangs outside the slide, and since the slides sit side by side
     in one track, the next slide's ribbon peeked in on the right. */
  overflow: hidden;
}
.ad__img img { display: block; width: 100%; }
.ad__title { padding: 0 16px; font-weight: 700; font-size: var(--step-0); line-height: 1.25; color: #fff; }
.ad__price { padding: 3px 16px 0; color: #ffdf7e; font-weight: 800; font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.ad__desc { padding: 5px 16px 0; color: rgba(255, 255, 255, 0.9); font-size: var(--step--1); line-height: 1.4; }
.ad__cta { align-self: flex-start; margin: 14px 16px 0; }
.adcarousel--ad .adslide .btn--primary { background: #fff; color: #b71c1c; }
.adcarousel--ad .adslide .btn--primary:hover { background: #fff; }
.adcarousel--ad .adcarousel__dots button { background: rgba(255, 255, 255, 0.5); }
.adcarousel--ad .adcarousel__dots button.is-active { background: #fff; }

.article-aside { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.toc-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.toc-box__title { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.toc-box__list { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 3px; }
.toc-box__list li { counter-increment: toc; }
.toc-box__list a { display: flex; gap: 9px; align-items: baseline; color: var(--ink-soft); font-size: .9rem; padding: 5px 7px; border-radius: 6px; text-decoration: none; line-height: 1.35; }
.toc-box__list a::before { content: counter(toc); font-family: var(--mono); font-size: .72rem; color: var(--gold-strong); font-weight: 700; }
.toc-box__list a:hover { background: var(--surface-2); color: var(--ink); }
.prose h2 { scroll-margin-top: 90px; }
/* An article with no headings has no aside — let it use the full column width. */
.layout--solo { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .layout--solo { grid-template-columns: minmax(0, 1fr); }
  /* pin the whole sidebar (ad + TOC) so it stays in view instead of scrolling
     away with the article body. */
  .article-aside { position: sticky; top: 92px; align-self: start; }
}

/* ---- Reading-depth funnel (author dashboard) ---- */
.depth { white-space: nowrap; }
.depth-cell {
  display: inline-flex; align-items: baseline; gap: 3px; margin-right: 8px;
  font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.depth-cell b { color: var(--ink); font-weight: 700; font-size: 0.82rem; }
.depth-cell--end b { color: var(--teal); }

/* ---- Listing amenities ---- */
.amgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 5px 10px;
  margin-top: 4px;
}
.amcheck { display: flex; align-items: center; gap: 8px; font-size: var(--step--1); color: var(--ink-soft); cursor: pointer; padding: 4px 0; }
.amcheck input { flex: none; }
.amenities { margin-top: 20px; }
.amenities__title { font-size: 1.05rem; margin: 0 0 10px; }
.amenities__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amenities__list li {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 600; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
}
.amenities__list li::before { content: "✓"; color: var(--teal); font-weight: 700; }

/* ---- Listing per-room breakdown (form + detail) ---- */
.roomsup { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.roomsup__items { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.roomsup__row { display: grid; grid-template-columns: minmax(120px, 1fr) 90px minmax(120px, 2fr) auto; gap: 8px; align-items: center; }
.roomsup__row .input { margin: 0; }
.roomsup__rm { position: static; width: 28px; height: 28px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-strong); }
.roomsup__rm:hover { background: var(--gold-strong); color: #fff; border-color: var(--gold-strong); }
@media (max-width: 560px) { .roomsup__row { grid-template-columns: 1fr 1fr; } .roomsup__note { grid-column: 1 / -1; } }
.spec__cap {
  text-align: left;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  padding: 14px 10px 8px;
  caption-side: top;
}
/* Shanraq's own line icons: brand red, sized to the surrounding text. */
.ic { color: var(--gold-strong); vertical-align: -0.14em; }
.roomic { font-size: 1.15rem; margin-right: 4px; }
/* inline meta icon (views, date, reading time, comments): red glyph + value */
.metaic { display: inline-flex; align-items: center; gap: 4px; }
.metaic .ic { font-size: 1.05em; }
/* amenity icon in the listing chips and the submission checkboxes */
.amic { display: inline-flex; font-size: 1.1rem; margin-right: 5px; vertical-align: -0.16em; }
/* rubric icon inside the category label */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
}
.kicker .ic { font-size: 1.2em; }
/* real-estate (shanyrak) marker before a page heading */
.h1-ic { display: flex; align-items: center; gap: 10px; }
.h1-ic__mark { display: inline-flex; color: var(--gold-strong); font-size: 1.6rem; }
/* on the light listings heading, the shanyrak mark (red variant) replaces the icon */
.h1-ic__mark--logo { align-items: center; }
.h1-logo { height: 2.1rem; width: auto; display: block; }
/* row of amenity icons on a listing card */
.post__amen {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 10px;
  margin-top: 8px;
}
.post__amen .amic { margin: 0; font-size: 1.2rem; }
/* facts summary (flag · area · rooms) — wraps to a second row when it overflows */
.post__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: var(--step--1);
  padding: 0 10px;
}
.post__facts .fact { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.post__facts .fact .ic { font-size: 1.15em; }
.post__facts .fact--sec { color: var(--muted); }
.spec--rooms th .hint { font-weight: 400; }

