/* ==========================================================================
   CraftBox 3D — /guides
   Standalone styles for the acquisition guides. Kept out of the Tailwind build
   so guide pages can be edited without regenerating the site bundle. Existing
   header/footer utilities and theme-toggle behaviour are reused as-is.
   ========================================================================== */

:root {
    --guide-bg: #0b1220;
    --guide-bg-elevated: #0f172a;
    --guide-surface: #111c31;
    --guide-surface-2: #16233c;
    --guide-surface-3: #1b2a46;
    --guide-border: rgba(148, 163, 184, 0.2);
    --guide-border-strong: rgba(148, 163, 184, 0.34);
    --guide-text: #e8eefb;
    --guide-body: #c6d2e6;
    --guide-muted: #94a3b8;
    --guide-faint: #6f819b;
    --guide-blue: #60a5fa;
    --guide-blue-strong: #2563eb;
    --guide-blue-deep: #1d4ed8;
    --guide-blue-soft: rgba(37, 99, 235, 0.14);
    --guide-blue-line: rgba(96, 165, 250, 0.36);
    --guide-green: #34d399;
    --guide-green-soft: rgba(16, 185, 129, 0.12);
    --guide-amber: #fbbf24;
    --guide-amber-soft: rgba(245, 158, 11, 0.13);
    --guide-red: #fb7185;
    --guide-red-soft: rgba(244, 63, 94, 0.12);
    --guide-shadow: 0 24px 60px -32px rgba(2, 8, 23, 0.9);
    --guide-radius: 20px;
    --guide-radius-sm: 14px;
    --guide-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --guide-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

html[data-theme="light"] {
    --guide-bg: #f6f8fc;
    --guide-bg-elevated: #ffffff;
    --guide-surface: #ffffff;
    --guide-surface-2: #f2f5fa;
    --guide-surface-3: #e9eef7;
    --guide-border: rgba(15, 23, 42, 0.12);
    --guide-border-strong: rgba(15, 23, 42, 0.2);
    --guide-text: #0f172a;
    --guide-body: #334155;
    --guide-muted: #55657c;
    --guide-faint: #6b7a90;
    --guide-blue: #1d4ed8;
    --guide-blue-strong: #2563eb;
    --guide-blue-deep: #1e40af;
    --guide-blue-soft: rgba(37, 99, 235, 0.08);
    --guide-blue-line: rgba(37, 99, 235, 0.3);
    --guide-green: #047857;
    --guide-green-soft: rgba(5, 150, 105, 0.09);
    --guide-amber: #b45309;
    --guide-amber-soft: rgba(217, 119, 6, 0.1);
    --guide-red: #be123c;
    --guide-red-soft: rgba(225, 29, 72, 0.08);
    --guide-shadow: 0 24px 60px -36px rgba(15, 23, 42, 0.28);
}

[hidden] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

body.guides-page > nav.fixed {
    top: 0;
    left: 0;
    right: 0;
}

body.guides-page {
    margin: 0;
    padding-top: 64px;
    min-height: 100vh;
    background: var(--guide-bg);
    color: var(--guide-text);
    font-family: var(--guide-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.guides-page a {
    color: var(--guide-blue);
}

body.guides-page img,
body.guides-page svg {
    max-width: 100%;
}

body.guides-page :focus-visible {
    outline: 2px solid var(--guide-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

.guide-skip-link {
    position: absolute;
    left: 16px;
    top: 8px;
    z-index: 200;
    transform: translateY(-160%);
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--guide-blue-strong);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.guide-skip-link:focus {
    transform: translateY(0);
}

.guide-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 24px;
}

.guide-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--guide-border);
    background:
        radial-gradient(58% 70% at 82% 0%, var(--guide-blue-soft), transparent 68%),
        radial-gradient(48% 60% at 10% 12%, rgba(99, 102, 241, 0.12), transparent 70%),
        var(--guide-bg-elevated);
}

.guide-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--guide-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--guide-border) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.22;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.guide-hero > .guide-wrap {
    position: relative;
    z-index: 1;
    padding-block: 34px 42px;
}

.guide-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: var(--guide-muted);
}

.guide-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.guide-breadcrumbs li + li::before {
    content: "/";
    color: var(--guide-faint);
}

.guide-breadcrumbs a {
    color: var(--guide-muted);
    text-decoration: none;
}

.guide-breadcrumbs a:hover {
    color: var(--guide-blue);
}

.guide-breadcrumbs [aria-current="page"] {
    color: var(--guide-text);
    font-weight: 600;
}

.guide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 0;
    padding: 6px 12px;
    border: 1px solid var(--guide-blue-line);
    border-radius: 999px;
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-hero h1 {
    max-width: 980px;
    margin: 18px 0 0;
    color: var(--guide-text);
    font-size: clamp(2.1rem, 4.6vw, 3.55rem);
    line-height: 1.07;
    letter-spacing: -0.035em;
    font-weight: 800;
    text-wrap: balance;
}

