/* Balanz Blog — site styles */
:root {
  --ink: #14213D;
  --ink-2: #3B4660;
  --muted: #5B6478;
  --paper: #F5F7FA;
  --surface: #FFFFFF;
  --line: #E1E5EC;
  --saffron: #F0A30A;
  --saffron-soft: #FDF1D6;
  --teal: #0E7C7A;
  --teal-soft: #DDF1EF;
  --chili: #C23B22;
  --chili-soft: #FBE4DE;
  --violet: #5A48D6;
  --violet-soft: #E8E5FB;
  --focus: #F0A30A;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8ECF5; --ink-2: #C3CADB; --muted: #98A2B8; --paper: #0E1424; --surface: #161E33; --line: #263049;
    --saffron-soft: #3A2E12; --teal: #3CC1BC; --teal-soft: #0F2E30; --chili: #FF7A5E; --chili-soft: #3A1C17;
    --violet: #A79BFF; --violet-soft: #241F48; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E8ECF5; --ink-2: #C3CADB; --muted: #98A2B8; --paper: #0E1424; --surface: #161E33; --line: #263049;
  --saffron-soft: #3A2E12; --teal: #3CC1BC; --teal-soft: #0F2E30; --chili: #FF7A5E; --chili-soft: #3A1C17;
  --violet: #A79BFF; --violet-soft: #241F48; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { background: var(--saffron-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.5rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.logo-mark { width: 30px; height: 30px; stroke: none; }
.logo-mark path[stroke] { fill: none; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .98rem; color: var(--ink-2); }
.main-nav a:hover { background: var(--surface); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.head-actions { display: flex; gap: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); border-radius: 999px; cursor: pointer; }
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 21px; height: 21px; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .head-actions { margin-left: auto; }
  .main-nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; display: none; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* ---------- search */
.search-dialog { width: min(680px, calc(100vw - 32px)); max-height: 80vh; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0; background: var(--surface); color: var(--ink); margin-top: 10vh; box-shadow: 0 30px 80px -20px rgba(10,20,40,.45); }
.search-dialog::backdrop { background: rgba(10, 16, 32, .5); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search-box svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box input { flex: 1; border: 0; background: transparent; color: var(--ink); font: 500 1.15rem var(--sans); outline: none; min-width: 0; }
.search-box.inline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 16px 0; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow: auto; max-height: 60vh; }
.search-results.page { max-height: none; padding: 0; }
.search-results a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; }
.search-results a:hover, .search-results a:focus { background: var(--paper); color: var(--ink); }
.search-results strong { display: block; font-weight: 600; }
.search-results small { color: var(--muted); }
.search-results .empty { padding: 16px 12px; color: var(--muted); }

/* ---------- chips & buttons */
.cat-chip { display: inline-block; font: 700 .78rem/1 var(--sans); letter-spacing: .02em; padding: 6px 10px; border-radius: 999px; text-decoration: none; background: var(--saffron-soft); color: #8A5A00; }
.cat-chip.c-teal { background: var(--teal-soft); color: var(--teal); }
.cat-chip.c-chili { background: var(--chili-soft); color: var(--chili); }
.cat-chip.c-violet { background: var(--violet-soft); color: var(--violet); }
:root[data-theme="dark"] .cat-chip.c-saffron, :root[data-theme="dark"] .cat-chip:not([class*="c-"]) { color: var(--saffron); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--ink); color: var(--paper); font: 700 1rem/1 var(--sans); padding: 13px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.btn:hover { color: var(--paper); background: var(--teal); }
.btn:disabled { opacity: .45; cursor: not-allowed; background: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); background: transparent; }
.btn.accent { background: var(--saffron); color: #1B1300; }
.btn.accent:hover { background: #D99000; color: #1B1300; }

/* ---------- hero */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 400px at 85% 0%, var(--saffron-soft), transparent 70%), var(--paper); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); letter-spacing: -0.035em; line-height: 1.02; max-width: 13ch; }
.hero-copy p { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.hero-cats, .hero-cats + * { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-cats a { text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); }
.hero-cats a.c-teal:hover { border-color: var(--teal); color: var(--teal); }
.hero-cats a.c-chili:hover { border-color: var(--chili); color: var(--chili); }
.hero-cats a.c-violet:hover { border-color: var(--violet); color: var(--violet); }
.hero-tools { background: var(--surface); border-radius: var(--radius-lg); padding: 18px; border: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; box-shadow: 0 24px 60px -30px rgba(20, 33, 61, .35); }
.ht-note { grid-column: 1 / -1; margin: 2px 4px 6px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.hero-tool { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); text-decoration: none; background: var(--paper); }
.hero-tool:hover { background: var(--saffron-soft); color: var(--ink); }
.hero-tool strong { display: block; font-size: 1rem; line-height: 1.2; }
.hero-tool small { color: var(--muted); font-size: .8rem; line-height: 1.3; display: block; }
.tool-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--saffron); flex: none; }
.tool-ico svg { width: 22px; height: 22px; }
.ht-all { grid-column: 1 / -1; text-align: center; font-weight: 700; padding: 10px; text-decoration: none; color: var(--teal); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } .hero { padding-top: 36px; } }
@media (max-width: 460px) { .hero-tools { grid-template-columns: 1fr; } }

