:root {
    --orange: #FE5300;
    --orange-700: #c83f00;
    --ink: #111111;
    --ink-2: #2b2723;
    --paper: #FBFAF8;
    --surface: #ffffff;
    --line: #EBE7E0;
    --line-2: #ddd7cc;
    --muted: #6f6a62;
    --muted-2: #948e84;
    --tint: #FFF0E8;
    --tint-2: #ffe3d3;
    --code-bg: #f4f1ec;
    --radius: 14px;
    --sidebar-w: 284px;
    --header-h: 66px;
    --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 14px 34px -20px rgba(17, 17, 17, .16);
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-size: 15px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: "Poppins", sans-serif;
}

a {
    color: inherit
}

img {
    max-width: 100%;
    display: block
}

/* ---------- spark mark ---------- */
.spark {
    display: inline-block;
    color: var(--orange);
    flex: none
}

.spark svg {
    display: block;
    width: 100%;
    height: 100%
}

/* ---------- header ---------- */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 40;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(1.5) blur(10px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 clamp(14px, 3vw, 26px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    text-decoration: none
}

.brand img {
    height: 26px;
    width: auto
}

.brand .tag {
    font-family: "Poppins";
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    border-left: 1px solid var(--line-2);
    padding-left: 10px;
}

@media(max-width:560px) {
    .brand .tag {
        display: none
    }
}

.search {
    position: relative;
    flex: 1;
    max-width: 560px;
    margin-left: auto
}

.search input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line-2);
    border-radius: 11px;
    background: var(--surface);
    padding: 0 84px 0 42px;
    font-family: "Inter";
    font-size: 14.5px;
    color: var(--ink);
    transition: border-color .16s, box-shadow .16s;
}

.search input::placeholder {
    color: var(--muted-2)
}

.search input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(254, 83, 0, .14)
}

.search .ico {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--muted-2);
    pointer-events: none
}

.search kbd {
    position: absolute;
    right: 38px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Inter";
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: var(--code-bg);
    border: 1px solid var(--line-2);
    border-radius: 6px;
    padding: 2px 7px;
    pointer-events: none
}

.search .clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--muted-2);
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 17px;
    display: none;
    align-items: center;
    justify-content: center
}

.search .clear:hover {
    background: var(--code-bg);
    color: var(--ink)
}

.search.has-value .clear {
    display: flex
}

.search.has-value kbd {
    display: none
}

.menu-btn {
    display: none;
    flex: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--ink)
}

.menu-btn svg {
    width: 20px;
    height: 20px
}

/* ---------- layout ---------- */
.sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    max-width: 85vw;
    z-index: 30;
    background: var(--surface);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    padding: 22px 14px 60px;
    scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar {
    width: 8px
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--line-2);
    border-radius: 8px
}

.nav-group {
    margin-bottom: 22px
}

.nav-kicker {
    font-family: "Poppins";
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: 0 12px 6px;
    display: flex;
    align-items: center;
    gap: 8px
}

.nav-kicker .spark {
    width: 11px;
    height: 11px
}

.nav-group a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    transition: background .13s, color .13s
}

.nav-group a .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--line-2);
    flex: none;
    transition: background .13s, transform .13s
}

.nav-group a:hover {
    background: var(--paper);
    color: var(--ink)
}

.nav-group a.active {
    background: var(--tint);
    color: var(--orange-700);
    font-weight: 600
}

.nav-group a.active .dot {
    background: var(--orange);
    transform: scale(1.5)
}

.nav-hidden {
    display: none !important
}

.main {
    margin-left: var(--sidebar-w);
    padding: clamp(26px, 4vw, 54px) clamp(18px, 4vw, 60px) 100px;
    max-width: 920px;
}

.content-wrap {
    margin-top: var(--header-h)
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 46px
}

.hero .ghost {
    position: absolute;
    right: -40px;
    top: -56px;
    width: 230px;
    height: 230px;
    color: var(--tint-2);
    opacity: .9;
    z-index: 0;
    pointer-events: none
}