.guide-dek {
    max-width: 780px;
    margin: 20px 0 0;
    color: var(--guide-body);
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    line-height: 1.65;
}

.guide-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin: 24px 0 0;
    color: var(--guide-muted);
    font-size: 0.86rem;
}

.guide-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.guide-meta svg {
    width: 15px;
    height: 15px;
    color: var(--guide-faint);
}

.guide-tldr {
    position: relative;
    max-width: 980px;
    margin: 30px 0 0;
    padding: 22px 26px 22px 28px;
    border: 1px solid var(--guide-blue-line);
    border-left: 4px solid var(--guide-blue);
    border-radius: var(--guide-radius-sm);
    background: linear-gradient(120deg, var(--guide-blue-soft), transparent 70%), var(--guide-surface);
    box-shadow: var(--guide-shadow);
}

.guide-tldr h2 {
    margin: 0 0 12px;
    color: var(--guide-text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-tldr ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.guide-tldr li {
    position: relative;
    padding-left: 26px;
    color: var(--guide-body);
    font-size: 0.96rem;
    line-height: 1.55;
}

.guide-tldr li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.34em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--guide-blue-soft);
    border: 1px solid var(--guide-blue-line);
}

.guide-tldr li::after {
    content: "";
    position: absolute;
    left: 5.5px;
    top: 0.63em;
    width: 7px;
    height: 4px;
    border-left: 2px solid var(--guide-blue);
    border-bottom: 2px solid var(--guide-blue);
    transform: rotate(-45deg);
}

.guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 56px;
    align-items: start;
    padding-block: 48px 88px;
}

.guide-main {
    min-width: 0;
}

.guide-sidebar {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 18px;
    max-height: calc(100vh - 108px);
    overflow: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

/* --- Table of contents --------------------------------------------------- */

.guide-toc {
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-surface);
    padding: 18px 18px 16px;
}

.guide-toc-title {
    margin: 0 0 10px;
    color: var(--guide-faint);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 2px;
}

.guide-toc a {
    display: block;
    padding: 7px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 8px 8px 0;
    color: var(--guide-muted);
    font-size: 0.83rem;
    line-height: 1.35;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.guide-toc a:hover {
    color: var(--guide-text);
    background: var(--guide-surface-2);
}

.guide-toc a.is-active {
    border-left-color: var(--guide-blue);
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
    font-weight: 650;
}

.guide-toc-item--sub a {
    padding-left: 22px;
    font-size: 0.79rem;
}

.guide-toc--mobile {
    display: none;
}

.guide-mobile-toc {
    display: none;
    margin: 0 0 30px;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-surface);
    overflow: hidden;
}

.guide-mobile-toc > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    color: var(--guide-text);
    font-size: 0.92rem;
    font-weight: 700;
    list-style: none;
}

.guide-mobile-toc > summary::-webkit-details-marker {
    display: none;
}

.guide-mobile-toc > summary svg {
    width: 18px;
    height: 18px;
    color: var(--guide-muted);
    transition: transform 0.18s ease;
}

.guide-mobile-toc[open] > summary svg {
    transform: rotate(180deg);
}

.guide-mobile-toc .guide-toc {
    border: 0;
    border-top: 1px solid var(--guide-border);
    border-radius: 0;
    background: transparent;
}

/* --- Sidebar CTA --------------------------------------------------------- */

.sidebar-cta {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--guide-blue-line);
    border-radius: var(--guide-radius);
    background:
        radial-gradient(120% 100% at 100% 0%, var(--guide-blue-soft), transparent 62%),
        var(--guide-surface);
    padding: 22px 20px;
    box-shadow: var(--guide-shadow);
}

.sidebar-cta::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--guide-blue), #818cf8);
}

.sidebar-cta h2 {
    margin: 0 0 8px;
    color: var(--guide-text);
    font-size: 1.12rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.sidebar-cta p {
    margin: 0 0 16px;
    color: var(--guide-muted);
    font-size: 0.83rem;
    line-height: 1.55;
}

.sidebar-cta .guide-btn {
    width: 100%;
}

.sidebar-cta-note {
    margin: 12px 0 0 !important;
    color: var(--guide-faint) !important;
    font-size: 0.72rem !important;
}

.sidebar-trust {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    color: var(--guide-muted);
    font-size: 0.76rem;
}

.sidebar-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-trust svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: var(--guide-green);
}

/* --- Article prose ------------------------------------------------------- */

.guide-prose {
    min-width: 0;
    color: var(--guide-body);
    font-size: 1.03rem;
    line-height: 1.78;
}

.guide-prose > * {
    margin-top: 0;
    margin-bottom: 0;
}

.guide-prose > * + * {
    margin-top: 1.05em;
}

.guide-prose h2 {
    margin-top: 2.5em;
    margin-bottom: 0.55em;
    scroll-margin-top: 94px;
    color: var(--guide-text);
    font-size: clamp(1.55rem, 2.8vw, 2.1rem);
    line-height: 1.18;
    letter-spacing: -0.025em;
    font-weight: 780;
    text-wrap: balance;
}