/* ---------- sections & cards */
.home-sec { padding: 48px 20px 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.home-sec.c-teal .sec-head { border-color: var(--teal); }
.home-sec.c-chili .sec-head { border-color: var(--chili); }
.home-sec.c-violet .sec-head { border-color: var(--violet); }
.home-sec.c-saffron .sec-head { border-color: var(--saffron); }
.sec-head h2 { margin: 0; }
.sec-head a { font-weight: 700; white-space: nowrap; font-size: .95rem; }
.lead-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; }
.row-list { display: grid; gap: 18px; align-content: start; }
@media (max-width: 860px) { .lead-grid { grid-template-columns: 1fr; } }
.grid { display: grid; gap: 28px 24px; }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 12px; }
.card-img { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.card h3 { margin: 0; font-size: 1.22rem; }
.card h3 a { text-decoration: none; }
.card p { margin: 0; color: var(--ink-2); font-size: .97rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { color: var(--muted); font-size: .85rem; }
.card.lead h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.card.row { flex-direction: row; gap: 16px; }
.card.row .card-img { width: 40%; flex: none; aspect-ratio: 4 / 3; }
.card.row h3 { font-size: 1.05rem; }
.card.row p { -webkit-line-clamp: 2; font-size: .9rem; }
@media (max-width: 520px) { .card.row .card-img { width: 36%; } .card.row p { display: none; } }

/* ---------- category page */
.cat-head { padding: 28px 20px 24px; }
.cat-head h1 { margin-top: 8px; }
.dek { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.count { color: var(--muted); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.filter { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: 999px; font: 600 .9rem var(--sans); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.card[hidden] { display: none; }

/* ---------- breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; font-size: .88rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .6; }
.crumbs li[aria-current] { max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a { text-decoration: none; }

/* ---------- post */
.post-top { padding-top: 28px; max-width: 900px; }
.post-top h1 { margin: 12px 0 14px; font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -0.03em; }
.byline { color: var(--muted); font-size: .92rem; }
.jump { margin-top: 4px; background: var(--chili); }
.jump:hover { background: var(--ink); }
.hero-fig { margin: 24px auto 0; }
.hero-img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; }
.post-grid { display: grid; grid-template-columns: 260px minmax(0, 720px); gap: 56px; justify-content: center; padding-top: 36px; padding-bottom: 32px; }
.post-side { position: relative; }
.post-side > div { position: sticky; top: 92px; }
@media (max-width: 1040px) { .post-grid { grid-template-columns: minmax(0, 720px); gap: 0; } .post-side .ad-slot { display: none; } }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: .92rem; margin-bottom: 24px; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--teal); }

.prose { font: 400 1.14rem/1.75 var(--serif); }
.prose > * { max-width: 70ch; }
.prose h2 { margin: 1.9em 0 .6em; font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.prose h3 { margin: 1.6em 0 .5em; font-size: 1.3rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--saffron); font-weight: 700; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--saffron); font-style: italic; color: var(--ink-2); }
.prose strong { font-weight: 600; }
.prose a { color: var(--teal); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; font: .95rem/1.45 var(--sans); }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose .tip { background: var(--saffron-soft); border-radius: var(--radius); padding: 14px 18px; font-family: var(--sans); font-size: 1rem; }
[data-cat="travel"] .prose h2 { color: var(--teal); }
[data-cat="recipes"] .prose h2 { color: var(--chili); }
[data-cat="tech"] .prose h2 { color: var(--violet); }

/* ---------- recipe card */
.recipe-card { margin: 2.4em 0; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--chili); border-radius: var(--radius-lg); padding: 24px; font-family: var(--sans); font-size: 1rem; max-width: none; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rc-head h2 { margin: 0; color: var(--ink) !important; }
.rc-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rc-facts dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.rc-facts dd { margin: 0; font-weight: 700; }
.rc-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; }
@media (max-width: 700px) { .rc-cols { grid-template-columns: 1fr; } }
.rc-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rc-sub h3, .rc-cols h3 { margin: 0 0 8px; }
.scaler { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; font-size: .9rem; }
.scaler button { width: 30px; height: 30px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 1.1rem; }
.scaler output { font-weight: 800; min-width: 1.5em; text-align: center; }
.scaler span { margin-right: 6px; color: var(--muted); }
.rc-ings { list-style: none; padding: 0; margin: 0; }
.rc-ings li { padding: 7px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.rc-ings li::marker { content: ""; }
.rc-ings label { display: flex; gap: 10px; cursor: pointer; align-items: baseline; }
.rc-ings input { accent-color: var(--chili); width: 17px; height: 17px; flex: none; transform: translateY(2px); }
.rc-ings input:checked + span { text-decoration: line-through; color: var(--muted); }
.rc-ings .ing-group { font-weight: 800; border: 0; padding-top: 14px; color: var(--chili); }
.rc-steps { padding-left: 1.4em; }
.rc-steps li { margin-bottom: .8em; padding-left: 4px; }
.rc-steps li::marker { color: var(--chili); font-weight: 800; }
.rc-note { background: var(--chili-soft); padding: 12px 16px; border-radius: var(--radius); margin: 12px 0 0; }

/* ---------- faq & share */
.faq { margin: 2.4em 0; font-family: var(--sans); font-size: 1rem; }
.faq h2 { color: var(--ink) !important; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2em 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: .92rem; }
.share span { font-weight: 700; margin-right: 6px; }
.share a, .share button { text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink) !important; font: 600 .9rem var(--sans); cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--ink); }
.related { padding-bottom: 48px; }
.related h2 { border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 22px; }

