/* Sparks look: colours from starelectric.ca and the Sparks logo kit (static/sparks/brand). */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght.260c81a4759b.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --brand: #f5c018; --brand-dark: #d4a812; --on-brand: #111111; --ink: #111111; --ink-2: #3a3a3a; --muted: #666666;
  --sidebar: #111111; --sidebar-2: #1e1e1e; --sidebar-line: #262626; --sidebar-text: #d0c5bf; --sidebar-quiet: #a39a94; --accent: #4a3d13;
  --ground: #f4f4f4; --card: #ffffff; --line: #e5e5e5; --line-soft: #efefef; --pill: #f1f1f1;
  --radius-sm: 10px; --radius: 16px; --radius-pill: 999px;
  --shadow: 0 10px 28px rgba(17, 17, 17, .05);
  --sidebar-w: 248px; --tabbar-h: 64px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { font-family: "Inter", "Segoe UI", Arial, sans-serif; background: var(--ground); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
:where(input, select, textarea, button, a):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
a { color: inherit; }
img { max-width: 100%; }
.icon { flex: none; }

/* Layout: sidebar on desktop, a drawer behind the menu button below 1100px, plus a bottom tab bar on phones. */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: none; background: var(--sidebar); color: #fff; display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 18px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.brand { display: block; line-height: 0; }
.brand img { width: 176px; height: auto; }
/* The company using Sparks: a quiet line above the signed-in person, so the Sparks logo stands alone at the top. */
.workspace { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-size: 12px; color: var(--sidebar-quiet); }
.workspace-logo { height: 20px; width: auto; max-width: 96px; flex: none; object-fit: contain; }
.workspace-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-initials { width: 22px; height: 22px; flex: none; border-radius: 6px; background: #2a2a2a; color: var(--sidebar-text); display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); color: var(--sidebar-text); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover { background: var(--sidebar-2); color: #fff; }
/* Grouped menu: small labels that aren't links, real links under each. Settings is the gear in the profile row. */
.nav .nav-label { margin-top: 14px; }
.nav > .nav-label:first-child { margin-top: 0; }
@media (min-width: 1101px) { .nav a { min-height: 40px; } }
.nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav a.active .icon { color: var(--brand); }
.who { display: flex; align-items: center; gap: 8px; padding: 14px 6px 0; border-top: 1px solid var(--sidebar-line); font-size: 13px; }
.who-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.who-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-role { color: var(--sidebar-quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Settings gear beside Sign out: a quiet round button, yellow when you're on a settings page. */
.who-gear { width: 34px; height: 34px; margin-right: -2px; flex: none; border-radius: var(--radius-pill); display: grid; place-items: center; color: var(--sidebar-quiet); transition: background .15s ease, color .15s ease; }
.who-gear .icon { width: 18px; height: 18px; }
.who-gear:hover { background: var(--sidebar-2); color: #fff; }
.who-gear.active { background: var(--accent); color: var(--brand); }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #2a2a2a; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
button.link { background: none; border: 0; padding: 0; color: var(--sidebar-text); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.nav-close, .topbar, .tabbar, .scrim { display: none; }
.main { flex: 1; min-width: 0; padding: 36px 40px 56px; position: relative; isolation: isolate; }
/* Wide screens: content stops at 1440px and sits centred right of the sidebar; the bar and background stay full width. */
.shell > .main { --content: 1440px; }
.shell > .main > .page { max-width: var(--content); margin-inline: auto; position: relative; }

@media (max-width: 1099px) {
  .who-gear { width: 44px; height: 44px; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--sidebar); color: #fff; padding: 8px 16px 8px 8px; }
  .topbar-logo { line-height: 0; flex: 1; }
  .topbar-logo img { width: 160px; height: auto; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .nav-open .sidebar { transform: none; visibility: visible; transition: transform .2s ease; }
  .nav-close { display: grid; }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); }
  .main { padding: 28px 24px 48px; }
}
@media (max-width: 719px) {
  .tabbar { display: flex; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 600 11px Inter, sans-serif; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; position: relative; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active::after { content: ""; position: absolute; bottom: 2px; width: 18px; height: 3px; border-radius: 2px; background: var(--brand); }
  .main { padding: 20px 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* Type */
.kicker { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.page-title { font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; margin: 0 0 24px; }
.page-title:has(+ .page-sub) { margin-bottom: 6px; }
.page-sub { margin: 0 0 24px; font-size: 15px; color: var(--muted); }
.greeting { font-size: 40px; line-height: 1.1; font-weight: 300; letter-spacing: -.02em; margin: 0 0 24px; }
.greeting b { font-weight: 800; }
@media (max-width: 719px) { .page-title { font-size: 30px; } .greeting { font-size: 30px; } }
.muted { color: var(--muted); }
.warn { color: #b45309; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card h2 { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.card.narrow { width: 100%; max-width: 420px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.card-head a { font-size: 13px; font-weight: 600; }
.section { margin-top: 20px; }
/* The one dark card on a page (at most one): the sign-in page's faded sparks behind it, a yellow button inside. */
.spotlight { background: var(--sidebar-2); color: #fff; border-color: var(--sidebar-2); position: relative; overflow: hidden; isolation: isolate; }
.spotlight::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("patterns/sparks-dark.94c92f324ad6.svg") 0 0 / 180px 180px; -webkit-mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 75%); mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 75%); }
.spotlight .muted { color: var(--sidebar-text); }

/* Figures */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stats a { text-decoration: none; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column-reverse; gap: 8px; height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.stats a:hover div { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(17, 17, 17, .08); }
.stats strong { font-size: 32px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; background: var(--brand); color: var(--on-brand); border: 0; border-radius: var(--radius-pill); text-decoration: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; }
.btn:hover { background: var(--brand-dark); }
.btn-quiet { background: #fff; border: 1px solid var(--line); font-weight: 600; }
.btn-quiet:hover { background: #f7f7f7; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-wide { display: flex; width: 100%; margin-top: 18px; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .22); font-weight: 600; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }

/* Pages, lists and forms */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .page-title { margin-bottom: 20px; }
.page-head .page-title:has(+ .page-sub) { margin-bottom: 6px; }
.page-head:has(.page-sub) { margin-bottom: 24px; }
.page-head .page-sub { margin-bottom: 0; }
.page-head > div { min-width: 0; }
/* The title takes the room and wraps; the actions stay on the right until the screen is too narrow. */
.page-head > div:first-child:not(:only-child) { flex: 1 1 320px; }
.page-head > .actions { flex: 0 1 auto; justify-content: flex-end; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.toolbar input[type=search] { flex: 1 1 260px; padding-left: 18px; }
/* Pills: buttons, toolbar searches and filters. Form fields keep soft corners. */
.toolbar input, .toolbar select, input[type=search] { border-radius: var(--radius-pill); }
input, select, textarea { font: inherit; font-size: 14px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); max-width: 100%; }
input:hover, select:hover, textarea:hover { border-color: #cfcfcf; }
/* Dropdowns: our own chevron with room on the right, and (where the browser allows) a themed list. */
select:not([multiple]):not([size]) { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23666666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 12px; }
@supports (appearance: base-select) {
  select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size]) { display: inline-flex; align-items: center; }
  select:not([multiple]):not([size]) selectedcontent { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  select::picker-icon { display: none; }
  select::picker(select) { margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(17, 17, 17, .14); }
  select:not([multiple]):not([size]) option { padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); }
  select:not([multiple]):not([size]) option::checkmark { display: none; }
  select:not([multiple]):not([size]) option:hover, select:not([multiple]):not([size]) option:focus-visible { background: #f4f4f4; outline: none; }
  select:not([multiple]):not([size]) option:checked { background: color-mix(in srgb, var(--brand) 22%, #fff); font-weight: 600; }
}
input[type=checkbox], input[type=radio] { min-height: 0; width: 18px; height: 18px; accent-color: var(--ink); }
textarea { width: 100%; min-height: 90px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap { border: 0; box-shadow: none; border-radius: 0; margin: 0 -22px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); padding: 12px 16px; background: #fafafa; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.card .table th { background: transparent; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfaf3; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-link { font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.row-link:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--muted); padding: 32px; }
/* On phones, list tables turn into stacked rows: classes o1-o5 set the order, s-full takes a line, s-end sits on the right. */
@media (max-width: 719px) {
  .table-stack thead { display: none; }
  .table-stack tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td { display: block; padding: 0; border: 0; }
  .table-stack td.hide-sm { display: none; }
  .table-stack tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
  .table.table-stack tfoot th { padding: 0; border: 0; }
  .table-stack tfoot th.hide-sm, .table-stack tfoot th:empty { display: none; }
  .table-stack tr:hover td { background: none; }
  .table-stack td.s-full, .table-stack td.empty { flex-basis: 100%; }
  .table-stack td.s-end { margin-left: auto; }
  .table-stack td.s-quiet { color: var(--muted); font-size: 13px; }
  .table-stack td.warn { color: #b45309; }
  .table-stack td.num { text-align: left; }
  .table-stack .o1 { order: 1; } .table-stack .o2 { order: 2; } .table-stack .o3 { order: 3; } .table-stack .o4 { order: 4; } .table-stack .o5 { order: 5; }
}
/* Status pills: neutral grey, the lookup's colour lives in the dot so it never fights the brand colour. */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--pill); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--badge, #a0a0a0); }
/* Warnings the office must notice (credit hold) keep a red pill. */
.badge-danger { background: #fdecea; color: #991b1b; --badge: #991b1b; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 16px 0; font-size: 14px; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 719px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 8px; } }
.notes { white-space: normal; background: var(--ground); padding: 12px 14px; border-radius: var(--radius-sm); }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -12px 0 16px; }
.form-card { max-width: 880px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 13px; }
.field-wide { grid-column: 1 / -1; }
.field-check label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.field ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.field ul label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.field small.error, .has-error label { color: #b91c1c; }
.has-error input, .has-error select { border-color: #b91c1c; }
.form-actions { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.inline-form label { font-weight: 600; font-size: 13px; }
.note-form { display: grid; gap: 8px; justify-items: start; margin-bottom: 16px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { position: relative; padding-left: 20px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #d8d8d8; }
.timeline li.system { color: var(--muted); }
.timeline li.system::before { background: #a0a0a0; }
.apply-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fffaf0; border: 1px solid var(--brand); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.flash { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: #fff6d6; border: 1px solid #f3df9b; font-size: 14px; }
.flash-error { background: #fdecea; border-color: #f5c2bd; }
.flash-success { background: #ecf7ef; border-color: #bfe3c8; }

/* Sign-in and other full-screen pages */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.center.dark { background: #09090b; background-image: radial-gradient(ellipse at 50% 30%, #1d1d1f 0%, #09090b 60%); }
.signin { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.signin-logo { width: 280px; height: auto; }
.signin .card { width: 100%; padding: 26px; }
.signin .card h1 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.signin-foot { display: flex; align-items: center; gap: 8px; color: var(--sidebar-quiet); font-size: 12.5px; }
.signin-foot img { height: 16px; width: auto; opacity: .85; }
.dev-login { margin-top: 22px; padding-top: 18px; border-top: 1px dashed #e0b84a; display: grid; gap: 8px; }
.dev-login label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #92400e; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- The animated Sparks logo (core/_logo.html) ---------- */
.lg { display: block; height: auto; overflow: visible; }
.lg-l { fill: #fff; }
.lg-stop0 { stop-color: #fff; }
.lg-stop1 { stop-color: var(--brand); }
.lg-fade { stop-color: var(--brand); stop-opacity: 0; }
.lg-hot { stop-color: #fff8dc; }
/* A pulse of light that runs along the line to the star (sign-in page, between idle flickers and sparks). */
.lg-pulse { opacity: 0; filter: drop-shadow(0 0 3px var(--brand)); }
.lg-pulse.run { animation: lg-run .5s cubic-bezier(.5, 0, .9, .6) both; }
@keyframes lg-run { 0% { opacity: 0; transform: translateX(20px); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(270px); } }
.lg .lg-star.hit { animation: lg-hit .5s ease-out; }
@keyframes lg-hit { 35% { filter: brightness(1.5) drop-shadow(0 0 5px var(--brand)); } }
.lg-star, .lg-spark { fill: var(--brand); }
.lg-trace { fill: none; stroke: var(--brand); stroke-width: .9; stroke-dasharray: 1; opacity: 0; }
.lg-spark, .lg-streak { transform-box: fill-box; transform-origin: center; }
.lg-streak { opacity: 0; }
.lg-up { transform-origin: 50% 100%; --ty: -8px; } .lg-right { transform-origin: 0 50%; --tx: 8px; } .lg-down { transform-origin: 50% 0; --ty: 8px; }
@keyframes lg-flicker { 0% { opacity: 0; } 8% { opacity: .85; } 12% { opacity: .1; } 20% { opacity: 1; } 24% { opacity: .35; } 32%, 100% { opacity: 1; } }
@keyframes lg-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes lg-trace { 0% { opacity: 1; stroke-dashoffset: 1; } 85% { opacity: 1; stroke-dashoffset: 0; } 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes lg-fill { from { opacity: 0; } to { opacity: 1; } }
@keyframes lg-shoot { 0% { opacity: 1; transform: scale(0); } 45% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15) translate(var(--tx, 0), var(--ty, 0)); } }
@keyframes lg-pop { 0% { opacity: 0; transform: scale(0) rotate(-60deg); } 60% { opacity: 1; transform: scale(1.7) rotate(12deg); } 100% { opacity: 1; transform: none; } }
@keyframes lg-tick { 0% { opacity: .08; } 14% { opacity: .9; } 24% { opacity: .15; } 40% { opacity: 1; } 52% { opacity: .35; } 66%, 100% { opacity: 1; } }
@keyframes lg-twinkle { 40% { transform: scale(1.6) rotate(20deg); } }
:where(.lg-play, .logo-play .sidebar .lg) .lg-l { animation: lg-flicker .9s steps(1, end) both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-l1 { animation-delay: .05s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-l2 { animation-delay: .28s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-l3 { animation-delay: .14s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-l4 { animation-delay: .36s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-l5 { animation-delay: .22s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-l6 { animation-delay: .44s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-line { animation: lg-draw .7s cubic-bezier(.65, 0, .35, 1) 1s both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-trace { animation: lg-trace .6s ease-in-out 1.62s both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-star { animation: lg-fill .35s ease 2.1s both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-up { animation: lg-shoot .55s cubic-bezier(.2, .8, .3, 1) 2.3s both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-right { animation: lg-shoot .55s cubic-bezier(.2, .8, .3, 1) 2.34s both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-down { animation: lg-shoot .55s cubic-bezier(.2, .8, .3, 1) 2.38s both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-spark { animation: lg-pop .45s cubic-bezier(.3, 1.7, .5, 1) both; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-s1 { animation-delay: 2.6s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-s2 { animation-delay: 2.78s; }
:where(.lg-play, .logo-play .sidebar .lg) .lg-s3 { animation-delay: 2.96s; }
/* The menu's logo is small: no streaks shooting past it. */
.sidebar .lg-streak { display: none; }
/* Idle moments on the sign-in page, added by signin.js. */
.lg .lg-l.tick { animation: lg-tick .7s steps(1, end); }
.lg .lg-spark.tw { animation: lg-twinkle .6s ease; }

/* ---------- Menu touches ---------- */
.brand .lg { width: 176px; }
.nav a { position: relative; transition: background .15s ease, color .15s ease; }
.nav a .icon { transition: transform .15s ease; }
.nav a:hover .icon { transform: translateX(2px); }
.nav a.active { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent)); }
.nav-label { padding: 0 14px 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--sidebar-quiet); opacity: .7; }
.who { border-top: 0; position: relative; }
.who::before { content: ""; position: absolute; left: 6px; right: 6px; top: 0; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .14), color-mix(in srgb, var(--brand) 70%, transparent)); }
@media (max-width: 1099px) {
  .topbar { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06); }
  .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25) 40%, var(--brand)); opacity: .7; }
}

/* ---------- Settings ---------- */
.setting-link { text-decoration: none; display: block; transition: transform .15s ease, box-shadow .15s ease; }
.setting-link:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(17, 17, 17, .08); }
.setting-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sidebar); color: var(--brand); margin-bottom: 14px; }
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1099px) { .brand-layout { grid-template-columns: 1fr; } }
.logo-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-current { display: grid; place-items: center; min-width: 96px; height: 56px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--sidebar); }
.logo-current img { max-height: 40px; width: auto; }
.workspace-initials.big { width: 36px; height: 36px; font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500 !important; margin-top: 6px; }
.logo-pick input[type=file] { flex: 1 1 220px; font: inherit; font-size: 14px; color: var(--muted); }
.logo-pick input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; margin-right: 12px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); cursor: pointer; }
.colour-pick { display: flex; align-items: center; gap: 10px; }
.colour-pick input[type=color] { width: 52px; height: 42px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.colour-pick code { font-size: 13px; color: var(--muted); }
.small { font-size: 13px; }
.brand-preview { position: sticky; top: 56px; }
.pv { display: flex; height: 230px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--ground); }
.pv-side { width: 42%; background: var(--pv-dark); color: #fff; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.pv-logo { font-weight: 700; font-size: 17px; padding: 0 6px 10px; letter-spacing: -.01em; position: relative; }
.pv-logo i { position: absolute; left: 22px; right: 2px; bottom: 7px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #fff, var(--pv-brand)); }
.pv-item { display: flex; align-items: center; gap: 7px; padding: 6px; border-radius: 6px; color: #d0c5bf; }
.pv-item b { width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px; }
.pv-item.active { background: var(--pv-accent); color: #fff; }
.pv-item.active b { color: var(--pv-brand); }
.pv-ws { margin-top: auto; display: flex; align-items: center; gap: 6px; color: #a39a94; font-weight: 600; overflow: hidden; white-space: nowrap; }
.pv-mark { flex: none; height: 14px; width: auto; max-width: 60px; object-fit: contain; }
.pv-init { flex: none; width: 18px; height: 18px; border-radius: 4px; background: rgba(255, 255, 255, .12); color: #d0c5bf; display: grid; place-items: center; font-size: 8px; font-weight: 800; }
.pv-init[hidden] { display: none; }
.pv-main { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.pv-title { font-weight: 800; font-size: 15px; }
.pv-bar { width: 26px; height: 3px; border-radius: 2px; background: var(--pv-brand); margin-top: -6px; }
.pv-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.pv-card .badge { height: 20px; font-size: 10px; padding: 0 8px; }
.pv-btn { margin-top: auto; background: var(--pv-brand); color: var(--pv-on-brand); font-weight: 700; font-size: 12px; padding: 8px 12px; border-radius: 8px; }

/* ---------- Sign-in: the logo on top, then one panel with the write-up and the sign-in ---------- */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px; padding: 64px 24px 48px; background: #09090b; color: #fff; overflow: hidden; isolation: isolate; }
/* Light pools in the middle and falls off to near black at the corners. */
.auth-bg { position: fixed; inset: 0; z-index: -3; background: radial-gradient(70% 65% at 50% 50%, #18171b 0%, #0e0e10 50%, #050506 100%); }
/* Background pattern: faint scattered sparks toward the sign-in page edges. */
.auth-bg::after { content: ""; position: absolute; inset: 0; background: url("patterns/sparks-dark.94c92f324ad6.svg") 0 0 / 220px 220px; -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, rgba(0, 0, 0, .35) 25%, #000 85%); mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, rgba(0, 0, 0, .35) 25%, #000 85%); }
/* A soft dark vignette at the very edges, over the pattern but under the twinkling stars. */
.auth-bg::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 62%, rgba(0, 0, 0, .6) 100%); }
/* A star somewhere in the background lights up now and then (signin.js). */
.auth-twinkle { position: fixed; z-index: -1; pointer-events: none; color: var(--brand); filter: drop-shadow(0 0 4px currentColor); opacity: 0; animation: auth-twinkle 2s ease-in-out forwards; }
.auth-twinkle.pale { color: #fff8dc; }
@keyframes auth-twinkle { 0% { opacity: 0; transform: scale(.3) rotate(0deg); } 35% { opacity: .85; transform: scale(1) rotate(20deg); } 100% { opacity: 0; transform: scale(.4) rotate(45deg); } }
.auth-wash { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(90% 70% at 50% 25%, color-mix(in srgb, var(--brand) 2.5%, transparent), transparent 70%); }
.auth-glow { position: absolute; z-index: -2; left: 50%; top: 220px; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 8%, transparent), color-mix(in srgb, var(--brand) 2.5%, transparent) 45%, transparent); opacity: 0; transition: opacity 1.2s ease; }
.auth-glow.on { opacity: 1; animation: auth-breathe 7s ease-in-out infinite; }
@keyframes auth-breathe { 50% { transform: scale(1.08); opacity: .8; } }
/* Sparks draw over the panel so they stay visible; the canvas never takes clicks. */
.auth-fx { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.auth > .lg { width: min(440px, 82vw); }
.auth-panel { width: 100%; max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; border-radius: 26px; border: 1px solid rgba(255, 255, 255, .1); background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); box-shadow: 0 40px 100px rgba(0, 0, 0, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); overflow: hidden; }
.auth-copy { padding: 44px; display: grid; gap: 22px; align-content: center; min-width: 0; }
.auth-side { padding: 44px 40px; display: grid; gap: 10px; align-content: center; text-align: center; border-left: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25); }
.auth-title { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.04; font-weight: 300; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.auth-title b { font-weight: 800; background: linear-gradient(90deg, #fff 25%, var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lede { font-size: 16.5px; line-height: 1.65; color: #b9b1ab; margin: 0; max-width: 34em; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; color: #d0c5bf; font-size: 14px; line-height: 1.45; }
.auth-points b { display: block; color: #fff; font-weight: 600; }
.auth-points .icon { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: var(--brand); }
.auth-side .kicker { color: var(--brand); margin: 0; }
.auth-side h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.auth-side p { color: #b9b1ab; margin: 0; font-size: 14.5px; line-height: 1.55; }
.btn-ms { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; margin-top: 14px; border-radius: 12px; background: #fff; color: #1b1b1b; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.btn-ms:hover { transform: translateY(-1px); box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 25%, transparent); }
.btn-ms svg { flex: none; }
.auth-help { margin-top: 6px !important; font-size: 12.5px !important; color: #8f8780 !important; text-align: center; }
.auth .flash { color: var(--ink); }
.auth .dev-login { border-top-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.auth .dev-login label { color: var(--brand); }
.auth .dev-login input { background: rgba(255, 255, 255, .95); }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 10px; color: #8f8780; font-size: 12.5px; margin-top: 12px; }
.auth-foot img { height: 18px; width: auto; opacity: .9; }
.auth-foot .workspace-initials { width: 22px; height: 22px; font-size: 9px; background: rgba(255, 255, 255, .1); }
.auth-foot span + span::before { content: "·"; margin-right: 10px; }
.auth-rise { animation: auth-up .8s ease both; }
.auth-rise { animation-delay: 1.1s; }
@keyframes auth-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 899px) {
  .auth { justify-content: flex-start; gap: 32px; padding: 48px 16px 32px; }
  .auth > .lg { width: min(300px, 76vw); }
  .auth-panel { grid-template-columns: 1fr; }
  .auth-copy { padding: 30px 26px 8px; }
  .auth-side { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); padding: 30px 26px; }
  .auth-points { gap: 12px; margin: 4px 0 22px; }
  .auth-points li { gap: 12px; font-size: 13.5px; }
  .auth-points .icon { width: 32px; height: 32px; padding: 7px; border-radius: 9px; }
  .auth-lede { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav a .icon, .setting-link, .btn-ms, .stats div { transition: none; transform: none !important; }
  .lg *, .auth * { animation: none !important; }
  .auth-glow { transition: none; }
  .lg-trace, .lg-streak { opacity: 0 !important; }
}

/* =====================================================================
   The frame (2026-11). Every page gets these from base.html; don't restyle them per page.
   ===================================================================== */

/* A thin black-to-yellow line along the very top, and faint stars fading in from the top right. */
.shell > .main::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 16; background: linear-gradient(90deg, var(--ink) 0%, var(--accent) 45%, var(--brand) 100%); }
.shell > .main::after { content: ""; position: absolute; z-index: -1; right: 0; top: 0; width: min(60%, 680px); height: 340px; pointer-events: none; background: url("patterns/stars-light.bc9116105bfb.svg") 100% 0 / 240px 150px; -webkit-mask-image: radial-gradient(circle at 100% 0, #000 0%, rgba(0, 0, 0, .45) 40%, transparent 72%); mask-image: radial-gradient(circle at 100% 0, #000 0%, rgba(0, 0, 0, .45) 40%, transparent 72%); }
@media (max-width: 1099px) { .shell > .main::before { display: none; } .shell > .main::after { width: 75%; height: 220px; } }

/* The frosted top bar (core/_appbar.html): where you are, search everything, bell and + New. Hidden on phones. */
.appbar { position: sticky; top: 0; z-index: 15; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 480px) minmax(180px, 1fr); align-items: center; gap: 16px; height: 64px; margin: -36px -40px 30px; padding: 0 max(40px, calc((100% - var(--content, 1440px)) / 2 + 40px)); background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: saturate(1.8) blur(28px); backdrop-filter: saturate(1.8) blur(28px); border-bottom: 1px solid rgba(17, 17, 17, .08); }
.appbar-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.appbar-crumbs a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.appbar-crumbs a:hover { color: var(--ink); }
.appbar-crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.appbar-search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 16px; border-radius: var(--radius-pill); background: rgba(17, 17, 17, .05); color: var(--muted); }
.appbar-search:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--brand); }
.appbar-search .icon { width: 17px; height: 17px; }
.appbar-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; outline: none; }
.appbar-search input:focus-visible { outline: none; }
.appbar-end { grid-column: 3; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
@media (max-width: 1099px) { .appbar { display: none; } }
/* Home has no bar: its bell and + New sit top right of the page instead. */
.home-actions { position: absolute; top: -12px; right: 0; z-index: 5; display: flex; gap: 10px; align-items: center; }
@media (max-width: 1099px) { .home-actions { display: none; } }

/* =====================================================================
   Components. Build new pages from these; add a new piece here and to /style/ together.
   ===================================================================== */

/* Quick filters under a toolbar: pills with a count, e.g. "Needs a category 96". The current one is dark. */
.quick-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
.quick-filters a { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 8px 0 14px; border-radius: var(--radius-pill); background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink); }
.quick-filters a:hover { background: var(--ground); }
.quick-filters b { min-width: 24px; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--pill); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.quick-filters a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.quick-filters a[aria-current] b { background: rgba(255, 255, 255, .18); }
/* Codes people read off a label or type in: item codes, barcodes. */
.code { font: 500 12px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .02em; }

/* Building a list by scanning: check out, returns, receiving (inventory/_lines.html).
   .scan-line is the scan box; .pick a "which one?" choice; .line-row a line with its .stepper. */
.builder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.builder > *, .builder select { min-width: 0; max-width: 100%; }
.builder-job { max-width: 640px; }
.scan-line { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--card); }
.scan-line:focus-within { border-color: var(--ink); }
.scan-line .icon { flex: none; color: var(--muted); }
.scan-line input { flex: 1; min-width: 0; border: 0; padding: 0; min-height: 40px; font-size: 16px; background: transparent; outline: none; }
.scan-camera { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.scan-camera[hidden] { display: none; }
.picks, .out-list { display: flex; flex-wrap: wrap; gap: 8px; }
.picks p, .out-list h3 { flex-basis: 100%; margin: 0; }
.pick { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pick:hover { background: var(--ground); }
.pick b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick span { color: var(--muted); white-space: nowrap; }
.lines { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px 40px; align-items: center; gap: 12px; padding: 10px 8px 10px 16px; border-top: 1px solid var(--line-soft); }
.line-row:first-child { border-top: 0; }
.line-row em { font-style: normal; }
.line-unit { font-size: 13px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--card); }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; border-radius: var(--radius-pill); }
.stepper button:hover { background: var(--ground); }
.stepper .icon { width: 16px; height: 16px; }
.stepper input { width: 64px; min-height: 40px; border: 0; padding: 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: transparent; }
.line-remove { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; border-radius: var(--radius-pill); }
.line-remove:hover { background: var(--ground); color: var(--ink); }
.builder-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.builder-foot input, .builder-foot select { flex: 1 1 240px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.line-row.is-new { background: var(--ground); }
.count-discard { margin-top: 16px; text-align: right; }
/* The phone camera as a scanner (inventory/_camera.html): full screen over the page while it's on. */
.camera { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 16px; padding: 16px; background: var(--ink); color: #fff; }
.camera[hidden] { display: none; }
.camera video { width: min(100%, 520px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: #000; }
.camera-note { margin: 0; font-weight: 600; }
@media (max-width: 719px) {
  .line-row { grid-template-columns: minmax(0, 1fr) 40px; padding-left: 12px; }
  .line-row .stepper { grid-column: 1; justify-self: start; }
  .line-row .line-unit { display: none; }
  .line-row .list-main span { white-space: normal; }
  .line-row .line-remove { grid-row: 1; grid-column: 2; }
  .builder-foot .btn { flex: 1 1 100%; }
}

/* Keyboard hint, like "Ctrl K". */
kbd { font: 500 11px ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted); background: #fff; border-radius: var(--radius-pill); padding: 4px 9px; white-space: nowrap; }
@media (max-width: 719px) { kbd { display: none; } }

/* Round icon button (the bell). */
.icon-round { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-pill); background: #fff; border: 1px solid var(--line); color: var(--ink); }
.icon-round:hover { box-shadow: 0 6px 16px rgba(17, 17, 17, .08); }
.icon-round .icon { width: 18px; height: 18px; }
.bell-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #fff; }
.topbar .bell-menu .bell-dot { top: 10px; right: 11px; box-shadow: 0 0 0 2px var(--sidebar); }

/* Pop-up menu: <details class="pop-menu"><summary>…</summary><div class="pop-list">links</div></details>. */
.pop-menu { position: relative; }
.pop-menu summary { list-style: none; cursor: pointer; }
.pop-menu summary::-webkit-details-marker { display: none; }
.pop-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 6px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(17, 17, 17, .12); display: flex; flex-direction: column; }
.pop-list a { padding: 10px 14px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pop-list a:hover { background: var(--ground); }
.pop-head { padding: 8px 14px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.pop-empty { padding: 6px 14px 12px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.new-menu summary { min-height: 40px; }
.new-menu summary .icon { width: 16px; height: 16px; color: var(--brand); }

/* The big search box: Home, under the greeting, and the search page. */
.search-big { display: flex; align-items: center; gap: 12px; max-width: 600px; height: 52px; margin: 6px 0 34px; padding: 0 6px 0 20px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(17, 17, 17, .06); color: var(--muted); }
.search-big:focus-within { border-color: var(--brand); }
.search-big input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; font-size: 15px; outline: none; }
.search-big input:focus-visible { outline: none; }
.search-big kbd { background: var(--ground); margin-right: 8px; }
.search-big .btn { min-height: 40px; }
.search-group { margin-bottom: 16px; }
.hits { list-style: none; margin: 0 -22px -22px; padding: 0; }
.hits a { display: flex; flex-direction: column; padding: 12px 22px; border-top: 1px solid var(--line-soft); text-decoration: none; }
.hits a:hover { background: #fafafa; }
.hits b { font-weight: 600; }
.hits span { font-size: 13px; color: var(--muted); }

/* Section label with a small yellow spark: <h2 class="section-kicker">{% include "core/_spark.html" %}This week</h2>. */
.home-head .greeting { margin-bottom: 6px; }
.section-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
/* A kicker after a card or table starts a new section: give it room. */
:is(.card, .table-wrap, .list-card) + .section-kicker { margin-top: 28px; }
.spark-glyph { fill: var(--brand); flex: none; }

/* Figure cards: a label and pill, a big number, then one small chart (area, day bars or a share bar). No coloured top lines. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 30px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.kpi.kpi-static:hover { transform: none; box-shadow: none; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(17, 17, 17, .08); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-pill { padding: 3px 10px; border-radius: var(--radius-pill); background: var(--ground); font-size: 12px; font-weight: 600; white-space: nowrap; }
.kpi-pill.warm { background: color-mix(in srgb, var(--brand) 22%, #fff); }
.kpi-value { font-size: 36px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-chart { width: 100%; height: 56px; color: var(--ink); margin-top: 4px; }
.kpi-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 56px; margin-top: 4px; }
.kpi-bars span { border-radius: 8px; background: #ece4d4; }
.kpi-bars span.on { background: var(--ink); }
.kpi-split { display: flex; gap: 3px; height: 10px; margin-top: 30px; border-radius: var(--radius-pill); overflow: hidden; }
.kpi-split span { min-width: 6px; }
.kpi-split .s0 { background: var(--ink); } .kpi-split .s1 { background: #c8bba5; } .kpi-split .s2 { background: #ece4d4; }
.kpi-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 11px; color: #757575; }
.kpi-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #757575; }
.kpi-chart-empty { display: flex; align-items: end; height: 56px; margin-top: 4px; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .kpi { transition: none; } .kpi:hover { transform: none; } }

/* List card: rows of number, title and detail, avatars, then a status badge (Home's "On site today"). */
.list-card { padding: 6px 0; }
.list-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 22px; text-decoration: none; border-top: 1px solid var(--line-soft); }
.list-row:first-child { border-top: 0; }
.list-row:hover { background: #fafafa; }
.list-num { font: 500 13px ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted); }
.list-main { display: flex; flex-direction: column; min-width: 0; }
.list-main b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-empty { margin: 0; padding: 18px 22px; color: var(--muted); }
.avatars { display: flex; }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.avatars .avatar-sm + .avatar-sm { margin-left: -4px; background: var(--accent); }
@media (max-width: 719px) {
  .list-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .list-num, .avatars { display: none; }
}

/* A section label under a row of cards needs room above it. */
.cards + .section-kicker { margin-top: 28px; }

/* Small pill button for an action inside a row ("+ Add" on a day), and a count inside a button ("To approve 3"). */
.btn-sm { min-height: 32px; padding: 0 12px; gap: 4px; font-size: 13px; }
.btn-sm .icon { width: 15px; height: 15px; }
.count-pill { min-width: 22px; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
button.link-danger { color: #b91c1c; font-size: 14px; }

/* Day groups in a list card (My time): a day header, then that day's rows. Rows can end in a bold figure (hours). */
.list-day { display: flex; align-items: center; gap: 10px; padding: 16px 22px 8px; border-top: 1px solid var(--line-soft); }
.list-card > .list-day:first-child { border-top: 0; }
.list-day + .list-row { border-top: 0; }
.list-day b { font-weight: 700; }
.list-day.is-today b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.list-day-total { margin-left: auto; min-width: 52px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.list-day > .btn-sm { margin-left: auto; }
.list-day > .btn-sm + .list-day-total { margin-left: 0; }
.list-figure { min-width: 52px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-main .sent-back { display: block; font-style: normal; color: #b91c1c; white-space: normal; }
@media (max-width: 719px) {
  .list-day { padding: 14px 16px 6px; }
  .list-row:has(> .list-figure), .list-row:has(> .btn-sm) { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; }
}

/* A bar that stays in view at the bottom while there is something to send (My time: "Send the week"). */
.submit-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-top: 16px; padding: 12px 12px 12px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(17, 17, 17, .12); font-size: 14px; }
@media (max-width: 719px) { .submit-bar { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); padding-left: 16px; } .submit-bar .btn { flex: 1; } }

/* A card to act on: a table, then its buttons (Approve time). A <details class="send-back"> opens a reason box. */
.card + .card.approval { margin-top: 16px; }
.card.approval + .section-kicker { margin-top: 28px; }
.approval-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin-top: 16px; }
.send-back summary { list-style: none; }
.send-back summary::-webkit-details-marker { display: none; }
.send-back[open] summary { display: none; }
.send-back .inline-form { margin: 0; }
.send-back input[type=text] { min-width: min(320px, 100%); flex: 1; }

/* Text only on phones (where .list-num is hidden): <span class="show-sm">. */
.show-sm { display: none; }
@media (max-width: 719px) { .show-sm { display: inline; } .list-main .show-sm { display: block; } }
/* A list card whose rows wrap instead of cutting text off (a tech's day: the address matters). */
.list-wrap .list-main b, .list-wrap .list-main span { white-space: normal; }
.section-after { margin-top: 30px; }

/* The dispatch board: people down the side, days across, a white card per booking with its status as a dot.
   No grid lines; today's column is lit softly and its date sits in a yellow pill. */
.board { table-layout: fixed; min-width: 1040px; }
.board td { vertical-align: top; padding: 6px 4px; }
.board th { padding-inline: 6px; }
.board tbody .board-who { vertical-align: top; padding-top: 12px; }
.board .board-who { width: 190px; text-align: left; font-size: 14px; letter-spacing: 0; text-transform: none; }
.board thead .board-who { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.board thead th.is-today span { display: inline-block; padding: 4px 10px; margin-left: -10px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--brand) 30%, #fff); color: var(--ink); }
.board td.is-today { background: color-mix(in srgb, var(--brand) 6%, #fff); }
.board tbody tr:hover td { background: inherit; }
.board tbody tr:hover td.is-today { background: color-mix(in srgb, var(--brand) 6%, #fff); }
.board-person { display: flex; gap: 10px; align-items: flex-start; }
.board-person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.board-person b { font-size: 14px; }
.board-person small { font-size: 12px; font-weight: 500; color: var(--muted); }
.board .avatar, .timeline .avatar { background: var(--ink); }
.booking { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(17, 17, 17, .04); font-size: 12.5px; line-height: 1.3; text-decoration: none; color: var(--ink); }
.booking:hover { border-color: #cfcfcf; box-shadow: 0 4px 12px rgba(17, 17, 17, .07); }
.booking b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.booking > span:not(.booking-time) { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-time { display: flex; align-items: center; gap: 6px; font: 500 11.5px ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted); }
.booking .dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--badge, #a0a0a0); }
.booking-urgent { font-style: normal; font-weight: 800; color: #b91c1c; margin-right: 4px; }
.board-add { display: grid; place-items: center; min-height: 34px; border-radius: 12px; border: 1px dashed transparent; color: var(--muted); font-size: 16px; text-decoration: none; opacity: .45; }
.board-add:hover, .board-add:focus-visible, td:not(:has(.booking)) > .board-add { border-color: #d9d9d9; opacity: 1; }
.board-add:hover { background: var(--card); color: var(--ink); }

/* The day as a timeline: a track per person, bookings placed by their times, gaps are free time.
   Clicking a gap books that person; a thin yellow line marks now. */
.timeline { position: relative; padding: 14px 20px 18px; overflow-x: auto; --who: 190px; }
.timeline-row { display: grid; grid-template-columns: var(--who) minmax(640px, 1fr); align-items: center; gap: 0; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.timeline-head { border-top: 0; padding: 0 0 6px; }
.timeline-scale { position: relative; height: 16px; }
.timeline-scale span { position: absolute; font: 500 11px ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted); }
.track { position: relative; height: 64px; border-radius: 12px; background: var(--ground); }
.track-free { position: absolute; inset: 0; border-radius: 12px; }
.track-free:hover { background: color-mix(in srgb, var(--brand) 14%, var(--ground)); }
.track-bar { position: absolute; top: 5px; bottom: 5px; margin: 0; padding: 7px clamp(2px, 1vw, 10px); justify-content: center; min-width: 0; box-sizing: border-box; border-left-width: 1px; }
.track-bar b { -webkit-line-clamp: 1; }
.track-bar { overflow: hidden; }
.timeline-now { position: absolute; z-index: 2; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--brand); pointer-events: none; }
.day-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.day-pills a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.day-pills a.is-today { background: color-mix(in srgb, var(--brand) 22%, #fff); }
.day-pills a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Dragging a booking: it fades where it was; the cell or track under it is outlined, and a track shows the new start. */
.booking[draggable="true"] { cursor: grab; }
.booking.is-dragged { opacity: .35; }
.is-dragging .board td[data-drop] .board-add { visibility: hidden; }
.board td.drop-here, .track.drop-here { box-shadow: inset 0 0 0 2px var(--ink); border-radius: 12px; }
.track.drop-here::after { content: attr(data-at); position: absolute; right: 8px; top: -22px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--ink); color: #fff; font: 600 11px Inter, sans-serif; pointer-events: none; }
.is-saving { cursor: progress; }

/* A two-way switch (Week / Day): links in a pill, the current one dark. */
.switch { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--radius-pill); background: #fff; border: 1px solid var(--line); }
.switch a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 16px; border-radius: var(--radius-pill); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.switch a:hover { background: var(--ground); }
.switch a[aria-current] { background: var(--ink); color: #fff; }

/* The side panel (core/_panel.html): slides in from the right over the page, which stays in view.
   On phones it's a sheet from the bottom. */
dialog.panel { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; background: var(--card); color: var(--ink); box-shadow: -20px 0 50px rgba(17, 17, 17, .18); }
dialog.panel:has(.builder), dialog.panel:has([data-wide-panel]) { width: min(720px, 100vw); }  /* lists and long forms need room */
.panel-body .builder.card { padding: 0; border: 0; box-shadow: none; }
dialog.panel::backdrop { background: rgba(17, 17, 17, .22); }
dialog.panel[open] { animation: panel-in .18s ease-out; }
@keyframes panel-in { from { transform: translateX(24px); opacity: .6; } }
.panel-body { padding: 28px 30px 30px; min-height: 100%; box-sizing: border-box; }
.panel-body .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.panel-body .delete-form { margin-top: 18px; }
.panel-title { margin: 0 48px 4px 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.panel-sub { margin: 0 0 18px; font-size: 14px; }
.panel-title + form { margin-top: 18px; }
.panel-close { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.panel-close:hover { background: var(--ground); }
@media (max-width: 719px) {
  dialog.panel { inset: auto 0 0 0; width: 100vw; height: auto; max-height: 92dvh; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(17, 17, 17, .2); }
  dialog.panel[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: .6; } }
  .panel-body { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .panel-body .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-body .form-grid .field:has([type=date]) { grid-column: 1 / -1; }
  .day-pills { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .day-pills a { flex: none; }
  .panel-close { top: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { dialog.panel[open] { animation: none; } }

/* Job tabs (jobs/_head.html): the .switch under the chips, scrolling sideways on phones. */
.page-head .chips { margin: 12px 0 0; }
.job-tabs { margin: 0 0 22px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.job-tabs a { flex: none; }
/* A thin used-of-budget bar in a table cell: <span class="meter"><i style="width: 60%"></i></span>. Over budget turns warm. */
.meter { display: inline-block; vertical-align: middle; width: 90px; height: 8px; border-radius: var(--radius-pill); background: #ece4d4; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.meter.over i { background: var(--brand); }
.table td.over { color: #b45309; font-weight: 600; }
.table tfoot th { padding-top: 12px; border-top: 1px solid var(--line); }
.card-note { margin: 12px 0 0; }

/* Billing (billing/invoice.html, _schedule.html). A claim table groups lines with a .group-row heading and a
   .subtotal-row; .pct-input is a small percent box in a cell; .sums is a totals list (dt label, dd figure). */
.claim-table .group-row th { padding-top: 18px; background: none; color: var(--ink); font-size: 11px; }
.claim-table .subtotal-row th { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); background: none; border-bottom: 1px solid var(--line); }
.pct-input { display: inline-flex; align-items: center; gap: 4px; }
.pct-input input { width: 76px; padding: 6px 10px; text-align: right; font-variant-numeric: tabular-nums; }
.pct-input.has-error input { border-color: #b91c1c; }
.claim-foot { margin-top: 20px; }
.sums { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; margin: 0 0 12px; font-size: 14px; }
.sums dt { color: var(--muted); }
.sums dd { margin: 0; padding-left: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.sums .sums-sub { color: var(--ink); font-weight: 700; }
.sums .sums-total { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 800; font-size: 18px; }
.sov-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.sov-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 64px; gap: 10px; align-items: start; }
.sov-row .field { display: grid; gap: 4px; }
.sov-row .field-check { padding-top: 10px; text-align: center; }
.sov-labels { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
@media (max-width: 719px) {
  .claim-table .group-row, .claim-table .subtotal-row { display: flex; justify-content: space-between; padding: 12px 16px 4px; }
  .claim-table .group-row th, .claim-table .subtotal-row th { padding: 0; border: 0; }
  .claim-table .subtotal-row th.hide-sm { display: none; }
  .sov-row { grid-template-columns: minmax(0, 1fr) 110px; }
  .sov-row .field-check { grid-column: 1 / -1; text-align: left; padding-top: 0; }
  .sov-labels span:last-child { display: none; }
  .submit-bar > .actions { width: 100%; }
  .submit-bar > .actions .btn { flex: 1; }
}

/* Printed letters (quotes/letter.html): a white sheet on the page, just the sheet on paper. */
.letter-tools { display: flex; justify-content: center; gap: 8px; padding: 20px 16px 0; }
.letter { max-width: 800px; margin: 20px auto 40px; padding: 48px 56px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-size: 14px; line-height: 1.55; }
.letter-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.letter-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.letter-brand img { height: 44px; width: auto; border-radius: var(--radius-sm); background: var(--ink); padding: 4px; }
.letter-meta { display: grid; text-align: right; color: var(--muted); }
.letter-meta b { color: var(--ink); font-size: 20px; letter-spacing: .02em; text-transform: uppercase; }
.letter-to { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.letter-to div { display: grid; align-content: start; }
.letter-to small, .letter-price span, .letter-price small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.letter-title { font-size: 20px; margin: 8px 0 12px; }
.letter-title span { color: var(--muted); font-weight: 500; }
.letter-scope p { margin: 0 0 10px; }
.letter-price { display: grid; justify-items: end; margin: 28px 0 8px; padding: 16px 20px; background: var(--ground); border-radius: var(--radius-sm); }
.letter-price b { font-size: 28px; font-variant-numeric: tabular-nums; }
.letter-terms { color: var(--muted); }
.letter-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 56px; }
.letter-sign div { display: grid; gap: 6px; }
.letter-line { border-bottom: 1px solid var(--ink); height: 36px; }
.letter-sums { max-width: 420px; margin: 20px 0 16px auto; }
.letter-sub { font-size: 15px; margin: 32px 0 10px; }
.letter-table { font-size: 12.5px; }
.letter-table th, .letter-table td { padding: 8px 10px; }
@media (max-width: 719px) { .letter { padding: 24px 20px; margin: 12px; } .letter-to, .letter-sign { grid-template-columns: 1fr; } }
@media print {
  body { background: #fff; }
  .letter-tools, .no-print { display: none; }
  .letter { border: 0; margin: 0; padding: 0; max-width: none; }
}

/* The style guide page (/settings/style/) only. */
.style-guide .section-kicker { margin-top: 36px; }
.style-guide .search-big { margin-bottom: 16px; }
.style-rules { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.style-gap { margin-top: 14px; }
.style-guide .submit-bar.style-static { position: static; }
.style-guide .board-sample { min-width: 520px; }
.style-guide .board-sample td { width: 40%; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.swatch { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.swatch span { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(0, 0, 0, .08); }
.swatch b { font: 600 13px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.swatch small { color: var(--muted); font-size: 12px; }