.guide-prose h3 {
    margin-top: 1.9em;
    margin-bottom: 0.45em;
    scroll-margin-top: 94px;
    color: var(--guide-text);
    font-size: clamp(1.16rem, 2vw, 1.4rem);
    line-height: 1.3;
    letter-spacing: -0.015em;
    font-weight: 720;
}

.guide-prose p {
    color: var(--guide-body);
}

.guide-prose strong {
    color: var(--guide-text);
    font-weight: 680;
}

.guide-prose em {
    color: var(--guide-text);
}

.guide-prose a:not(.guide-btn):not(.app-callout-link) {
    color: var(--guide-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.guide-prose a:not(.guide-btn):not(.app-callout-link):hover {
    color: var(--guide-text);
}

.guide-prose ul,
.guide-prose ol {
    padding-left: 1.45em;
}

.guide-prose ul {
    list-style: disc;
}

.guide-prose ol {
    list-style: decimal;
}

.guide-prose li {
    display: list-item;
}

.guide-prose li + li {
    margin-top: 0.48em;
}

.guide-prose li::marker {
    color: var(--guide-blue);
}

.guide-prose blockquote {
    margin: 1.6em 0;
    padding: 18px 22px;
    border-left: 3px solid var(--guide-amber);
    border-radius: 0 var(--guide-radius-sm) var(--guide-radius-sm) 0;
    background: var(--guide-amber-soft);
    color: var(--guide-body);
}

.guide-prose blockquote p {
    margin: 0;
}

.guide-prose code {
    padding: 0.14em 0.4em;
    border: 1px solid var(--guide-border);
    border-radius: 6px;
    background: var(--guide-surface-2);
    color: var(--guide-text);
    font-family: var(--guide-mono);
    font-size: 0.88em;
}

.guide-prose hr {
    height: 1px;
    margin: 2.6em 0;
    border: 0;
    background: var(--guide-border);
}

.guide-section-heading {
    margin-top: 2.6em;
    margin-bottom: 1.2em;
    scroll-margin-top: 94px;
}

.guide-section-heading h2 {
    margin-top: 0.2em;
}

.guide-kicker {
    margin: 0;
    color: var(--guide-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-lede {
    color: var(--guide-body);
    font-size: 1.1rem;
    line-height: 1.65;
}

/* --- Tables -------------------------------------------------------------- */

.guide-table-wrap {
    margin: 1.5em 0;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius-sm);
    overflow-x: auto;
    background: var(--guide-surface);
    -webkit-overflow-scrolling: touch;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    line-height: 1.45;
    min-width: 640px;
}

.guide-table caption {
    padding: 14px 16px 0;
    color: var(--guide-muted);
    font-size: 0.8rem;
    text-align: left;
}

.guide-table th,
.guide-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--guide-border);
    text-align: left;
    vertical-align: top;
}

.guide-table th {
    background: var(--guide-surface-2);
    color: var(--guide-text);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.guide-table td {
    color: var(--guide-body);
}

.guide-table tr:last-child td {
    border-bottom: 0;
}

.guide-table strong {
    color: var(--guide-text);
}

.guide-table .is-best {
    color: var(--guide-text);
    font-weight: 700;
}

.guide-table--compare {
    table-layout: fixed;
    min-width: 660px;
    font-size: 0.79rem;
}

.guide-table--compare th,
.guide-table--compare td {
    padding: 10px 9px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.guide-table--compare th:nth-child(1) { width: 15%; }
.guide-table--compare th:nth-child(2) { width: 14%; }
.guide-table--compare th:nth-child(3) { width: 21%; }
.guide-table--compare th:nth-child(4) { width: 22%; }
.guide-table--compare th:nth-child(5) { width: 15%; }
.guide-table--compare th:nth-child(6) { width: 13%; }

.guide-table .cell-note {
    display: block;
    margin-top: 4px;
    color: var(--guide-faint);
    font-size: 0.76rem;
}

/* --- Callouts, specs and formulas --------------------------------------- */

.guide-callout {
    margin: 1.7em 0;
    padding: 20px 22px;
    border: 1px solid var(--guide-border);
    border-left: 3px solid var(--guide-blue);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-surface);
}

.guide-callout--tip {
    border-left-color: var(--guide-green);
    background: var(--guide-green-soft);
}

.guide-callout--warn {
    border-left-color: var(--guide-amber);
    background: var(--guide-amber-soft);
}

.guide-callout h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.guide-callout p:last-child,
.guide-callout ul:last-child {
    margin-bottom: 0;
}

.guide-callout ul {
    margin-bottom: 0;
}

.spec-block {
    margin: 1.6em 0;
    border: 1px solid var(--guide-border-strong);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-bg-elevated);
    overflow: hidden;
    box-shadow: var(--guide-shadow);
}

.spec-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--guide-border);
    background: var(--guide-surface-2);
}

