/* pythontic — "fresh" theme */
:root {
  --bg: #FAFAFA; --surface: #FFFFFF; --ink: #18181B; --ink2: #3F3F46; --muted: #52525B; --subtle: #71717A;
  --line: #E7E7EA; --line2: #E0E0E4;
  --accent: #E5484D;
  --mint: #C9F0DD; --peach: #FFE1C7; --lav: #E3DCFF; --sky: #CFE6FF; --yel: #FFF1B8; --pink: #FFD9E4;
  --code-bg: #18181B; --code-ink: #F4F4F5;
  --r-lg: 24px; --r-md: 16px; --r-sm: 12px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }

/* ---- header ---- */
.hdr { background: var(--bg); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.hdr__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
.logo__mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.04em; }
.logo__text { font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.logo--sm .logo__mark { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.logo--sm .logo__text { font-size: 17px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 6px; flex: 1 1 auto; font-size: 15px; font-weight: 600; }
.nav a { padding: 10px 12px; border-radius: 8px; color: var(--ink2); }
.nav a:hover { background: #F0F0F2; text-decoration: none; }

/* ---- search ---- */
.search { position: relative; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm); color: var(--subtle); }
.search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(24,24,27,.08); }
.search--top { flex: 0 1 300px; min-width: 210px; height: 44px; padding: 0 8px 0 14px; }
.search--top input { height: 40px; font-size: 15px; }
.search kbd { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 6px; background: var(--bg); }
.search--big { max-width: 680px; margin: 0 auto 22px; height: 60px; padding: 0 8px 0 18px; border-radius: 16px; box-shadow: 0 8px 24px -12px rgba(24,24,27,.18); }
.search--big input { height: 56px; font-size: 17px; }
.search--big .btn { height: 44px; }
.search--left { margin-left: 0; margin-top: 20px; }
.search--inline { height: 48px; padding: 0 14px; flex: 0 1 340px; }
.search--inline input { height: 44px; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm); box-shadow: 0 16px 40px -16px rgba(24,24,27,.25); z-index: 20; max-height: 70vh; overflow: auto; text-align: left; }
.suggest a { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.suggest a:hover, .suggest a.is-active { background: #F2F2F4; text-decoration: none; }
.suggest small { color: var(--subtle); font-size: 12px; }
.suggest b { background: var(--yel); font-weight: 700; border-radius: 3px; }
.suggest .suggest__all { color: var(--ink2); font-weight: 700; font-size: 14px; }

/* ---- buttons, chips, badges ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 22px; border-radius: var(--r-sm); font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2E2E33; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips--center { justify-content: center; }
.chips__label { font-size: 14px; color: var(--subtle); font-weight: 600; margin-right: 4px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink2); }
.chip:hover { border-color: var(--ink); text-decoration: none; }
.chip--mono { font-family: var(--mono); font-weight: 400; font-size: 14px; }
.chip--soft { background: rgba(255,255,255,.8); border-color: transparent; border-radius: 10px; color: var(--ink); }
.chip__sw { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink); background: #ECECEF; }
a.badge:hover { text-decoration: none; filter: brightness(.96); }
.kicker { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.more { font-size: 15px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---- headings & generic sections ---- */
.h-xl { margin: 0 0 8px; font-size: 40px; letter-spacing: -.035em; font-weight: 800; line-height: 1.1; }
.h-lg { margin: 0 0 20px; font-size: 28px; letter-spacing: -.025em; font-weight: 800; }
.h-md { margin: 0 0 14px; font-size: 21px; letter-spacing: -.015em; font-weight: 800; }
.lead { margin: 0 0 36px; color: var(--muted); font-size: 17px; }
.block { padding-block: 40px; }
.block-sm { margin-top: 32px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band > .wrap { padding-block: 56px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.sec-head h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; font-weight: 800; }
.grid { display: grid; gap: 20px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--topics { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.grid--sections { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---- home ---- */
.hero { padding-block: 80px 48px; text-align: center; }
.hero__title { margin: 0 auto 20px; max-width: 920px; font-size: clamp(38px, 6vw, 64px); line-height: 1.04; letter-spacing: -.045em; font-weight: 800; }
.hero__title span { color: var(--accent); }
.hero__text { margin: 0 auto 34px; max-width: 620px; font-size: 19px; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin: 40px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; align-items: center; }
.stats dt { font-size: 13px; color: var(--subtle); font-weight: 600; }
.stats dd { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.bento { display: flex; flex-direction: column; gap: 20px; padding-bottom: 72px; }
.bento__row { display: flex; flex-wrap: wrap; gap: 20px; }
.card { flex: 1 1 320px; min-width: 0; padding: 28px; border-radius: var(--r-lg); background: var(--surface); }
.card--big { flex: 2 1 520px; padding: 36px; }
.card__title-lg { margin: 0 0 24px; font-size: 32px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.card__title { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; font-weight: 800; }
.card__text { margin: 0 0 16px; color: var(--ink2); font-size: 15px; }
.card .chips { margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.steps a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,.75); font-weight: 600; }
.steps a:hover { background: #fff; text-decoration: none; }
.steps__n { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.card--dark { flex: 1 1 340px; margin: 0; background: var(--code-bg); color: var(--code-ink); display: flex; flex-direction: column; gap: 14px; }
.kicker--dim { color: #A1A1AA; }
.mini-code, .mini-out { margin: 0; padding: 16px 18px; border-radius: 14px; background: #232327; font-family: var(--mono); font-size: 14px; line-height: 1.75; overflow-x: auto; }
.mini-out { color: var(--mint); }
.mini-code code { background: none; padding: 0; color: inherit; }
.divider { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #A1A1AA; }
.divider span { flex: 1; height: 1px; background: #3F3F46; }
.card--dark__note { margin: 0; color: #D4D4D8; font-size: 15px; }
.post { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg); }
.post:hover { border-color: var(--ink); text-decoration: none; }
.post .badge { align-self: flex-start; }
.post__title { font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.post__meta { margin-top: auto; font-size: 13px; color: var(--muted); }
.topics { padding-block: 72px; }
.tgroup { margin-bottom: 32px; }
.tgroup__name { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.topic { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.topic:hover { border-color: var(--ink); text-decoration: none; }
.topic__sw { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.topic__name { flex: 1 1 auto; font-weight: 700; font-size: 15px; }
.topic__count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.author { padding-bottom: 72px; }
.author__card { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 36px; padding: 32px 36px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.author__photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.author__photo--initials { display: inline-flex; align-items: center; justify-content: center; background: var(--peach); font-size: 34px; font-weight: 800; }
.author__text { flex: 1 1 380px; min-width: 0; }
.author__text h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; font-weight: 800; }
.author__text p { margin: 0; color: var(--muted); }

/* ---- page hero (category, listing, article, search) ---- */
.phero { --tint: var(--mint); background: linear-gradient(var(--tint), var(--tint)) top / 100% 10px no-repeat, var(--surface); border-bottom: 1px solid var(--line); }
.phero > .wrap { padding-block: 34px 40px; }
.phero--sm > .wrap { padding-block: 28px 32px; }
.phero__title { margin: 0 0 12px; max-width: 900px; font-size: clamp(30px, 4.5vw, 46px); line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.phero--article .phero__title { font-size: clamp(28px, 4vw, 40px); }
.phero__text { margin: 0 0 16px; max-width: 720px; font-size: 18px; color: var(--muted); }
.phero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.phero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 14px; font-weight: 600; }
.crumbs li { color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: #A1A1AA; }
.crumbs a { color: var(--ink2); }
.crumbs [aria-current] { color: var(--ink); }

/* ---- category sections ---- */
.scard { display: flex; flex-direction: column; padding: 22px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.scard__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.scard h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; font-weight: 800; }
.scard__list { list-style: none; margin: 0 0 14px; padding: 0; flex: 1 1 auto; }
.scard__list li { border-top: 1px solid #F0F0F2; }
.scard__list a { display: block; padding: 9px 0; font-size: 15px; color: var(--ink2); }

/* ---- rows (lists of articles) ---- */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: flex-start; gap: 16px; padding: 16px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.row:hover { border-color: var(--ink); text-decoration: none; }
.row__n { flex: 0 0 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #F0F0F2; font-weight: 700; font-size: 14px; color: var(--ink2); }
.row__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rows:not(.rows--numbered) .row { flex-direction: column; gap: 2px; }
.row__title { font-weight: 700; font-size: 17px; line-height: 1.35; }
.row__desc { font-size: 14px; color: var(--muted); }
.row__date { flex: 0 0 auto; font-size: 13px; color: var(--muted); padding-top: 4px; }

/* ---- layout with side menu ---- */
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; padding-block: 32px 72px; }
.layout__main { flex: 999 1 600px; min-width: 0; }
.layout__side { flex: 1 1 270px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 960px) {
  .layout__side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
}
.side__box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 10px 12px; }
.side__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; }
.side__head::-webkit-details-marker { display: none; }
.side__head::after { content: "▾"; font-size: 12px; margin-left: auto; color: var(--subtle); }
details:not([open]) > .side__head::after { content: "▸"; }
.side__head .badge { text-transform: none; letter-spacing: 0; }
.side__list { list-style: none; margin: 0; padding: 0; }
.side__item { display: block; padding: 8px 10px; border-radius: 10px; font-size: 14.5px; line-height: 1.35; color: var(--ink2); }
a.side__item:hover { background: #F2F2F4; text-decoration: none; }
.side__item small { color: var(--subtle); }
.side__item.is-current { background: var(--ink); color: #fff; font-weight: 700; }
.side__all { display: block; padding: 10px 10px 2px; font-size: 14px; font-weight: 700; }

/* ---- article body ---- */
.prose--card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 40px 44px; }
@media (max-width: 640px) { .prose--card { padding: 24px 18px; border-radius: 18px; } }
.prose { font-size: 17px; line-height: 1.75; color: #27272A; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin: 2.2em 0 .6em; font-size: 26px; line-height: 1.2; letter-spacing: -.025em; font-weight: 800; color: var(--ink); }
.prose h3 { margin: 1.8em 0 .5em; font-size: 20px; letter-spacing: -.015em; font-weight: 800; color: var(--ink); }
.prose h4, .prose h5, .prose h6 { margin: 1.5em 0 .4em; font-size: 17px; font-weight: 800; }
.prose p { margin: 0 0 1.1em; }
.prose a { text-decoration: underline; text-decoration-color: #A1A1AA; text-underline-offset: 3px; font-weight: 600; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--subtle); }
.prose strong { color: var(--ink); }
.prose code { font-family: var(--mono); font-size: .86em; background: #F2F2F4; padding: .15em .45em; border-radius: 6px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose blockquote { margin: 0 0 1.2em; padding: 14px 20px; background: var(--yel); border-radius: var(--r-sm); color: var(--ink); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { display: block; margin: 1.4em auto; border-radius: var(--r-sm); border: 1px solid var(--line); }
.pt-table { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pt-table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.pt-table th, .pt-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.pt-table th { background: #F6F6F7; font-weight: 700; }
.pt-table tr:last-child td { border-bottom: 0; }

/* code blocks */
.pt-code, .pt-output { margin: 1.2em 0 1.4em; border-radius: var(--r-md); overflow: hidden; border: 1px solid #E4E4E7; }
.pt-code { background: #F4F4F6; }
.pt-code figcaption { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 18px; border-bottom: 1px solid #E4E4E7; background: #ECECEF; font-family: var(--mono); font-size: 12px; color: #52525B; text-transform: lowercase; }
.pt-copy { font: 600 12px var(--font); color: #3F3F46; background: #FFFFFF; border: 1px solid #D4D4D8; border-radius: 8px; padding: 5px 12px; min-height: 30px; cursor: pointer; }
.pt-copy:hover { border-color: #18181B; color: #18181B; }
.prose pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 14.5px; line-height: 1.7; tab-size: 4; }
.prose pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; }
.pt-code pre { color: #1F2937; }
.pt-output { background: #FAFAFB; border-style: dashed; border-color: #D4D4D8; }
.pt-output figcaption { padding: 10px 18px 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #52525B; }
.pt-output pre { padding-top: 6px; color: #27272A; }
/* syntax colours on the light grey code panel */
.pt-code .hljs-keyword, .pt-code .hljs-built_in, .pt-code .hljs-selector-tag { color: #9D174D; }
.pt-code .hljs-string, .pt-code .hljs-regexp, .pt-code .hljs-template-string { color: #166534; }
.pt-code .hljs-number, .pt-code .hljs-literal, .pt-code .hljs-symbol { color: #B45309; }
.pt-code .hljs-comment, .pt-code .hljs-quote { color: #6B7280; font-style: italic; }
.pt-code .hljs-title, .pt-code .hljs-title.function_, .pt-code .hljs-title.class_, .pt-code .hljs-section { color: #1D4ED8; }
.pt-code .hljs-params { color: #1F2937; }
.pt-code .hljs-meta, .pt-code .hljs-decorator, .pt-code .hljs-attr, .pt-code .hljs-attribute { color: #6D28D9; }
.pt-code .hljs-variable, .pt-code .hljs-name, .pt-code .hljs-type { color: #C2410C; }
/* the small dark sample on the home page keeps light colours */
.card--dark .hljs-keyword, .card--dark .hljs-built_in { color: #FDA4AF; }
.card--dark .hljs-string { color: #A7F3D0; }
.card--dark .hljs-number, .card--dark .hljs-literal { color: #FCD34D; }
.card--dark .hljs-comment { color: #A1A1AA; font-style: italic; }
.card--dark .hljs-title, .card--dark .hljs-title.function_ { color: #93C5FD; }

.toc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 16px; }
.toc__label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.toc a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 24px; }
.pager__link { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.pager__link:hover { border-color: var(--ink); text-decoration: none; }
.pager__link--next { text-align: right; grid-column: -2; }
.pager__dir { font-size: 13px; color: var(--muted); font-weight: 600; }
.pager__title { font-weight: 800; }

/* ---- search results ---- */
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 880px; }
.result { padding: 18px 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.result__path { margin: 0 0 2px; font-size: 13px; color: var(--muted); font-weight: 600; }
.result__title { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.result__snip { margin: 0; font-size: 15px; color: var(--ink2); }
.result mark, .result__snip mark { background: var(--yel); color: inherit; border-radius: 3px; padding: 0 1px; }
.empty .chips { margin-top: 12px; }

/* ---- footer ---- */
.ftr { background: var(--surface); border-top: 1px solid var(--line); }
.ftr__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 36px; }
.ftr nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; font-weight: 600; }
.ftr nav a { color: var(--ink2); }
.ftr__copy { font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .hero { padding-block: 48px 32px; }
  .search--big { height: 54px; }
  .search--big .btn { display: none; }
  .card, .card--big { padding: 24px; }
  .row__date { display: none; }
}

/* ---- privacy choices banner ---- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 780px; margin: 0 auto; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-md); box-shadow: 0 18px 50px -18px rgba(24,24,27,.35); font-size: 14.5px; color: var(--ink2); }
.consent[hidden], .consent [hidden] { display: none !important; }
.consent__title { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--ink); }
.consent p { margin: 0 0 12px; }
.consent a { font-weight: 700; text-decoration: underline; }
.consent__btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.consent .btn { height: 44px; padding: 0 18px; font-size: 15px; }
.consent .btn--link { background: none; border: 0; color: var(--ink2); text-decoration: underline; padding: 0 10px; margin-right: auto; }
.btn--light { background: var(--surface); color: var(--ink); border-color: var(--line2); }
.btn--light:hover { border-color: var(--ink); }
.consent__cats { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.consent__cat { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; }
.consent__cat + .consent__cat { border-top: 1px solid var(--line); }
.consent__cat strong { display: block; color: var(--ink); }
.consent__cat small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.consent__always { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.switch { position: relative; flex: 0 0 auto; width: 48px; height: 28px; margin-top: 2px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #D4D4D8; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent__gpc { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--sky); color: var(--ink); font-size: 13.5px; }
.ftr__btn { font: inherit; font-weight: 600; font-size: 15px; color: var(--ink2); background: none; border: 0; padding: 0; cursor: pointer; }
.ftr__btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- ad units ---- */
.ad { margin: 24px 0; text-align: center; min-height: 120px; }
.ad__label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.ad--article_top { margin-top: 0; }
.ad--sidebar { min-height: 270px; margin: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
