/* Daily Helpers — light, accessible, editorial. No framework, no external assets. */

:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f1f4f1;
  --ink: #1b2a26;
  --ink-2: #3c514b;
  --muted: #5d706a;
  --line: #dde5df;
  --accent: #2e6b5e;
  --accent-dark: #215046;
  --accent-soft: #e7f0eb;
  --warm: #b3653f;
  --warm-soft: #fbf0e7;
  --focus: #b3653f;
  --shadow: 0 1px 2px rgba(27, 42, 38, .04), 0 8px 26px rgba(27, 42, 38, .05);
  --radius: 14px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
}

html[data-font="large"] { font-size: 20px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(1250px 430px at 17% -9%, #e7f0eb 0%, rgba(231, 240, 235, 0) 72%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.22; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.35rem); margin: .25em 0 .45em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin: 0 0 .7em; }
h3 { font-size: 1.13rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }
.wrap { width: min(1080px, calc(100% - 2.5rem)); margin-inline: auto; }
[id] { scroll-margin-top: 96px; }

.skip {
  position: fixed; top: -100px; left: 1rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 247, 243, .93);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px;
  background: var(--accent); color: #fff; font-family: var(--serif); font-size: 1.25rem; line-height: 1;
}
.brand-word { font-family: var(--serif); font-size: 1.42rem; letter-spacing: -.04em; }
.brand-stack { display: flex; flex-direction: column; gap: .05rem; line-height: 1.08; }
.brand-dot { color: var(--warm); }
/* The domain sits directly under the wordmark on the left, as a plain
   sub-line rather than a separate top-right badge. */
.site-domain {
  display: block; white-space: nowrap; font-size: .68rem; font-weight: 600;
  letter-spacing: .015em; color: var(--muted); line-height: 1.25;
}
.brand:hover .site-domain { color: var(--accent-dark); }

/* ---------- category strip ---------- */
.cat-nav { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cat-nav-inner {
  display: flex; flex-wrap: wrap; gap: .35rem;
  padding: .5rem 0; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.cat-link {
  flex: none; white-space: nowrap; font-size: .8rem; font-weight: 600;
  color: var(--ink-2); padding: .32rem .68rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface);
}
.cat-link:hover { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.cat-link.is-current { color: #fff; background: var(--accent); border-color: var(--accent); }
.head-nav { display: flex; gap: 1.35rem; margin-left: auto; }
.head-nav a { color: var(--ink-2); font-size: .9rem; font-weight: 550; padding: .55rem 0; border-bottom: 2px solid transparent; }
.head-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.head-tools { display: flex; align-items: center; gap: .7rem; }

.font-tools { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.font-btn {
  min-width: 40px; min-height: 40px; border: 0; background: transparent; color: var(--ink-2);
  font-family: var(--sans); font-size: .86rem; font-weight: 650; cursor: pointer; transition: background .18s, color .18s;
}
.font-btn + .font-btn { border-left: 1px solid var(--line); }
.font-btn:hover, .font-btn.is-on { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- language switcher ---------- */
.lang-menu { position: relative; }
.lang-menu > summary {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 42px;
  padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 600;
  cursor: pointer; list-style: none; transition: border-color .18s, background .18s;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { border-color: var(--accent); background: var(--accent-soft); }
.lang-menu > summary svg { width: 18px; height: 18px; color: var(--accent); }
.chev { font-size: .7rem; color: var(--muted); }
.lang-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 288px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .6rem;
  max-height: min(72vh, 540px); overflow-y: auto;
}
.lang-panel-title { margin: .3rem .55rem .55rem; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lang-item {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: .7rem;
  padding: .55rem .6rem; border-radius: 9px; color: var(--ink); transition: background .16s;
}
.lang-item:hover { background: var(--accent-soft); }
.lang-item.is-active { background: var(--surface-2); }
.lang-code {
  grid-row: 1 / 3; align-self: center; text-align: center; font-size: .68rem; font-weight: 750;
  letter-spacing: .04em; color: var(--accent-dark); background: var(--accent-soft);
  padding: .35rem 0; border-radius: 6px;
}
.lang-name { font-size: .9rem; font-weight: 650; line-height: 1.35; }
.lang-region { font-size: .74rem; color: var(--muted); line-height: 1.35; }
/* ---------- geo banner ---------- */
.lang-banner { background: var(--warm-soft); border-bottom: 1px solid #eecdb4; }
.banner-inner { display: flex; align-items: center; gap: 1rem; padding: .65rem 0; font-size: .88rem; flex-wrap: wrap; }
.banner-inner span { color: var(--ink-2); }
.banner-inner a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.banner-inner button { margin-left: auto; border: 0; background: transparent; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; min-width: 40px; min-height: 40px; }
.banner-inner button:hover { color: var(--ink); }

/* ---------- hero / hub ---------- */
.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow, .post-head .eyebrow {
  font-size: .76rem; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 750; color: var(--accent); margin-bottom: .5rem;
}
.hero h1 { max-width: 20ch; }
.hero-lead { max-width: 62ch; font-size: 1.13rem; color: var(--ink-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: .65rem 1.25rem; border: 1px solid var(--accent);
  border-radius: 10px; background: var(--surface); color: var(--accent-dark);
  font-weight: 650; font-size: .92rem; cursor: pointer; transition: background .18s, color .18s, border-color .18s;
}
.btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.section { padding: clamp(2.5rem, 5vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.section-lead { max-width: 68ch; color: var(--ink-2); font-size: 1.05rem; }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 1.1rem; margin-top: 1.8rem; }
.guide-card { display: flex; flex-direction: column; padding: 1.5rem 1.4rem; color: var(--ink); transition: border-color .18s, box-shadow .18s; cursor: pointer; }
.guide-card:hover { border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.guide-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); }
.guide-icon svg, .post-icon svg { width: 40px; height: 40px; }
.guide-no { margin-top: 1.1rem; font-size: .72rem; letter-spacing: .1em; font-weight: 750; color: var(--warm); }
.guide-card h3 { margin-top: .2rem; }
.guide-card p { font-size: .9rem; color: var(--ink-2); flex: 1; }
.guide-link { font-size: .87rem; font-weight: 700; color: var(--accent-dark); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-block; padding: .38rem .72rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font-size: .82rem; text-decoration: none; line-height: 1.4;
}
.chip-link { cursor: pointer; transition: border-color .18s, background .18s, color .18s; }
.chip-link:hover, .chip-link:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.chips-large .chip { font-size: .88rem; padding: .5rem .9rem; }
.note { margin: clamp(2.5rem, 5vw, 4rem) 0; padding: 1.6rem 1.7rem; border-left: 4px solid var(--warm); background: var(--warm-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.note h2 { font-size: 1.25rem; }
.note p { margin: 0; color: var(--ink-2); font-size: .94rem; }

/* ---------- article ---------- */
.crumbs { display: flex; gap: .55rem; align-items: center; padding: 1.6rem 0 .4rem; font-size: .82rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.post { max-width: 760px; margin-inline: auto; padding-bottom: 3rem; }
.post-head { padding: 2rem 0 1.8rem; border-bottom: 1px solid var(--line); }
.post-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 1.2rem; }
.post-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
.dek { font-size: 1.12rem; color: var(--ink-2); max-width: 66ch; }
.meta { font-size: .8rem; color: var(--muted); margin: 1.2rem 0 0; }

.toc { margin: 1.8rem 0; padding: 1.1rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.toc p { margin: 0 0 .45rem; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 750; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { font-size: .9rem; padding: .12rem 0; break-inside: avoid; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--accent); }

.post-section { padding-top: 2.4rem; }
.post-section > p { color: var(--ink-2); font-size: .98rem; line-height: 1.72; margin: 0 0 1rem; max-width: 70ch; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.check { padding: 1.15rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.check-n { font-family: var(--serif); font-size: 1.35rem; color: var(--warm); }
.check h3 { margin-top: .1rem; font-size: 1.04rem; }
.check p { margin: 0; font-size: .9rem; color: var(--ink-2); }

.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; padding: 0 0 1.4rem; position: relative; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 1px; background: var(--line); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem; z-index: 1; }
.step h3 { margin: .35rem 0 .25rem; font-size: 1.06rem; }
.step p { margin: 0; font-size: .94rem; color: var(--ink-2); }

.cta { margin: 2.6rem 0 .5rem; padding: 1.6rem 1.7rem; background: var(--accent-soft); border: 1px solid #cfe1d8; border-radius: var(--radius); }
.cta h2 { font-size: 1.3rem; }
.cta p { font-size: .93rem; color: var(--ink-2); }
.cta-buttons { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0 .5rem; }
.cta .btn { background: var(--surface); }
.cta .btn:hover { background: var(--accent); color: #fff; }
.cta-fine { margin: .4rem 0 0; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.tips { margin: 0; padding-left: 1.2rem; }
.tips li { padding: .35rem 0; color: var(--ink-2); font-size: .95rem; }
.faq { display: grid; gap: .6rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .2rem 1.1rem; }
.faq summary { padding: .85rem 0; font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { font-size: .92rem; color: var(--ink-2); margin: 0 0 .9rem; }

.siblings { margin-top: 2.4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.siblings > p:first-child { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 750; color: var(--muted); margin-bottom: .45rem; }
.sib-note { font-size: .86rem; color: var(--muted); line-height: 1.55; margin: 0 0 1rem; max-width: 720px; }
.sib-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.sib {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .46rem .85rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--ink-2);
  text-decoration: none; transition: border-color .18s, background .18s, color .18s;
}
.sib:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.sib-arrow { color: var(--accent-dark); font-size: .95rem; }
.sib-all { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.back { margin-top: 1.8rem; font-size: .9rem; }

/* ---------- in-site search ---------- */
.site-search { display: flex; align-items: center; gap: .3rem; }
.site-search input {
  width: 190px; min-height: 40px; padding: .4rem .7rem;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: .84rem;
}
.site-search input::placeholder { color: var(--muted); }
.site-search input:focus-visible { border-color: var(--accent); }
.site-search button {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--ink-2); cursor: pointer;
}
.site-search button:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.site-search svg { width: 19px; height: 19px; }
.search-big { display: flex; gap: .55rem; margin: 1.6rem 0 1.1rem; max-width: 720px; }
.search-big input {
  flex: 1; min-width: 0; min-height: 50px; padding: .65rem 1rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
}
.search-big input:focus-visible { border-color: var(--accent); }
.search-big button {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 50px;
  padding: .6rem 1.15rem; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff; font: inherit; font-size: .92rem;
  font-weight: 700; cursor: pointer;
}
.search-big button:hover { background: var(--accent-dark); }
.search-big svg { width: 18px; height: 18px; }
.search-status { font-size: .88rem; color: var(--muted); margin: 0 0 1.1rem; }
.search-empty {
  padding: 1.1rem 1.2rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2);
}
.search-results { display: grid; gap: .65rem; margin-bottom: 1rem; }
.search-hit {
  position: relative; display: block; padding: 1rem 3rem 1rem 1.15rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); text-decoration: none;
  transition: border-color .18s, background .18s;
}
.search-hit:hover { border-color: var(--accent); background: var(--accent-soft); }
.search-hit h3 { margin: .25rem 0 .35rem; font-size: 1.05rem; }
.search-hit p { margin: 0; font-size: .88rem; color: var(--ink-2); line-height: 1.55; }
.hit-kind { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 750; color: var(--accent-dark); }
.hit-go { position: absolute; right: 1.15rem; top: 50%; transform: translateY(-50%); color: var(--accent-dark); font-size: 1.2rem; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--surface-2); padding: 2.4rem 0 2.8rem; }
.foot-inner { max-width: 760px; }
.foot-brand { font-family: var(--serif); font-size: 1.5rem; margin-bottom: .2rem; }
.foot-note { font-size: .9rem; color: var(--ink-2); }
.disclosure { font-size: .8rem; color: var(--muted); line-height: 1.6; }
.foot-links { font-size: .82rem; margin-bottom: 0; }
.foot-domain {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem;
  font-size: .8rem; color: var(--muted); margin: .9rem 0 0;
}
.foot-host { letter-spacing: .05em; font-weight: 600; }
.foot-sep { opacity: .6; }
.foot-copyright { line-height: 1.6; }

/* ---------- catalogue pagination ---------- */
.hero-page { padding-bottom: .6rem; }
.hero-page h1 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .6rem; margin: 2.2rem 0 .5rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.pager-btn {
  display: inline-flex; align-items: center; min-height: 42px;
  padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--accent-dark);
  font-size: .88rem; font-weight: 650;
}
.pager-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.pager-btn.is-off { color: var(--muted); opacity: .6; cursor: default; }
.pager-status { font-size: .84rem; color: var(--ink-2); padding: 0 .3rem; }

/* ---------- gateway (root) ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 3rem 1.25rem; }
.gate-card { width: min(720px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(1.8rem, 4vw, 3rem); }
.gate-top { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.6rem; }
.gate h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: .3rem; }
.gate-lead { color: var(--ink-2); }
.gate-status { display: inline-flex; align-items: center; gap: .6rem; padding: .55rem .9rem; background: var(--accent-soft); border-radius: 9px; font-size: .86rem; color: var(--accent-dark); font-weight: 600; }
.gate-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.gate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; margin: 1.8rem 0 1.2rem; }
.gate-link { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: .8rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); transition: border-color .18s, background .18s; }
.gate-link:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.gate-code { grid-row: 1/3; align-self: center; text-align: center; font-size: .68rem; font-weight: 750; color: var(--accent-dark); background: var(--accent-soft); padding: .4rem 0; border-radius: 6px; }
.gate-name { font-weight: 650; font-size: .95rem; line-height: 1.35; }
.gate-region { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.gate-fine { font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- topic pages & grouped guide index ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.topic-card { display: flex; flex-direction: column; padding: 1.35rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: border-color .18s, background .18s; }
.topic-card:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.topic-no { font-family: var(--serif); font-size: 1.4rem; color: var(--warm); }
.topic-card h3 { margin: .2rem 0 .5rem; font-size: 1.1rem; }
.topic-card p { font-size: .9rem; color: var(--ink-2); flex: 1; margin: 0 0 1rem; }
.group { margin-top: 2.6rem; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.group-head h3 { margin: 0; font-size: 1.28rem; }
.group-head a { font-size: .86rem; font-weight: 700; color: var(--accent-dark); }
.group .guide-grid { margin-top: 1.2rem; }
.topic-guide-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 1.3rem; }
.topic-guide-grid .guide-card { padding: 1.15rem 1.1rem; }
.topic-guide-grid .guide-icon { width: 48px; height: 48px; }
.topic-guide-grid .guide-icon svg { width: 30px; height: 30px; }
.hub-faq { margin-top: 1.9rem; max-width: 760px; }

/* ---------- answer capsule, key facts, editorial note ---------- */
.answer-box {
  margin: 2rem 0 2.4rem; padding: 1.4rem 1.6rem;
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
}
.answer-box h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
.answer-box p { margin: 0; color: var(--ink); font-size: 1.02rem; line-height: 1.65; }
.answer-box strong { color: var(--accent-dark); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.facts li {
  padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink-2); line-height: 1.55;
}
/* ---------- home button + back-to-top ---------- */
.home-btn {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 42px;
  padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink-2); font-size: .86rem;
  font-weight: 650; white-space: nowrap;
  transition: border-color .18s, background .18s, color .18s;
}
.home-btn svg { width: 18px; height: 18px; color: var(--accent); }
.home-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.gate-top .home-btn { margin-left: auto; }
.gate-domain { justify-content: center; text-align: center; margin-top: 1.4rem; }

/* ---------- 404 ---------- */
.nf-card { max-width: 640px; }
.nf-code { font-family: var(--serif); font-size: 3.2rem; line-height: 1; letter-spacing: -.05em; color: var(--accent); margin: 0 0 .4rem; }
.nf-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0 1.8rem; }
.nf-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .6rem 1.1rem; border: 1px solid var(--line); border-radius: 9px;
  font-size: .92rem; font-weight: 600; color: var(--ink); background: var(--surface);
}
.nf-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.nf-btn-main { background: var(--accent); border-color: var(--accent); color: #fff; }
.nf-btn-main:hover { color: #fff; background: var(--accent-dark); }
.nf-langs { display: flex; flex-wrap: wrap; gap: .45rem .95rem; font-size: .84rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.nf-langs a { color: var(--ink-2); }
.nf-langs a:hover, .nf-langs a.is-current { color: var(--accent-dark); font-weight: 650; }
@media (max-width: 560px) {
  .nf-code { font-size: 2.6rem; }
  .nf-actions { flex-direction: column; }
  .nf-btn { width: 100%; }
}
.home-btn:focus-visible, .to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 45;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 48px; min-height: 48px; padding: .55rem .95rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--accent-dark);
  font-family: var(--sans); font-size: .85rem; font-weight: 700;
  box-shadow: var(--shadow); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s, border-color .18s;
}
.to-top svg { width: 19px; height: 19px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- product cover illustrations ---------- */
.post-cover { margin: 1.8rem 0 0; }
.post-cover img {
  display: block; width: 100%; height: auto; aspect-ratio: 8 / 5;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
}
.card-cover {
  display: block; width: 100%; height: auto; aspect-ratio: 8 / 5;
  object-fit: cover; border-radius: 10px; background: var(--surface-2);
  margin: 0 0 1rem;
}

/* ---------- long-form detail and care lists ---------- */
.post-section h3 { margin: 1.6rem 0 .5rem; font-size: 1.06rem; }
.care-list { margin: 0 0 .8rem; padding-left: 1.2rem; }
.care-list li { padding: .3rem 0; color: var(--ink-2); font-size: .95rem; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .check-grid { grid-template-columns: 1fr; }
  .head-nav { display: none; }
  .head-tools { margin-left: auto; }
  .head-inner { flex-wrap: wrap; row-gap: .3rem; padding: .35rem 0; }
  .brand, .head-tools { flex: none; }
  .brand-stack .site-domain { font-size: .64rem; }
  .cat-nav-inner { flex-wrap: nowrap; overflow-x: auto; }
  .cat-link { font-size: .76rem; padding: .3rem .58rem; }
  .site-search input { width: 140px; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 1.75rem, 1080px); }
  .home-btn span, .to-top span { display: none; }
  .home-btn { padding: .35rem .6rem; }
  .to-top { right: .9rem; bottom: .9rem; padding: .55rem; }
  .head-inner { gap: .6rem; min-height: 64px; }
  .brand-word { font-size: 1.2rem; }
  .lang-current { display: none; }
  .lang-panel { width: min(288px, calc(100vw - 2rem)); right: -4px; }
  .toc ol { columns: 1; }
  /* On narrow screens the header form becomes a small search button that
     opens the search page, where the full-width input is easier to use. */
  .site-search input { display: none; }
  .search-big { flex-direction: column; }
  .sib-grid { gap: .4rem; }
  .post-head { padding-top: 1.2rem; }
  .cta { padding: 1.2rem; }
}

/* ---------- picture gallery, step illustrations and lightbox ---------- */
.photos { padding-top: 1.6rem; }
.gallery { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1rem; align-items: start; }
.gallery-side { display: grid; gap: 1rem; }
.gallery figure, .step-fig { margin: 0; min-width: 0; }
.gallery button.zoomable, .step-fig button.zoomable, .official-link {
  display: block; width: 100%; padding: 0; margin: 0; line-height: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surface-2); cursor: zoom-in;
  transition: border-color .18s;
}
.official-link { cursor: pointer; }
.gallery button.zoomable:hover, .step-fig button.zoomable:hover,
.gallery button.zoomable:focus-visible, .step-fig button.zoomable:focus-visible,
.official-link:hover, .official-link:focus-visible { border-color: var(--accent); outline-offset: 2px; }
.gallery img, .step-fig img {
  display: block; width: 100%; height: auto; aspect-ratio: 8 / 5;
  object-fit: cover; background: var(--surface-2);
}
.gallery-side img, .step-fig img { aspect-ratio: 16 / 10; }
.gallery figcaption { margin: .45rem 0 0; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.post-section > p.photo-note, .post-section > p.zoom-hint {
  font-size: .88rem; color: var(--muted); line-height: 1.6;
}
.post-section > p.photo-note { margin-top: 1rem; }
.post-section > p.zoom-hint { margin: .45rem 0 0; }
.photo-cta { margin: 1rem 0 0; }
.btn-quiet { background: var(--surface); color: var(--accent-dark); border-color: var(--line); }
.btn-quiet:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-body { min-width: 0; }
.step-fig { margin: .85rem 0 .2rem; max-width: 520px; }
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: 1.5rem; background: rgba(14, 20, 24, .88);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(100%, 1100px); max-height: 84vh; border-radius: 10px;
  background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.lightbox button.lb-close {
  position: absolute; top: 1rem; right: 1rem;
  min-width: 48px; min-height: 48px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox button.lb-close:hover { background: rgba(255, 255, 255, .3); }
body.lb-open { overflow: hidden; }
@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery-side { grid-template-columns: 1fr 1fr; }
  .step-fig { max-width: 100%; }
}
@media (max-width: 420px) { .gallery-side { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .gallery button.zoomable, .step-fig button.zoomable, .official-link { transition: none; }
}