.spec-block-head span {
    color: var(--guide-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.spec-block pre {
    margin: 0;
    padding: 18px 16px;
    overflow-x: auto;
    color: var(--guide-text);
    font-family: var(--guide-mono);
    font-size: 0.85rem;
    line-height: 1.65;
    tab-size: 4;
}

.spec-block pre code {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid var(--guide-border-strong);
    border-radius: 8px;
    background: var(--guide-surface);
    color: var(--guide-muted);
    font-family: var(--guide-font);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.copy-btn:hover {
    color: var(--guide-text);
    border-color: var(--guide-blue-line);
    background: var(--guide-blue-soft);
}

.copy-btn svg {
    width: 13px;
    height: 13px;
}

.copy-btn.is-copied {
    color: var(--guide-green);
    border-color: var(--guide-green);
    background: var(--guide-green-soft);
}

.copy-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.2em 0;
}

.copy-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--guide-border);
    border-radius: 999px;
    background: var(--guide-surface);
    color: var(--guide-text);
    font-size: 0.82rem;
}

.copy-chip code {
    border: 0;
    background: none;
    padding: 0;
    font-size: 0.82rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.copy-chip .copy-btn {
    margin-left: 2px;
    padding: 4px 7px;
    font-size: 0.66rem;
}

/* --- App CTA callout cards ---------------------------------------------- */

.app-callout {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 18px;
    margin: 2.1em 0;
    padding: 24px;
    border: 1px solid var(--guide-blue-line);
    border-radius: var(--guide-radius);
    background:
        radial-gradient(110% 130% at 100% 0%, var(--guide-blue-soft), transparent 60%),
        var(--guide-surface);
    box-shadow: var(--guide-shadow);
    overflow: hidden;
}

.app-callout::after {
    content: "";
    position: absolute;
    top: -42px;
    right: -42px;
    width: 150px;
    height: 150px;
    border: 1px solid var(--guide-blue-line);
    border-radius: 50%;
    opacity: 0.35;
    pointer-events: none;
}

.app-callout-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--guide-blue-line);
    border-radius: 14px;
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
}

.app-callout-icon svg {
    width: 26px;
    height: 26px;
}

