/* app.css: page chrome for the control page and the embed builder.
   Deliberately cool and quiet so it never competes with the board's own
   palettes. Board styling lives in board.css. */


/* ==========================================================================
   PAGE CHROME
   Cool and quiet on purpose: seventeen board palettes are the subject, so the
   chrome accent is a slate blue that never competes with any of them.
   ========================================================================== */
:root {
    --ground:#eeeef0; --panel:#ffffff; --panel-2:#e4e5e9;
    --rule:#d3d5da; --rule-hard:#a8acb5;
    --ink:#15181c; --ink-2:#454b54; --muted:#767d88;
    --chrome:#2c6485; --chrome-bg:#dfe9ef;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ground:#0d0f12; --panel:#16191d; --panel-2:#1f232a;
        --rule:#2a2f36; --rule-hard:#454c56;
        --ink:#edeff2; --ink-2:#b6bcc5; --muted:#7d8792;
        --chrome:#74b4d8; --chrome-bg:#14262f;
    }
}
:root[data-theme="dark"] {
    --ground:#0d0f12; --panel:#16191d; --panel-2:#1f232a;
    --rule:#2a2f36; --rule-hard:#454c56;
    --ink:#edeff2; --ink-2:#b6bcc5; --muted:#7d8792;
    --chrome:#74b4d8; --chrome-bg:#14262f;
}

* { box-sizing: border-box; }

body {
    background: var(--ground);
    color: var(--ink);
    font-family: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 110px; }

header.mast {
    padding: 40px 0 14px;
    border-bottom: 2px solid var(--rule-hard);
    display: flex; flex-wrap: wrap;
    align-items: flex-end; justify-content: space-between;
    gap: 12px 28px;
}
.mast h1 {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700; text-transform: uppercase;
    font-size: clamp(32px, 5vw, 48px); line-height: .95; margin: 0;
}
.mast p { margin: 0; max-width: 46ch; color: var(--ink-2); font-size: 15.5px; }

/* ===== Control rail ===== */
.controls { display: flex; flex-wrap: wrap; gap: 16px 30px; padding: 16px 0 14px; align-items: flex-start; }
.ctl-group { display: flex; flex-direction: column; gap: 7px; }
.ctl-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 10.5px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; }

button {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    font-size: 13.5px; line-height: 1;
    padding: 8px 12px 7px;
    background: var(--panel); color: var(--ink-2);
    border: 1px solid var(--rule-hard); border-radius: 2px;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
button:hover { border-color: var(--chrome); color: var(--ink); }
button:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
button[aria-pressed="true"] { background: var(--chrome); border-color: var(--chrome); color: #fff; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) button[aria-pressed="true"] { color: #08131a; }
}
:root[data-theme="dark"] button[aria-pressed="true"] { color: #08131a; }
button.fire:active { transform: translateY(1px); }
.variant-row { min-height: 30px; }

/* Intensity slider */
.slider-wrap { display: flex; align-items: center; gap: 10px; }
input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 132px; height: 4px; background: var(--rule-hard);
    border-radius: 2px; outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--chrome); border: none; cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--chrome); border: none; cursor: pointer;
}
input[type="range"]:disabled { opacity: .35; cursor: not-allowed; }
select {
    font-family: "Barlow Condensed", sans-serif; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em; font-size: 13px;
    padding: 6px 8px; background: var(--panel); color: var(--ink-2);
    border: 1px solid var(--rule-hard); border-radius: 2px; cursor: pointer; width: 214px;
}
select:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
.slider-val {
    font-family: "IBM Plex Mono", monospace; font-size: 12px;
    color: var(--muted); width: 34px; font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   READOUT + NOTES
   ========================================================================== */
section { margin-top: 48px; }
h2 {
    font-family: "Barlow Condensed", sans-serif; font-weight: 700;
    text-transform: uppercase; font-size: 27px; margin: 0 0 4px;
    padding-bottom: 9px; border-bottom: 1px solid var(--rule-hard);
}
h3 {
    font-family: "Barlow Condensed", sans-serif; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em;
    font-size: 18px; margin: 24px 0 6px;
}
p { margin: 12px 0; max-width: 70ch; color: var(--ink-2); }
ul { max-width: 70ch; padding-left: 20px; color: var(--ink-2); }
li { margin: 6px 0; }
strong { color: var(--ink); font-weight: 600; }
code {
    font-family: "IBM Plex Mono", monospace; font-size: .86em;
    background: var(--panel-2); padding: 1px 5px; border-radius: 2px; color: var(--ink);
}

.readout {
    display: grid; grid-template-columns: minmax(300px, 1fr) minmax(270px, 320px);
    gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 18px;
}
@media (max-width: 720px) { .readout { grid-template-columns: 1fr; } }
.readout > div { background: var(--panel); padding: 15px 17px; }
.readout h4 {
    margin: 0 0 8px; font-family: "Barlow Condensed", sans-serif;
    font-size: 19px; text-transform: uppercase; letter-spacing: .03em;
}
.readout p { margin: 0 0 12px; font-size: 15px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 8px; }
.sw { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sw i { width: 24px; height: 24px; border: 1px solid var(--rule-hard); flex: none; border-radius: 2px; }
.sw dl { margin: 0; min-width: 0; }
.sw dt { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--muted); white-space: nowrap; }
.sw dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 12px; text-transform: uppercase; }
.typerow {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px;
}
.typerow:last-child { border-bottom: none; }
.typerow b { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.typerow span { text-align: right; }

pre {
    background: var(--panel); border: 1px solid var(--rule);
    border-left: 3px solid var(--chrome);
    padding: 13px 15px; overflow-x: auto;
    font-family: "IBM Plex Mono", monospace; font-size: 13px; line-height: 1.6; color: var(--ink);
}
pre .c { color: var(--muted); }

.note { border-left: 3px solid var(--chrome); background: var(--chrome-bg); padding: 12px 16px; margin: 18px 0; }
.note p { margin: 0; max-width: none; }
.note b {
    display: block; font-family: "Barlow Condensed", sans-serif;
    text-transform: uppercase; letter-spacing: .09em;
    font-size: 11.5px; color: var(--chrome); margin-bottom: 2px;
}

.fxtable { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 18px 0; }
.fxrow { background: var(--panel); padding: 12px 16px; display: grid; grid-template-columns: 132px 1fr; gap: 14px; }
@media (max-width: 640px) { .fxrow { grid-template-columns: 1fr; gap: 2px; } }
.fxrow b {
    font-family: "Barlow Condensed", sans-serif; text-transform: uppercase;
    letter-spacing: .05em; font-size: 16px; color: var(--ink);
}
.fxrow span { font-size: 15px; color: var(--ink-2); }

footer {
    margin-top: 56px; padding-top: 16px; border-top: 2px solid var(--rule-hard);
    font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--muted);
}
