/* Public reading surfaces use the existing AETERNIA appearance and assets. */
:root {
    color-scheme: dark;
    --guide-text: #f2eee8;
    --guide-muted: #b5b3b0;
    --guide-accent: #c48749;
    --guide-bronze: #b87333;
    --guide-accent-text: #14110d;
    --guide-panel: #181818;
    --guide-soft: rgba(255, 255, 255, 0.045);
    --guide-border: rgba(255, 255, 255, 0.13);
    --guide-line: rgba(255, 255, 255, 0.09);
    --guide-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    --guide-page-bg: #050505;
    --guide-bg-image: url('/static/assets/bg/bg_final.webp?v=20260425');
}

html[data-theme="light"] {
    color-scheme: light;
    --guide-text: #202222;
    --guide-muted: #5d6063;
    --guide-accent: #98602e;
    --guide-bronze: #a56833;
    --guide-accent-text: #fff;
    --guide-panel: #f3f3f3;
    --guide-soft: rgba(30, 30, 30, 0.035);
    --guide-border: rgba(0, 0, 0, 0.12);
    --guide-line: rgba(0, 0, 0, 0.09);
    --guide-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

html[data-appearance="zephiria"] {
    --guide-text: #262329;
    --guide-muted: #655d65;
    --guide-accent: #98602e;
    --guide-bronze: #a56833;
    --guide-accent-text: #fff;
    --guide-panel: #fff4f2;
    --guide-soft: rgba(134, 69, 98, 0.05);
    --guide-border: rgba(119, 56, 86, 0.18);
    --guide-line: rgba(119, 56, 86, 0.12);
    --guide-page-bg: #c6b5e7;
    --guide-bg-image: url('/static/assets/bg/zephiria-bg.webp?v=20260903');
    --guide-shadow: 0 18px 60px rgba(93, 61, 121, 0.15);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body.guides-page {
    min-height: 100vh;
    margin: 0;
    color: var(--guide-text);
    background: var(--guide-page-bg);
    font: 16px/1.75 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.guides-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: var(--guide-bg-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

a { color: inherit; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible {
    outline: 2px solid var(--guide-accent);
    outline-offset: 5px;
    border-radius: 4px;
}
::selection { background: var(--guide-accent); color: var(--guide-accent-text); }
h1, h2, h3, .guides-brand, .guides-footer-brand {
    font-family: Outfit, Inter, system-ui, sans-serif;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 3.5vw, 47px); line-height: 1.15; letter-spacing: -0.035em; }
h2 { line-height: 1.3; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.4; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; height: auto; }

.guide-skip-link {
    position: absolute;
    top: 8px;
    left: 16px;
    z-index: 10;
    padding: 9px 14px;
    transform: translateY(-150%);
    background: var(--guide-panel);
    border: 1px solid var(--guide-accent);
    border-radius: 12px;
}
.guide-skip-link:focus { transform: translateY(0); }

.guides-header, .guides-shell, .guides-footer {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}
.guides-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 134px;
    padding-block: 28px;
}
.guides-brand {
    flex: 0 1 auto;
    color: #fff;
    font-size: clamp(25px, 3.4vw, 39px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    text-decoration: none;
    white-space: nowrap;
}
.guides-brand-zephiria { display: none; width: 260px; }
html[data-appearance="zephiria"] .guides-brand-classic { display: none; }
html[data-appearance="zephiria"] .guides-brand-zephiria { display: block; }
.guides-header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px;
    color: var(--guide-text);
    background: var(--guide-panel);
}
.guides-header-nav a {
    padding: 10px 17px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}
.guides-header-nav a:hover { background: var(--guide-soft); }
.guides-header-nav .guides-cabinet-link { background: var(--guide-soft); }
.guides-cabinet-link span { margin-left: 6px; color: var(--guide-accent); }

.guide-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 4px 22px;
    color: #dedbd7;
    font-size: 13px;
    line-height: 1.55;
}
.guide-breadcrumbs ol { display: contents; list-style: none; }
.guide-breadcrumbs li { display: inline; }
.guide-breadcrumbs a { color: #fff; }
.guide-breadcrumbs [aria-current="page"] { opacity: 0.8; }
.guides-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    align-items: start;
    gap: 24px;
}
.guides-layout:has(> .guide-sidebar:empty), .guides-index .guides-layout { grid-template-columns: minmax(0, 1fr); }
.guide-sidebar:empty { display: none; }
.guide-main, .guide-sidebar { min-width: 0; }
.guide-main, .guide-toc, .guide-card, .guide-hero {
    border: 1px solid var(--guide-border);
    border-radius: 28px;
    background: var(--guide-panel);
    box-shadow: var(--guide-shadow);
}
.guide-main { padding: clamp(26px, 4vw, 48px); }
.guide-main > :last-child { margin-bottom: 0; }
.guides-article .guide-main { padding: 0; border: 0; background: none; box-shadow: none; }
.guides-article .guide-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    margin-bottom: 18px;
}
.guide-hero-icon, .guide-card-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 96px;
    height: 96px;
    border: 1px solid #dedede;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
}
.guide-hero-icon img, .guide-card-icon img { display: block; width: 70%; height: 70%; object-fit: contain; }
.guide-icon--google-flow, .guide-icon--grok { border-color: #292929; background: #050505; }
.guide-icon--google-flow img { width: 100%; height: 100%; }
.guide-icon--grok img { width: 72%; height: 72%; }
.guide-hero-copy { min-width: 0; }
.heroeyebrow, .guide-eyebrow, .guide-card-label {
    margin-bottom: 16px;
    color: var(--guide-accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.13em;
    line-height: 1.5;
    text-transform: uppercase;
}
.guide-hero h1 { margin-bottom: 8px; }
.guide-summary {
    max-width: 64ch;
    margin-bottom: 12px;
    color: var(--guide-muted);
    font-size: 17px;
    line-height: 1.75;
}
.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 0;
    color: var(--guide-muted);
    font-size: 12px;
    line-height: 1.6;
}
.guide-meta > span + span { border-left: 1px solid var(--guide-border); padding-left: 18px; }
.guide-section { margin-block: 0 18px; scroll-margin-top: 28px; }
.guide-section--card {
    padding: 26px 30px;
    border: 1px solid var(--guide-border);
    border-radius: 24px;
    background: var(--guide-panel);
}
.guide-section-index {
    margin-bottom: 10px;
    color: var(--guide-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}
.guide-section--steps > h2 { margin-bottom: 16px; color: #fff; }
.guide-step-list { display: grid; gap: 14px; padding: 0 !important; list-style: none; }
.guide-section .guide-step-list li {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 0;
    padding: 21px 24px;
    border: 1px solid var(--guide-border);
    border-radius: 22px;
    background: var(--guide-panel);
}
.guide-step-list li p { margin: 0; }
.guide-step-number {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--guide-bronze);
    border-radius: 50%;
    color: var(--guide-accent);
    font: 700 15px/1 Outfit, Inter, sans-serif;
}
.guide-section h2, .guide-faq > h2 { margin-bottom: 18px; font-size: 27px; }
.guide-section h3 { margin-block: 26px 12px; }
.guide-section p { margin-bottom: 16px; }
.guide-section ol, .guide-section ul { margin-block: 20px; padding-left: 24px; }
.guide-section li { padding-left: 5px; margin-bottom: 13px; }
.guide-section li::marker { color: var(--guide-accent); font-weight: 750; }
.guide-section a, .guide-faq a { overflow-wrap: anywhere; }
.guide-section .guide-links, .guide-section .guide-sources { font-size: 14px; }
.guide-section code, .guide-faq code {
    padding: 2px 5px;
    border: 1px solid var(--guide-line);
    border-radius: 6px;
    background: var(--guide-soft);
    font-size: 0.9em;
    overflow-wrap: anywhere;
}
.guide-section pre { max-width: 100%; overflow-x: auto; padding: 18px; background: var(--guide-soft); border-radius: 14px; }
.guide-section pre code { padding: 0; border: 0; background: none; }

.guide-sidebar { position: sticky; top: 24px; }
.guide-toc { padding: 24px; }
.guide-toc h2, .guide-toc h3, .guide-toc-title, .guide-toc > p {
    margin-bottom: 16px;
    color: var(--guide-muted);
    font: 700 11px/1.5 Inter, system-ui, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.guide-toc ol, .guide-toc ul { margin: 0; padding: 0; list-style: none; }
.guide-toc li + li { margin-top: 3px; }
.guide-toc a {
    display: block;
    padding: 9px 0;
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.guide-toc a:hover { color: var(--guide-accent); }
.guide-toc .btn-primary { width: 100%; margin-top: 18px; font-size: 12px; padding-inline: 10px; }
.guide-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    padding: 24px 28px;
    margin-block: 0 18px;
    border: 2px solid var(--guide-bronze);
    border-radius: 24px;
    background: var(--guide-panel);
}
.guide-cta-copy { flex: 1 1 260px; }
.guide-cta h2, .guide-cta h3 { margin-bottom: 6px; font-size: 24px; }
.guide-cta p { margin-bottom: 0; color: var(--guide-muted); font-size: 14px; line-height: 1.6; }
.guide-cta .guide-status:not(:empty) { flex-basis: 100%; }
.guide-cta-actions, .guide-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 12px 19px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
}
.btn-primary { color: var(--guide-accent-text); background: var(--guide-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { border-color: var(--guide-border); color: var(--guide-text); background: transparent; }
.btn-secondary:hover { background: var(--guide-soft); }
.guide-actions > a:not([class]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 19px;
    border: 1px solid var(--guide-border);
    border-radius: 13px;
    color: var(--guide-text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
}
.guide-actions > a:not([class]):hover { background: var(--guide-soft); }
.guide-cta .guide-cta-note { margin: 16px 0 0; font-size: 12px; }
.guide-faq { margin-block: 36px; }
.guide-faq details { padding: 18px 0; border-top: 1px solid var(--guide-line); }
.guide-faq details:last-child { border-bottom: 1px solid var(--guide-line); }
.guide-faq summary { padding-right: 8px; cursor: pointer; font-size: 15px; font-weight: 650; line-height: 1.6; }
.guide-faq summary::marker { color: var(--guide-accent); }
.guide-faq details p { margin: 14px 0 0; color: var(--guide-muted); font-size: 14px; line-height: 1.8; }

.guides-index .guide-main { padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
.guides-index .guide-hero { padding: clamp(28px, 4vw, 42px); margin-bottom: 28px; }
.guides-index .guide-hero h1 { max-width: 20ch; font-size: clamp(34px, 4vw, 52px); }
.guides-index .guide-summary { max-width: 64ch; }
.guide-group { margin-bottom: 32px; }
.guide-group > h2 { margin: 0 0 16px; color: #fff; font-size: 26px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.guide-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 230px;
    padding: 25px;
    color: var(--guide-text);
    text-align: center;
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease;
}
.guide-card:hover, .guide-card:focus-visible { border-color: var(--guide-bronze); transform: translateY(-2px); text-decoration: none; }
.guide-card-icon { margin-bottom: 18px; }
.guide-card-name { font: 700 24px/1.3 Outfit, Inter, sans-serif; letter-spacing: -.025em; }
.guide-related { margin-top: 42px; }
.guide-related > h2 { color: #fff; font-size: 26px; }
.guide-related .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-related .guide-card { min-height: 190px; padding: 22px; }
.guide-related .guide-card-icon { width: 72px; height: 72px; margin-bottom: 12px; }
.guide-related .guide-card-name { font-size: 20px; }

.guides-footer { padding-block: 42px 30px; color: #e4dfd7; font-size: 12px; text-align: center; }
.guides-footer-brand { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 0.13em; text-decoration: none; }
.guides-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-block: 14px; }
.guides-footer nav a { padding-block: 6px; }
.guides-footer p { color: #bcb8b4; }
html[data-appearance="zephiria"] .guide-breadcrumbs,
html[data-appearance="zephiria"] .guide-breadcrumbs a,
html[data-appearance="zephiria"] .guide-group > h2,
html[data-appearance="zephiria"] .guide-section--steps > h2,
html[data-appearance="zephiria"] .guide-related > h2,
html[data-appearance="zephiria"] .guides-footer,
html[data-appearance="zephiria"] .guides-footer-brand,
html[data-appearance="zephiria"] .guides-footer p { color: #3c3045; }

@media (max-width: 960px) {
    .guides-layout { grid-template-columns: minmax(0, 1fr); }
    .guide-sidebar { position: static; grid-row: 1; }
    .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guide-toc { padding: 20px 26px; }
    .guide-toc ol, .guide-toc ul { display: flex; flex-wrap: wrap; gap: 2px 22px; }
    .guide-toc a { padding-block: 5px; }
    .guide-toc .btn-primary { width: auto; }
    .guide-related .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .guides-header, .guides-shell, .guides-footer { width: calc(100% - 28px); }
    .guides-header { flex-direction: column; align-items: stretch; gap: 22px; padding-block: 27px 22px; }
    .guides-brand { align-self: center; font-size: 31px; }
    .guides-header-nav { justify-content: center; padding: 5px; }
    .guides-header-nav a { flex: 1 1 auto; padding: 11px 10px; text-align: center; font-size: 12px; }
    .guide-breadcrumbs { gap: 7px; padding: 0 4px 18px; font-size: 11px; }
    .guides-layout { gap: 16px; }
    .guide-sidebar { grid-row: auto; }
    .guide-main { padding: 27px 22px; border-radius: 24px; }
    .guides-article .guide-hero { align-items: flex-start; gap: 14px; padding: 22px; margin-bottom: 16px; }
    .guide-hero-icon { width: 62px; height: 62px; }
    h1 { font-size: 31px; letter-spacing: -0.035em; }
    .heroeyebrow, .guide-eyebrow { font-size: 10px; margin-bottom: 13px; }
    .guide-summary { font-size: 15px; line-height: 1.8; }
    .guide-meta { font-size: 11px; gap: 6px 12px; }
    .guide-meta > span + span { padding-left: 12px; }
    .guide-section { margin-bottom: 16px; }
    .guide-section--card { padding: 22px; }
    .guide-section .guide-step-list li { padding: 18px; }
    .guide-section h2, .guide-faq > h2 { font-size: 24px; }
    .guide-section { font-size: 15px; line-height: 1.85; }
    .guide-section ol, .guide-section ul { padding-left: 20px; }
    .guide-section li { padding-left: 3px; }
    .guide-toc { padding: 18px 22px; border-radius: 22px; }
    .guide-toc h2, .guide-toc h3, .guide-toc-title { margin-bottom: 9px; }
    .guide-toc ol, .guide-toc ul { gap: 0 16px; }
    .guide-toc a { font-size: 12px; }
    .guide-cta { padding: 22px 18px; margin-block: 0 16px; border-radius: 18px; }
    .guide-cta h2, .guide-cta h3 { font-size: 23px; }
    .guide-cta-actions, .guide-actions { flex-direction: column; }
    .guide-cta .btn-primary, .guide-cta .btn-secondary { width: 100%; }
    .guide-grid, .guide-related .guide-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .guide-card { min-height: 210px; padding: 25px 23px; border-radius: 24px; }
    .guide-card-icon { width: 86px; height: 86px; }
    .guide-card-name { font-size: 23px; }
    .guides-index .guide-hero { padding: 30px 25px; border-radius: 26px; margin-bottom: 20px; }
    .guides-index .guide-hero h1 { font-size: 35px; }
    .guide-related { margin-top: 30px; }
    .guide-group > h2, .guide-related > h2 { font-size: 24px; padding-inline: 4px; }
    .guides-footer { padding-top: 34px; }
    .guides-footer nav { column-gap: 18px; }
}

@media print {
    :root, html[data-theme="dark"], html[data-theme="light"] { color-scheme: light; --guide-text: #222; --guide-muted: #555; --guide-accent: #61472d; --guide-panel: #fff; --guide-border: #ddd; }
    body.guides-page { background: #fff; color: #222; }
    body.guides-page::before, .guides-header, .guide-sidebar, .guide-related, .guides-footer, .guide-skip-link { display: none; }
    .guides-shell { width: 100%; }
    .guides-layout { display: block; }
    .guide-main, .guide-card, .guide-hero { padding: 0; border: 0; box-shadow: none; }
    .guide-breadcrumbs, .guide-breadcrumbs a { color: #555; }
    .guide-faq details > * { display: block; }
    .guide-section, .guide-cta { break-inside: avoid; }
}