.app-callout-eyebrow {
    margin: 0 0 6px;
    color: var(--guide-blue);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-callout h3 {
    margin: 0 0 8px;
    color: var(--guide-text);
    font-size: 1.22rem;
    line-height: 1.32;
    letter-spacing: -0.015em;
}

.app-callout-body > p:not(.app-callout-eyebrow):not(.app-callout-note) {
    margin: 0 0 16px;
    color: var(--guide-body);
    font-size: 0.94rem;
    line-height: 1.6;
}

.app-callout-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.app-callout-note {
    margin: 12px 0 0;
    color: var(--guide-faint);
    font-size: 0.75rem;
    line-height: 1.5;
}

/* --- Buttons ------------------------------------------------------------- */

.guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-family: var(--guide-font);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.guide-btn svg {
    width: 16px;
    height: 16px;
}

.guide-btn:hover {
    transform: translateY(-1px);
}

.guide-btn--primary {
    background: var(--guide-blue-strong);
    color: #ffffff !important;
    box-shadow: 0 12px 30px -14px rgba(37, 99, 235, 0.9);
}

.guide-btn--primary:hover {
    background: var(--guide-blue-deep);
}

.guide-btn--secondary {
    border-color: var(--guide-border-strong);
    background: var(--guide-surface-2);
    color: var(--guide-text) !important;
}

.guide-btn--secondary:hover {
    border-color: var(--guide-blue-line);
    background: var(--guide-surface-3);
}

.guide-btn--ghost {
    color: var(--guide-muted) !important;
}

.guide-btn--ghost:hover {
    color: var(--guide-text) !important;
}

/* --- Interactive kerf calculator ---------------------------------------- */

.kerf-calculator {
    margin: 2.1em 0;
    border: 1px solid var(--guide-border-strong);
    border-radius: var(--guide-radius);
    background:
        linear-gradient(150deg, var(--guide-blue-soft), transparent 52%),
        var(--guide-surface);
    overflow: hidden;
    box-shadow: var(--guide-shadow);
    scroll-margin-top: 94px;
}

.kerf-calculator-head {
    padding: 22px 24px 0;
}

.kerf-calculator-head h3 {
    margin: 0 0 6px;
    color: var(--guide-text);
    font-size: 1.28rem;
    letter-spacing: -0.015em;
}

.kerf-calculator-head p {
    margin: 0;
    color: var(--guide-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.kerf-calculator-body {
    padding: 18px 24px 24px;
}

.kerf-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kerf-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--guide-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.kerf-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.kerf-field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 52px 10px 14px;
    border: 1px solid var(--guide-border-strong);
    border-radius: 11px;
    background: var(--guide-bg-elevated);
    color: var(--guide-text);
    font-family: var(--guide-mono);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.kerf-field input:focus {
    border-color: var(--guide-blue);
    outline: none;
    box-shadow: 0 0 0 3px var(--guide-blue-soft);
}

.kerf-unit {
    position: absolute;
    right: 12px;
    color: var(--guide-faint);
    font-size: 0.75rem;
    pointer-events: none;
}

.kerf-field-help {
    margin: 6px 0 0;
    color: var(--guide-faint);
    font-size: 0.72rem;
    line-height: 1.45;
}

.kerf-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.kerf-result {
    padding: 14px;
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    background: var(--guide-bg-elevated);
}

.kerf-result-label {
    display: block;
    margin-bottom: 4px;
    color: var(--guide-faint);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.kerf-result output {
    display: block;
    color: var(--guide-text);
    font-family: var(--guide-mono);
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.kerf-result--primary {
    border-color: var(--guide-blue-line);
    background: var(--guide-blue-soft);
}

.kerf-result--primary output {
    color: var(--guide-blue);
}

.kerf-fit-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    background: var(--guide-surface-2);
    color: var(--guide-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.kerf-fit-note strong {
    color: var(--guide-text);
}

.kerf-calculator-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 16px;
}

.kerf-calculator-actions .guide-btn {
    flex: 1 1 260px;
}

.kerf-calculator-footnote {
    margin: 12px 0 0;
    color: var(--guide-faint);
    font-size: 0.72rem;
    line-height: 1.5;
}

/* --- Comparison slider --------------------------------------------------- */

.guide-figure {
    margin: 2em 0;
}

.guide-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--guide-border-strong);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-bg-elevated);
    box-shadow: var(--guide-shadow);
}

.guide-figure figcaption {
    margin-top: 10px;
    color: var(--guide-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.guide-figure figcaption strong {
    color: var(--guide-text);
}

.compare-figure {
    margin: 2em 0;
}

.compare-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--guide-border-strong);
    border-radius: var(--guide-radius-sm);
    background: #f8fafc;
    overflow: hidden;
    user-select: none;
    touch-action: pan-y;
}

.compare-stage:focus-within {
    outline: 2px solid var(--guide-blue);
    outline-offset: 3px;
}

.compare-layer {
    position: absolute;
    inset: 0;
    background: #f8fafc;
}

.compare-layer svg,
.compare-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-layer--after {
    clip-path: inset(0 0 0 var(--compare-pos, 50%));
}

.compare-stage--photos {
    aspect-ratio: 16 / 10;
    background: #ffffff;
}

.compare-stage--photos .compare-layer {
    background: #ffffff;
}

.compare-stage--photos .compare-layer img {
    object-fit: contain;
}

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--compare-pos, 50%);
    z-index: 3;
    width: 2px;
    background: #2563eb;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.compare-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    border: 2px solid #2563eb;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
    transform: translate(-50%, -50%);
}

.compare-handle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6-6 6 6 6'/%3E%3Cpath d='m15 6 6 6-6 6'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
    transform: translate(-50%, -50%);
}

.compare-range {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
}

.compare-tag {
    position: absolute;
    top: 12px;
    z-index: 5;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.compare-tag--before {
    left: 12px;
    background: #fff1f2;
    color: #be123c;
}

.compare-tag--after {
    right: 12px;
    background: #ecfdf5;
    color: #047857;
}

.compare-figure figcaption {
    margin-top: 10px;
    color: var(--guide-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.compare-figure figcaption strong {
    color: var(--guide-text);
}

.compare-expand + .compare-expand {
    margin-left: 14px;
}

.compare-expand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--guide-blue);
    font: inherit;
    font-size: 0.79rem;
    font-weight: 700;
    cursor: pointer;
}

.compare-expand svg {
    width: 14px;
    height: 14px;
}

/* --- Downloads ----------------------------------------------------------- */

.download-grid {
    display: grid;
    gap: 12px;
}

.download-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 1.2em 0;
    padding: 18px;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-surface);
}

.download-card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--guide-border);
    border-radius: 11px;
    background: var(--guide-surface-2);
    color: var(--guide-blue);
}

.download-card-icon svg {
    width: 22px;
    height: 22px;
}

.download-card-format {
    margin: 0 0 2px;
    color: var(--guide-blue);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.download-card-body h3 {
    margin: 0 0 4px;
    color: var(--guide-text);
    font-size: 0.98rem;
}

.download-card-body p {
    margin: 0;
    color: var(--guide-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.download-card-meta {
    margin-top: 4px !important;
    color: var(--guide-faint) !important;
    font-family: var(--guide-mono);
    font-size: 0.7rem !important;
}

.download-card-btn {
    white-space: nowrap;
}

/* --- FAQ ----------------------------------------------------------------- */

.guide-faq {
    margin: 1.4em 0 0;
    border-top: 1px solid var(--guide-border);
}

.guide-faq-item {
    border-bottom: 1px solid var(--guide-border);
}

.guide-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 2px;
    cursor: pointer;
    color: var(--guide-text);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.45;
    list-style: none;
}

.guide-faq-item summary::-webkit-details-marker {
    display: none;
}

.guide-faq-item summary svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--guide-muted);
    transition: transform 0.18s ease;
}

