/* SPDX-FileCopyrightText: 2026 Leelsey */
/* SPDX-License-Identifier: MIT */

:root {
    --bg:        light-dark(#eaeef3, #090c12);
    --panel:     light-dark(#ffffff, #141a24);
    --panel-2:   light-dark(#dde3ea, #1e2733);
    --fg:        light-dark(#11161f, #eef1f6);
    --fg-2:      light-dark(#333f4f, #c7cedb);
    --muted:     light-dark(#56637b, #8b96ab);
    --line:      light-dark(#cdd5e0, #242e3d);
    --line-2:    light-dark(#b4bfcf, #33404f);
    --accent:    light-dark(#1f5f7a, #6fb6d4);
    --accent-fg: light-dark(#ffffff, #10161a);
    --accent-sf: light-dark(#e4eef3, #1c2b33);
    --warn:      light-dark(#8a4b00, #dcab5c);
    --warn-bg:   light-dark(#fbeedd, #2b2416);
    --warn-line: light-dark(#e6cfa4, #4a3d20);
    --ok:        light-dark(#1c6a48, #63c398);
    --ok-bg:     light-dark(#e2f0e9, #152a21);
    --ok-line:   light-dark(#b7d8c8, #234434);
    --danger:    light-dark(#a32a1f, #ef8f85);
    --danger-bg: light-dark(#fae4e1, #2e1a18);
    --danger-line: light-dark(#e9bfba, #4f2e2b);

    --slate:     #1e3a4f;
    --amber:     #e8b455;

    --shadow-near: light-dark(rgba(17, 22, 31, .07), rgba(0, 0, 0, .4));
    --shadow-far:  light-dark(rgba(17, 22, 31, .34), rgba(0, 0, 0, .8));
    --shadow:      0 1px 2px var(--shadow-near), 0 6px 20px -14px var(--shadow-far);

    --radius:    7px;
    --mono:      ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --nav-h:     56px;
    --page-w:    860px;

    color-scheme: light dark;
}

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

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) { animation: none !important; }
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--fg);
    font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

p { text-wrap: pretty; }

code, kbd, pre { font-family: var(--mono); }

code {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .5px 5px;
    font-size: .88em;
}

pre {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}

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

pre:focus-visible { border-radius: var(--radius); }

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: var(--accent-fg);
    padding: 10px 16px;
    border-radius: 0 0 var(--radius) 0;
    z-index: 10;
}

.skip:focus { left: 0; }

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

.btn:focus-visible, .theme:focus-visible,
input[type="submit"]:focus-visible, button[type="submit"]:focus-visible { border-radius: var(--radius); }
.theme-option:focus-visible { outline-offset: -2px; border-radius: calc(var(--radius) - 2px); }

body > nav {
    flex: none;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
    height: var(--nav-h);
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}

body > nav .brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: auto;
    text-decoration: none;
    color: var(--fg);
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -.005em;
}

body > nav .brand:hover { text-decoration: none; }
body > nav .brand img { display: block; width: 26px; height: 26px; }

body > nav a { color: var(--accent); text-decoration: none; font-weight: 500; }
body > nav .links { display: flex; align-items: center; gap: 18px; }
body > nav [aria-current="page"] { color: var(--fg-2); }

.theme-wrap { position: relative; display: inline-flex; flex: none; }

.theme {
    background: var(--panel-2);
    color: var(--fg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    height: 30px;
    padding: 0 10px;
    font: inherit;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

.theme:hover { border-color: var(--line-2); }

.theme-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 2px;
    min-width: 132px;
    padding: 6px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.theme-menu[hidden] { display: none; }

.theme-option {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: calc(var(--radius) - 2px);
    background: none;
    color: var(--fg-2);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.theme-option:hover { background: var(--panel-2); color: var(--fg); }
.theme-option[aria-checked="true"] { color: var(--accent); font-weight: 600; }

@media (max-width: 640px) {
    body > nav { gap: 12px; padding: 0 16px; }
    body > nav .links { gap: 12px; font-size: 14px; }
    body > nav .links .wide { display: none; }
}

@media (max-width: 400px) {
    body > nav .brand { gap: 0; }
    body > nav .brand span { display: none; }
}

main {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 0 24px 72px;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -.015em; }
h1, h2, h3, h4 { text-wrap: balance; }

h1 { font-size: 34px; margin: 0 0 14px; }
h2 { font-size: 22px; margin: 0 0 6px; }
h3 { font-size: 16.5px; margin: 0 0 6px; }

main p { max-width: 68ch; }

.lede { font-size: 17px; color: var(--fg-2); margin: 0 0 8px; }
.sub  { color: var(--muted); margin: 0 0 22px; }

.eyebrow {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 46px; }
.actions.tight { margin: 20px 0 0; }

form { margin: 16px 0; }

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-2);
    margin-bottom: 5px;
}

.field { margin-bottom: 14px; }

input:is(:not([type]), [type="text"], [type="password"], [type="email"], [type="search"],
         [type="url"], [type="tel"], [type="number"], [type="date"]),
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--fg);
    font: inherit;
}

textarea { min-height: 150px; resize: vertical; line-height: 1.55; }

input[type="file"] { max-width: 100%; color: var(--fg-2); font: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

input:is(:not([type]), [type="text"], [type="password"], [type="email"], [type="search"],
         [type="url"], [type="tel"], [type="number"], [type="date"]):focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline-offset: 1px;
    border-color: var(--accent);
    border-radius: var(--radius);
}

.btn,
input[type="submit"],
button[type="submit"] {
    display: inline-block;
    padding: 9px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line-2);
    background: var(--panel);
    color: var(--fg);
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
}

button.btn,
input[type="submit"],
button[type="submit"] {
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
}

.btn:hover { text-decoration: none; border-color: var(--muted); }

.btn.primary,
input[type="submit"],
button[type="submit"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-fg);
}

.btn.primary:hover,
input[type="submit"]:hover,
button[type="submit"]:hover { filter: brightness(1.08); }

.cards { display: grid; gap: 14px; margin: 22px 0 0; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.card h3 { margin-top: 0; }
.card h3 code { font-size: .95em; background: none; border: 0; padding: 0; color: inherit; }

.card h3 a { color: var(--fg); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card p { margin: 0 0 10px; color: var(--fg-2); }
.card p:last-child { margin-bottom: 0; }

.card .meta {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 12px;
}

.tag {
    display: inline-block;
    padding: 1.5px 8px;
    border-radius: 20px;
    background: var(--accent-sf);
    color: var(--accent);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: 2px;
}

.tag.draft { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.tag.ready { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.tag.soon  { background: var(--panel-2); color: var(--muted); border-color: var(--line); }

.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tag-chips:empty { display: none; }

.tag-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--panel-2);
    color: var(--muted);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.scroll { overflow-x: auto; margin: 20px 0 0; }
.scroll:focus-visible { border-radius: var(--radius); }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

th, td {
    text-align: left;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th { background: var(--panel-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

.note {
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--panel);
    padding: 14px 18px;
    margin: 24px 0 0;
    color: var(--fg-2);
}

.note.warn {
    background: var(--warn-bg);
    border-color: var(--warn-line);
    border-left-color: var(--warn);
    color: var(--fg);
}

.note.ok {
    background: var(--ok-bg);
    border-color: var(--ok-line);
    border-left-color: var(--ok);
    color: var(--fg);
}

.note.danger {
    background: var(--danger-bg);
    border-color: var(--danger-line);
    border-left-color: var(--danger);
    color: var(--fg);
}

.note p { margin: 0 0 10px; }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--fg); }

.plain { list-style: none; padding: 0; margin: 18px 0 0; }
.plain li { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.plain li:last-child { border-bottom: 0; }
.plain b { color: var(--fg); font-weight: 600; }

.muted { color: var(--muted); }
td .muted { font-size: 13px; }

footer {
    flex: none;
    border-top: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
    font-size: 13.5px;
}

footer .inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 26px 24px 40px;
}

footer .foot-text { min-width: 0; }
footer .theme-wrap { flex: none; }

@media (max-width: 640px) {
    footer .inner { flex-direction: column; align-items: flex-start; }
}

footer p { margin: 0 0 8px; max-width: 68ch; }
footer p:last-child { margin-bottom: 0; }
