/* WhatxTime design system — tokens from the Figma file (blue #0A52B8, red #E81F33, white). */
:root {
  --blue: #0A52B8;
  --blue-700: #083F8E;
  --blue-600: #0947A0;
  --blue-100: #D6E6FB;
  --blue-50: #EAF2FD;
  --blue-25: #F5F8FC;
  --red: #E81F33;
  --red-700: #C41428;
  --red-50: #FDECEE;
  --white: #FFFFFF;
  --ink: #1D2733;
  --ink-2: #3F4A59;
  --muted: #667180;
  --line: #DCE3EC;
  --line-2: #EDF1F6;
  --ok: #137A3F;
  --ok-50: #E7F5EC;
  --warn: #8A5A00;
  --warn-50: #FFF4DC;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-xs: .78rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.125rem;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 64, .06), 0 2px 8px rgba(16, 32, 64, .05);
  --gutter: 40px;
  --max: 1360px;
  --header-h: 60px;
  --tap: 44px;
}

@media (max-width: 1024px) { :root { --gutter: 24px; } }
@media (max-width: 640px)  { :root { --gutter: 16px; --fs-2xl: 1.5rem; --fs-3xl: 1.75rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: var(--fs-md);
  line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #F2B70F; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--sp-3); color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: var(--fs-3xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 650; }
p { margin: 0 0 var(--sp-4); }
code { font-family: var(--mono); font-size: .92em; background: var(--line-2); padding: .1em .35em; border-radius: 4px; }
table { border-collapse: collapse; width: 100%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--blue); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: var(--sp-4); }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--blue); color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; gap: var(--sp-6); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.nav a { color: var(--white); font-size: var(--fs-sm); font-weight: 500; padding: 10px 14px; border-radius: 6px; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); text-decoration: none; }
.menu-btn { display: none; background: transparent; border: 0; color: var(--white); width: var(--tap); height: var(--tap); border-radius: 8px; cursor: pointer; margin-left: -10px; }
.menu-btn svg { width: 26px; height: 26px; }
.menu-btn:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--blue-700); flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-2) var(--gutter) var(--sp-4); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: var(--fs-md); border-bottom: 1px solid rgba(255,255,255,.1); }
}

