/* Vendored from https://github.com/dedicatedcom/dedicated-theme at commit 22e2bbfe296a4d4e865c134af208f25d4aef18a8 (2026-10-03, tokens.json version 1.1.0).
 * Do not edit here. Update the upstream repo, then re-copy this file and bump the commit in README.md.
 */
/*
 * Dedicated Theme — tokens and base components
 * Source of truth: THEME.md. Keep in sync with tokens.json.
 *
 * Usage:
 *   <link href="https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
 *   <link rel="stylesheet" href="tokens.css">
 *   <body class="dt-page"> ...
 *
 * Light mode is opt-in: add data-theme="light" to <html>, <body>, or any
 * ancestor of the styled region. Dark is the default and nothing follows
 * prefers-color-scheme.
 *
 * Copyright (c) 2026 US Dedicated LLC. All rights reserved.
 */

/* ---------- tokens ---------- */
:root {
    /* surfaces */
    --bg: #050607;
    --bg-rgb: 5, 6, 7;
    --panel: #0b0d10;
    --panel-2: #11141a;
    --output: #07090b;
    --line: #1e232c;

    /* text */
    --text: #c9cfd8;
    --text-output: #aeb7c2;
    --muted: #5c6672;
    --placeholder: #3a424d;
    --white: #ffffff;
    --on-red: #0a0405;

    /* accent */
    --red: #f5232e;
    --red-hi: #ff4a52;
    --red-dim: rgba(245, 35, 46, 0.12);
    --red-ink: #f5232e;
    --red-rgb: 245, 35, 46;

    /* state */
    --ok: #35e08c;
    --ok-rgb: 53, 224, 140;
    --warn: #ffb454;
    --warn-rgb: 255, 180, 84;
    --idle: #2a303a;

    /* disabled */
    --disabled-bg: #3a3f48;
    --disabled-text: #767d88;

    /* illustration strokes */
    --map-graticule: #141a22;
    --map-border: #303a47;
    --map-lake: #364252;
    --map-coast: #4a5666;
    --vent: #242b35;

    /* type */
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --display: 'Chakra Petch', var(--mono);

    /* layout */
    --shell-max: 1160px;
    --gutter: 22px;
    --grid: 44px;

    /* shape */
    --cut-lg: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    --cut-sm: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));

    /* texture */
    --grid-ink: rgba(255, 255, 255, 0.014);
    --scan-ink: rgba(255, 255, 255, 0.018);
    --wash-alpha: 0.09;

    /* effects */
    --shadow-popover: 0 10px 28px rgba(0, 0, 0, 0.55);
    --glow-focus: 0 0 0 1px var(--red), 0 0 18px rgba(var(--red-rgb), 0.25);
    --glow-button: 0 0 24px rgba(var(--red-rgb), 0.45);

    /* motion */
    --t-fast: 0.15s;
    --t-med: 0.3s;
    --t-slow: 0.4s;
}

/* ---------- light mode (slate) ---------- */
/* Derived from --muted (#5c6672, hue 213). Only the tokens that differ are listed. */
[data-theme="light"] {
    /* surfaces */
    --bg: #ccd1d7;
    --bg-rgb: 204, 209, 215;
    --panel: #dadde2;
    --panel-2: #e5e8eb;
    --output: #c3c9d0;
    --line: #a0a7b1;

    /* text */
    --text: #1a1e23;
    --text-output: #2b3036;
    --placeholder: #848e9a;
    --white: #0b0d10;

    /* accent: fills keep --red; hover and text go darker */
    --red-hi: #b8141f;
    --red-ink: #b0101a;

    /* state */
    --ok: #126a43;
    --ok-rgb: 18, 106, 67;
    --warn: #8a4b00;
    --warn-rgb: 138, 75, 0;
    --idle: #abb2ba;

    /* disabled */
    --disabled-bg: #aab1ba;
    --disabled-text: #67717d;

    /* illustration strokes */
    --map-graticule: #bfc5cc;
    --map-border: #8a94a0;
    --map-lake: #8c97a3;
    --map-coast: #6b7684;
    --vent: #b4bbc3;

    /* texture */
    --grid-ink: rgba(10, 14, 20, 0.045);
    --scan-ink: rgba(10, 14, 20, 0.035);
    --wash-alpha: 0.07;

    /* effects */
    --shadow-popover: 0 10px 28px rgba(22, 28, 36, 0.22);
    --glow-focus: 0 0 0 1px var(--red), 0 0 18px rgba(var(--red-rgb), 0.18);
    --glow-button: 0 0 24px rgba(var(--red-rgb), 0.35);
}

