/* tokens */
:root {
  color-scheme: light dark;
  /* Surfaces and text */
  --bg: #f7f6f2;
  --fg: #1c1b18;
  --muted: #6a675f;
  --line: #e6e3da;
  --card: #fff;
  /* Accent: active nav, links, primary actions */
  --accent: #1f5fa6;
  --accent-bg: #e4edf8;
  --accent-fg: #164a85;
  /* States: text colour, then its soft surface */
  --warn: #7a4a0a;
  --warn-bg: #f8ecd3;
  --warn-line: #ecd7a8;
  --ok: #35610f;
  --ok-bg: #e5f0dc;
  --bad: #9a2b2b;
  --bad-bg: #f8e3e1;
  --neu: #55534c;
  --neu-bg: #ecebe5;
  /* Owner role pill: reads as neither a state nor an action */
  --owner: #5b3f99;
  --owner-bg: #eee9f7;
  /* Scale */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-pill: 999px;
  --side-w: 14.5rem;
  --side-w-collapsed: 4rem;
  --sheet-w: 32rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171715;
    --fg: #ecebe6;
    --muted: #a09f97;
    --line: #34332f;
    --card: #21211f;
    --accent: #8dbbee;
    --accent-bg: #1f3249;
    --accent-fg: #a9cdf3;
    --warn: #f2c46f;
    --warn-bg: #3b2a0d;
    --warn-line: #5a4116;
    --ok: #a4cf6b;
    --ok-bg: #1c3010;
    --bad: #f0a09a;
    --bad-bg: #3d1717;
    --neu: #c9c8c1;
    --neu-bg: #302f2b;
    --owner: #c3b0ef;
    --owner-bg: #2a2340;
  }
}
/* base */
* {
  box-sizing: border-box;
}
/* The link colour has no specificity of its own: a component that sets a colour
   on an anchor (.btn, the nav, the contents list) wins in every state. A
   specific rule here let :visited beat them and turned visited nav links blue. */