.hero .eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: "Poppins";
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--orange-700);
    background: var(--tint);
    border: 1px solid var(--tint-2);
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 20px
}

.hero .eyebrow .spark {
    width: 13px;
    height: 13px
}

.hero h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(30px, 5.4vw, 46px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 16px
}

.hero h1 em {
    font-style: normal;
    color: var(--orange)
}

.hero p.lead {
    position: relative;
    z-index: 1;
    font-size: 16.5px;
    color: var(--muted);
    max-width: 60ch;
    margin: 0
}

.hero .stats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px
}

.hero .stats span {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px
}

.hero .stats b {
    font-family: "Poppins";
    font-weight: 700;
    color: var(--orange)
}

/* ---------- groups & modules ---------- */
.group {
    margin-bottom: 12px
}

.group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 44px 0 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line)
}

.group-head .spark {
    width: 15px;
    height: 15px
}

.group-head h2 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0
}

.module {
    scroll-margin-top: calc(var(--header-h) + 20px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 32px);
    margin-top: 20px;
    box-shadow: var(--shadow)
}

.m-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px
}

.m-title h3 {
    font-size: clamp(20px, 3vw, 25px);
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0
}

.route {
    font-family: "Inter";
    font-size: 12.5px;
    font-weight: 600;
    color: var(--orange-700);
    background: var(--tint);
    border: 1px solid var(--tint-2);
    border-radius: 7px;
    padding: 3px 9px;
    letter-spacing: .01em
}

.m-lead {
    color: var(--muted);
    margin: 4px 0 20px;
    font-size: 15px
}

.module h4 {
    font-size: 15.5px;
    font-weight: 600;
    margin: 26px 0 10px;
    display: flex;
    align-items: center;
    gap: 9px
}

.module h4::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--orange);
    flex: none;
    transform: rotate(45deg)
}

.module p {
    margin: 0 0 12px
}

.module ul {
    margin: 0 0 14px;
    padding-left: 2px;
    list-style: none
}

.module ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 7px
}

.module ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tint-2);
    border: 1.5px solid var(--orange)
}

.module strong {
    font-weight: 600;
    color: var(--ink)
}

.module code,
.kbdlike {
    font-family: "Inter";
    font-weight: 600;
    font-size: .9em;
    background: var(--code-bg);
    border-radius: 6px;
    padding: 2px 7px;
    color: var(--ink)
}

.action {
    font-weight: 600;
    color: var(--orange-700);
    background: var(--tint);
    border-radius: 6px;
    padding: 1px 7px;
    white-space: nowrap
}

/* ---------- tables ---------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 11px;
    margin: 0 0 16px;
    -webkit-overflow-scrolling: touch
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 440px;
    font-size: 13.6px
}

thead th {
    background: var(--paper);
    text-align: left;
    font-family: "Poppins";
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 11px 14px;
    border-bottom: 1px solid var(--line)
}

tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top
}

tbody tr:last-child td {
    border-bottom: none
}

tbody tr:nth-child(even) {
    background: rgba(251, 250, 248, .6)
}

td:first-child {
    font-weight: 600;
    color: var(--ink)
}

/* ---------- callouts ---------- */
.callout {
    border-radius: 12px;
    padding: 15px 18px 15px 16px;
    margin: 18px 0;
    display: flex;
    gap: 13px;
    font-size: 14px;
    line-height: 1.55
}

.callout .ic {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px
}

.callout .ct-label {
    font-family: "Poppins";
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 3px
}

.callout.tip {
    background: var(--tint);
    border: 1px solid var(--tint-2)
}

.callout.tip .ic,
.callout.tip .ct-label {
    color: var(--orange-700)
}

.callout.warn {
    background: #fdf6e7;
    border: 1px solid #f2e2b8
}

.callout.warn .ic,
.callout.warn .ct-label {
    color: #a76a00
}

.callout.soon {
    background: #f4f2f0;
    border: 1px solid var(--line-2)
}