/* ---------- base ---------- */
.dt-page,
.dt-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html:has(> body.dt-page) {
    background: var(--bg);
}

.dt-page {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--text);
    background:
        radial-gradient(1100px 420px at 50% -140px, rgba(var(--red-rgb), var(--wash-alpha)), transparent 70%),
        repeating-linear-gradient(0deg, var(--grid-ink) 0 1px, transparent 1px var(--grid)),
        repeating-linear-gradient(90deg, var(--grid-ink) 0 1px, transparent 1px var(--grid)),
        var(--bg);
    min-height: 100vh;
}

.dt-page ::selection {
    background: var(--red);
    color: var(--on-red);
}

.dt-page button,
.dt-page input {
    font: inherit;
    color: inherit;
}

.dt-page :focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* ---------- topbar ---------- */
.dt-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px var(--gutter);
    border-bottom: 1px solid var(--line);
    background: rgba(var(--bg-rgb), 0.82);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.dt-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dt-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

.dt-logo-mark {
    display: block;
    height: 20px;
    width: auto;
}

.dt-logo-word {
    font-family: var(--display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--white);
}

.dt-brand-sub {
    padding-left: 14px;
    border-left: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.22em;
    white-space: nowrap;
    text-decoration: none;
}

.dt-brand-sub:hover,
.dt-brand-sub:focus-visible {
    color: var(--white);
}

.dt-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.dt-sys-dot {
    width: 7px;
    height: 7px;
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
    animation: dt-blink 2.4s steps(1) infinite;
}

/* ---------- layout ---------- */
.dt-shell {
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: 40px var(--gutter) 80px;
}

.dt-intro {
    margin-bottom: 34px;
}

.dt-h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(26px, 4.5vw, 40px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    line-height: 1.05;
}

.dt-h1 .dt-slash {
    color: var(--red);
}

.dt-lede {
    margin-top: 10px;
    max-width: 84ch;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.dt-eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.28em;
    color: var(--red-ink);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.dt-eyebrow::before {
    content: '// ';
    color: var(--muted);
}

/* ---------- console / command bar ---------- */
.dt-console {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 18px;
    margin-bottom: 28px;
    clip-path: var(--cut-lg);
}

.dt-cmdbar {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.dt-prompt {
    display: flex;
    align-items: center;
    color: var(--red-ink);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    user-select: none;
}

.dt-flags {
    display: flex;
    border: 1px solid var(--line);
    background: var(--bg);
}

.dt-flag {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    padding: 10px 16px;
    cursor: pointer;
    letter-spacing: 0.04em;
    border-right: 1px solid var(--line);
    transition: color var(--t-fast), background var(--t-fast);
}

.dt-flag:last-child {
    border-right: none;
}

.dt-flag::before {
    content: '--';
    opacity: 0.5;
}

.dt-flag:hover {
    color: var(--text);
}

.dt-flag.active {
    background: var(--red-dim);
    color: var(--red-hi);
    box-shadow: inset 0 -2px 0 var(--red);
}

.dt-input {
    flex: 1;
    min-width: 220px;
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--white);
    caret-color: var(--red);
}

.dt-input::placeholder {
    color: var(--placeholder);
}

.dt-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: var(--glow-focus);
}

.dt-btn {
    appearance: none;
    border: none;
    background: var(--red);
    color: var(--on-red);
    font-family: var(--display);
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px 26px;
    cursor: pointer;
    clip-path: var(--cut-sm);
    transition: background var(--t-fast), box-shadow var(--t-fast);
}

.dt-btn:hover:not(:disabled) {
    background: var(--red-hi);
    box-shadow: var(--glow-button);
}

.dt-btn:disabled {
    background: var(--disabled-bg);
    color: var(--disabled-text);
    cursor: not-allowed;
}

