@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: optional; /* preloaded; avoids the layout shift a late font swap causes */
}

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #16191f;
  --muted: #5f6774;
  --border: #e3e6eb;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-text: #0b5f58;
  --good: #15803d;
  --good-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 14px;
  --on-accent: #ffffff;
  color-scheme: light;
}
/* Dark theme: follows the system unless the visitor picked one (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1d222b;
    --text: #e8ebf0;
    --muted: #9aa3b0;
    --border: #2a303a;
    --accent: #2dd4bf;
    --accent-soft: #123b37;
    --accent-text: #5eead4;
    --good: #4ade80;
    --good-soft: #14321f;
    --warn: #fbbf24;
    --warn-soft: #3a2c0c;
    --bad: #f87171;
    --bad-soft: #3b1515;
    --shadow: none;
    --on-accent: #062a27;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116;
  --surface: #161a21;
  --surface-2: #1d222b;
  --text: #e8ebf0;
  --muted: #9aa3b0;
  --border: #2a303a;
  --accent: #2dd4bf;
  --accent-soft: #123b37;
  --accent-text: #5eead4;
  --good: #4ade80;
  --good-soft: #14321f;
  --warn: #fbbf24;
  --warn-soft: #3a2c0c;
  --bad: #f87171;
  --bad-soft: #3b1515;
  --shadow: none;
  --on-accent: #062a27;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  font-feature-settings: 'ss01';
}
h1, h2, h3 { margin: 0; line-height: 1.4; }
h1 { font-size: 1.35rem; font-weight: 800; }
.brand-name { font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
a.brand { color: inherit; text-decoration: none; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; }

.top { background: var(--surface); border-bottom: 1px solid var(--border); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.top-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

.btn { font: inherit; border: 0; background: var(--accent); color: var(--on-accent); padding: 8px 18px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent-text); border: 1px solid var(--border); }
.btn.small { padding: 4px 12px; font-size: .82rem; }
.btn:disabled { opacity: .55; cursor: default; }

.tabs-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0; margin: 8px 0 6px; }
.tabs { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px; max-width: 520px; }
.tab { flex: 1; font: inherit; border: 0; background: transparent; color: var(--muted); min-height: 40px; padding: 4px 10px; border-radius: 9px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: var(--on-accent); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card-head { margin-bottom: 12px; }
.card-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid3 > * { min-width: 0; }
@media (max-width: 860px) { .grid3 { grid-template-columns: minmax(0, 1fr); } }
.hl { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.hl .label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.hl .big { font-size: 1.6rem; font-weight: 800; color: var(--accent-text); }
.hl .sub { font-size: .85rem; }
.hl ol { margin: 4px 0 0; padding-inline-start: 18px; font-size: .85rem; }
.hl ol li { margin-bottom: 2px; }

.op { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.op::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--op, var(--muted)); flex: none; }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 860px) { .calendar { grid-template-columns: 1fr; } }
.day { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--surface-2); min-height: 92px; }
.day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day h3 { font-size: .85rem; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.promo { font-size: .78rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 7px; margin-bottom: 6px; }
.promo b { color: var(--good); }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.item .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.item .price { text-align: left; font-weight: 800; white-space: nowrap; }
.item .price small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.strike { text-decoration: line-through; color: var(--muted); font-weight: 400; margin-inline-start: 6px; }

.buckets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bucket { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.bucket h3 { margin-bottom: 8px; }
.bucket .row { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; padding: 4px 0; border-top: 1px dashed var(--border); }
.bucket .row:first-of-type { border-top: 0; }

.plan-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 6px; }
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 6px 10px; min-width: 0; }
input[type="number"] { width: 120px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input[type="search"] { width: 160px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
td.title { white-space: normal; min-width: 180px; }
td.notes { white-space: normal; min-width: 160px; color: var(--muted); font-size: .78rem; }
th { background: var(--surface-2); font-weight: 700; position: sticky; top: 0; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.perGB { font-weight: 700; }
.perGB.best { color: var(--good); }


.empty { padding: 8px 4px; }
.foot { padding: 6px 16px 28px; text-align: center; }
.skeleton { color: transparent; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 8px; min-height: 120px; }
@keyframes sh { to { background-position: -200% 0; } }

.daily-promos:not(:empty) { margin-top: 10px; }
.daily-promos h3 { font-size: .85rem; margin-bottom: 6px; }
.promo .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- freshness indicator ---------- */
.fresh { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.fresh::before, .dot { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.dot { margin-inline-end: 6px; vertical-align: middle; }
.fresh.ok::before, .dot.ok { background: var(--good); }
.fresh.warn::before, .dot.warn { background: var(--warn); }
.fresh.bad::before, .dot.bad { background: var(--bad); }
.fresh.bad { color: var(--bad); font-weight: 600; }
.fresh.busy::before { background: var(--accent); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }

/* ---------- status banner ---------- */
#status-banner { margin-top: 14px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; }
.banner.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.banner-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.banner.bad .banner-icon { background: var(--bad); }
.banner.warn .banner-icon { background: var(--warn); }
.banner-body { flex: 1; min-width: 0; font-size: .88rem; }
.banner-body p { color: var(--text); opacity: .85; }
.banner .btn { flex: none; }
@media (max-width: 600px) { .banner { flex-wrap: wrap; } .banner .btn { width: 100%; } }

/* ---------- planner (hero) ---------- */
.card.hero { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.preset { font: inherit; font-size: .82rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.preset:hover { border-color: var(--accent); }
.preset.active { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; font-weight: 700; }
.item.winner { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.item.winner .price { color: var(--accent-text); font-size: 1.1rem; }
.more { margin-top: 10px; }

/* stale operator marker */
.op.stale::after { content: '⏱'; font-size: .75em; margin-inline-start: 2px; opacity: .8; }

/* ---------- sources (collapsible) ---------- */
.sources-card > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sources-card > summary::-webkit-details-marker { display: none; }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; margin: 0 4px 4px; flex: none; }
.sources-card[open] .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.src-cause { color: var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.sources-note { margin: 10px 0; }
.sources { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.src { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 4px 14px; padding: 9px 12px; border-top: 1px solid var(--border); }
.src:first-child { border-top: 0; }
.src-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.src-time { white-space: nowrap; }
.src-err { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; color: var(--warn); }
.src-err code { font-family: ui-monospace, monospace; font-size: .72rem; color: var(--muted); direction: ltr; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.src-link { white-space: nowrap; }
@media (max-width: 600px) {
  .src { grid-template-columns: minmax(0, 1fr) auto; }
  .src-time { grid-row: 2; }
  .src-link { grid-row: 2; justify-self: end; }
}
@media (max-width: 600px) {
  .item { grid-template-columns: minmax(0, 1fr); }
  .item .price { text-align: start; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: 6px; }
  .item .price small { display: inline; }
}

/* ---------- theme switch ---------- */
.theme-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.theme-switch button { font: inherit; border: 0; background: transparent; color: var(--muted); width: 30px; height: 26px; border-radius: 999px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow), 0 0 0 1px var(--border); }
.theme-switch svg { width: 16px; height: 16px; }

/* ---------- SEO / content blocks ---------- */
.intro { margin: 18px 0 4px; }
.intro h1 { margin-bottom: 4px; }
.intro p { max-width: 80ch; }
.crumbs { margin-top: 14px; }
.op-group + .op-group { margin-top: 18px; }
.op-group h3 { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.op-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.op-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 12px 14px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2);
  color: var(--text); transition: border-color .15s;
}
.op-card:hover { border-color: var(--accent); text-decoration: none; }
.op-card.is-cheapest { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.op-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-width: 0; }
.op-card-rank { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.op-card-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-card-head .chip { margin-inline-start: auto; font-size: .7rem; padding: 0 8px; }
.op-card-label { font-size: .72rem; color: var(--muted); }
.op-card-price { font-size: .85rem; white-space: nowrap; }
.op-card-price b { font-size: 1.25rem; font-weight: 800; }
.op-card.is-cheapest .op-card-price b { color: var(--accent-text); }
.op-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); font-size: .75rem; color: var(--muted); }
.op-card-go { color: var(--muted); transition: transform .15s; }
.op-card:hover .op-card-go { transform: translateX(-3px); }
.faq details { border-top: 1px solid var(--border); padding: 10px 2px; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 6px; color: var(--muted); }
.plain-list { margin: 0; padding-inline-start: 18px; }
.plain-list li { margin-bottom: 8px; }

/* ---------- reserve space while data loads (prevents layout shift / CLS) ---------- */
#plan-results:empty, #highlights:empty, #calendar:empty, #buckets:empty {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2));
  background-size: 200% 100%;
  animation: sh 1.2s infinite;
}
#plan-results:empty { min-height: 400px; }
#highlights:empty { min-height: 300px; }
#calendar:empty { min-height: 130px; }
#buckets:empty { min-height: 260px; }
@media (max-width: 860px) {
  #highlights:empty { min-height: 900px; }
  #calendar:empty { min-height: 480px; }
}
@media (max-width: 600px) { #plan-results:empty { min-height: 560px; } }
@media (prefers-reduced-motion: reduce) { #plan-results:empty, #highlights:empty, #calendar:empty, #buckets:empty { animation: none; } }

/* Links inside running text are underlined, not just colored (accessibility). */
.intro p a, .faq p a, .crumbs a, .card-head p a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- price history: chart + change log ---------- */
/* Chart series slots: dataviz reference palette, validated (light vs #fff, dark vs #161a21). */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #6250d6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #9085e9; } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #9085e9; }
.s1 { --c: var(--s1); } .s2 { --c: var(--s2); } .s3 { --c: var(--s3); } .s4 { --c: var(--s4); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .8rem; border: 0; background: transparent; color: var(--muted); padding: 4px 12px; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 0 0 1px var(--border); }
.seg.small button { font-size: .76rem; padding: 3px 10px; }

.chart-block { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.chart-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hist-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.hist-op { font: inherit; font-size: .76rem; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.hist-op .sw { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--border); }
.hist-op.on { color: var(--text); border-color: var(--c); font-weight: 600; }
.hist-op.on .sw { background: var(--c); border-color: var(--c); }
.hist-op:disabled { opacity: .45; cursor: not-allowed; }

.chart { position: relative; min-height: 230px; }
.chart svg { display: block; width: 100%; height: auto; direction: ltr; touch-action: pan-y; }
.viz .grid { stroke: var(--border); stroke-width: 1; }
.viz .ax { fill: var(--muted); font-size: 11px; font-family: inherit; }
.viz .ln { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.viz .pt { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.viz .dl { fill: var(--text); font-size: 12px; font-weight: 600; font-family: inherit; }
.viz .xh { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.viz .hit { fill: transparent; cursor: crosshair; }
.chart .tip { position: absolute; top: 4px; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: .78rem; display: flex; flex-direction: column; gap: 3px; min-width: 170px; z-index: 2; }
.chart .tip .tr { display: flex; align-items: center; gap: 6px; }
.chart .tip .tr b { margin-inline-start: auto; }
.chart .tip .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.chart-empty { display: grid; place-items: center; min-height: 200px; }

.hist-log-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.hist-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.hist-day { font-size: .82rem; color: var(--muted); margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.hist-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 7px 2px; align-items: start; }
.hist-row + .hist-row { border-top: 1px dashed var(--border); }
.hist-main .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .82rem; margin-top: 2px; }
.hist-time { padding-top: 2px; }
.chart .tip[hidden] { display: none; }
.chart-hint { margin: -2px 0 6px; }
.hist-summary { margin-bottom: 14px; }
.hist-summary h3 { font-size: .9rem; margin-bottom: 8px; }
.sum-row { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.sum-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(150px, auto) 1fr auto 14px; gap: 6px 16px; align-items: center; padding: 10px 12px; }
.sum-row > summary::-webkit-details-marker { display: none; }
.sum-row > summary:hover { background: color-mix(in srgb, var(--surface) 50%, transparent); border-radius: 12px; }
.sum-row[open] > summary { border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; }
.sum-row[open] .chev { transform: rotate(-135deg); margin-top: 4px; }
.chg-list { list-style: none; margin: 0; padding: 4px 12px 8px; }
.chg { padding: 8px 0; }
.chg + .chg { border-top: 1px dashed var(--border); }
.chg-title { font-weight: 600; font-size: .88rem; }
.chg-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .82rem; margin-top: 3px; }
.sum-op { display: flex; flex-direction: column; gap: 2px; }
.sum-detail { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.sum-total { display: flex; flex-direction: column; align-items: flex-end; }
.sum-total b { font-size: 1.15rem; }
.sum-total b.up { color: var(--bad); }
.sum-total b.down { color: var(--good); }
.sum-still { margin-top: 4px; }
.viz .grid.zero { stroke: var(--muted); stroke-opacity: .55; }
@media (max-width: 600px) {
  .sum-row > summary { grid-template-columns: 1fr auto 14px; }
  .sum-detail { grid-column: 1 / -1; grid-row: 2; }
}

/* Long operator notes (fees, fair-use rules…) stay readable: 2 lines, full text on hover. */
td.notes .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 340px; }
.viz .evt { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 4 3; }
.viz .evt-l { fill: var(--warn); font-size: 10px; font-family: inherit; }
.official { margin-top: 10px; padding: 10px 12px; border: 1px dashed color-mix(in srgb, var(--warn) 50%, var(--border)); border-radius: 12px; }
.official h4 { margin: 0 0 4px; font-size: .82rem; }
.official p { margin: 2px 0; }

.cat-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.cat-links a { display: block; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 700; }
.cat-links a:hover { border-color: var(--accent); text-decoration: none; }
.intro .btn { display: inline-block; margin-top: 8px; text-decoration: none; }
.chg-more { margin: 0 12px 10px; }
.viz .ln.gap { stroke-dasharray: 5 4; stroke-opacity: .8; }

/* ---------- history: overview bars ---------- */
.ov-hint { margin: -4px 0 8px; }
.ov { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ov-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 76px; grid-template-areas: 'name bar val' '. note note'; gap: 2px 12px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.ov-row:last-child { border-bottom: 0; }
.ov-name { grid-area: name; }
.ov-bar { grid-area: bar; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ov-bar span { display: block; height: 100%; border-radius: 999px; }
.ov-bar .up { background: color-mix(in srgb, var(--bad) 70%, transparent); }
.ov-bar .down { background: color-mix(in srgb, var(--good) 70%, transparent); }
.ov-row.weak .ov-bar span { background-image: repeating-linear-gradient(45deg, transparent 0 4px, color-mix(in srgb, var(--surface) 55%, transparent) 4px 8px); }
.ov-val { grid-area: val; text-align: left; font-size: 1rem; }
.ov-val.up { color: var(--bad); }
.ov-val.down { color: var(--good); }
.ov-note { grid-area: note; }
@media (max-width: 600px) { .ov-row { grid-template-columns: 90px minmax(0, 1fr) 64px; } }

/* ---------- history: timeline of change waves ---------- */
.tl { margin-top: 18px; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tl-head h3 { font-size: .95rem; }
.tl-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-filter button { font: inherit; font-size: .76rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.tl-filter button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; font-weight: 700; }
.tl-month { font-size: .82rem; color: var(--muted); margin: 16px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.tl-wave { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin-bottom: 6px; }
.tl-wave > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 210px minmax(0, 1fr) auto 14px; gap: 4px 14px; align-items: center; padding: 10px 12px; }
.tl-wave > summary::-webkit-details-marker { display: none; }
.tl-wave[open] > summary { border-bottom: 1px solid var(--border); }
.tl-wave[open] .chev { transform: rotate(-135deg); margin-top: 4px; }
.tl-when { display: flex; flex-direction: column; gap: 1px; }
.tl-when b { font-size: .88rem; }
.tl-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-big b { font-size: 1.05rem; white-space: nowrap; }
.tl-big .up { color: var(--bad); }
.tl-big .down { color: var(--good); }
@media (max-width: 700px) {
  .tl-wave > summary { grid-template-columns: minmax(0, 1fr) auto 14px; }
  .tl-when { grid-column: 1 / -1; }
}

/* Price-change pages */
.news-line { margin: 10px 0 0; padding: 8px 12px; border-inline-start: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 8px; max-width: 80ch; }
.news-line a, .foot a, .plain-list a { text-decoration: underline; text-underline-offset: 3px; }
.change-table b.up, td b.up { color: var(--bad); }
.change-table b.down, td b.down { color: var(--good); }
.card h3 { font-size: 1rem; margin: 16px 0 8px; }


/* =====================================================================
   v2 layout refinements
   ===================================================================== */
.icon-btn { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn svg { width: 18px; height: 18px; display: none; }
.icon-btn[data-state="auto"] [data-icon="auto"], .icon-btn[data-state="light"] [data-icon="light"], .icon-btn[data-state="dark"] [data-icon="dark"], .icon-btn:not([data-state]) [data-icon="auto"] { display: block; }
@media (max-width: 600px) {
  .brand-tag, #today-badge, .fresh .long, .top-meta .long { display: none; }
  .brand svg { width: 28px; height: 28px; }
}

/* intro */
.intro { margin: 14px 0 0; }
@media (max-width: 600px) {
  .intro h1 { font-size: 1.15rem; }
  .intro p { font-size: .88rem; }
}

/* titles of packages read as text; price is the hero */
.rr-title a, .item-title a, td.title a, .hl .sub a { color: var(--text); }
.rr-title a:hover, .item-title a:hover, td.title a:hover, .hl .sub a:hover { color: var(--accent-text); }
.item-title a[target="_blank"]::after, td.title a[target="_blank"]::after { content: ' ↗'; color: var(--muted); font-size: .8em; }

/* planner */
.card.hero { padding-bottom: 12px; }
.presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 4px; }
.presets::-webkit-scrollbar { display: none; }
.preset { flex: none; min-height: 34px; }
.plan-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 12px; }
.plan-form input[type="number"], .plan-form select { width: 100%; min-height: 40px; }
.plan-form label.check { grid-column: 1 / -1; font-size: .82rem; }
@media (min-width: 861px) { .plan-form { grid-template-columns: repeat(4, minmax(140px, 200px)); } }

.item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'op price' 'title price' 'meta price'; gap: 2px 14px; background: var(--surface); }
.item-op { grid-area: op; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-title { grid-area: title; font-size: .92rem; }
.item .meta { grid-area: meta; margin-top: 2px; }
.item .price { grid-area: price; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.item .price .p-total { font-size: 1.05rem; }
.item .price .p-total small { font-size: .75rem; font-weight: 500; color: var(--muted); }
.item.winner .price .p-total { font-size: 1.3rem; }
@media (max-width: 600px) {
  .item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'op price' 'title title' 'meta meta'; }
  .item .price { text-align: left; border-top: 0; padding-top: 0; display: flex; flex-direction: column; align-items: flex-end; }
  .item .price small { display: block; }
}

/* ranked rows (highlights, buckets, deals) */
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: .86rem; }
.rank li:first-child { border-top: 0; }
.rr-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-val { flex: none; white-space: nowrap; text-align: left; }
.rr-val small { font-weight: 500; }
.rank .strike { margin-inline-start: 6px; font-size: .8em; }

.hl { gap: 4px; }
.hl .big { line-height: 1.3; }
.hl .big small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.hl span.sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl .rank { margin-top: 6px; border-top: 1px solid var(--border); }
.hl > .muted.small:last-child { margin-top: 4px; }

.buckets { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.bucket, .wait-group, .promo-body { min-width: 0; }
.bucket { background: var(--surface); }
.bucket h3 { margin: 0 0 4px; font-size: .9rem; }
.bucket .rank li.first .rr-val b { color: var(--good); }

.sub-h { font-size: .95rem; margin: 18px 0 8px; }
.wait-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 4px; margin-bottom: 8px; }
.wait-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .88rem; margin-bottom: 4px; }
.wait-head .chip { margin-inline-start: auto; }

.m-unit { display: none; font-size: .78em; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) { .m-unit { display: inline; } }

/* loading placeholders sized for the new, shorter sections */
@media (max-width: 860px) { #calendar:empty { min-height: 160px; } #highlights:empty { min-height: 640px; } }
.rr-stack { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.35; }
.rr-stack .strike { margin: 0; }

/* =====================================================================
   v3: one view at a time
   ===================================================================== */
.intro { margin-bottom: 4px; }
.intro + .card, .intro + section { margin-top: 14px; }
/* "news" as one tidy line, never a cut-off paragraph */
.news-line { display: flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 10px; padding: 8px 12px; font-size: .86rem; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-inline-start-width: 1px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-radius: 10px; }
.news-line b { flex: none; color: var(--accent-text); }
.news-line a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--text); }
.news-line a:hover { text-decoration: underline; }
.news-line::after { content: '←'; flex: none; color: var(--accent-text); }

.tabs-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.views { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.view-btn { position: relative; font: inherit; font-size: .88rem; font-weight: 600; border: 0; background: transparent; color: var(--muted); min-height: 40px; padding: 4px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.view-btn svg { width: 18px; height: 18px; flex: none; }
.view-btn:hover { color: var(--text); }
.view-btn[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.view-badge { position: absolute; top: 6px; inset-inline-end: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.view > .card:first-child { margin-top: 0; }


/* planner */
.presets { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; }
@media (max-width: 600px) {
  .presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .preset { padding: 4px 4px; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.plan-form { grid-template-columns: 1fr 1fr; }
@media (min-width: 861px) { .plan-form { grid-template-columns: 160px 160px minmax(0, 1fr); align-items: end; } }
.field-day { display: flex; flex-direction: column; gap: 3px; grid-column: 1 / -1; min-width: 0; }
@media (min-width: 861px) { .field-day { grid-column: auto; } }
.field-label { font-size: .82rem; color: var(--muted); }

/* day strips (planner purchase day + deals) */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wd { position: relative; font: inherit; cursor: pointer; text-align: center; min-height: 40px; padding: 6px 2px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.wd:hover { border-color: var(--muted); }
.wd.has { color: var(--text); font-weight: 700; }
.wd.today { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.wd.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wd-dot { position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; }
.wd.has .wd-dot { background: var(--good); }
.wd.on .wd-dot { background: var(--on-accent); }
.wd-abbr { display: none; }
@media (max-width: 1000px) { .wd-full { display: none; } .wd-abbr { display: inline; } }

/* deals view */
#deal-days { margin-bottom: 4px; }
.sub-h { font-size: .95rem; margin: 16px 0 8px; }
.empty-day { padding: 4px 0; }
.promo-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.promo-row { padding: 10px 12px; border-top: 1px solid var(--border); }
.promo-row:first-child { border-top: 0; }
.promo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .9rem; }
.promo-head .chip { margin-inline-start: auto; }
.promo-row .desc { margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wait-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 4px; margin-bottom: 8px; min-width: 0; }
.wait-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .9rem; margin-bottom: 4px; }
.wait-head .chip { margin-inline-start: auto; }

/* sources: name + meta | time/status + link */
.src { grid-template-columns: minmax(0, 1fr) auto; }
.src-main { flex-direction: column; align-items: flex-start; gap: 0; }
.src-side { display: flex; align-items: center; gap: 10px; }
.src-link { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); color: var(--muted); text-decoration: none; }
.src-link:hover { color: var(--accent-text); border-color: var(--accent); text-decoration: none; }
@media (max-width: 600px) { .src-time, .src-link { grid-row: auto; } }

/* operator cards (SEO block): two compact columns on phones */
@media (max-width: 600px) {
  .op-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .op-card { padding: 10px 10px 8px; }
  .op-card-head .chip { display: none; }
  .op-card-price b { font-size: 1.1rem; }
  .cat-links { grid-template-columns: minmax(0, 1fr); }
}
/* SSR pages: header button stays small on phones */
@media (max-width: 600px) { .top-meta .btn.small { padding: 4px 10px; font-size: .78rem; } }

/* =====================================================================
   v4: views as tabs at the top on phones; cleaner package cards
   ===================================================================== */
@media (max-width: 760px) {
  /* type selector + section tabs stay together at the top while scrolling */
  .tabs-bar { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 0; margin-inline: -16px; padding-inline: 16px; border-bottom: 1px solid var(--border); }
  .tabs { max-width: none; }
  .tab { min-height: 36px; }
  .views { margin-top: 6px; background: transparent; border: 0; border-radius: 0; padding: 0; gap: 0; }
  .view-btn { flex: 1; justify-content: center; min-height: 44px; padding: 4px 2px; border-radius: 0; font-size: .82rem; gap: 4px; border-bottom: 3px solid transparent; }
  .view-btn[aria-selected="true"] { background: transparent; box-shadow: none; color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 800; }
  .view-btn svg { width: 16px; height: 16px; }
  .view-badge { top: 8px; inset-inline-end: 4px; }
  .view > .card:first-child { margin-top: 12px; }
}
@media (max-width: 400px) { .view-btn svg { display: none; } }

/* compact "prices not updated" notice: one line, expands on tap */
.banner.compact { display: block; padding: 0; }
.banner.compact > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: .86rem; }
.banner.compact > summary::-webkit-details-marker { display: none; }
.banner.compact .banner-icon { width: 22px; height: 22px; font-size: .8rem; }
.banner.compact .chev { margin-inline-start: auto; }
.banner.compact[open] .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.banner.compact .banner-body { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.banner.compact .btn { width: auto; }

/* all packages: on phones each row is a card — operator & price / title / spec & per-GB / notes */
td.c-spec { display: none; }
@media (max-width: 640px) {
  #packages .table-wrap { overflow: visible; }
  #pkg-table thead { display: none; }
  #pkg-table, #pkg-table tbody { display: block; }
  #pkg-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'op price' 'title title' 'spec pgb' 'notes notes'; gap: 3px 12px; padding: 12px; border-top: 1px solid var(--border); }
  #pkg-table tr:first-child { border-top: 0; }
  #pkg-table td { border: 0; padding: 0; min-width: 0; white-space: normal; }
  #pkg-table td.c-op { grid-area: op; }
  #pkg-table td.c-price { grid-area: price; text-align: left; font-weight: 800; white-space: nowrap; }
  #pkg-table td.title { grid-area: title; font-size: .9rem; min-width: 0; }
  #pkg-table td.c-spec { display: block; grid-area: spec; color: var(--muted); font-size: .8rem; }
  #pkg-table td.perGB { grid-area: pgb; text-align: left; white-space: nowrap; font-size: .85rem; }
  #pkg-table td.c-vol, #pkg-table td.c-dur, #pkg-table td.c-speed, #pkg-table td.c-gbd { display: none; }
  #pkg-table td.notes { grid-area: notes; font-size: .76rem; }
  #pkg-table td.notes:has(.clamp:empty) { display: none; }
  #pkg-table td.notes .clamp { max-width: none; -webkit-line-clamp: 2; }
  #pkg-table tbody tr:hover { background: transparent; }
  .filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .filters input[type="search"] { width: 100%; grid-column: 1 / -1; }
  .filters select { width: 100%; min-height: 38px; }
}
bdi { unicode-bidi: isolate; }

/* =====================================================================
   v5: on phones the four sections are the main navigation (icon over
   label, active pill like a native tab bar) and the type picker is a
   quieter, smaller control above it
   ===================================================================== */
@media (max-width: 760px) {
  .tabs-bar { background: var(--surface); padding-top: 8px; box-shadow: 0 8px 14px -12px rgba(0, 0, 0, .35); }
  .tabs { background: var(--surface-2); border: 0; border-radius: 10px; padding: 3px; gap: 2px; }
  .tab { min-height: 32px; font-size: .84rem; font-weight: 600; border-radius: 8px; }
  .tab.active { background: var(--surface); color: var(--accent-text); font-weight: 800; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
  .views { margin-top: 4px; }
  .view-btn { flex-direction: column; gap: 2px; min-height: 58px; padding: 6px 2px 5px; font-size: .76rem; font-weight: 600; border-bottom: 0; }
  .view-btn svg, .view-btn[aria-selected="true"] svg { display: block; width: 52px; height: 30px; padding: 5px 16px; box-sizing: border-box; border-radius: 15px; transition: background-color .15s; }
  .view-btn[aria-selected="true"] { color: var(--accent-text); font-weight: 800; }
  .view-btn[aria-selected="true"] svg { background: var(--accent-soft); }
  .view-badge { top: 6px; inset-inline-end: calc(50% - 26px); width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--surface); }
}
@media (max-width: 400px) { .view-btn svg { display: block; } }
/* phones: type picker slides away while scrolling down (toggled in app.js) */
@media (max-width: 760px) {
  .tabs-bar { transition: transform .22s ease; }
  .tabs-bar.collapsed { transform: translateY(calc(-1 * var(--bar-hide, 0px))); }
}
@media (prefers-reduced-motion: reduce) { .tabs-bar { transition: none; } }
/* while the picker is hidden, a small tab under the menu names the current type */
.type-peek { display: none; }
@media (max-width: 760px) {
  .type-peek { display: inline-flex; align-items: center; gap: 4px; position: absolute; top: 100%; inset-inline-start: 50%; transform: translate(50%, -6px); opacity: 0; pointer-events: none;
    font: inherit; font-size: .72rem; font-weight: 700; color: var(--accent-text); background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; padding: 2px 12px 3px; cursor: pointer; transition: opacity .15s, transform .15s; box-shadow: 0 6px 10px -8px rgba(0, 0, 0, .4); }
  .type-peek::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
  .tabs-bar.collapsed .type-peek { opacity: 1; pointer-events: auto; transform: translate(50%, 0); }
}

/* site-wide footer: brand, folding link groups (phones), bottom note */
.site-foot { margin-top: 28px; background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: .86rem; }
.site-foot .wrap { padding-top: 26px; padding-bottom: 22px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.foot-top .brand { text-decoration: none; color: inherit; }
.foot-about { margin: 0; max-width: 460px; line-height: 1.9; }
.site-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 22px 0; }
.site-nav-group summary { list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); margin-bottom: 10px; pointer-events: none; }
.site-nav-group summary::-webkit-details-marker { display: none; }
.site-nav-n { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 7px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav ul.two { columns: 2; column-gap: 16px; }
.site-nav li { margin: 0; break-inside: avoid; }
.site-nav a { color: var(--muted); text-decoration: none; display: inline-block; padding: 4px 0; }
.site-nav a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px 24px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); font-size: .78rem; line-height: 1.9; }
.foot-bottom p { margin: 0; max-width: 720px; }
.foot-copy { white-space: nowrap; }
@media (max-width: 760px) {
  .site-nav { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px 0 14px; }
  .site-nav-group { border-bottom: 1px solid var(--border); }
  .site-nav-group summary { pointer-events: auto; cursor: pointer; margin: 0; min-height: 48px; }
  .site-nav-group summary::after { content: ''; margin-inline-start: auto; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
  .site-nav-group[open] summary::after { transform: rotate(-135deg); }
  .site-nav-group ul { columns: 2; column-gap: 16px; padding-bottom: 12px; }
  .site-nav a { padding: 7px 0; }
  .foot-bottom { border-top: 0; padding-top: 4px; }
}
.site-foot .brand-name { color: var(--text); }
/* operator page "new price" notice: full width, text wraps freely, link never truncated */
.news-line.news-block { flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin: 12px 0 18px; padding: 12px 14px; line-height: 1.9; }
.news-line.news-block::after { content: none; }
.news-block p { margin: 0; flex: 1 1 340px; min-width: 0; }
.news-block a { flex: none; white-space: nowrap; overflow: visible; color: var(--accent-text); font-weight: 700; }
.news-block a::after { content: ' ←'; }
/* footer: about text sits under the brand instead of floating on the far side */
.foot-top { flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-about { max-width: 560px; }
@media (max-width: 760px) {
  .site-foot .wrap { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .foot-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
  .foot-copy { padding-top: 10px; border-top: 1px solid var(--border); text-align: center; }
}
