/* =====================================================================
   MACLINIC public website (maclinic.net) — landing-specific sections.
   Shared art (navy background, glass cards, btn-gold) lives in brand-art.css,
   tokens/components in app.css.
   ===================================================================== */
.site { display: flex; flex-direction: column; min-height: 100vh; background: var(--surface); color: var(--ink-900); }
.site main { flex: 1; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav (solid; transparent over the hero on the landing page) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 1030;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-nav .nav-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.site-nav .logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.site-nav .logo img { height: 38px; width: auto; display: block; }
.site-nav .links { display: flex; gap: 24px; margin-left: auto; }
.site-nav .links a { color: var(--ink-600); font-size: .92rem; }
.site-nav .links a:hover { color: var(--brand-600); text-decoration: none; }
.site-nav .nav-cta { display: flex; align-items: center; gap: 8px; }
.site-nav .menu-btn { display: none; }
.mobile-menu { border-top: 1px solid var(--line); padding: 8px 0 16px; }
.mobile-menu a.m-link { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 4px; color: var(--ink-900); border-bottom: 1px solid var(--line); }
.mobile-menu a.m-link .ms { color: var(--brand-600); }
.mobile-menu .m-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }

/* over the navy hero: white text, no background until the page scrolls (app.js adds .is-solid) */
.site-nav.over-hero { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-nav.over-hero .links a, .site-nav.over-hero .icon-btn, .site-nav.over-hero .btn-ghost { color: #E6EDFC; }
.site-nav.over-hero .links a:hover { color: #fff; }
.site-nav.over-hero .icon-btn:hover, .site-nav.over-hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.site-nav.over-hero .logo .logo-on-light { display: none !important; }
.site-nav.over-hero .logo .logo-on-dark { display: block !important; }
.site-nav.over-hero.is-solid, .site-nav.over-hero.menu-open {
  background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 20px -12px rgba(11, 31, 75, .35);
}
.site-nav.over-hero.is-solid .links a, .site-nav.over-hero.menu-open .links a { color: var(--ink-600); }
.site-nav.over-hero.is-solid .icon-btn, .site-nav.over-hero.is-solid .btn-ghost,
.site-nav.over-hero.menu-open .icon-btn, .site-nav.over-hero.menu-open .btn-ghost { color: var(--ink-600); }
.site-nav.over-hero.is-solid .logo .logo-on-light, .site-nav.over-hero.menu-open .logo .logo-on-light { display: block !important; }
.site-nav.over-hero.is-solid .logo .logo-on-dark, .site-nav.over-hero.menu-open .logo .logo-on-dark { display: none !important; }
:root[data-theme="dark"] .site-nav.over-hero.is-solid .logo .logo-on-light,
:root[data-theme="dark"] .site-nav.over-hero.menu-open .logo .logo-on-light { display: none !important; }
:root[data-theme="dark"] .site-nav.over-hero.is-solid .logo .logo-on-dark,
:root[data-theme="dark"] .site-nav.over-hero.menu-open .logo .logo-on-dark { display: block !important; }

@media (max-width: 1024px) {
  .site-nav .links { display: none; }
  .site-nav .nav-cta { margin-left: auto; }
  .site-nav .menu-btn { display: inline-grid; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-nav .nav-cta .hide-sm { display: none; }
  .site-nav .logo img { height: 32px; }
  .site-nav .nav-inner { gap: 6px; min-height: 60px; }
  .site-nav .nav-cta .btn { --bs-btn-padding-x: 12px; }
}
@media (min-width: 1025px) { .mobile-menu { display: none !important; } }

/* ---------- hero (navy art, full bleed) ---------- */
.hero { padding: 132px 0 96px; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 31, 75, .65) 0%, rgba(11, 31, 75, .2) 55%, rgba(11, 31, 75, 0) 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { margin: 18px 0 16px; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.18; font-weight: 700; }
.hero h1 .gold { color: #F4C45A; }
.hero .lead-text { font-size: 1.1rem; color: #C9D3EE; margin: 0 0 30px; max-width: 34em; }
.hero .lead-text b { color: #fff; font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9rem; color: #C9D3EE; }
.hero-points li { display: flex; align-items: center; gap: 6px; }
.hero-points .ms { color: #9FE3BF; font-size: 18px; font-variation-settings: 'FILL' 1; }

/* glass collage */
.collage { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.collage .glass { animation-duration: 8s; }
.collage .glass.wide { grid-column: span 2; }
.collage .glass:nth-child(1) { margin: 0 0 0 10%; }
.collage .glass:nth-child(2) { margin: 18px 0 0 0; }
.collage .glass:nth-child(3) { margin: 0 8% 0 0; animation-delay: -1.5s; }
.collage .glass:nth-child(4) { margin: 0 0 0 6%; animation-delay: -3s; }
.collage .glass:nth-child(5) { margin: 0 0 0 18%; animation-delay: -5s; }
.glass .chip-row { display: flex; gap: 4px; margin-top: 4px; }
.glass .chip-row em { font-style: normal; font-size: .68rem; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #E6EDFC; }
.glass .chip-row em.w { background: rgba(224, 165, 38, .3); color: #F4C45A; }
.glass .chip-row em.o { background: rgba(22, 128, 79, .4); color: #9FE3BF; }
.glass .ico.bad { background: rgba(200, 55, 45, .35); color: #FFB4AE; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p { color: var(--ink-600); margin: 0; }
.art-bg .section-head p { color: #AFC2F5; }
.kicker { color: var(--brand-600); font-weight: 600; font-size: .85rem; letter-spacing: .04em; }
.art-bg .kicker { color: #F4C45A; }
.section h2, .cta-band h2, .page-hero h1 { margin: 8px 0 12px; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.3; color: var(--heading); }
.art-bg.section h2, .art-bg h2 { color: #fff; }
.section h3 { margin: 0 0 6px; font-size: 1.08rem; color: var(--heading); }
.art-bg h3 { color: #fff; }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.feature:hover { border-color: var(--brand-600); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.feature p { margin: 0; color: var(--ink-600); font-size: .92rem; }
.f-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 12px; background: var(--brand-100); color: var(--brand-600); }
.f-icon .ms { font-size: 26px; }
.feature.gold .f-icon { background: color-mix(in srgb, var(--accent-500) 18%, transparent); color: var(--gold-ink); }

/* pricing (plans with is_public = 1, prices set by the platform operator) */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 1040px; margin: 0 auto; }
.price-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.price-card .price { font: 700 1.5rem var(--font-num); color: var(--heading); margin: 4px 0 2px; }
.price-card .price-sub { color: var(--ink-600); font-size: .85rem; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 6px; font-size: .92rem; color: var(--ink-600); }
.price-card li::before { content: "✓"; color: var(--brand-600); font-weight: 700; margin-right: 8px; }
.price-card .btn { margin-top: auto; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.steps li { position: relative; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.steps p { margin: 0; color: var(--ink-600); font-size: .9rem; }
.s-num { position: absolute; top: 14px; right: 20px; font: 700 2rem var(--font-num); color: var(--line-strong); }
.s-icon { font-size: 32px !important; color: var(--brand-600); margin-bottom: 12px; display: block; }

.faq .accordion { --bs-accordion-bg: var(--surface); --bs-accordion-border-color: var(--line); --bs-accordion-border-radius: var(--radius-md); --bs-accordion-inner-border-radius: var(--radius-md); --bs-accordion-active-bg: var(--brand-100); --bs-accordion-active-color: var(--brand-ink); --bs-accordion-btn-focus-box-shadow: 0 0 0 3px rgba(var(--brand-600-rgb), .2); max-width: 820px; margin: 0 auto; }
.faq .accordion-button { font-weight: 500; }

.cta-band { padding: 72px 0; overflow: hidden; }
.cta-band::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 31, 75, .35), rgba(11, 31, 75, .55)); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.cta-band p { margin: 0; color: #C9D3EE; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-band .ecg-line { margin-top: 28px; opacity: .9; }

/* ---------- inner pages ---------- */
.page-hero { padding: 120px 0 56px; }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 31, 75, .6), rgba(11, 31, 75, .15)); }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { margin: 0; color: #C9D3EE; max-width: 46em; }
.page-body { padding: 48px 0 72px; }

/* ---------- auth pages (two-column, reuse .auth from app.css + art from brand-art.css) ---------- */
.auth-wrap.wide { max-width: 680px; }
.auth-brand .auth-copy .glass-stack { display: grid; gap: 12px; margin-top: 32px; max-width: 360px; }
.code-preview { font: 500 .85rem var(--font-num); color: var(--ink-600); }
.code-preview b { color: var(--brand-600); }
.consent-box { padding: 14px 16px; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line); }
.consent-box .mb-3 { margin-bottom: 0 !important; }
.auth .form-section-title { margin-top: 4px; }
/* sign-up security (frontend /site/signup) */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.code-check { margin-top: 4px; min-height: 1.2em; }
.code-check.ok { color: var(--ok-ink); }
.code-check.bad { color: var(--bad-ink); }
.pw-field .input-group:has(.is-invalid) ~ .invalid-feedback { display: block; }
.pw-field .input-group > .form-control.is-invalid { z-index: 1; }
.pw-toggle { min-width: 46px; border-color: var(--line-strong); color: var(--ink-600); }
.pw-toggle .ms { font-size: 20px; vertical-align: middle; }
.pw-meter-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.pw-meter-bar span { height: 6px; border-radius: 3px; background: var(--line); transition: background-color .2s; }
.pw-meter[data-level="1"] .pw-meter-bar span:nth-child(-n+1),
.pw-meter[data-level="2"] .pw-meter-bar span:nth-child(-n+1) { background: var(--status-bad); }
.pw-meter[data-level="2"] .pw-meter-bar span:nth-child(2) { background: var(--status-bad); }
.pw-meter[data-level="3"] .pw-meter-bar span:nth-child(-n+3) { background: var(--status-warn); }
.pw-meter[data-level="4"] .pw-meter-bar span:nth-child(-n+4),
.pw-meter[data-level="5"] .pw-meter-bar span { background: var(--status-ok); }
.pw-meter-label { color: var(--ink-600); }
.pw-rules { list-style: none; padding: 0; margin: 0 0 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; color: var(--ink-600); }
.pw-rules li { position: relative; padding-left: 20px; }
.pw-rules li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line-strong); }
.pw-rules li[data-state="ok"] { color: var(--ok-ink); }
.pw-rules li[data-state="ok"]::before { background: var(--status-ok); border-color: var(--status-ok); }
.pw-rules li[data-state="bad"] { color: var(--bad-ink); }
.pw-rules li[data-state="bad"]::before { border-color: var(--status-bad); }
@media (max-width: 575.98px) { .pw-rules { grid-template-columns: minmax(0, 1fr); } }
.captcha-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.captcha-img { border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: #fff; cursor: pointer; max-width: 100%; height: auto; }
.captcha-input { flex: 1 1 160px; min-width: 0; }
.consent-box .form-check + .form-check, .consent-box .mb-3 + .mb-3 { margin-top: 8px; }
.result-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--brand-100); color: var(--brand-600); margin-bottom: 16px; }
.result-icon .ms { font-size: 34px; }
.result-icon.ok { background: color-mix(in srgb, var(--level-5) 16%, transparent); color: var(--ok-ink); }
.result-icon.bad { background: color-mix(in srgb, var(--level-1) 12%, transparent); color: var(--bad-ink); }
.result-list { color: var(--ink-600); padding-left: 1.2em; }
.draft-note { display: flex; gap: 8px; align-items: center; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--level-3) 18%, transparent); color: var(--warn-ink); font-weight: 600; font-size: .9rem; }
.legal-text h2 { font-size: 1rem; margin: 20px 0 6px; color: var(--heading); }
.legal-text p, .legal-text li { color: var(--ink-600); font-size: .92rem; }
.legal-text .table-wrap { margin: 8px 0 10px; overflow-x: auto; }
.legal-text table { font-size: .88rem; margin: 0; }
.legal-text table th, .legal-text table td { vertical-align: top; color: var(--ink-600); }
.legal-text table th { color: var(--heading); font-weight: 600; white-space: nowrap; }
.legal-text blockquote { margin: 8px 0 0; padding: 12px 16px; border-left: 3px solid var(--brand-600); background: var(--bg); border-radius: var(--radius-sm); font-size: .9rem; }
.auth .form-actions { justify-content: space-between; }
@media (max-width: 900px) {
  .auth .form-actions { position: static; margin: 8px 0 0; padding: 16px 0 0; background: transparent; }
}

/* ---------- articles (frontend /articles, ArticleController) ---------- */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0 0 10px; font-size: .85rem; color: var(--ink-600); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--ink-400); }
.crumbs a { color: var(--ink-600); }
.crumbs a:hover { color: var(--brand-600); }
.art-bg .crumbs, .art-bg .crumbs a { color: #AFC2F5; }
.art-bg .crumbs li + li::before { color: #7C8FC4; }
.articles-hero h1 small { font-size: .55em; font-weight: 500; color: #AFC2F5; }
.article-search { display: flex; align-items: center; gap: 8px; max-width: 560px; margin-top: 24px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); }
.article-search:focus-within { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }
.article-search .ms { color: #AFC2F5; }
.article-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font-size: 1rem; outline: none; padding: 6px 0; }
.article-search input::placeholder { color: #9FB0DC; }
.article-search .btn { border-radius: 999px; }
.articles-section { padding-top: 40px; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; scrollbar-width: thin; }
.cat-chips a { flex: 0 0 auto; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-600); font-size: .9rem; }
.cat-chips a:hover { border-color: var(--brand-600); color: var(--brand-600); text-decoration: none; }
.cat-chips a.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--brand-600); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.post-card-cover { display: block; aspect-ratio: 1.91 / 1; overflow: hidden; background: var(--bg); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-art { display: grid; place-items: center; width: 100%; height: 100%; }
.post-card-art .ms { font-size: 44px; color: #F4C45A; opacity: .85; }
.post-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.post-cat { align-self: flex-start; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--brand-600); }
.post-card .post-card-title { margin: 0; font-size: 1.08rem; line-height: 1.45; }
.post-card-title a { color: var(--heading); }
.post-card-title a:hover { color: var(--brand-600); text-decoration: none; }
.post-card-excerpt { margin: 0; color: var(--ink-600); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: auto; color: var(--ink-400); font-size: .82rem; }
.post-card .post-meta { gap: 6px; padding-top: 4px; }
.post-meta .ms { font-size: 17px; vertical-align: -3px; margin-right: 4px; }
.post-pager { margin-top: 40px; }
.post-empty { text-align: center; padding: 48px 16px; color: var(--ink-600); }
.post-empty > .ms { font-size: 48px; color: var(--brand-600); }
.post-empty h2 { font-size: 1.2rem; margin: 10px 0 6px; color: var(--heading); }

.preview-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; background: color-mix(in srgb, var(--level-3) 22%, var(--surface)); color: var(--warn-ink); font-weight: 600; font-size: .9rem; text-align: center; }
.wrap.narrow { max-width: 820px; }
.post-header { padding: 40px 0 24px; }
.post-header h1 { margin: 6px 0 14px; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.3; color: var(--heading); }
.post-lead { font-size: 1.12rem; color: var(--ink-600); margin: 0 0 18px; }
.post-header .post-meta { margin-top: 0; font-size: .88rem; color: var(--ink-600); }
.post-author { font-weight: 500; color: var(--ink-900); }
.post-cover { margin: 0 auto 8px; max-width: 1040px; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); background: var(--bg); }
.post-layout { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 48px; padding-top: 32px; padding-bottom: 56px; }
.post-layout.has-toc { grid-template-columns: 240px minmax(0, 760px); }
.post-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: .88rem; }
.post-toc summary { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--heading); cursor: pointer; margin-bottom: 10px; list-style: none; }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc ol { list-style: none; padding: 0 0 0 12px; margin: 0; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.post-toc li.lv3 { padding-left: 14px; font-size: .84rem; }
.post-toc a { color: var(--ink-600); display: block; line-height: 1.45; }
.post-toc a:hover, .post-toc a.active { color: var(--brand-600); text-decoration: none; }

.prose { font-size: 1.06rem; line-height: 1.85; color: var(--ink-900); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose pre, .prose .table-wrap, .prose .embed { margin: 0 0 1.25em; }
.prose h2, .prose h3, .prose h4 { color: var(--heading); line-height: 1.4; scroll-margin-top: 90px; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 .7em; }
.prose h3 { font-size: 1.2rem; margin: 1.6em 0 .6em; }
.prose h4 { font-size: 1.05rem; margin: 1.4em 0 .5em; }
.prose a { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.prose figure { text-align: center; }
.prose figcaption { margin-top: 8px; font-size: .88rem; color: var(--ink-600); }
.prose blockquote { padding: 14px 20px; border-left: 4px solid var(--accent-500); background: var(--bg); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--ink-600); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose pre { padding: 14px 16px; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line); overflow-x: auto; font-size: .9rem; }
.prose code { font-size: .92em; }
.prose hr { margin: 2.2em 0; border-color: var(--line); opacity: 1; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th, .prose tr:first-child th { background: var(--bg); color: var(--heading); }
.prose tr:last-child td { border-bottom: 0; }
.prose .embed { position: relative; aspect-ratio: 16 / 9; }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-md); }

.post-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-tags > .ms { color: var(--ink-400); }
.post-tags a { padding: 4px 12px; border-radius: 999px; background: var(--brand-100); color: var(--brand-ink, var(--brand-600)); font-size: .85rem; }
.post-tags a:hover { text-decoration: none; filter: brightness(.96); }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-share-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--heading); margin-right: 4px; }
.post-share .btn .ms { font-size: 18px; vertical-align: -4px; }
.related-posts h2 { margin: 0 0 24px; }

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-layout.has-toc { grid-template-columns: minmax(0, 760px); gap: 24px; }
  .post-toc { position: static; max-height: none; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); }
  .post-toc summary { margin-bottom: 0; }
  .post-toc details[open] summary { margin-bottom: 10px; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-header { padding-top: 24px; }
  .post-cover { padding: 0; }
  .post-cover img { border-radius: 0; }
  .prose { font-size: 1.02rem; }
  .article-search .btn { padding-inline: 14px; }
}

/* ---------- footer ---------- */
.site-footer { background: #0B1F4B; color: #9FB0DC; padding: 48px 0 28px; font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer img { height: 36px; width: auto; }
.site-footer h4 { color: #fff; font-size: .9rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer .legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .split, .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 112px 0 64px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collage { max-width: 560px; }
}
@media (max-width: 640px) {
  .features, .steps, .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .hero { padding: 96px 0 48px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .collage { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .collage .glass, .collage .glass.wide { grid-column: auto; margin: 0 !important; }
  .collage .glass:nth-child(n+4) { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .page-hero { padding: 96px 0 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav, .feature, .post-card { transition: none; }
}
.auth-wrap .code { font: 700 3.5rem/1 var(--font-num); color: var(--brand-600); }