.guide-faq-item[open] summary svg {
    transform: rotate(180deg);
    color: var(--guide-blue);
}

.guide-faq-answer {
    padding: 0 34px 18px 2px;
}

.guide-faq-answer p {
    margin: 0;
    color: var(--guide-body);
    font-size: 0.93rem;
    line-height: 1.7;
}

/* --- Related guides and templates --------------------------------------- */

.guide-related {
    margin-top: 3.2em;
    padding-top: 2.4em;
    border-top: 1px solid var(--guide-border);
}

.related-guides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1.4em;
}

.related-guide-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-surface);
    color: var(--guide-text) !important;
    text-decoration: none !important;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-guide-card:hover {
    border-color: var(--guide-blue-line);
    transform: translateY(-2px);
}

.related-guide-card-media {
    display: block;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: var(--guide-surface-2);
}

.related-guide-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-guide-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px 16px;
}

.related-guide-card-kicker {
    color: var(--guide-blue);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.related-guide-card-body strong {
    color: var(--guide-text);
    font-size: 0.98rem;
    line-height: 1.35;
}

.related-guide-card-body > span:last-child {
    color: var(--guide-faint);
    font-size: 0.75rem;
}

.related-guide-card--plain {
    justify-content: center;
    border-style: dashed;
    background: transparent;
}

.related-guide-card--plain .related-guide-card-body {
    gap: 8px;
}

.related-guide-card--plain a {
    color: var(--guide-blue);
    font-size: 0.83rem;
    font-weight: 700;
    text-decoration: none;
}

.related-templates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.related-template {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    background: var(--guide-surface);
    color: var(--guide-text) !important;
    text-decoration: none !important;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-template:hover {
    border-color: var(--guide-blue-line);
    transform: translateY(-2px);
}

.related-template-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
}

.related-template-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-template-open {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.84);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.related-template-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px 12px;
}

.related-template-body strong {
    color: var(--guide-text);
    font-size: 0.85rem;
    line-height: 1.3;
}

.related-template-body span {
    color: var(--guide-faint);
    font-size: 0.7rem;
}

/* --- Mobile launch bar --------------------------------------------------- */

.mobile-launch {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--guide-border-strong);
    background: rgba(11, 18, 32, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateY(110%);
    transition: transform 0.22s ease;
}

html[data-theme="light"] .mobile-launch {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -10px 30px -20px rgba(15, 23, 42, 0.5);
}

.mobile-launch.is-visible {
    transform: translateY(0);
}

.mobile-launch-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.mobile-launch-copy strong {
    display: block;
    color: var(--guide-text);
    font-size: 0.8rem;
    line-height: 1.2;
}

.mobile-launch-copy span {
    display: block;
    margin-top: 2px;
    color: var(--guide-muted);
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-launch .guide-btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding-inline: 14px;
    font-size: 0.8rem;
}

/* --- Lightbox ------------------------------------------------------------ */

.guide-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.guide-lightbox.is-open {
    display: flex;
}

.guide-lightbox-panel {
    position: relative;
    width: min(1200px, 96vw);
    max-height: 92vh;
    overflow: auto;
    border: 1px solid var(--guide-border-strong);
    border-radius: var(--guide-radius);
    background: #ffffff;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
}

.guide-lightbox-content {
    display: grid;
    place-items: center;
    padding: 18px;
    background: #f8fafc;
}

.guide-lightbox-content img,
.guide-lightbox-content svg {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 78vh;
    height: auto;
}

.guide-lightbox-caption {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.8rem;
}

.guide-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.guide-lightbox-close:hover {
    background: #f1f5f9;
}

/* --- Hub ----------------------------------------------------------------- */

.guides-hub-hero {
    text-align: center;
}

.guides-hub-hero .guide-breadcrumbs ol {
    justify-content: center;
}

.guides-hub-hero h1 {
    margin-inline: auto;
}

.guides-hub-hero .guide-dek {
    margin-inline: auto;
}

.guides-hub-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.guides-hub-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    margin-top: 24px;
    padding: 0;
    list-style: none;
    color: var(--guide-muted);
    font-size: 0.8rem;
}

.guides-hub-stats li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.guides-hub-stats svg {
    width: 15px;
    height: 15px;
    color: var(--guide-green);
}

.guides-index {
    padding-block: 46px 88px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 18px 20px;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius);
    background: var(--guide-surface);
    box-shadow: var(--guide-shadow);
}