/* ---------- ads */
.ad-slot { display: none; }
.ad-slot.on { display: block; margin: 28px auto; min-height: 120px; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot.on::before { content: "Advertisement"; display: block; font: 600 .7rem/1 var(--sans); color: var(--muted); margin-bottom: 6px; letter-spacing: .04em; }
.post-side .ad-slot.on { min-height: 600px; }

/* ---------- tools */
.tool-head { padding: 28px 20px 8px; max-width: 900px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tool-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.tool-tile .tool-ico { grid-row: 1 / 3; }
.tool-tile strong { line-height: 1.2; }
.tool-tile small { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.tool-tile:hover { border-color: var(--ink); color: var(--ink); }
.tool-app { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-top: 12px; min-height: 220px; box-shadow: 0 24px 60px -36px rgba(20, 33, 61, .35); }
.privacy-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin: 12px 4px 0; }
.privacy-note svg { width: 18px; height: 18px; color: var(--teal); }
.prose-narrow { max-width: 780px; padding-top: 24px; padding-bottom: 32px; }
.tool-info { font: 400 1.08rem/1.7 var(--serif); }
.tool-info h2 { margin-top: 1.6em; }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: .5em; }
.steps li::marker { color: var(--saffron); font-weight: 800; font-family: var(--sans); }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.drop:hover, .drop.over { border-color: var(--saffron); background: var(--saffron-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.drop small { color: var(--muted); }
.drop .btn { margin-top: 14px; pointer-events: none; }
.t-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; margin: 18px 0; }
.t-field { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; font-weight: 600; }
.t-field input[type="text"], .t-field input[type="number"], .t-field input[type="url"], .t-field select, .t-area {
  font: 500 1rem var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.t-field input:focus, .t-field select:focus, .t-area:focus { border-color: var(--saffron); outline: none; }
.t-field input[type="range"] { accent-color: var(--saffron); width: 200px; }
.t-area { width: 100%; min-height: 200px; resize: vertical; line-height: 1.55; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); }
.file-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--paper); border-radius: var(--radius-sm); font-size: .95rem; }
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .fsize { color: var(--muted); font-size: .85rem; }
.file-list button { border: 0; background: var(--surface); color: var(--ink); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.file-list button:hover { background: var(--saffron-soft); }
.file-list img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.t-status { margin-top: 14px; font-weight: 600; }
.t-status.err { color: var(--chili); }
.t-status.ok { color: var(--teal); }
.progress { height: 8px; background: var(--paper); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress > div { height: 100%; width: 0; background: var(--saffron); transition: width .2s; }
.result { margin-top: 18px; padding: 16px; background: var(--teal-soft); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.result .big { font: 800 1.4rem var(--display); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.thumbs figure { margin: 0; background: var(--paper); border-radius: var(--radius-sm); padding: 8px; text-align: center; font-size: .85rem; }
.thumbs img { margin: 0 auto 6px; max-height: 180px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 16px 0; }
.stats div { background: var(--paper); border-radius: var(--radius-sm); padding: 12px; }
.stats b { display: block; font: 800 1.6rem/1.1 var(--display); }
.stats span { color: var(--muted); font-size: .85rem; }
.bar { margin: 8px 0; font-size: .88rem; }
.bar .track { height: 6px; background: var(--paper); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.bar .fill { height: 100%; background: var(--teal); }
.bar.over .fill { background: var(--chili); }
.qr-out { display: grid; place-items: center; padding: 16px; background: #fff; border-radius: var(--radius); width: max-content; max-width: 100%; margin-top: 16px; }
.qr-out svg, .qr-out img { width: 240px; height: 240px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .calc-grid { grid-template-columns: 1fr; } }
.donut { width: 180px; height: 180px; }
.sched { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 12px; }
.sched th, .sched td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.sched th:first-child, .sched td:first-child { text-align: left; }
.preview-doc { max-height: 360px; overflow: auto; background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px; font: 15px/1.5 Georgia, serif; margin-top: 16px; }

/* ---------- footer */
.site-foot { margin-top: 48px; background: var(--ink); color: #C9D0DF; padding: 48px 0 24px; }
:root[data-theme="dark"] .site-foot { background: #0A0F1C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-foot { background: #0A0F1C; } }
.site-foot .brand { color: #fff; }
.site-foot .brand .logo-mark path[stroke] { stroke: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: 1rem; color: #fff; margin-bottom: 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .93rem; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: var(--saffron); }
.foot-tag { margin-top: 12px; max-width: 32ch; font-size: .95rem; }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-head, .site-foot, .post-side, .share, .related, .ad-slot, .jump, .hero-fig, .crumbs, .faq, [data-print] { display: none !important; }
  body.print-recipe .prose > :not(.recipe-card), body.print-recipe .post-top { display: none !important; }
  body { background: #fff; color: #000; }
  .post-grid { display: block; padding: 0; }
  .recipe-card { border: 1px solid #999; }
}

.side-tools { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: .92rem; margin-bottom: 24px; }
.side-tools p { font-weight: 700; margin: 0 0 8px; }
.side-tools ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.side-tools a { text-decoration: none; color: var(--ink-2); }
.side-tools a:hover { color: var(--teal); }
@media (max-width: 1040px) { .side-tools { display: none; } }
