/* The Gassed Up Hub. Gassed Up colors: mint, pink and navy. One column; departments sit side by side on a wide screen. */
:root {
  --bg: #f1f7f5;
  --surface: #ffffff;
  --sunk: #e6f0ed;
  --ink: #1f2447;
  --muted: #565c80;
  --line: #d3e2de;
  --mint: #74c8b2;
  --mint-soft: #e0f3ed;
  --mint-ink: #1b6956;
  --pink: #e6228c;
  --pink-soft: #fde3f0;
  --pink-ink: #b1116a;
  --display: "Fredoka", "Quicksand", system-ui, sans-serif;
  --body: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13162e; --surface: #1f2447; --sunk: #171b38; --ink: #eef1fb; --muted: #aab0cf; --line: #363c69;
    --mint-soft: #1f3f4b; --mint-ink: #9be0cd;
    --pink: #ff63b3; --pink-soft: #4b1f48; --pink-ink: #ffa3d2;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; font-weight: 500; line-height: 1.45; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: 0; }
a { color: var(--mint-ink); text-underline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.err { color: var(--pink-ink); font-weight: 700; }
.loading { padding: 48px 0; text-align: center; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* top bar */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding: 12px 16px 0; border-bottom: 3px solid var(--mint); background: var(--surface); }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.375rem; color: var(--ink); text-decoration: none; padding-bottom: 10px; }
.brand span { color: var(--pink); }
.nav { display: flex; gap: 4px; overflow-x: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px 12px 10px; border-bottom: 3px solid transparent; margin-bottom: -3px; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--pink); }

main { padding: 24px 16px 72px; }
.wrap { max-width: 1040px; margin-inline: auto; display: flex; flex-direction: column; gap: 28px; }
.wrap.xl { max-width: 1240px; }
section { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }

/* buttons and fields */
button { font: inherit; font-weight: 700; cursor: pointer; border-radius: 10px; border: 1.5px solid transparent; padding: 9px 14px; }
button:disabled { opacity: 0.55; cursor: default; }
.primary { background: var(--ink); color: var(--bg); }
.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.ghost:hover { color: var(--ink); border-color: var(--muted); }
.ghost.sm { padding: 4px 10px; font-size: 0.8125rem; white-space: nowrap; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--mint-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; border-radius: 4px; }
a.btn { display: inline-block; font-weight: 700; text-decoration: none; border-radius: 10px; border: 1.5px solid var(--line); padding: 8px 14px; color: var(--ink); background: var(--surface); white-space: nowrap; }
a.btn:hover { border-color: var(--muted); }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="search"], select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 0; max-width: 100%;
}
label.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 0.875rem; }
label.field input, label.field select { font-weight: 500; font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.panel { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.login { max-width: 400px; margin: 24px auto 0; }
.label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* the front page: numbers, then what is waiting */
.tally { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.tally b { font-family: var(--display); font-weight: 600; font-size: 1.375rem; margin-right: 6px; }
.tally .hot b { color: var(--pink-ink); }
.waiting { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; }
.waiting.hot { border-color: var(--pink); }
.waiting li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.waiting li:first-child { border-top: 0; }
.waiting .what { min-width: 0; flex: 1 1 260px; }
.waiting .title { font-weight: 700; display: block; overflow-wrap: anywhere; }
.waiting .note { color: var(--muted); font-size: 0.9375rem; display: block; max-width: 70ch; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; border-radius: 6px; padding: 1px 7px; background: var(--mint-soft); color: var(--mint-ink); white-space: nowrap; }
.tag.hot { background: var(--pink-soft); color: var(--pink-ink); }
.tag.plain { background: var(--sunk); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.clear { background: var(--mint-soft); color: var(--mint-ink); border-radius: 14px; padding: 14px 16px; font-weight: 700; }

/* is the list being kept up to date */
.checks { display: flex; flex-direction: column; gap: 3px; font-size: 0.875rem; color: var(--muted); }
.checks .warn { color: var(--pink-ink); font-weight: 700; }

/* the to-do list */
.add { display: flex; flex-wrap: wrap; gap: 8px; }
.add input[type="text"] { flex: 1 1 240px; }
.groups { display: flex; flex-direction: column; gap: 12px; }
details.group { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; }
details.group.first { border-color: var(--pink); }
details.group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-family: var(--display); font-weight: 600; font-size: 1.125rem; border-radius: 14px; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary::before { content: "+"; width: 1ch; color: var(--muted); font-family: var(--body); font-weight: 700; }
details.group[open] > summary::before { content: "\2212"; }
.count { font-family: var(--body); font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--mint-soft); color: var(--mint-ink); border-radius: 999px; padding: 2px 9px; }
details.group.first .count { background: var(--pink-soft); color: var(--pink-ink); }
.hint { color: var(--muted); padding: 0 16px 14px; }
ul.items { list-style: none; margin: 0; padding: 0 16px 6px; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.item input[type="checkbox"] { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--mint-ink); cursor: pointer; }
.item .title { font-weight: 700; cursor: pointer; display: block; overflow-wrap: anywhere; }
.item .note { color: var(--muted); margin-top: 2px; font-size: 0.9375rem; max-width: 65ch; overflow-wrap: anywhere; }
.item .tags { margin-top: 6px; }
.item.done .title { text-decoration: line-through; color: var(--muted); font-weight: 600; }
.tag.line { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.proofline { color: var(--muted); font-size: 0.875rem; margin-top: 4px; max-width: 65ch; }
.confirm { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 12px; border: 1.5px solid var(--mint); border-radius: 10px; background: var(--mint-soft); }
.confirm p { font-size: 0.9375rem; }
.confirm input { width: 100%; }
@media (max-width: 520px) {
  .item { grid-template-columns: auto minmax(0, 1fr); }
  .item .act { grid-column: 2; justify-self: start; }
}
.personal { border-top: 3px solid var(--line); padding-top: 24px; }

/* departments */
.depts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .depts { grid-template-columns: minmax(0, 1fr); } }
.dept { background: var(--surface); border: 1.5px solid var(--line); border-top: 5px solid var(--mint); border-radius: 14px; padding: 14px 16px 10px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dept .job { color: var(--muted); font-size: 0.9375rem; margin-bottom: 4px; }
ul.tools { list-style: none; margin: 0; padding: 0; }
.tool { padding: 10px 0; border-top: 1px solid var(--line); }
.tool .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tool .name { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.tool a.name { color: var(--mint-ink); text-decoration: underline; text-underline-offset: 3px; }
.tool .what { color: var(--muted); font-size: 0.875rem; margin-top: 2px; }
.tool .where { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; margin-top: 3px; }
.tool form, form.newtool { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.dept > .ghost { align-self: flex-start; margin-top: 6px; }
.ref ul.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
@media (max-width: 820px) { .ref ul.tools { grid-template-columns: minmax(0, 1fr); } }

/* tables */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
td.n, th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.wrapcell { white-space: normal; min-width: 240px; }
tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
tr.off td { color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; margin-top: 4px; }

/* all products */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.toolbar input[type="search"] { flex: 1 1 240px; max-width: 420px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { background: var(--surface); color: var(--ink); border-color: var(--line); padding: 5px 12px; font-size: 0.875rem; font-weight: 600; border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--mint-soft); border-color: var(--mint); color: var(--mint-ink); font-weight: 700; }
.seg.fix button[aria-pressed="true"] { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-ink); }
.seg button .n { font-variant-numeric: tabular-nums; opacity: 0.75; margin-left: 4px; }
.catbar { display: flex; flex-direction: column; gap: 10px; }
.pcell { display: flex; gap: 12px; align-items: center; }
.thumb { flex: none; width: 96px; height: 96px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 3px; overflow: hidden; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb.none { border-style: dashed; background: var(--sunk); }
.thumb.xs { width: 44px; height: 44px; border-radius: 6px; padding: 2px; }
.back { color: var(--mint-ink); font-weight: 700; text-decoration: none; align-self: flex-start; }

#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 700; max-width: calc(100vw - 32px); z-index: 10; }
#toast.bad { background: var(--pink-soft); color: var(--pink-ink); border: 1.5px solid var(--pink); }
#toast[hidden] { display: none; }