.callout.soon .ic,
.callout.soon .ct-label {
    color: var(--muted)
}

.callout p {
    margin: 0
}

.badge-soon {
    font-family: "Poppins";
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--code-bg);
    border: 1px solid var(--line-2);
    border-radius: 100px;
    padding: 3px 10px
}

/* ---------- paths (create work) ---------- */
.paths {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 6px 0 20px
}

.path {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    background: var(--paper)
}

.path .n {
    font-family: "Poppins";
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--orange)
}

.path p {
    margin: 0;
    font-size: 13.5px;
    color: var(--muted)
}

@media(max-width:540px) {
    .paths {
        grid-template-columns: 1fr
    }
}

/* ---------- status chips ---------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 16px
}

.chip {
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 100px;
    padding: 4px 12px;
    border: 1px solid var(--line-2);
    color: var(--ink-2);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    gap: 7px
}

.chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: .85
}

.chip.ok {
    color: #137a4b;
    border-color: #bfe6d0;
    background: #eefaf3
}

.chip.warn {
    color: #a76a00;
    border-color: #f2e2b8;
    background: #fdf6e7
}

.chip.bad {
    color: #c22f2f;
    border-color: #f0c9c9;
    background: #fdeeee
}

.chip.neutral {
    color: var(--muted);
    background: var(--code-bg)
}

.chip.orange {
    color: var(--orange-700);
    border-color: var(--tint-2);
    background: var(--tint)
}

/* ---------- search highlight & empty ---------- */
mark {
    background: var(--orange);
    color: #fff;
    border-radius: 4px;
    padding: 0 3px;
    font-weight: 600
}

.no-results {
    display: none;
    text-align: center;
    padding: 70px 20px;
    color: var(--muted)
}

.no-results.show {
    display: block
}

.no-results .spark {
    width: 46px;
    height: 46px;
    margin: 0 auto 18px;
    opacity: .5
}

.no-results h3 {
    font-size: 20px;
    margin: 0 0 6px;
    color: var(--ink)
}

.no-results p {
    margin: 0
}

.no-results b {
    color: var(--ink)
}

.result-count {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px
}

.result-count.show {
    display: flex
}

.result-count b {
    color: var(--orange-700);
    font-family: "Poppins"
}

/* ---------- footer ---------- */
.footer {
    margin-top: 40px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted-2);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between
}

.footer .brand-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted)
}

.footer .brand-mini .spark {
    width: 14px;
    height: 14px
}

/* ---------- overlay (mobile) ---------- */
.overlay {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(17, 17, 17, .4);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s
}

.overlay.show {
    opacity: 1;
    visibility: visible
}

/* ---------- responsive ---------- */
@media(max-width:900px) {
    :root {
        --sidebar-w: 270px
    }

    .menu-btn {
        display: flex
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform .24s ease;
        box-shadow: var(--shadow)
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .main {
        margin-left: 0;
        max-width: none
    }

    .search kbd {
        display: none
    }

    .search input {
        padding-right: 40px
    }
}

@media(max-width:620px) {
    body {
        font-size: 14.5px
    }

    .search {
        margin-left: 8px
    }

    .header {
        gap: 10px;
        padding: 0 12px
    }
}

@media(max-width:420px) {
    .header {
        gap: 8px;
        padding: 0 10px
    }

    .search {
        margin-left: 6px
    }

    .search input {
        padding-left: 36px;
        padding-right: 34px
    }

    .search .ico {
        left: 11px;
        width: 15px;
        height: 15px
    }

    .search .clear {
        right: 4px
    }

    .menu-btn {
        width: 38px;
        height: 38px
    }

    .hero .stats span {
        font-size: 12px;
        padding: 6px 11px
    }

    .module {
        padding: 16px 14px
    }

    table {
        font-size: 12.5px
    }

    thead th,
    tbody td {
        padding: 9px 11px
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important
    }
}

:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-radius: 6px
}