:root {
    color-scheme: dark;
    --bg: #090d0b;
    --surface: #111713;
    --surface-raised: #182019;
    --line: #2b392d;
    --text: #edf5ee;
    --muted: #9eaca1;
    --green: #67d279;
    --green-dark: #153f1e;
    --amber: #f1bb54;
    --red: #ff8178;
    --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a { color: inherit; }

button, input, select, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(103, 210, 121, .35);
    outline-offset: 3px;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }

h1 { max-width: 850px; margin-bottom: 22px; font-size: clamp(2.65rem, 6vw, 5.3rem); }

h2 { margin-bottom: 14px; font-size: clamp(1.55rem, 3vw, 2.4rem); }

h3 { margin-bottom: 8px; font-size: 1.12rem; }

code, pre, .code-input {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code { overflow-wrap: anywhere; color: #b7eebf; }

.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.narrow { max-width: 820px; }

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 8px 12px;
    transform: translateY(-150%);
    border-radius: 6px;
    background: var(--green);
    color: #071109;
    font-weight: 800;
}

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

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(9, 13, 11, .9);
    backdrop-filter: blur(18px);
}

.header-inner, .footer-inner, .page-hero-actions, .card-heading, .key-row, .decision-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.header-inner { min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; }

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--green);
    border-radius: 9px;
    color: var(--green);
    font-size: .72rem;
    letter-spacing: .08em;
}

.primary-nav { display: flex; align-items: center; gap: 6px; }

.primary-nav a { padding: 8px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 700; }

.primary-nav a:hover, .primary-nav a.is-current { background: var(--surface-raised); color: var(--text); }

.hero {
    overflow: hidden;
    padding: clamp(70px, 10vw, 145px) 0;
    background:
        radial-gradient(circle at 72% 25%, rgba(103, 210, 121, .15), transparent 30%),
        linear-gradient(135deg, #0a100c 0%, #0c1710 50%, #080b09 100%);
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr); gap: clamp(44px, 8vw, 105px); align-items: center; }