/* ---------------------------------------------------------------- hero */
.hero { background: var(--blue); color: var(--white); padding: var(--sp-5) 0 var(--sp-8); }
.hero h1 { color: var(--white); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: var(--sp-4); }
.hero h1 strong { font-weight: 700; }
.hero p.lead { color: rgba(255,255,255,.9); margin: -8px 0 var(--sp-4); }
.hero .crumbs, .hero .crumbs a { color: rgba(255,255,255,.85); }
.search-form { display: flex; gap: var(--sp-2); max-width: 960px; position: relative; }
.search-form .input { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- forms */
.input, .select, textarea.input {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: var(--fs-sm); color: var(--ink); background: var(--white);
}
.input:focus, .select:focus { border-color: var(--blue); outline: 2px solid var(--blue-100); outline-offset: 0; }
textarea.input { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.label { display: block; font-size: var(--fs-xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.field { margin-bottom: var(--sp-4); }
.field .error, .error-text { color: var(--red-700); font-size: var(--fs-sm); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 18px; border-radius: var(--radius);
  font: inherit; font-size: var(--fs-sm); font-weight: 650; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-700); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-700); }
.btn-ghost { background: var(--white); color: var(--blue); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-sm { min-height: 34px; padding: 6px 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------------------------------------------------------------- layout */
main { display: block; }
.page { padding-top: var(--sp-8); padding-bottom: var(--sp-12); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: var(--sp-8); align-items: start; }
@media (max-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-6); } }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.section { margin-bottom: var(--sp-10); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.section-head h2 { margin: 0; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-5); }
.card-soft { background: var(--blue-50); border: 0; border-radius: var(--radius-lg); padding: var(--sp-5); }
.card-tint { background: var(--blue-25); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-5); }
.card h2, .card-soft h2, .card-tint h2 { font-size: var(--fs-lg); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 5px 0; }
.bullets { padding-left: 1.1em; margin: 0; }
.bullets li { padding: 3px 0; }
.bullets li::marker { color: var(--blue); }
.crumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-2); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; opacity: .7; }
.tag { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--blue-50); color: var(--blue); }
.tag-red { background: var(--red-50); color: var(--red-700); }
.tag-ok { background: var(--ok-50); color: var(--ok); }
.tag-warn { background: var(--warn-50); color: var(--warn); }
.notice { border-radius: var(--radius); padding: 12px 14px; margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
.notice-info { background: var(--blue-50); color: var(--blue-700); }
.notice-warn { background: var(--warn-50); color: var(--warn); }
.notice-error { background: var(--red-50); color: var(--red-700); }
.notice-ok { background: var(--ok-50); color: var(--ok); }
.empty { text-align: center; padding: var(--sp-10) var(--sp-4); color: var(--muted); }

/* ---------------------------------------------------------------- clocks */
.clock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-6); }
.clock-card { text-align: left; }
.analog { width: 175px; height: 175px; display: block; margin: 0 auto var(--sp-3); }
.analog-sm { width: 140px; height: 140px; }
.analog .face { fill: var(--blue); }
.analog .num { fill: var(--white); font-size: 13px; font-family: var(--font); text-anchor: middle; dominant-baseline: central; }
.analog .hand { stroke: var(--white); stroke-linecap: round; }
.analog .hand-s { stroke: var(--red); }
.analog .pin { fill: var(--white); }
.clock-card .place { font-weight: 700; font-size: var(--fs-lg); }
.clock-card .place a { color: var(--ink); }
.clock-card .time { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.clock-card .zone { font-size: var(--fs-xs); color: var(--muted); }
.clock-card .day { font-size: var(--fs-xs); color: var(--muted); }
.my-cities-tools { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.remove-city { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-xs); padding: 4px 0; min-height: 28px; }
.remove-city:hover { color: var(--red); }

/* ---------------------------------------------------------------- world table */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.world-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.world-table .toolbar { background: var(--red); color: var(--white); display: flex; align-items: center; gap: var(--sp-3); padding: 8px 12px; flex-wrap: wrap; }
.world-table .toolbar label { font-size: var(--fs-sm); font-weight: 650; }
.world-table .toolbar .select { width: auto; min-width: 140px; min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.world-table .toolbar .spacer { flex: 1; }
.world-table .toolbar .col-label { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .03em; padding-right: 30px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 8px 14px; border-top: 1px solid var(--line); min-height: 40px; font-size: var(--fs-sm); }
.rows li:nth-child(even) { background: var(--blue-25); }
.rows .r-time { font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; padding-right: 20px; }
.rows .r-meta { color: var(--muted); font-size: var(--fs-xs); margin-left: 6px; }
.rows .r-day { color: var(--muted); font-size: var(--fs-xs); margin-right: 6px; }
@media (max-width: 640px) { .world-table .toolbar .col-label { display: none; } .rows .r-time { padding-right: 0; min-width: 0; } }

.data-table { width: 100%; font-size: var(--fs-sm); }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); background: var(--blue-25); }
.data-table tbody tr:hover { background: var(--blue-25); }
.data-table .is-today { background: var(--blue-50); font-weight: 600; }
.data-table .is-past { color: var(--muted); }
.facts { width: 100%; font-size: var(--fs-md); }
.facts th { font-weight: 650; text-align: left; width: 220px; padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts td { padding: 7px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .facts th { width: 42%; } }

/* ---------------------------------------------------------------- city page */
.tabs { display: flex; gap: var(--sp-6); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-6); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 0; color: var(--blue); white-space: nowrap; font-size: var(--fs-md); border-bottom: 3px solid transparent; }
.tabs a:hover { text-decoration: none; border-bottom-color: var(--blue-100); }
.time-panel { background: var(--blue-50); border-radius: var(--radius-lg); padding: var(--sp-6); display: grid; grid-template-columns: auto 1fr; gap: var(--sp-8); align-items: center; }
.time-panel .big { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.time-panel .ampm { font-size: .45em; font-weight: 700; margin-left: 4px; }
.time-panel .zone { color: var(--ink-2); margin-top: 8px; }
.time-panel .date { font-size: var(--fs-lg); margin-top: 6px; }
@media (max-width: 640px) { .time-panel { grid-template-columns: 1fr; text-align: center; gap: var(--sp-4); } .time-panel .analog { margin: 0 auto; } }
.glance .k { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 2px; }
.glance .v { font-weight: 650; font-size: var(--fs-lg); margin-bottom: var(--sp-4); }
.diff-list li { display: flex; justify-content: space-between; gap: var(--sp-3); }

/* ---------------------------------------------------------------- tools */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
@media (max-width: 900px) { .tool-grid { grid-template-columns: 1fr; } }
.result-panel { background: var(--blue-50); border-radius: var(--radius-lg); padding: var(--sp-5); margin-top: var(--sp-4); }
.result-panel .label { color: var(--blue); }
.result-panel .big { font-size: 2.2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.compare-rows { list-style: none; margin: 0; padding: 0; }
.compare-rows li { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); gap: var(--sp-4); align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.compare-rows .c-name { font-weight: 650; }
.compare-rows .c-time { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.compare-rows .c-zone { color: var(--muted); font-size: var(--fs-xs); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px 0 12px; min-height: 40px; font-size: var(--fs-sm); }
.chip button { background: none; border: 0; cursor: pointer; color: var(--muted); width: 30px; height: 30px; border-radius: 6px; font-size: 18px; line-height: 1; }
.chip button:hover { color: var(--red); background: var(--red-50); }
.chip-add { min-width: 220px; }
.chip-add .input { border: 0; min-height: 38px; padding: 6px 4px; }

.planner { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.planner table { min-width: 760px; font-size: var(--fs-xs); }
.planner th, .planner td { border-bottom: 1px solid var(--line); padding: 0; text-align: center; }
.planner th.city { text-align: left; padding: 8px 12px; min-width: 170px; background: var(--white); position: sticky; left: 0; z-index: 1; font-size: var(--fs-sm); }
.planner th.city small { display: block; color: var(--muted); font-weight: 400; }
.planner td span { display: block; padding: 8px 2px; min-width: 34px; font-variant-numeric: tabular-nums; }
.planner td.work span { background: #DCEBFB; }
.planner td.night span { background: #F2F4F8; color: #8B95A3; }
.planner td.overlap span { background: #CDEFD9; font-weight: 700; color: #0D5E30; }
.planner td.other-date span { box-shadow: inset 0 -3px 0 var(--red); }
.planner tr.current td.now span { outline: 2px solid var(--red); outline-offset: -2px; }
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--ink-2); margin-top: var(--sp-3); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }

/* ---------------------------------------------------------------- calendar */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calendar .dow { background: var(--blue); color: var(--white); text-align: center; font-size: var(--fs-xs); font-weight: 700; padding: 8px 0; letter-spacing: .04em; }
.calendar .day { min-height: 92px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 6px 8px; font-size: var(--fs-xs); background: var(--white); }
.calendar .day:nth-child(7n + 1) { border-left: 0; }
.calendar .day .n { font-weight: 700; font-size: var(--fs-sm); }
.calendar .day.out { background: var(--blue-25); color: #9AA4B2; }
.calendar .day.weekend .n { color: var(--red-700); }
.calendar .day.today { box-shadow: inset 0 0 0 2px var(--red); }
.calendar .hol { display: block; margin-top: 4px; color: var(--red-700); font-weight: 600; line-height: 1.3; }
.calendar .dst { display: block; margin-top: 4px; color: var(--blue); font-weight: 600; }
@media (max-width: 640px) { .calendar .day { min-height: 58px; padding: 4px; } .calendar .hol, .calendar .dst { font-size: 10px; } }

/* ---------------------------------------------------------------- faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 650; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 10px; font-size: 22px; color: var(--blue); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 14px; color: var(--ink-2); font-size: var(--fs-sm); }
.faq .answer p:last-child { margin: 0; }

/* ---------------------------------------------------------------- autocomplete */
.ac { position: relative; flex: 1; min-width: 0; }
.ac-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(16, 32, 64, .16); list-style: none; margin: 0; padding: 4px; max-height: 340px; overflow-y: auto; }
.ac-list li { padding: 9px 10px; border-radius: 6px; cursor: pointer; color: var(--ink); font-size: var(--fs-sm); display: flex; justify-content: space-between; gap: 10px; }
.ac-list li small { color: var(--muted); }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--blue-50); }
.ac-list .ac-empty { color: var(--muted); cursor: default; }

/* ---------------------------------------------------------------- blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-6); }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--blue-50); }
.post-card .body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.post-card h3 { font-size: var(--fs-lg); margin: var(--sp-2) 0; }
.post-card h3 a { color: var(--ink); }
.post-card p { color: var(--ink-2); font-size: var(--fs-sm); margin: 0; }
.article { max-width: 760px; }
.article .meta { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-6); }
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink-2); }
.prose h2 { margin-top: var(--sp-8); font-size: 1.45rem; }
.prose h3 { margin-top: var(--sp-6); }
.prose img { border-radius: var(--radius); height: auto; }
.prose blockquote { border-left: 4px solid var(--blue); margin: var(--sp-6) 0; padding: 4px 0 4px var(--sp-5); color: var(--ink); }
.prose pre { background: #0F1B2D; color: #E6EDF7; padding: var(--sp-4); border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose table { margin: var(--sp-6) 0; font-size: var(--fs-sm); }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
.featured { width: 100%; border-radius: var(--radius-lg); margin-bottom: var(--sp-6); aspect-ratio: 16 / 9; object-fit: cover; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: var(--sp-6); }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-sm); }
.pagination .current { background: var(--blue); color: var(--white); border-color: var(--blue); }
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--sp-5); }
.letters a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; font-size: var(--fs-sm); }
.letters a.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.col-list { columns: 4 220px; column-gap: var(--sp-8); list-style: none; padding: 0; margin: 0; }
.col-list li { break-inside: avoid; padding: 5px 0; font-size: var(--fs-sm); }
.col-list .meta { color: var(--muted); font-size: var(--fs-xs); margin-left: 4px; }

/* ---------------------------------------------------------------- ads */
.ad-slot { display: block; position: relative; margin: var(--sp-6) auto; max-width: 100%; text-align: center; background: var(--blue-25); border-radius: var(--radius); overflow: hidden; contain: layout; }
.ad-slot .ad-label { position: absolute; top: 2px; left: 8px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #8B95A3; }
.ad-slot.ad-desktop { display: none; }
@media (min-width: 901px) { .ad-slot.ad-desktop { display: block; } .ad-slot.ad-mobile { display: none; } }

/* ---------------------------------------------------------------- CTA + footer */
.cta { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-6); align-items: center; background: var(--blue); color: var(--white); border-radius: var(--radius-lg); padding: var(--sp-6); }
.cta h2 { color: var(--white); }
.cta p { color: rgba(255,255,255,.9); margin: 0; }
.cta .btn-ghost { color: var(--blue); }
@media (max-width: 640px) { .cta { grid-template-columns: 1fr; } }
.site-footer { background: var(--blue); color: rgba(255, 255, 255, .92); margin-top: var(--sp-10); font-size: var(--fs-sm); }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--sp-6); padding: var(--sp-10) 0 var(--sp-6); }
.site-footer h2 { color: var(--white); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--sp-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding: var(--sp-4) 0; display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; }
.site-footer .linkbtn { background: none; border: 0; padding: 0; color: var(--white); font: inherit; cursor: pointer; text-decoration: underline; }
.social { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }
@media (max-width: 1024px) { .site-footer .cols { grid-template-columns: 1fr 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }
@media (max-width: 560px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

.consent { position: fixed; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); z-index: 60; max-width: 720px; margin: 0 auto; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgba(16, 32, 64, .22); padding: var(--sp-5); display: none; }
.consent.show { display: block; }
.consent p { font-size: var(--fs-sm); color: var(--ink-2); }
.consent .actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.error-page { text-align: center; padding: var(--sp-12) 0; }
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--blue); line-height: 1; }

/* ---------------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .ad-slot, .consent, .search-form, .menu-btn { display: none !important; }
  .hero { background: none; color: var(--ink); }
  .hero h1 { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.prose table { display: block; overflow-x: auto; max-width: 100%; }
.prose code { overflow-wrap: anywhere; }
