:root {
    color-scheme: light;
    --ink: #142039;
    --muted: #505f73;
    --blue: #0345bf;
    --blue-dark: #023387;
    --blue-light: #ecf3ff;
    --line: #dbe3ee;
    --paper: #fff;
    --wash: #f6f8fc;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: var(--ink);
    background: var(--wash);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); text-underline-offset: .22em; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #1763df; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 3rem, 1100px); margin-inline: auto; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 76px; }
.brand { display: grid; place-items: center; height: 60px; }
.brand img { display: block; width: 166px; margin-block: -20px; }
nav { display: flex; gap: clamp(.75rem, 3vw, 2rem); }
nav a { font-weight: 650; text-decoration: none; }
nav a:hover { text-decoration: underline; }
main { min-height: 57vh; padding-block: clamp(2rem, 5vw, 4rem) 1rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.75rem); letter-spacing: -.055em; line-height: 1.07; }
h2 { font-size: 1.4rem; letter-spacing: -.025em; }
.muted { color: var(--muted); }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.75rem; }
.intro p, .login h1 + p { margin-top: .65rem; }
.button, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    border: 1px solid #aebed5;
    border-radius: .55rem;
    padding: .55rem .9rem;
    background: var(--paper);
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}
.button:hover, button:not(:disabled):hover { background: var(--blue-light); }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--blue); color: white; border-color: var(--blue); }
.primary:hover, button.primary:not(:disabled):hover { background: var(--blue-dark); }
.table-panel, .panel, .archive { background: var(--paper); border: 1px solid var(--line); border-radius: .85rem; }
.table-panel { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .85rem clamp(.65rem, 2vw, 1.35rem); vertical-align: top; }
thead { background: var(--blue-light); }
thead th { color: #263d66; font-size: .83rem; vertical-align: bottom; }
tbody tr + tr { border-top: 1px solid var(--line); }
tbody th { font-weight: 620; overflow-wrap: anywhere; }
tbody tr:hover { background: #f9fbff; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.retail { color: var(--blue-dark); font-weight: 700; }
.business, .footer { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; color: var(--muted); }
.business { padding-block: 1.4rem; }
.footer { justify-content: space-between; padding-block: 1.25rem 2rem; border-top: 1px solid var(--line); }
.archive, .edit-list { list-style: none; padding: 0; margin: 0; }
.archive li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; }
.archive li + li { border-top: 1px solid var(--line); }
.notice { background: var(--blue-light); border: 1px solid #c6d9ff; padding: .8rem 1rem; border-radius: .55rem; margin: 0 0 1rem; }
.error { color: #831d31; background: #fff0f2; border-color: #efbfca; }
.panel { padding: 1.15rem; min-width: 0; margin: 0; }
legend { padding-inline: .35rem; font-weight: 700; }
.login { max-width: 480px; }
.login h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.stacks, label { display: grid; gap: 1rem; }
label { gap: .3rem; font-weight: 600; font-size: .9rem; min-width: 0; }
input:not([type="hidden"]), select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .5rem .65rem;
    border: 1px solid #aebed5;
    border-radius: .4rem;
    background: var(--paper);
    color: var(--ink);
    font-weight: 400;
}
.settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.form-actions, .section-title, .row-actions { display: flex; gap: .55rem; align-items: end; }
.form-actions { margin-bottom: .65rem; flex-wrap: wrap; }
.section-title { justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.edit-list { display: grid; gap: .5rem; }
.edit-row { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr 1fr auto; align-items: end; gap: .65rem; padding: .8rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--paper); }
.row-actions button { padding-inline: .65rem; }
.publish-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding-block: .8rem; background: var(--wash); border-top: 1px solid var(--line); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 1; padding: .5rem; background: white; }
@media (max-width: 900px) {
    .edit-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .edit-row > label:first-child { grid-column: 1 / -1; }
    .row-actions { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .wrap { width: calc(100% - 1.5rem); }
    .intro { align-items: flex-start; flex-direction: column; }
    .settings { grid-template-columns: 1fr; }
    .archive li { align-items: flex-start; flex-direction: column; }
    .table-panel { overflow-x: auto; }
    table { min-width: 300px; }
    table th, table td { padding: .65rem .3rem; font-size: .78rem; }
    thead th { font-size: .72rem; overflow-wrap: anywhere; }
    tbody th { width: 40%; }
    table tr > :first-child { padding-left: .55rem; }
    table tr > :last-child { padding-right: .45rem; }
    .brand img { width: 143px; }
}