:where(a),
:where(a:visited) {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Set by app.js to filter a list; beats the component's own display. */
.hide {
  display: none !important;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
}
.i {
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.5 system-ui,
    sans-serif;
}
main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 6rem;
}
h1 {
  font-size: 1.4rem;
  font-weight: 500;
}
h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 2rem;
}
h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}
.muted,
.help,
.sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.25rem 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
/* shell */
.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
  /* Pack the rows to the top. Without this the grid stretches its two rows to
     fill 100vh, which pushes a short page's content to the middle of a phone
     screen (V181-04). */
  align-content: start;
  transition: grid-template-columns 0.2s;
}
.shell[data-collapsed="true"] {
  --side-w: var(--side-w-collapsed);
}
.shell > main {
  max-width: 62rem;
  margin: 0;
  padding: 2rem 2rem 6rem;
}
.side {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: 1rem 0.75rem;
  background: var(--card);
  border-right: 1px solid var(--line);
}
.side .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
}
.logo {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-size: 0.75rem;
  font-weight: 700;
}
.brandtext {
  display: grid;
  justify-items: start;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.2;
}
.icon-btn {
  display: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--neu-bg);
  color: var(--fg);
}
.js #sidebar-toggle,
.signout .icon-btn {
  display: grid;
}
#sidebar-toggle .i {
  transition: transform 0.2s;
}
.shell[data-collapsed="true"] #sidebar-toggle .i {
  transform: rotate(180deg);
}
.grp h4 {
  margin: 0 0 0.25rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.grp + .grp {
  margin-top: 0.6rem;
}
/* A group divider on the phone strip only (V181-05). */
.grp-sep {
  display: none;
}
.side nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.side nav a:hover {
  background: var(--neu-bg);
  color: var(--fg);
}
.side nav a[aria-current="page"] {
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-weight: 600;
}
.switcher {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}
.acct {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.acct form {
  margin: 0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--neu-bg);
  color: var(--neu);
  font-size: 0.8rem;
  font-weight: 600;
}
.meta {
  display: grid;
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.3;
}
.meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.shell[data-collapsed="true"]
  :is(.label, .brandtext, .meta, .grp h4, .switcher) {
  display: none;
}
.shell[data-collapsed="true"] .head,
.shell[data-collapsed="true"] .acct {
  flex-direction: column;
}
.shell[data-collapsed="true"] .grp + .grp {
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}
.shell[data-collapsed="true"] .side nav a {
  justify-content: center;
  padding: 0.55rem 0;
}
/* Phone nav: a bottom bar plus a Menu sheet (V110). Both are built in the
   markup always and hidden here on a wide screen; the sidebar is hidden
   on a phone. With JavaScript off the sheet is not a modal — the grouped nav
   inside it is the fallback. */
.bottom-bar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-bar a,
.bottom-bar button {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.5rem 0.2rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
}
.bottom-bar a .label,
.bottom-bar button .label {
  overflow: hidden;
  text-overflow: ellipsis;
  /* Full words, wrapped onto a second line rather than abbreviated. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
}
.bottom-bar a[aria-current="page"] {
  color: var(--accent-fg);
  font-weight: 600;
}
.bottom-bar button[data-menu-current] {
  color: var(--accent-fg);
}
/* The phone header (V110): the brand and the account link, which the hidden
   sidebar used to carry. It scrolls away with the page — the bar is the fixed
   chrome — so it is not position: fixed. Hidden at and above the breakpoint. */
.phone-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.phone-head .avatar {
  text-decoration: none;
}
.sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
}
.sheet[hidden] {
  display: none;
}
.sheet[data-open] {
  display: block;
}
.sheet .scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--fg) 35%, transparent);
}
.sheet .sheet-panel {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 2;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0));
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
/* From 46rem the same panel is a centred dialog over the scrim. */
@media (min-width: 46rem) {
  .sheet .sheet-panel {
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(var(--sheet-w), calc(100% - 2rem));
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
}
/* An inline sheet (a picker or a help, V113-05) with the script off: the panel
   sits in the page where it was written, with no scrim or title bar, and its
   trigger is hidden, so the control inside is still usable. */
html:not(.js) [data-sheet-open][data-sheet-fallback] {
  display: none;
}
html:not(.js) .sheet[data-sheet-inline] {
  display: block;
  position: static;
}
html:not(.js) .sheet[data-sheet-inline] .scrim,
html:not(.js) .sheet[data-sheet-inline] .sheet-head,
html:not(.js) .sheet[data-sheet-inline] [data-sheet-done] {
  display: none;
}
html:not(.js) .sheet[data-sheet-inline] .sheet-panel {
  position: static;
  transform: none;
  width: auto;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
}
.sheet .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet .sheet-head .icon-btn {
  display: grid;
}
.sheet nav a,
.sheet .acct {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.4rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}
.sheet nav a:hover {
  background: var(--neu-bg);
  color: var(--fg);
}
.sheet nav a[aria-current="page"] {
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-weight: 600;
}
.sheet .acct {
  padding: 0.6rem 0.4rem 0;
  border-top: 1px solid var(--line);
}
.sheet .switcher {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 46rem) {
  .shell,
  .shell[data-collapsed="true"] {
    grid-template-columns: minmax(0, 1fr);
  }
  /* The sidebar is a desktop tool; on a phone the bar and sheet replace it. */
  .side {
    display: none;
  }
  .bottom-bar {
    display: grid;
  }
  .phone-head {
    display: flex;
    margin-bottom: 0.5rem;
  }
  .shell > main {
    padding: 1rem 1rem calc(4.5rem + env(safe-area-inset-bottom, 0));
  }
}
.app-version {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}
.app-version .app-row {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  justify-content: center;
}
.app-version a {
  color: var(--muted);
}
.side .app-version {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0 0.7rem;
  text-align: left;
}
.side .app-version .app-row {
  justify-content: flex-start;
}
.shell[data-collapsed="true"] .side .app-version {
  padding: 0;
  text-align: center;
}
/* controls */
input,
select,
textarea,
button,
.btn {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
}
/* A password field with its Show/Hide button (V181-08). The button keeps a
   44px target so it is usable one-handed on a phone. */
.secret {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
  min-width: 0;
}
.secret input {
  flex: 1;
  min-width: 0;
}
.secret-toggle {
  flex: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.secret-toggle:hover {
  background: var(--neu-bg);
}
.secret-toggle[aria-pressed="true"] {
  background: var(--accent-bg);
  border-color: var(--accent-bg);
  color: var(--accent-fg);
}
/* A generated id (V181-02): the value reads as text with an Edit button, and
   the real input is behind it. A readonly input was still focusable and
   clickable, so it looked editable and broken. With the script off the text is
   hidden and the input editable, so the form still posts. app.js adds `js` and
   marks the field `data-edited` when Edit is pressed. */
.id-view {
  display: none;
}
.id-value {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.js .fld .id-input {
  display: none;
}
.js .fld .id-view {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.js .fld[data-edited] .id-input {
  display: block;
}
.js .fld[data-edited] .id-view {
  display: none;
}

/* Buttons (V171-01). A form has one primary action; everything else is
   secondary, danger or ghost. A bare <button> and .btn-primary are the
   primary action, so existing forms keep their look. The global :focus-visible
   ring in base.css covers all five. */
button,
.btn,
.btn-primary {
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 500;
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-danger {
  background: transparent;
  color: var(--bad);
  border-color: var(--bad);
}
.btn-ghost {
  background: transparent;
  color: var(--accent-fg);
  border-color: transparent;
}
button:disabled,
.btn:disabled {
  background: var(--neu-bg);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
}
/* Small layout helpers shared by the V171 pages. */
.row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
.actions {
  justify-content: space-between;
}
.row-actions {
  text-align: right;
}
.once {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin: 0;
}
.pick {
  background: var(--accent-bg);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}
.pick .row {
  margin-top: 0.4rem;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0.75rem 0;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch i {
  position: relative;
  width: 2.4rem;
  height: 1.35rem;
  border-radius: var(--radius-pill);
  background: var(--neu-bg);
  border: 1px solid var(--line);
  transition: background 0.15s;
  flex: none;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  transition: left 0.15s;
}
.switch input:checked + i {
  background: var(--accent);
  border-color: var(--accent);
}
.switch input:checked + i::after {
  left: 1.1rem;
}
.switch input:focus-visible + i {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 36rem) {
  .two {
    grid-template-columns: 1fr;
  }
}
.pill {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--neu-bg);
  color: var(--neu);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill[data-state="ok"] {
  background: var(--ok-bg);
  color: var(--ok);
}
.pill[data-state="attention"] {
  background: var(--warn-bg);
  color: var(--warn);
}
.pill[data-state="bad"] {
  background: var(--bad-bg);
  color: var(--bad);
}
.pill[data-state="accent"] {
  background: var(--accent-bg);
  color: var(--accent-fg);
}
.pill[data-state="owner"] {
  background: var(--owner-bg);
  color: var(--owner);
}
/* Voided is a deliberate state, not an error, so the badge is neutral. */
.badge {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--neu-bg);
  color: var(--neu);
  vertical-align: middle;
}
/* wizard */
/* The New workshop wizard (V171-03): step list, the steps themselves, the
   review list and the footer. Without JavaScript every step shows and the
   submit is visible; app.js hides the submit and drives the footer. */
.steps {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.steps li {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--neu-bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.steps li[data-state="current"] {
  background: var(--accent-bg);
  color: var(--accent-fg);
}
.steps li[data-state="done"] {
  background: var(--ok-bg);
  color: var(--ok);
}

.js .step {
  display: none;
}
.js .step[data-open] {
  display: block;
}

details.more {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}
details.more summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-fg);
}

.review {
  margin: 0;
}
.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.review-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.review-value {
  display: block;
  margin-top: 0.1rem;
  font-weight: 600;
}

.foot {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.wizard-nav {
  display: none;
}
.js .wizard-nav {
  display: flex;
}
.js .wizard-submit {
  display: none;
}

@media (max-width: 36rem) {
  .steps li {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
}

/* Opening hours (V182-02): one row per day, an Open checkbox and the two times.
   The selects override the generic .fld select width with a second class, so the
   rows stay compact however the partials are ordered. */
.hours {
  display: grid;
  gap: 0.35rem;
  margin: 0.25rem 0 0.4rem;
}
.hours-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--fg);
}
.hours-open {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 4.5rem;
  flex: none;
}
.hours-open input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
.hours-day {
  font-weight: 600;
}
.fld .hours-row select {
  width: auto;
  font-size: 0.9rem;
  color: var(--fg);
}
.hours-to {
  color: var(--muted);
}
@media (max-width: 36rem) {
  .hours-open {
    min-width: 0;
  }
  .hours-row {
    flex-wrap: wrap;
  }
}

/* The People step (V113-04): the primary recipient stands apart from the overrides,
   and the review repeats the split. */
.primary {
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.review-group {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* A picker field (V113-05): the control sits in a sheet, and the field shows its
   current value as a button styled like the select it replaces. */
.picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  background: var(--card);
  color: var(--fg);
}
.picker-trigger::after {
  content: "\25BE";
  color: var(--muted);
}
.sheet-panel select[size],
.sheet-panel input[type="text"] {
  width: 100%;
  font-size: 1rem;
  color: var(--fg);
}
.help-steps {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

/* The page-level summary and the creation-failure screen (V113-06) sit above the
   step bar, so they need room before it. */
.banner[data-error-summary],
.banner[data-creation-failed] {
  margin-bottom: 1rem;
}
.banner[data-creation-failed] p {
  margin: 0.5rem 0;
}

/* cards */
.status {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.status strong {
  display: block;
  font-size: 1.15rem;
}
.status p {
  margin: 0;
  font-size: 0.9rem;
}
.status .dot {
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.5rem;
  border-radius: var(--radius-pill);
  background: currentColor;
}
.status[data-state="ok"] {
  background: var(--ok-bg);
  border-color: var(--ok-bg);
  color: var(--ok);
}
.status[data-state="attention"] {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn);
}
.status[data-state="bad"] {
  background: var(--bad-bg);
  border-color: var(--bad-bg);
  color: var(--bad);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}
.card {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.card h2 {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.card .value {
  margin: 0.15rem 0;
  font-size: 1.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.card .sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.card-action {
  margin-top: 0.4rem;
  font-size: 0.85rem;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}
.card h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}
/* tables */
/* Access: a row's panel and the Add account panel are collapsed until opened
   (V171-04). Without script they stay open, so the form still works. */
.js tr.panel {
  display: none;
}
.js tr.panel[data-open] {
  display: table-row;
}
.js #access-add-panel,
.js #recipient-add-panel {
  display: none;
}
.js #access-add-panel[data-open],
.js #recipient-add-panel[data-open] {
  display: block;
}
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td strong a {
  font-weight: 600;
}
td code {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  word-break: break-word;
}
.dim {
  color: var(--muted);
  opacity: 0.7;
}
tr[data-quiet] {
  opacity: 0.6;
}
/* The receipt's facts list (V181-03). A bare table forced 32rem and scrolled a
   phone sideways; a label above its value wraps to any width. */
.facts {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.fact {
  display: grid;
  gap: 0.1rem;
}
.fact dt {
  color: var(--muted);
  font-size: 0.75rem;
}
.fact dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.empty {
  color: var(--muted);
  padding: 1rem 0;
}
.search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.search input[type="text"] {
  flex: 1;
  min-width: 12rem;
}
/* Phone: the order list stacks each row into a small card; the other
   tables keep their columns and scroll sideways inside .table-wrap. */
@media (max-width: 36rem) {
  .table-wrap[data-stack="orders"] table {
    min-width: 0;
  }
  .table-wrap[data-stack="orders"] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table-wrap[data-stack="orders"] tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 0.75rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--line);
  }
  .table-wrap[data-stack="orders"] tbody tr:last-child {
    border-bottom: 0;
  }
  .table-wrap[data-stack="orders"] td {
    display: block;
    padding: 0;
    border: 0;
  }
  .table-wrap[data-stack="orders"] td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .table-wrap[data-stack="orders"] td:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
  }
  .table-wrap[data-stack="orders"] td:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .table-wrap[data-stack="orders"] td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 0.85rem;
    color: var(--muted);
  }
  .table-wrap[data-stack="orders"] td:nth-child(2):not(.has-due) {
    display: none;
  }
  .table-wrap[data-stack="orders"] td.has-due::before {
    content: "Due ";
  }
}
/* settings */
.group {
  margin: 0 0 1.5rem;
}
.group > h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.panel {
  margin: 0 0 0.75rem;
  padding: 0 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stage {
  margin: 0.75rem 0;
  padding: 0 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stage h3 {
  padding-top: 0.9rem;
}
.stage > .muted {
  margin: 0;
  padding-bottom: 0.6rem;
}
.setting {
  display: grid;
  /* The label column gives way first: a control crushed to nothing is worse than
     a wrapped label. The breakpoint below stacks the pair before that happens. */
  grid-template-columns: minmax(0, 15rem) minmax(12rem, 1fr);
  gap: 0.5rem 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}
.stage > .setting:first-child {
  border-top: 0;
}
.setting-info label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}
.setting-info .help {
  margin: 0.2rem 0 0;
}
.setting-control {
  min-width: 0;
}
.setting-control > .help,
.setting-control > .muted {
  margin: 0.4rem 0 0;
}
.setting.dirty,
.setting.has-error {
  margin: 0 -1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
}
.setting.dirty {
  background: var(--accent-bg);
  border-top-color: transparent;
}
.setting.has-error {
  background: var(--bad-bg);
  border-top-color: transparent;
}
.setting.dirty .setting-info label::after {
  content: "Edited";
  margin-left: 0.5rem;
  padding: 0.05rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--card);
  font-size: 0.65rem;
  font-weight: 600;
  vertical-align: middle;
}
.control-line {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
/* A flex child defaults to min-width: auto, so an input or a unit select refuses to
   shrink below its content and the row runs past the column. At 768 the Settings
   page overflowed by 59 px until these were allowed to shrink (V182-05). This
   matches the same rule in controls.css. */
.control-line input,
.control-line select {
  min-width: 0;
}
.control-line input {
  max-width: 14rem;
}
.unit {
  color: var(--muted);
}
.field-error {
  color: var(--bad);
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}
.field-error:empty {
  display: none;
}
.fld.has-error input,
.fld.has-error select,
.fld.has-error textarea {
  border-color: var(--bad);
}
.confirm-row {
  margin-top: 0.5rem;
}
.js .confirm-row {
  display: none;
}
.js .confirm-row.show {
  display: block;
}
.save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}
.save-bar span {
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0;
}
.chip {
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  font-family: ui-monospace, monospace;
}
.preview {
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0;
}
/* Settings and Messages layout (V171-05): a section list beside collapsible
   sections, and a grouped list with tabs. */
.settings-tools {
  margin: 0 0 1rem;
}
.settings-tools input {
  max-width: 26rem;
}
.set {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.toc {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.toc a {
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
}
.toc a:hover {
  background: var(--neu-bg);
}
.toc a.cur {
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-weight: 600;
}
.sec {
  margin: 0 0 0.75rem;
}
.sec > summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 600;
  list-style: none;
}
.sec > summary::-webkit-details-marker {
  display: none;
}
.sec > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}
.sec[open] > summary::after {
  content: "\2212";
}
.sec .body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--line);
}
.tabs {
  margin: 0 0 0.75rem;
}
.messages .clip {
  display: inline-block;
  max-width: 30rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.messages .msg-roles {
  white-space: nowrap;
}
.messages tr.msg.dirty {
  background: var(--accent-bg);
}
.messages tr.msg.dirty .msg-when::after {
  content: "Edited";
  margin-left: 0.5rem;
  padding: 0.05rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--card);
  font-size: 0.65rem;
  font-weight: 600;
}
.preview .unknown {
  color: var(--bad);
  font-weight: 600;
  /* A placeholder chip can be long ({customer_name}) and sits in a line that
     would otherwise not wrap, pushing the row past its column. */
  overflow-wrap: anywhere;
}
@media (max-width: 52rem) {
  .set {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    overflow: auto;
  }
  /* Two columns need a label beside a control; below this the label sits above
     the control instead, so neither is crushed. */
  .setting {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 36rem) {
  .setting.dirty,
  .setting.has-error {
    margin: 0 -0.5rem;
    padding: 0.9rem 0.5rem;
  }
}
/* recipients */
/* Coverage strip (V171-09): one cell per role, amber when the owner is missing,
   red when everyone who holds a role has muted alerts. A job nobody does reads
   quietly (V111-06): a small workshop genuinely has no accounts person, so an empty
   non-owner cell is the base card, not a warning. */
.cov {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}
.cov .c {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  background: var(--card);
  font-size: 0.85rem;
}
.cov .c b {
  font-size: 0.9rem;
}
.cov .c span {
  color: var(--muted);
}
/* Phone: the strip becomes short pills of role + count; the sentence stays for
   wide screens where there is room for it (V181-06). */
.cov-count {
  display: none;
}
.cov .c.warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}
.cov .c.warn span {
  color: var(--warn);
}
.cov .c.warn .cov-count {
  color: var(--warn);
}
.cov .c.bad {
  background: var(--bad-bg);
  border-color: var(--bad);
}
.cov .c.bad span {
  color: var(--bad);
}
.owner-alerts {
  margin: 0 0 1rem;
}
.warn-text {
  color: var(--warn);
}
.chat code {
  margin-right: 0.35rem;
}
.row-error td {
  padding-top: 0;
}
.row-error .field-error {
  margin: 0;
}
.switch-form {
  margin: 0;
}
.rcpt {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.2fr;
  gap: 0.6rem 1rem;
  align-items: end;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.rcpt:last-child {
  border-bottom: 0;
}
.rcpt[data-active="false"] {
  opacity: 0.65;
}
.rcpt > .badge {
  grid-column: 1 / -1;
  justify-self: start;
}
.fld {
  display: grid;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.fld input:not([type="checkbox"]):not([type="radio"]),
.fld select {
  width: 100%;
  font-size: 1rem;
  color: var(--fg);
}
/* A stage checkbox row (V181-07): the field grid and the 100% input width were
   stretching the box, so its label dropped onto a line of its own. The box
   keeps its size and the label wraps under itself. */
label.fld[data-stage] {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--fg);
}
label.fld[data-stage] input[type="checkbox"] {
  flex: none;
  width: auto;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}
/* The workshop checklist: a quiet list, not default bullets. */
.check-list {
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
}
.check-item {
  margin: 0.5rem 0 0.6rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--line);
}
.check-item > b {
  font-weight: 600;
}
.check-item .help {
  margin: 0.15rem 0;
}
/* The Finish setup card (V113-07): number, text and action on one line. The action
   stays on the row's first line and the text wraps beside it, so a long help line
   never pushes the button off the edge at 360. */
.check-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.check-head h2 {
  margin: 0;
}
.setup-list > .check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.25rem 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.setup-list > .check-item + .check-item {
  margin-top: 0.5rem;
}
.check-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.8rem;
  font-weight: 600;
}
.check-text {
  min-width: 0;
}
.check-action {
  white-space: nowrap;
}
/* On a phone the action drops under the text, so a long label or help line keeps
   the full width beside the number. */
@media (max-width: 36rem) {
  .setup-list > .check-item .check-action {
    grid-column: 2;
    justify-self: start;
  }
}
.tog {
  grid-column: 1 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9rem;
}
.tog input {
  accent-color: var(--accent);
}
.act {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.rcpt > .confirm-row {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.rcpt .confirm-row label {
  display: grid;
  gap: 0.25rem;
}
.rcpt .confirm-row input {
  font-size: 1rem;
  color: var(--fg);
}
.switch-label {
  display: none;
}
@media (max-width: 36rem) {
  .rcpt {
    grid-template-columns: minmax(0, 1fr);
  }
  .tog {
    grid-column: auto;
  }
  .act {
    justify-content: flex-start;
  }

  /* Coverage: six short pills, at most two lines (V181-06). */
  .cov {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .cov .c {
    flex-direction: row;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
  }
  .cov .c b {
    font-size: 0.78rem;
  }
  .cov .cov-note {
    display: none;
  }
  .cov .cov-count {
    display: inline;
    font-variant-numeric: tabular-nums;
  }

  /* A recipient row becomes a card: name and Edit on the first line, role and
     status under it, chat id, then the two switches with visible labels. */
  .table-wrap[data-stack="recipients"] table,
  .table-wrap[data-stack="recipients"] tbody {
    display: block;
    min-width: 0;
  }
  .table-wrap[data-stack="recipients"] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table-wrap[data-stack="recipients"] tbody tr[data-row="recipient"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.3rem 0.75rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--line);
  }
  .table-wrap[data-stack="recipients"] tbody tr[data-row="recipient"] td {
    display: block;
    padding: 0;
    border: 0;
  }
  .table-wrap[data-stack="recipients"] td.who {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .table-wrap[data-stack="recipients"] td.row-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .table-wrap[data-stack="recipients"] td.role {
    grid-column: 1;
    grid-row: 2;
  }
  .table-wrap[data-stack="recipients"] td.status {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
  .table-wrap[data-stack="recipients"] td.chat {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
  }
  .table-wrap[data-stack="recipients"] td.chat code {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  .table-wrap[data-stack="recipients"] td.chat .btn {
    flex: none;
  }
  .table-wrap[data-stack="recipients"] td.role::before,
  .table-wrap[data-stack="recipients"] td.chat::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-size: 0.75rem;
  }
  .table-wrap[data-stack="recipients"] td.chat::before {
    flex: none;
  }
  .table-wrap[data-stack="recipients"] td.alerts {
    grid-column: 1;
    grid-row: 4;
  }
  .table-wrap[data-stack="recipients"] td.digest {
    grid-column: 2;
    grid-row: 4;
  }
  .table-wrap[data-stack="recipients"] .switch {
    margin: 0.2rem 0;
  }
  .switch-label {
    display: inline;
    font-size: 0.85rem;
    color: var(--muted);
  }
  .table-wrap[data-stack="recipients"] tbody tr.panel {
    display: block;
    padding: 0;
    border-bottom: 1px solid var(--line);
  }
  .table-wrap[data-stack="recipients"] tbody tr.panel > td,
  .table-wrap[data-stack="recipients"] tbody tr.row-error > td {
    display: block;
    padding: 0 0.85rem 0.75rem;
    border: 0;
  }
  .table-wrap[data-stack="recipients"] tbody tr.row-error {
    display: block;
  }
  .js .table-wrap[data-stack="recipients"] tbody tr.panel {
    display: none;
  }
  .js .table-wrap[data-stack="recipients"] tbody tr.panel[data-open] {
    display: block;
  }
}
/* A person's sign-in sits inside their Edit panel (V181-06). */
.signin-block {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.signin-block h3 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.signin,
.signin form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.signin input[type="email"] {
  flex: 1;
  min-width: 12rem;
}
.signin .email {
  overflow-wrap: anywhere;
}
/* The primary and the per-job overrides (V113-04): a quiet label over each group,
   the same grouping the New workshop wizard asks in. */
h2.grouping {
  margin: 1.5rem 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* orders */
.crumb {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}
.order-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.order-title h1 {
  margin: 0;
}
.order-head {
  margin: 0.5rem 0 0;
}
.order-head p {
  margin: 0.25rem 0;
}
.waiting {
  color: var(--warn);
  font-weight: 500;
}
.day {
  margin: 1.25rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.timeline {
  list-style: none;
  margin: 0 0 0 0.45rem;
  padding: 0;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.25rem 1rem;
  padding: 0.5rem 0 0.5rem 1.25rem;
  font-size: 0.9rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -0.43rem;
  top: 0.95rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--muted);
  border-radius: var(--radius-pill);
  background: var(--card);
}
.timeline li[data-kind="alert"]::before {
  border-color: var(--warn);
  background: var(--warn-bg);
}
.timeline li[data-kind="failed-send"]::before {
  border-color: var(--bad);
  background: var(--bad-bg);
}
.timeline li[data-kind="alert"] strong {
  color: var(--warn);
}
.timeline li[data-kind="failed-send"] strong {
  color: var(--bad);
}
.timeline time {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.timeline time small {
  display: block;
  font-size: 0.78rem;
}
.timeline code {
  display: block;
  margin-top: 0.15rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-word;
}
.void-confirm {
  margin: 0.5rem 0;
}
.void-confirm label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
@media (max-width: 36rem) {
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .timeline time small {
    display: inline;
    margin-left: 0.5rem;
  }
}
/* Danger zone: reserved for destructive actions such as voiding an order. */
.zone {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--bad-bg);
  border-radius: var(--radius);
}
.zone h3 {
  color: var(--bad);
}
/* The Orders filters (V171-06): search, state, stage and the two due dates. */
.filters {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.75rem;
}
/* A narrow field must be allowed to shrink. An input's intrinsic width is about
   20 characters, so without this the five tracks overflow between 46 rem and a
   full-width main column (V181-12 verification). */
.filters input,
.filters select {
  min-width: 0;
}
.filters label {
  min-width: 0;
}
.filters-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.5rem;
}
/* The filter panel (V182-04): on a phone the filters collapse to one row so the
   orders are not pushed below the fold. The server renders it open; app.js closes
   it on a phone when no filter is set. On wide screens the summary is hidden and
   the form shows as before. */
.filter-panel > summary {
  display: none;
}
@media (max-width: 46rem) {
  .filters {
    grid-template-columns: minmax(0, 1fr);
  }
  .filter-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--fg);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .filter-panel > summary::-webkit-details-marker {
    display: none;
  }
  .filter-panel > summary::after {
    content: "\25B8";
    color: var(--muted);
  }
  .filter-panel[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .filter-panel[open] > summary::after {
    content: "\25BE";
  }
  .filter-panel[open] .filters {
    margin-top: 0.75rem;
  }
}
.zone .help {
  margin: 0.2rem 0 0.6rem;
}
.notice {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--neu-bg);
  border-radius: var(--radius);
}
.notice p {
  margin: 0;
}
/* banners */
.banner {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
}
.banner.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.banner.error {
  background: var(--bad-bg);
  color: var(--bad);
}
.login-card {
  max-width: 22rem;
  margin: 3rem auto;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.login-card h1 {
  margin-top: 0;
}
.login-card form {
  display: grid;
  gap: 0.6rem;
}
/* The created screen (V113-08): the workshop's facts in a quiet two-column list. */
.banner.created {
  margin-bottom: 1.25rem;
}
.banner.created h2 {
  margin: 0 0 0.5rem;
}
.banner.created .facts {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}
.banner.created .facts > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.75rem;
}
.banner.created dt {
  color: var(--muted);
}
.banner.created dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