.filter-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.filter-group-label {
    margin-right: 2px;
    color: var(--guide-faint);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-pill {
    padding: 7px 12px;
    border: 1px solid var(--guide-border);
    border-radius: 999px;
    background: var(--guide-surface-2);
    color: var(--guide-muted);
    font-family: var(--guide-font);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.filter-pill:hover {
    color: var(--guide-text);
    border-color: var(--guide-border-strong);
}

.filter-pill[aria-pressed="true"] {
    border-color: var(--guide-blue-line);
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
}

.filter-count {
    color: var(--guide-faint);
    font-size: 0.76rem;
    white-space: nowrap;
}

.guide-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius);
    background: var(--guide-surface);
    box-shadow: var(--guide-shadow);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.guide-card:hover {
    border-color: var(--guide-blue-line);
    transform: translateY(-3px);
}

.guide-card-media {
    position: relative;
    display: block;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: var(--guide-surface-2);
}

.guide-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.guide-card:hover .guide-card-media img {
    transform: scale(1.025);
}

.guide-card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.guide-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 10px;
    padding: 20px 22px 22px;
}

.guide-card-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.guide-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid var(--guide-border);
    border-radius: 999px;
    background: var(--guide-surface-2);
    color: var(--guide-muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.guide-tag--skill {
    border-color: var(--guide-blue-line);
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
}

.guide-card h2 {
    margin: 0;
    color: var(--guide-text);
    font-size: 1.28rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.guide-card h2 a {
    color: var(--guide-text) !important;
    text-decoration: none !important;
}

.guide-card h2 a:hover {
    color: var(--guide-blue) !important;
}

.guide-card p {
    margin: 0;
    color: var(--guide-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.guide-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
    color: var(--guide-faint);
    font-size: 0.75rem;
}

.guide-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--guide-blue);
    font-weight: 700;
    text-decoration: none;
}

.guide-card-footer svg {
    width: 14px;
    height: 14px;
}

.guides-empty {
    margin-top: 28px;
    padding: 36px 24px;
    border: 1px dashed var(--guide-border-strong);
    border-radius: var(--guide-radius);
    color: var(--guide-muted);
    text-align: center;
    font-size: 0.92rem;
}

.guides-value-section {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--guide-border);
}

.guides-value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.value-card {
    padding: 20px;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-surface);
}

.value-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border: 1px solid var(--guide-blue-line);
    border-radius: 10px;
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
}

.value-card-icon svg {
    width: 20px;
    height: 20px;
}

.value-card h3 {
    margin: 0 0 6px;
    color: var(--guide-text);
    font-size: 1rem;
}

.value-card p {
    margin: 0;
    color: var(--guide-muted);
    font-size: 0.83rem;
    line-height: 1.6;
}

.guides-cta-band {
    position: relative;
    margin-top: 56px;
    overflow: hidden;
    padding: 34px;
    border: 1px solid var(--guide-blue-line);
    border-radius: var(--guide-radius);
    background:
        radial-gradient(80% 140% at 100% 0%, var(--guide-blue-soft), transparent 60%),
        var(--guide-surface);
    box-shadow: var(--guide-shadow);
}