.hero-copy, .page-hero > p, .page-hero > div > p { max-width: 750px; color: #b6c3b8; font-size: clamp(1.05rem, 2vw, 1.25rem); }

.eyebrow { margin-bottom: 12px; color: var(--green); font-size: .75rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }

.terminal-card { overflow: hidden; border: 1px solid #354b39; border-radius: 14px; background: #070b08; box-shadow: 0 28px 90px rgba(0,0,0,.45); }

.terminal-bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid #223027; background: #101711; }

.terminal-bar span { width: 9px; height: 9px; border-radius: 50%; background: #536157; }

.terminal-bar span:first-child { background: #ff8178; }

.terminal-bar span:nth-child(2) { background: #f1bb54; }

.terminal-bar span:last-child { background: var(--green); }

.terminal-card pre { overflow-x: auto; margin: 0; padding: 30px; color: #d8e6da; font-size: clamp(.75rem, 1.5vw, .92rem); line-height: 1.9; }

.button-row, .status-cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.row-actions { display: flex !important; grid-auto-flow: column; gap: 10px; align-items: center; }

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--green);
    border-radius: 7px;
    background: var(--green);
    color: #071109;
    cursor: pointer;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
}

.button:hover { filter: brightness(1.08); }

.button:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .55; }

.button-secondary { border-color: #425047; background: transparent; color: var(--text); }

.button-danger { border-color: #9a403b; background: #6f2925; color: #fff; }

.button-small { min-height: 36px; padding: 7px 12px; font-size: .84rem; }

.button-block { width: 100%; }

.button-link { padding: 4px; border: 0; background: transparent; color: var(--green); cursor: pointer; font-weight: 800; }

.button-link.danger { color: var(--red); }

.text-link { color: var(--green); font-weight: 800; text-decoration: none; }

.section { padding-block: clamp(55px, 7vw, 95px); }

.section-tint { border-block: 1px solid var(--line); background: var(--surface); }

.section-heading { max-width: 800px; margin-bottom: 34px; }

.step-grid, .publisher-grid, .market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.card, .market-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.card { padding: clamp(20px, 3vw, 30px); }

.card p:last-child { margin-bottom: 0; }

.step-number { display: grid; width: 38px; height: 38px; margin-bottom: 30px; place-items: center; border-radius: 50%; background: var(--green-dark); color: var(--green); font-weight: 900; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 100px); align-items: center; }

.code-links { display: grid; gap: 10px; }

.code-links a { display: grid; gap: 3px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: #0c110e; text-decoration: none; }

.code-links a:hover { border-color: var(--green); }

.code-links span, .muted, small { color: var(--muted); }

.callout { display: flex; align-items: center; justify-content: space-between; gap: 32px; }

.callout h2 { margin-bottom: 0; }

.page-hero { padding-top: clamp(65px, 9vw, 110px); padding-bottom: 35px; }

.page-hero h1 { margin-bottom: 15px; font-size: clamp(2.35rem, 5vw, 4.4rem); }

.page-hero-actions > div { min-width: 0; }

.flash { margin-top: 18px; padding: 13px 17px; border: 1px solid; border-radius: 8px; }

.flash ul { margin-bottom: 0; }

.flash-success { border-color: #326c3d; background: #102f17; color: #c4f4cc; }

.flash-warning { border-color: #8d6826; background: #382b12; color: #ffe5a8; }

.flash-error { border-color: #8f3f39; background: #3b1816; color: #ffd0cc; }

.docs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr) 190px; gap: clamp(25px, 4vw, 55px); padding-block: 50px 100px; align-items: start; }

.docs-sidebar, .docs-resources { position: sticky; top: 104px; display: grid; gap: 8px; }

.docs-sidebar nav { display: grid; gap: 3px; margin-bottom: 18px; }

.docs-sidebar nav a, .docs-resources a { padding: 7px 9px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: .9rem; }

.docs-sidebar nav a:hover, .docs-sidebar nav a.is-current, .docs-resources a:hover { background: var(--surface-raised); color: var(--text); }

.docs-resources h2 { margin-bottom: 6px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

.prose { min-width: 0; }

.prose h1 { margin-bottom: 28px; font-size: clamp(2.2rem, 4vw, 3.6rem); }

.prose h2 { margin-top: 50px; padding-top: 12px; border-top: 1px solid var(--line); }

.prose h3 { margin-top: 34px; }

.prose p, .prose li { color: #c4d0c6; }

.prose a { color: var(--green); }

.prose pre, details pre { max-width: 100%; overflow-x: auto; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #050806; color: #d5e7d8; font-size: .84rem; }

.prose :not(pre) > code { padding: 2px 5px; border: 1px solid #314035; border-radius: 4px; background: #111a14; }

.prose table { width: 100%; border-collapse: collapse; }

.prose th, .prose td { padding: 10px; border: 1px solid var(--line); text-align: left; }

.marketplace-layout { padding-top: 25px; }

.filter-bar, .inline-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; margin-bottom: 28px; align-items: end; }

label { display: grid; gap: 6px; color: #dbe5dc; font-size: .9rem; font-weight: 750; }

label > small { font-weight: 500; line-height: 1.4; }

input, select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #3a4b3e;
    border-radius: 7px;
    background: #090e0b;
    color: var(--text);
}

textarea { resize: vertical; }

input[type="file"] { padding: 8px; font-size: .82rem; }

fieldset { display: grid; gap: 10px; margin: 0 0 20px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; }

legend { padding-inline: 7px; font-weight: 800; }

.check-row { display: flex; align-items: center; gap: 10px; font-weight: 600; }

.check-row input { width: auto; min-height: 0; accent-color: var(--green); }

.market-card { display: grid; grid-template-columns: 58px 1fr; gap: 16px; padding: 22px; }

.market-card h2 { margin: 8px 0; font-size: 1.25rem; }

.market-card h2 a { text-decoration: none; }

.market-card h2 a:hover { color: var(--green); }

.market-card p { display: -webkit-box; overflow: hidden; margin-bottom: 15px; color: var(--muted); -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.extension-mark { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid #3d7145; border-radius: 12px; background: var(--green-dark); color: var(--green); font-size: 1.1rem; font-weight: 900; letter-spacing: .04em; }

.extension-mark-large { width: 82px; height: 82px; font-size: 1.4rem; }

.market-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .78rem; }

.badge, .status { display: inline-flex; width: fit-content; align-items: center; padding: 3px 8px; border: 1px solid #3b4b3f; border-radius: 99px; color: #c5d0c7; font-size: .7rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }

.status-trusted, .status-published, .status-approved, .status-active, .status-passed { border-color: #326d3c; background: #123019; color: #adf0b8; }

.status-pending, .status-submitted { border-color: #806026; background: #352811; color: #f4d285; }

.status-revoked, .status-rejected, .status-failed, .status-suspended { border-color: #833b36; background: #381714; color: #ffc0bb; }

.status-needs_changes, .status-draft { border-color: #4b5968; background: #18202a; color: #c5d2e0; }

.empty-state { padding: 65px 30px; border: 1px dashed #405045; border-radius: 12px; text-align: center; }

.empty-state p { color: var(--muted); }

.package-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }

.package-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }

.package-details { display: grid; gap: 10px; align-content: start; }

dl { margin: 0; }

dt { margin-top: 15px; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

dd { margin: 3px 0 0; overflow-wrap: anywhere; }

.permission-list { display: grid; gap: 7px; padding-left: 20px; }

.review { padding: 18px 0; border-bottom: 1px solid var(--line); }

.review:last-child { border-bottom: 0; }

.review-form { max-width: 850px; }

.review-form form, .form-stack, .stack { display: grid; gap: 18px; }

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

.publisher-card h2 { margin: 8px 0 3px; }

.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0; border-block: 1px solid var(--line); }

.metric-row div { display: grid; padding: 16px 10px; border-right: 1px solid var(--line); text-align: center; }

.metric-row div:last-child { border-right: 0; }

.metric-row strong { font-size: 1.6rem; }

.metric-row span { color: var(--muted); font-size: .78rem; }

.compact-list { display: grid; gap: 5px; }

.compact-list a, .list-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }

.compact-list a:last-child, .list-row:last-child { border-bottom: 0; }

.compact-list a span, .list-row > div { display: grid; }

.list-row > div:last-child { justify-items: end; text-align: right; }

.console-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .7fr); gap: 22px; padding-top: 25px; }

.console-grid-wide { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 22px; padding-top: 25px; }

.form-grid, .file-grid, .check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }

.file-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.form-stack hr { width: 100%; border: 0; border-top: 1px solid var(--line); }

.compact-form { margin-top: 20px; }

.inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }

.upload-form { margin-top: 22px; }

.notice, .copy-result { padding: 13px 15px; border: 1px solid #6c5727; border-radius: 7px; background: #2d2513; color: #eedcae; }

.notice-error { border-color: #83403a; background: #351816; color: #f8c7c3; }

.copy-result { display: grid; gap: 7px; margin: 16px 0; border-color: #326d3c; background: #102c16; color: #c4f4cc; }

.key-row { padding: 12px 0; border-bottom: 1px solid var(--line); }

.key-row > div { display: grid; }

.timeline-list { margin-top: 24px; }

.check-grid > div { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #0b100d; }

.check-grid span { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }

.event-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }

.event-list li { display: grid; grid-template-columns: 14px 1fr; gap: 14px; padding-bottom: 25px; }

.event-list li > span { width: 11px; height: 11px; margin-top: 6px; border: 2px solid var(--green); border-radius: 50%; box-shadow: 0 0 0 5px var(--green-dark); }

.event-list p { margin-bottom: 4px; color: var(--muted); }

.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-top: 25px; align-items: start; }

.review-column { min-width: 0; }

.queue-item { padding: 20px 0; border-bottom: 1px solid var(--line); }

.queue-item:last-child { border-bottom: 0; }

.queue-item > code { display: block; margin-bottom: 12px; font-size: .72rem; }

.decision-stack { display: grid; gap: 10px; margin-top: 16px; }

.decision-stack form { display: grid; gap: 7px; }

.decision-stack textarea { min-height: 70px; }

.decision-form { display: flex; gap: 8px; }

.decision-form input { min-height: 36px; }

.site-footer { margin-top: 60px; padding-block: 35px; border-top: 1px solid var(--line); color: var(--muted); }

.footer-inner p { margin: 4px 0 0; }

.footer-inner nav { display: flex; flex-wrap: wrap; gap: 16px; }

.footer-inner a { text-decoration: none; }

@media (max-width: 1000px) {
    .hero-grid, .split, .docs-layout, .package-layout, .console-grid, .console-grid-wide { grid-template-columns: 1fr; }
    .step-grid, .market-grid, .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .docs-sidebar, .docs-resources { position: static; }
    .docs-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .docs-resources { display: none; }
    .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .shell { width: min(calc(100% - 28px), var(--max)); }
    .site-header { position: static; }
    .header-inner, .footer-inner, .page-hero-actions, .callout { align-items: flex-start; flex-direction: column; }
    .primary-nav { width: 100%; overflow-x: auto; padding-bottom: 10px; }
    .primary-nav a { white-space: nowrap; }
    .hero-grid { grid-template-columns: 1fr; }
    .step-grid, .publisher-grid, .market-grid, .review-grid, .form-grid, .file-grid, .check-grid { grid-template-columns: 1fr; }
    .filter-bar, .inline-form { grid-template-columns: 1fr; }
    .package-hero { grid-template-columns: auto 1fr; }
    .package-hero form { grid-column: 1 / -1; }
    .compact-list a, .list-row { align-items: flex-start; flex-direction: column; }
    .list-row > div:last-child { justify-items: start; text-align: left; }
    .docs-sidebar nav { grid-template-columns: 1fr; }
}

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