/* Inter (SIL Open Font License), bundled: no external font service */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations'), url(/fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations'), url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* Hadus brand: Graphite Dark #0F172A, Electric Cyan #00E5FF, Layer Blue #00B4D8, Pure Silver #F8FAFC.
   --accent fills primary actions (with --accent-ink on top); --accent-text is the accent for text and borders,
   a darker Layer Blue in the light theme so it stays readable on white. */
:root {
  color-scheme: light dark;
  --graphite: #0f172a; --cyan: #00e5ff; --layer: #00b4d8; --silver: #f8fafc;
  --bg: var(--silver); --panel: #ffffff; --ink: var(--graphite); --muted: #5b6678; --line: #e2e8f0;
  --accent: var(--cyan); --accent-ink: var(--graphite); --accent-text: #00768f; --accent-soft: #e0f9fd;
  --danger: #c0392b; --ok: #1f8a4c; --warn: #b9770e; --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --top-bg: var(--graphite); --top-ink: #e2e8f0; --top-muted: #94a3b8; --top-dim: #7a889e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: var(--graphite); --panel: #16213a; --ink: var(--silver); --muted: #94a3b8; --line: #2a3650; --accent-text: var(--cyan); --accent-soft: rgba(0,229,255,.12);
    --danger: #ef7a6c; --ok: #55c58a; --warn: #e5a94b; --shadow: none; --top-bg: #0a1020; }
}
/* team branding (Pro): the accent colour of the team replaces the Hadus cyan */
:root[data-brand] { --accent: var(--brand-accent); --accent-ink: var(--brand-ink); --accent-text: color-mix(in srgb, var(--brand-accent) 65%, #000); --accent-soft: color-mix(in srgb, var(--brand-accent) 14%, transparent); --top-accent: var(--brand-accent); }
@media (prefers-color-scheme: dark) { :root[data-brand] { --accent-text: var(--brand-accent); } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; } h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; } h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; } .grow { flex: 1 1 auto; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

/* shell */
.topbar { background: var(--top-bg); color: var(--top-ink); border-bottom: 1px solid rgba(0,229,255,.25); position: sticky; top: 0; z-index: 20; }
.topbar a { color: var(--top-ink); } .topbar .badge.warn { color: #a63227; }
.topbar select { background: #16213a; color: var(--top-ink); border-color: #2a3650; }
.topbar .btn { background: transparent; color: var(--top-ink); border-color: #2a3650; } .topbar .btn:hover { background: rgba(0,229,255,.12); }
.topbar .inner { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.topbar .brand { color: #fff; } .brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.menubtn { display: none; font: inherit; font-size: 20px; line-height: 1; background: transparent; color: var(--top-ink); border: 1px solid #2a3650; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.menubtn:hover { background: rgba(0,229,255,.12); }
/* phone: one row (logo, team name, menu button); the links and the user open under it */
@media (max-width: 720px) {
  .topbar .inner { gap: 8px 12px; }
  .topbar .brand { flex: 1; min-width: 0; }
  .topbar .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menubtn { display: inline-flex; flex: none; }
  .topbar .nav, .topbar .usermenu { display: none; }
  .topbar.open .nav { display: grid; grid-template-columns: 1fr 1fr; flex-basis: 100%; }
  .topbar.open .usermenu { display: flex; flex-basis: 100%; flex-wrap: wrap; padding-bottom: 4px; min-width: 0; }
  .topbar .usermenu select { flex: 1 1 100%; width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
}
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--top-muted); font-weight: 500; }
.nav a:hover { background: rgba(0,229,255,.1); color: #fff; text-decoration: none; }
.nav a.active { background: color-mix(in srgb, var(--top-accent, var(--cyan)) 16%, transparent); color: var(--top-accent, var(--cyan)); }
/* a Pro function on a Free installation: dimmed on the dark bar (the bar is dark in the light and the dark theme), with a text on hover and keyboard focus */
.nav a.pro-locked { position: relative; color: var(--top-dim); }
.nav a.pro-locked:hover, .nav a.pro-locked:focus-visible { color: var(--top-muted); }
.nav a.pro-locked.active { color: var(--top-muted); background: rgba(148,163,184,.14); }
.nav a.pro-locked::after { content: attr(data-tip); display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; padding: 4px 8px; border-radius: 6px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none; }
@media (hover: hover) { .nav a.pro-locked:hover::after { display: block; } }
.nav a.pro-locked:focus-visible::after { display: block; }
.pro-preview { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 280px; }
.pro-preview-sample { filter: blur(7px); opacity: .7; pointer-events: none; user-select: none; }
.pro-preview-notice { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); z-index: 2; }
.checklist { display: flex; flex-direction: column; gap: 6px; }
label.f.checkstep { align-items: flex-start; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
label.f.checkstep input { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.textlinks { margin-top: 4px; overflow-wrap: anywhere; }
.procimgs { display: flex; flex-direction: column; gap: 10px; }
.procimg { margin: 0; }
/* a warning on a step: rounded, in the red of the badges for due and unpaid */
.stepwarn { display: flex; gap: 10px; align-items: flex-start; background: #fde5e2; color: #7d241b; border: 1px solid #f3b9b2; border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.stepwarn-sign { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; font-weight: 800; font-size: 13px; line-height: 20px; text-align: center; margin-top: 1px; }
@media (prefers-color-scheme: dark) { .stepwarn { background: #3b1b17; color: #f6b3aa; border-color: #6b2f28; } .stepwarn-sign { background: #ef7a6c; color: #3b1b17; } }
.stepbox { display: flex; flex-direction: column; gap: 6px; }
.stepbox .procimg { padding-left: 4px; }
.procimg img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: var(--bg); }
tr.attention td { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; background: #2a3650; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.avatar.big { width: 96px; height: 96px; margin: 0; box-shadow: 0 0 0 1px var(--line); }
.licence-bar { background: var(--panel); border-bottom: 1px solid var(--line); }
.licence-bar .inner { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.licence-bar .notice { flex: 1 1 320px; margin: 0; }
.page { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; } .grid2 > .card + .card, .grid3 > .card + .card { margin-top: 0; }
.card.flat { box-shadow: none; }

/* forms */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.f.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); font-weight: 400; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-text); outline-offset: -1px; border-color: transparent; }
input:disabled, select:disabled, textarea:disabled { opacity: .65; background: var(--bg); }
textarea { min-height: 70px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--accent-soft); }
a.btn { text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { background: var(--layer); border-color: var(--layer); }
.btn.danger { color: var(--danger); } .btn.small { padding: 3px 9px; font-size: 12px; } .btn.link { border: 0; background: none; color: var(--accent-text); padding: 2px 4px; font-weight: 500; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.unit { position: relative; } .unit input { padding-right: 38px; } .unit span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }
.hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.numwarn { display: block; color: var(--warn); font-size: 12px; margin-top: 2px; font-weight: 600; }
.error { color: var(--danger); font-size: 13px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td, tr.selected td { background: var(--accent-soft); }
.bulkbar { position: sticky; bottom: 8px; z-index: 5; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 18px rgba(0, 0, 0, .18); }
.tablewrap { overflow-x: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.badge.draft, .badge.takenover { background: var(--bg); color: var(--muted); border: 1px solid var(--line); } .badge.quote { background: #fff4d6; color: #8a6100; } .badge.invoice { background: var(--accent-soft); color: var(--accent-text); }
.badge.completed, .badge.paid { background: #dcf5e6; color: #17703c; } .badge.archived { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge.unpaid { background: #fde5e2; color: #a63227; } .badge.deposit { background: #fff0d6; color: #8a5a00; } .badge.warn, .badge.due { background: #fde5e2; color: #a63227; } .badge.soon { background: #fff0d6; color: #8a5a00; } .badge.ok { background: #dcf5e6; color: #17703c; } .badge.credited { background: #efe5fb; color: #6b3fa0; }
@media (prefers-color-scheme: dark) { .badge.quote { background: #3a3014; color: #e8c564; } .badge.completed, .badge.paid, .badge.ok { background: #14301f; color: #77d6a0; } .badge.unpaid, .badge.warn, .badge.due { background: #3b1b17; color: #f0988c; } .badge.deposit, .badge.soon { background: #38280e; color: #efbf6a; } .badge.credited { background: #2a1f3a; color: #c8a8f0; } }

/* thumbnails / images */
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: var(--bg); cursor: zoom-in; flex: none; }
.thumb.big { width: 64px; height: 64px; } .thumb.noclick { cursor: default; }
.swatch { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.imgbox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.imgs { display: flex; gap: 6px; flex-wrap: wrap; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; z-index: 100; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 8px; }

/* modal */
.modalbg { position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 60; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 40px 12px; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 720px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal.wide { max-width: 980px; } .modal h2 { font-size: 18px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; z-index: 120; font-weight: 500; box-shadow: 0 6px 24px rgba(0,0,0,.3); max-width: 92vw; }
.toast.err { background: var(--danger); color: #fff; }
.update-notice { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 130; display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--bg); padding: 8px 10px 8px 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.3); max-width: 92vw; }

/* login */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.center .card { width: 100%; max-width: 400px; }

/* order editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } }
.side { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1000px) { .side { position: static; } }
.line { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--panel); }
.line + .line { margin-top: 12px; }
.gcode { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge.file { margin-left: 6px; padding: 0 7px; font-size: 11px; font-weight: 500; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.sub { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.bd { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-variant-numeric: tabular-nums; }
.bd .k { color: var(--muted); } .bd .v { text-align: right; } .bd .tot { font-weight: 700; border-top: 1px solid var(--line); padding-top: 5px; margin-top: 3px; } .bd .big { font-size: 17px; color: var(--accent-text); }
.bd .ind { padding-left: 12px; font-size: 13px; }
.presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.preset { border: 1.5px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 10px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.preset:hover { border-color: var(--accent-text); } .preset.on { border-color: var(--accent-text); background: var(--accent-soft); }
.preset b { display: block; } .preset .p { font-size: 12px; color: var(--muted); } .preset .pr { font-weight: 700; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile .n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; } .tile .l { color: var(--muted); font-size: 12px; }
.bar { height: 10px; background: var(--accent); border-radius: 5px; min-width: 2px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.itemcard { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); cursor: pointer; text-align: left; font: inherit; color: var(--ink); width: 100%; }
.itemcard:hover { border-color: var(--accent-text); }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--accent-text); border-color: var(--accent); } .tabs a:hover { text-decoration: none; }
.subtabs { display: flex; gap: 6px; margin: -4px 0 4px; flex-wrap: wrap; }
.subtabs a, .subtabs button { font: inherit; background: none; cursor: pointer; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.subtabs a.active, .subtabs button.active { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft, transparent); } .subtabs a:hover { text-decoration: none; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.notice.suggest { background: #fff6df; color: #5f4607; border-left: 4px solid #e3b341; } @media (prefers-color-scheme: dark) { .notice.suggest { background: #2f2814; color: #ecd9a0; border-left-color: #b8902f; } }
.notice.warn { background: #fff4d6; color: #7a5500; } @media (prefers-color-scheme: dark) { .notice.warn { background: #3a3014; color: #e8c564; } }
.notice.ok { background: #dcf5e6; color: #17703c; } @media (prefers-color-scheme: dark) { .notice.ok { background: #14301f; color: #77d6a0; } }

/* Hadus wordmark: always shown on the sign-in screen, the Settings page and the profile page (20 px clear space) */
.wordmark { display: block; height: auto; width: 100%; max-width: 220px; }
/* the silver wordmark needs a dark background: a Graphite Dark panel in the light theme, the page itself in the dark theme */
.signature, .login-mark { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; background: var(--graphite); border-radius: var(--radius); color: #94a3b8; }
.signature { align-self: center; margin-top: 8px; width: 100%; max-width: 420px; }
.signature .tagline, .login-mark .tagline { font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.signature .legal { font-size: 11px; text-align: center; }
.signature a.legal { color: inherit; text-decoration: underline; }
.signature > a:first-child { display: block; width: 100%; max-width: 220px; }
@media (prefers-color-scheme: dark) { .signature, .login-mark { background: transparent; } }

/* the in-app help: the manual pages, in the look of the app */
.help { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-nav { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 2px; padding: 12px; max-height: calc(100vh - 90px); overflow-y: auto; }
.help-nav a { display: block; padding: 5px 9px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.help-nav a:hover { background: var(--accent-soft); }
.help-nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.help-nav .help-home { font-weight: 700; }
.help-group { margin: 12px 9px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.help-content { padding: 24px 28px; min-width: 0; }
.help-body, .help-content { line-height: 1.6; max-width: 860px; }
.help-content h1, .help-body h1 { font-size: 26px; margin: 0 0 12px; line-height: 1.2; }
.help-body h2, .help-content h2 { font-size: 19px; margin: 28px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.help-body h3, .help-content h3 { font-size: 15px; margin: 22px 0 6px; }
.help-body h4 { font-size: 14px; margin: 18px 0 4px; }
.help-body p { margin: 0 0 12px; }
.help-body ul, .help-body ol { margin: 0 0 12px; padding-left: 22px; } .help-body li { margin: 3px 0; }
.help-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--accent-soft); border-radius: 5px; padding: 1px 5px; }
.help-body pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 0 0 14px; }
.help-body pre code { background: none; padding: 0; font-size: 12.5px; white-space: pre; }
.help-body blockquote { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--warn); background: var(--bg); border-radius: 0 8px 8px 0; }
.help-body .tablewrap { margin: 0 0 14px; }
.help-body td, .help-body th { white-space: normal; vertical-align: top; }
.help-crumb { margin-bottom: 10px; }
@media (max-width: 800px) {
  .help { grid-template-columns: 1fr; }
  .help-nav { position: static; max-height: none; }
  .help-nav.has-page { display: none; } /* on a phone the page comes first, the crumb above it leads back to the list */
  .help-content { padding: 16px; }
}

/* collapsible sections of the order and its print jobs */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.sec-toggle { font: inherit; color: inherit; background: none; border: 0; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-align: left; }
.sec-head .sec-toggle { font-size: 16px; font-weight: 700; }
.sec-toggle:hover { background: var(--accent-soft); }
.sec-toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.sec-toggle[aria-disabled="true"] { cursor: default; } .sec-toggle[aria-disabled="true"]:hover { background: none; }
.chev { flex: none; color: var(--muted); transition: transform .12s; } .chev.open { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
.sec-summary { color: var(--muted); font-size: 13px; margin-top: -4px; }
.sec-body[hidden], .line-body[hidden] { display: none; }
.line-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.line-head .sec-toggle { font-weight: 700; }
.line-summary { color: var(--muted); font-size: 12px; }
.line-body { margin-top: 10px; }

/* rows of fields with fixed widths (filament, labour, packaging): one line on a wide screen, wrapped on a phone, so nothing is wider than the screen */
.linerow { flex-wrap: nowrap; }
@media (max-width: 720px) {
  .linerow { flex-wrap: wrap; row-gap: 6px; }
  .linerow > .grow { flex: 1 1 100%; }
}

.jobprog { display: inline-flex; align-items: center; gap: 8px; }
.progress { display: inline-block; width: 120px; max-width: 100%; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; vertical-align: middle; }
.progress > span { display: block; height: 100%; background: var(--accent); }
/* the production status of a print job: grey, purple, yellow, light green and a darker green */
.badge.job-waiting { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge.job-printing { background: #efe5fb; color: #6b3fa0; }
.badge.job-post { background: #fff4d6; color: #8a6100; }
.badge.job-packed { background: #e3f6c9; color: #3f6212; }
.badge.job-done { background: #1b7f43; color: #fff; }
@media (prefers-color-scheme: dark) { .badge.job-printing { background: #2a1f3a; color: #c8a8f0; } .badge.job-post { background: #3a3014; color: #e8c564; } .badge.job-packed { background: #263a17; color: #b9e08a; } .badge.job-done { background: #1f7a45; color: #fff; } }
a.badge { text-decoration: none; } a.badge:hover { filter: brightness(0.95); }
.jobbadges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
/* the start page */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.home-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.home-list li + li { border-top: 1px solid var(--line); }
.home-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; color: inherit; text-decoration: none; flex-wrap: wrap; }
.home-row:hover .home-main { text-decoration: underline; }
.home-main { min-width: 0; overflow-wrap: anywhere; }
.home-side { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* the Pro functions on the licence card: one column on a phone; on a wide screen the first 11 stay in the left column and new ones go to the right of them */
.feature-list { margin: 4px 0 0; padding-left: 20px; }
@media (min-width: 760px) { .feature-list { display: grid; grid-auto-flow: column; grid-template-rows: repeat(11, auto); grid-auto-columns: minmax(0, 1fr); column-gap: 40px; } }
/* labels of an order */
.label-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.label-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--line); line-height: 1.6; }
.label-chip.post { background: #efe5fb; color: #6b3fa0; border-color: transparent; } .label-chip.packing { background: #e0f2fe; color: #0b5d8f; border-color: transparent; }
button.label-chip { cursor: pointer; font-family: inherit; opacity: 0.55; } button.label-chip.on { opacity: 1; box-shadow: 0 0 0 2px var(--accent); } button.label-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .label-chip.post { background: #2a1f3a; color: #c8a8f0; } .label-chip.packing { background: #0f2a3a; color: #7cc4ee; } }
.label-icon { flex: none; }

/* an icon that is a button or a link (the shop link of a filament) */
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--accent-text); cursor: pointer; }
.iconbtn:hover { background: var(--accent-soft); text-decoration: none; }
/* a field that looks like a label (the text above, small and grey) but is a div, so a click beside its button does nothing */
.fieldcol { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.fieldcol input { width: 100%; }