.dt-hint {
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.dt-hint b {
    color: var(--text);
    font-weight: 500;
}

.dt-link {
    color: var(--red-ink);
    text-decoration: none;
    border-bottom: 1px dotted var(--red-ink);
    cursor: pointer;
}

.dt-link:hover,
.dt-link:focus-visible {
    color: var(--white);
    border-bottom-color: var(--white);
}

.dt-link.copied {
    color: var(--ok);
    border-bottom-color: var(--ok);
}

/* ---------- cards and status ---------- */
.dt-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dt-card {
    flex: 1 1 150px;
    max-width: 280px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 10px 14px;
}

.dt-card-code {
    font-weight: 600;
    font-size: 13px;
    color: var(--white);
    letter-spacing: 0.06em;
}

.dt-card-name {
    font-size: 10.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-dot {
    flex: none;
    width: 8px;
    height: 8px;
    background: var(--idle);
    transition: background var(--t-med), box-shadow var(--t-med);
}

.dt-dot.running {
    background: var(--warn);
    box-shadow: 0 0 8px var(--warn);
    animation: dt-pulse 1.2s ease-in-out infinite;
}

.dt-dot.completed {
    background: var(--ok);
    box-shadow: 0 0 8px rgba(var(--ok-rgb), 0.5);
}

.dt-dot.failed {
    background: var(--red);
    box-shadow: 0 0 8px rgba(var(--red-rgb), 0.5);
}

.dt-chip {
    flex: none;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 3px 10px;
    border: 1px solid var(--line);
    color: var(--muted);
}

.dt-chip.running {
    color: var(--warn);
    border-color: rgba(var(--warn-rgb), 0.4);
}

.dt-chip.completed {
    color: var(--ok);
    border-color: rgba(var(--ok-rgb), 0.4);
}

.dt-chip.failed {
    color: var(--red-hi);
    border-color: rgba(var(--red-rgb), 0.5);
}

/* ---------- summary, panes, output ---------- */
.dt-summary {
    border: 1px solid var(--line);
    border-left: 3px solid var(--red);
    background: var(--panel);
    padding: 11px 16px;
    margin-bottom: 18px;
    font-size: 12.5px;
    color: var(--muted);
}

.dt-summary strong {
    color: var(--red-ink);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.dt-pane {
    border: 1px solid var(--line);
    background: var(--panel);
    margin-bottom: 16px;
}

.dt-pane-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
    font-size: 12.5px;
}

.dt-pane-title {
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-pane-title b {
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-right: 8px;
}

.dt-pane-title b::before {
    content: '\250C  ';
    color: var(--red-ink);
    font-weight: 400;
}

.dt-pane.is-running {
    border-color: rgba(var(--red-rgb), 0.45);
    animation: dt-breathe 2s ease-in-out infinite;
}

.dt-output {
    position: relative;
    padding: 14px 16px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text-output);
    background:
        repeating-linear-gradient(0deg, var(--scan-ink) 0 1px, transparent 1px 3px),
        var(--output);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 420px;
    overflow-y: auto;
}

.dt-error {
    padding: 12px 16px;
    font-size: 12.5px;
    color: var(--red-hi);
    background: var(--red-dim);
    border-top: 1px solid rgba(var(--red-rgb), 0.35);
}

.dt-error::before {
    content: '!! ';
    font-weight: 600;
}

/* ---------- popover ---------- */
.dt-popover {
    position: absolute;
    z-index: 6;
    min-width: 216px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-popover);
    padding: 10px 12px 11px;
    font-size: 12px;
}

.dt-popover-head {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.dt-popover-head b {
    color: var(--white);
    margin-right: 6px;
}

.dt-popover-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.dt-popover-label {
    color: var(--muted);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: 30px;
    flex: none;
}

.dt-popover-row code {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--white);
    flex: 1;
}

.dt-icon-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: none;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    padding: 0;
}

.dt-icon-btn:hover,
.dt-icon-btn:focus-visible {
    color: var(--white);
    border-color: var(--red);
}

.dt-icon-btn.copied {
    color: var(--ok);
    border-color: var(--ok);
}

/* ---------- spinner ---------- */
.dt-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(10, 4, 5, 0.3);
    border-top-color: var(--on-red);
    border-radius: 50%;
    vertical-align: -2px;
    margin-right: 6px;
    animation: dt-spin 0.8s linear infinite;
}

/* ---------- motion ---------- */
@keyframes dt-blink {
    0%, 60% { opacity: 1; }
    61%, 100% { opacity: 0.25; }
}

@keyframes dt-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes dt-breathe {
    0%, 100% { box-shadow: 0 0 0 rgba(var(--red-rgb), 0); }
    50% { box-shadow: 0 0 22px rgba(var(--red-rgb), 0.18); }
}

@keyframes dt-flow {
    to { stroke-dashoffset: -18; }
}

@keyframes dt-spin {
    to { transform: rotate(360deg); }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
    .dt-brand-sub { display: none; }
    .dt-topbar-right span:last-child { display: none; }
    .dt-cmdbar .dt-prompt { display: none; }
    .dt-flags { width: 100%; }
    .dt-flag { flex: 1; }
    .dt-btn { width: 100%; padding: 13px 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .dt-sys-dot,
    .dt-dot.running,
    .dt-pane.is-running,
    .dt-spinner {
        animation: none;
    }
}
