:root {
    --fg: #111;
    --muted: #666;
    --bg: #fff;
    --card: #f6f6f6;
    --border: #e6e6e6;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font:
        16px/1.55 system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Ubuntu,
        Cantarell,
        Noto Sans,
        sans-serif;
    color: var(--fg);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
a:hover {
    text-decoration-thickness: 2px;
}

.wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 18px;
}
.header {
    margin-bottom: 16px;
}
.muted {
    color: var(--muted);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

h1 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -0.01em;
}
h2 {
    margin: 0 0 10px;
    font-size: 18px;
}
h3 {
    margin: 12px 0 6px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
@media (max-width: 820px) {
    .board {
        grid-template-columns: 1fr;
    }
    .code {
        padding: 10px;
    }
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item {
    display: grid;
    grid-template-columns: 26px max-content 1fr auto;
    column-gap: 10px;
    align-items: baseline;
    padding: 6px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.item:first-child {
    border-top: 0;
}

.chk,
.sid,
.stitle,
.sunits {
    min-width: 0;
}

.chk {
    color: var(--muted);
}

.sid {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        monospace;
    font-size: 13px;
    color: #333;
    width: auto;
}

.sunits {
    color: var(--muted);
}

.formgrid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}
@media (max-width: 820px) {
    .formgrid {
        grid-template-columns: 1fr;
    }
}

.field {
    display: grid;
    grid-template-columns: 54px 1fr;
    column-gap: 10px;
    align-items: center;
}

.label {
    width: auto;
}
.blank {
    min-width: 0;
}

.select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

img {
    max-width: 100%;
    height: auto;
}

/* rectangular outer frame (opt-in via class="card frame") */
.card.frame {
    border-radius: 0;
    padding: 12px;
    border-color: rgba(0, 0, 0, 0.18);
}

/* rectangular inputs inside framed cards (keeps main unchanged unless you use .frame there too) */
.card.frame .blank,
.card.frame .select {
    border-radius: 0;
}

/* dashed inner lanes (opt-in via class="board dashed") */
.board.dashed > section {
    border: 1px dashed rgba(0, 0, 0, 0.28);
    border-radius: 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.35);
}

/* remove the extra top margin so headings sit nicely in the lane frame */
.board.dashed > section h3 {
    margin-top: 0;
}

.nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    column-gap: 12px;
    justify-content: start;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}
.nav a {
    text-decoration: none;
}
.nav a:hover {
    text-decoration: underline;
}

.mono {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        monospace;
    font-size: 13px;
}

.code {
    margin: 10px 0 0;
    padding: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.35);
    overflow: auto;
    white-space: pre;
    line-height: 1.45;

    /* make <pre class="code"> stand alone (no inner <code> needed) */
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        monospace;
    font-size: 13px;
}

.bullets {
    margin: 8px 0 0;
    padding-left: 18px;
}
.bullets .bullets {
    margin-top: 6px;
}
