:root {
    color-scheme: dark;
    --bg: #13141c;
    --panel: #1c1e29;
    --ink: #f5f3f8;
    --muted: #b7b8c9;
    --line: #393a4b;
    --pink: #f1b3e6;
    --pink-ink: #32182e;
    --radius: 1rem;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; font-family: var(--gh-font-body, Inter, system-ui, sans-serif); }
a { color: var(--pink); text-underline-offset: .22em; }
a:hover { color: white; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--gh-font-heading, inherit); line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4.9vw, 3.5rem); }
h2 { font-size: clamp(1.26rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.12rem; }
.frame { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; padding: .5rem 1rem; background: var(--panel); }
.muted { color: var(--muted); }

.site-header { background: #191a24; border-bottom: 1px solid #2d2d3d; }
.nav { display: flex; gap: 1.25rem; align-items: center; min-height: 4.4rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 1.4rem; font-weight: 820; letter-spacing: -.06em; }
.brand-mark { display: grid; place-items: center; width: 2rem; aspect-ratio: 1; border-radius: .59rem; font-size: .86rem; font-weight: 900; letter-spacing: -.06em; background: linear-gradient(155deg, #f7c9e3, #be92fb); color: #29172e; }
.brand-secondary { color: var(--pink); }
.desktop-nav { display: flex; gap: clamp(1rem, 2.3vw, 2rem); margin-left: auto; }
.desktop-nav a, .mobile-nav a { display: inline-flex; align-items: center; color: var(--muted); min-height: 44px; text-decoration: none; font-weight: 600; }
.desktop-nav a:hover, .mobile-nav a:hover, .mobile-nav a[aria-current="page"] { color: var(--pink); }
.mobile-nav { display: none; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .58rem .95rem; border-radius: .59rem; border: 1px solid transparent; text-align: center; text-decoration: none; font-weight: 740; line-height: 1.2; }
.button-primary, .button-primary:hover { background: var(--pink); color: var(--pink-ink); }
.button-primary:hover { background: #ffd5f3; }
.button-secondary { border-color: #6a5570; background: #2b2135; color: var(--pink); }
.button-secondary:hover { background: #392c45; }

.hero {
    min-height: 25rem;
    display: flex;
    align-items: end;
    padding: 3.9rem 0 2.8rem;
    background:
        linear-gradient(90deg, #12111cf2 0%, #181421d6 28%, #21172555 69%, #14162419 100%),
        linear-gradient(0deg, #13141c 0%, #13141c00 48%),
        #211927 var(--hero-image) center 47% / cover no-repeat;
}
.hero-copy { max-width: 42rem; }
.hero h1 { font-size: clamp(2.35rem, 6.15vw, 4.75rem); font-weight: 800; line-height: 1.03; letter-spacing: -.055em; }
.hero p { margin: .85rem 0 1.2rem; color: #e5dce9; font-size: clamp(1rem, 1.7vw, 1.18rem); max-width: 34rem; }
.search-bar { display: flex; gap: .32rem; max-width: 40rem; padding: .3rem; border: 1px solid #6a526c; border-radius: .8rem; background: #1e1b29; }
.search-bar:focus-within { border-color: var(--pink); }
.search-bar input { flex: 1; min-width: 0; padding: .58rem .6rem; border: 0; color: var(--ink); background: transparent; }
input::placeholder, textarea::placeholder { color: #b7aec3; opacity: 1; }
.search-bar input:focus { outline: none; }
.hero-links { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-top: .65rem; }
.hero-links a, .filters a { padding: .42rem .66rem; border: 1px solid #5a465f; border-radius: 3rem; background: #241c2a; color: #f0def0; text-decoration: none; font-size: .85rem; }
.hero-links a:hover, .filters a:hover, .filters a[aria-current="true"] { background: #44314b; border-color: var(--pink); }

.front-sections { padding-bottom: 3rem; }
.section { margin-top: 1.6rem; }
.section + .section { margin-top: 2.2rem; }
.section > h2, .section-heading { margin-bottom: .95rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .7rem; }
.section-heading a { font-size: .86rem; white-space: nowrap; }
.category-grid, .guide-grid { display: grid; gap: .85rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-card { min-height: 8.5rem; position: relative; overflow: hidden; display: flex; align-items: end; border: 1px solid #55435a; border-radius: var(--radius); text-decoration: none; color: var(--ink); isolation: isolate; background: #2e2135; }
.category-card img, .category-card::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.category-card img { object-fit: cover; z-index: -2; }
.category-card::after { content: ""; background: linear-gradient(0deg, #11121bf5 0%, #15101c9f 46%, #20152744); z-index: -1; }
.category-card:hover { border-color: var(--pink); }
.category-card > div { padding: .8rem 1rem; }
.category-card p { margin-top: .2rem; font-size: .84rem; color: #e3dbe9; }
.guide-card, .panel, .side-card, .empty-state { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; }
.guide-card { display: flex; flex-direction: column; gap: .55rem; }
.guide-card h2 { font-size: 1.15rem; }
.guide-card h2 a { color: var(--ink); text-decoration: none; }
.guide-card h2 a:hover { color: var(--pink); text-decoration: underline; }
.guide-card p, .guide-card-meta { color: var(--muted); font-size: .86rem; }
.guide-label { color: var(--pink); font-size: .78rem; font-weight: 750; }
.guide-card-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem .6rem; margin-top: auto; padding-top: .55rem; }
.action-band { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem; border: 1px solid #65476b; border-radius: var(--radius); background: linear-gradient(110deg,#33243b,#1c1e29); }
.action-band p { margin: .3rem 0 0; color: #ded3e5; }

.page-wrap { padding-block: 2.8rem 4rem; min-height: 53vh; }
.page-heading { margin-bottom: 1.3rem; max-width: 49rem; }
.page-heading p { margin-top: .55rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .42rem; margin: .85rem 0; }
.filters a { display: inline-flex; align-items: center; min-height: 42px; }
.search-count { min-height: 1.55rem; margin: .45rem 0 .9rem; color: var(--muted); }
.empty-state p { margin: .55rem 0 .8rem; color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, 48rem) minmax(13.5rem, 1fr); gap: 2rem; padding-block: 2rem 3.5rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .6rem; color: var(--muted); font-size: .84rem; }
.article-header { margin-top: 1rem; }
.article-header h1 { margin-top: .35rem; font-size: clamp(2rem, 4.6vw, 3.2rem); overflow-wrap: anywhere; }
.article-meta { margin-top: .55rem; color: var(--muted); font-size: .9rem; }
.article-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.15rem 0; }
.quick-answer { border: 1px solid #7a5278; border-radius: .7rem; background: #2c2136; padding: 1rem 1.15rem; }
.quick-answer h2 { font-size: 1.2rem; }
.quick-answer p { margin-top: .42rem; }
.guide-body, .prose { max-width: 48rem; }
.guide-body h2, .prose h2 { margin-top: 1.6rem; margin-bottom: .65rem; }
.guide-body p, .prose p { margin-bottom: .7rem; }
.guide-body ol, .guide-body ul { padding-left: 1.35rem; }
.guide-body li { padding: .22rem .12rem; }
.guide-body a, .answer a { overflow-wrap: anywhere; }
.kg-width-wide { width: 100%; }
.kg-width-full { width: 100%; margin-inline: 0; }
.article-rail { padding-top: 2rem; }
.side-card + .side-card { margin-top: .75rem; }
.side-card h2, .panel h2 { font-size: 1.25rem; margin-bottom: .6rem; }
.side-card p { color: var(--muted); margin-bottom: .6rem; font-size: .89rem; }

.ask-layout { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(13.5rem, 1fr); align-items: start; gap: .9rem; }
.field { display: grid; gap: .24rem; margin-top: .75rem; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea, .checklist-form input {
    width: 100%; min-width: 0; min-height: 44px; padding: .55rem .68rem; border: 1px solid #5e536c; border-radius: .5rem; background: #171821; color: var(--ink);
}
.field textarea { resize: vertical; }
.form-context { border: 1px solid #67516e; border-radius: .5rem; background: #2a2236; padding: .5rem .65rem; }
.ask-controls { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: .75rem; }
.form-status { color: #f5b9cb; margin-top: .35rem; }
.form-status:empty { margin: 0; }
.example { display: block; text-align: left; width: 100%; min-height: 44px; background: #282331; color: var(--ink); border: 1px solid #44394d; border-radius: .5rem; padding: .45rem .6rem; margin-bottom: .48rem; }
.example:hover { border-color: var(--pink); }
.answer { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.2rem; }
.answer p { white-space: pre-line; margin-bottom: .65rem; }
.answer ul { padding-inline-start: 1.2rem; }

.playbook-grid, .pricing-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; align-items: start; }
.saved-answers { grid-column: 1 / -1; }
.list-row { padding: .5rem 0; display: flex; align-items: start; gap: .55rem; justify-content: space-between; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.list-row a { align-self: center; }
.list-row p { margin: .3rem 0; color: var(--muted); white-space: pre-line; }
.list-row label { display: flex; gap: .45rem; align-items: center; min-height: 44px; }
.list-row input { accent-color: var(--pink); }
.inline-button { border: 0; min-height: 44px; background: transparent; color: var(--pink); padding-inline: .3rem; }
.checklist-form { display: flex; gap: .4rem; margin-bottom: .6rem; }
.task-done { text-decoration: line-through; color: var(--muted); }
.playbook-grid .muted { margin-bottom: .55rem; }
.plan { height: 100%; }
.plan-pro { border-color: #875c88; background: linear-gradient(155deg,#312339,#1c1e29); }
.price { font-size: 2.2rem; font-weight: 780; }
.price span, .plan-state { color: var(--muted); font-size: .9rem; }
.plan ul { padding-left: 1.1rem; margin: .55rem 0 1rem; }

.site-footer { border-top: 1px solid #343447; padding: 1.35rem 0 2rem; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem 1rem; color: var(--muted); font-size: .85rem; }
.footer-content strong { color: var(--ink); }
.footer-content nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .8rem; }

@media (max-width: 800px) {
    .hero { min-height: 22rem; padding-block: 3rem 1.8rem; background-position: 53% 48%; }
    .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .article-rail { padding-top: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
    .article-rail .side-card { margin-top: 0; }
}

@media (max-width: 580px) {
    body { padding-bottom: calc(3.6rem + env(safe-area-inset-bottom)); }
    .frame { width: min(100% - 1.65rem, 72rem); }
    .nav { min-height: 3.65rem; justify-content: space-between; }
    .desktop-nav { display: none; }
    .mobile-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: fixed; z-index: 5; inset: auto 0 0; padding: .24rem .22rem env(safe-area-inset-bottom); background: #1a1b26; border-top: 1px solid #40384d; }
    .mobile-nav a { justify-content: center; font-size: .8rem; }
    .hero { min-height: 0; padding: 2.65rem 0 1.15rem; background-position: 60% center; }
    .hero h1 { max-width: 14ch; }
    .hero-break { display: none; }
    .hero p { margin: .65rem 0 .85rem; font-size: .95rem; }
    .hero-links a { display: inline-flex; align-items: center; min-height: 38px; padding: .22rem .55rem; font-size: .77rem; }
    .category-grid { grid-template-columns: 1fr; gap: .46rem; }
    .category-card { min-height: 4.65rem; align-items: center; }
    .category-card::after { background: linear-gradient(90deg, #15121de8 0%, #1b1424c7 55%, #2015273c); }
    .category-card > div { padding-block: .5rem; }
    .category-card p { margin-top: .12rem; }
    .section-heading { align-items: start; }
    .section-heading a { white-space: normal; text-align: right; }
    .guide-grid, .ask-layout, .playbook-grid, .pricing-grid, .article-rail { grid-template-columns: minmax(0, 1fr); }
    .action-band { align-items: start; flex-direction: column; }
    .page-wrap { padding-block: 1.6rem 2.75rem; }
    .article-layout { padding-top: 1.2rem; gap: 1.2rem; }
    .article-actions .button { flex: 1 1 auto; }
}