.guides-cta-band h2 {
    margin: 0 0 10px;
    color: var(--guide-text);
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.guides-cta-band p {
    max-width: 640px;
    margin: 0 0 18px;
    color: var(--guide-muted);
    line-height: 1.65;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1023px) {
    .guide-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding-block: 32px 64px;
    }

    .guide-sidebar {
        display: none;
    }

    .guide-toc--desktop {
        display: none;
    }

    .guide-toc--mobile {
        display: block;
    }

    .guide-mobile-toc {
        display: block;
    }

    .mobile-launch {
        display: flex;
    }

    body.guides-page {
        padding-bottom: 76px;
    }

    .guide-hero > .guide-wrap {
        padding-block: 26px 34px;
    }

    .guide-tldr {
        padding: 20px;
    }

    .related-templates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .guide-wrap {
        padding-inline: 18px;
    }

    .guide-hero h1 {
        font-size: clamp(1.9rem, 8vw, 2.55rem);
    }

    .guide-layout {
        padding-block: 26px 52px;
    }

    .kerf-fields,
    .kerf-results {
        grid-template-columns: minmax(0, 1fr);
    }

    .kerf-results {
        gap: 8px;
    }

    .kerf-result {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 11px 13px;
    }

    .kerf-result-label {
        margin-bottom: 0;
    }

    .kerf-result output {
        font-size: 1.1rem;
    }

    .app-callout {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding: 20px;
    }

    .app-callout-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .app-callout-icon svg {
        width: 22px;
        height: 22px;
    }

    .download-card {
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: start;
    }

    .download-card-icon {
        width: 40px;
        height: 40px;
    }

    .download-card-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .related-guides,
    .related-templates,
    .guide-card-grid,
    .guides-value-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .guide-card-grid {
        gap: 16px;
    }

    .related-guides {
        gap: 10px;
    }

    .filter-bar {
        padding: 14px;
    }

    .filter-groups {
        gap: 12px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-pill {
        padding: 6px 10px;
        font-size: 0.74rem;
    }

    .guide-tldr li {
        font-size: 0.9rem;
    }

    .guide-prose {
        font-size: 1rem;
        line-height: 1.72;
    }

    .guide-prose h2 {
        margin-top: 2.1em;
    }

    .guides-cta-band {
        padding: 24px 20px;
    }

    .compare-stage {
        aspect-ratio: 4 / 3;
    }

    .compare-handle::after {
        width: 32px;
        height: 32px;
    }

    .compare-tag {
        top: 8px;
        padding: 4px 7px;
        font-size: 0.58rem;
    }

    .compare-tag--before {
        left: 8px;
    }

    .compare-tag--after {
        right: 8px;
    }

    .guide-lightbox {
        padding: 10px;
    }

    .guide-lightbox-content {
        padding: 10px;
    }
}

@media (max-width: 420px) {
    .mobile-launch-copy span {
        display: none;
    }

    .app-callout-actions,
    .kerf-calculator-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .app-callout-actions .guide-btn,
    .kerf-calculator-actions .guide-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .guide-btn,
    .guide-card,
    .related-guide-card,
    .related-template,
    .mobile-launch,
    .guide-card-media img {
        transition: none !important;
    }

    .guide-btn:hover,
    .guide-card:hover,
    .related-guide-card:hover,
    .related-template:hover {
        transform: none !important;
    }
}

@media print {
    body.guides-page {
        padding: 0;
        background: #fff;
        color: #000;
    }

    .guide-sidebar,
    .mobile-launch,
    .guide-lightbox,
    .guide-skip-link,
    nav,
    footer,
    .app-callout,
    .kerf-calculator,
    .compare-expand {
        display: none !important;
    }

    .guide-layout {
        display: block;
        padding: 0;
    }

    .guide-prose {
        color: #000;
    }

    .guide-prose h2,
    .guide-prose h3 {
        color: #000;
        break-after: avoid;
    }

    .guide-tldr,
    .spec-block,
    .guide-table-wrap {
        box-shadow: none;
    }
}

/* --- Interactive tutorial articles -------------------------------------- */

.guide-card-badge--accent {
    background: var(--guide-blue-strong);
}

.guide-tutorial-steps {
    display: grid;
    gap: 18px;
    margin: 1.9em 0 2.2em;
}

.guide-tutorial-step {
    position: relative;
    padding: 20px 22px 21px;
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius-sm);
    background: var(--guide-surface);
    box-shadow: var(--guide-shadow);
    scroll-margin-top: 94px;
}

.guide-tutorial-step-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 11px;
}

.guide-tutorial-step-head h3 {
    margin: 2px 0 0;
    color: var(--guide-text);
    font-size: 1.12rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.guide-tutorial-step-number {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--guide-blue-line);
    border-radius: 10px;
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
    font-family: var(--guide-mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.guide-tutorial-step-body {
    padding-left: 47px;
    color: var(--guide-body);
    font-size: 0.98rem;
    line-height: 1.7;
}

.guide-tutorial-step-body p {
    margin: 0 0 0.8em;
    color: var(--guide-body);
}

.guide-tutorial-step-body p:last-child {
    margin-bottom: 0;
}

.guide-tutorial-step-body ul,
.guide-tutorial-step-body ol {
    margin: 0 0 0.8em;
}

.guide-tutorial-tip {
    margin: 15px 0 0 47px;
    padding: 14px 16px;
}

.guide-tutorial-tip p {
    margin: 0;
}

.guide-tutorial-step .tutorial-ui {
    display: inline-flex;
    align-items: center;
    padding: 0 5px;
    border: 1px solid var(--guide-border-strong);
    border-radius: 5px;
    background: var(--guide-surface-2);
    color: var(--guide-text);
    font-size: 0.8em;
    font-weight: 680;
    line-height: 1.45;
    white-space: nowrap;
}

.app-callout--tutorial .app-callout-icon {
    color: var(--guide-blue);
}

@media (max-width: 700px) {
    .guide-tutorial-step {
        padding: 17px 16px 18px;
    }

    .guide-tutorial-step-body,
    .guide-tutorial-tip {
        padding-left: 0;
    }

    .guide-tutorial-tip {
        margin-left: 0;
    }

    .guide-tutorial-step-number {
        width: 29px;
        height: 29px;
        border-radius: 8px;
        font-size: 0.66rem;
    }

    .guide-tutorial-step-head h3 {
        font-size: 1.02rem;
    }
}

/* Keyboard / mouse cheatsheet keys and grouped tables */
.guide-kbd {
    display: inline-block;
    min-width: 1.65em;
    padding: 2px 6px;
    border: 1px solid var(--guide-border-strong);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--guide-surface-2);
    color: var(--guide-text);
    font-family: var(--guide-mono);
    font-size: 0.8em;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

.guide-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.guide-shortcut > span {
    color: var(--guide-muted);
    font-size: 0.8em;
}

.guide-table tr.guide-table-group th {
    background: var(--guide-surface-2);
    color: var(--guide-blue);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.guide-table-note {
    color: var(--guide-muted);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
