/* Version: v1.3 | Generated: 2026-11-26 09:40 GMT | Model: Claude Sonnet 5.5 | Agent: n/a | Thinking: n/a */
:root {
  color-scheme: light dark;
  --bg: #f6f7f9; --surface: #ffffff; --text: #14181f; --muted: #4b5666; --border: #d9dee6;
  --primary: #0f766e; --primary-text: #ffffff;
  --good: #166534; --good-bg: #dcfce7; --great: #14532d; --great-bg: #bbf7d0;
  --warn: #854d0e; --warn-bg: #fef3c7; --bad: #991b1b; --bad-bg: #fee2e2; --neutral-bg: #e8ecf1;
  --radius: 12px; --tap: 44px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1218; --surface: #171d26; --text: #e8ecf2; --muted: #a3afbf; --border: #2a3342;
    --primary: #2dd4bf; --primary-text: #04201c;
    --good: #86efac; --good-bg: #123521; --great: #bbf7d0; --great-bg: #14532d;
    --warn: #fcd34d; --warn-bg: #3a2c0a; --bad: #fca5a5; --bad-bg: #3f1414; --neutral-bg: #232c3a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
a, button, input, select, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 20; }

/* Header and navigation. Phones get a bottom tab bar (thumb reach); wider screens get inline tabs. */
.topbar { display: flex; align-items: center; gap: 8px 16px; padding: 4px max(16px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left)); padding-top: max(4px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.tabs { display: flex; gap: 4px; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 12px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.tabs a[aria-current="page"] { color: var(--primary); font-weight: 600; background: var(--neutral-bg); }
.tabs svg { display: none; width: 24px; height: 24px; }
.account { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.account a, button.link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: 8px; background: none; border: 0; color: var(--muted); font: inherit; text-decoration: none; cursor: pointer; }
.account a:hover, button.link:hover { color: var(--text); background: var(--neutral-bg); }
form.inline { display: inline; margin: 0; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); }
.foot { padding-top: 0; text-align: center; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 8px 0 12px; } h2 { font-size: 1.1rem; margin: 0 0 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.narrow { max-width: 380px; margin: 32px auto; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid > .card { margin-bottom: 0; }
.meta { color: var(--muted); font-size: .875rem; } .desc { white-space: pre-wrap; margin: 0; }
.back { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Forms */
.stack > * + * { margin-top: 16px; }
.field > label { margin-bottom: 6px; }
.filters { display: grid; gap: 16px 12px; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); align-items: end; }
label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=search], input[type=password], input:not([type]), select { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }  /* 16px text stops iOS zooming on focus */
label.check { display: flex; gap: 12px; align-items: center; min-height: var(--tap); margin: 0; color: var(--text); font-size: 1rem; cursor: pointer; }  /* the whole row is the tap target */
.check input { width: 22px; height: 22px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 18px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--primary); }
.btn:active, .tabs a:active, button.link:active { filter: brightness(.92); }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); font-weight: 600; }
.btn.block { width: 100%; }
button:disabled { opacity: .65; cursor: progress; }
details.filter-panel > summary { display: flex; align-items: center; gap: 8px; min-height: var(--tap); cursor: pointer; font-weight: 600; list-style-position: inside; }
details.filter-panel[open] > summary { margin-bottom: 12px; }
details.filter-panel { padding-top: 4px; padding-bottom: 4px; }
.err-page { text-align: center; padding: 48px 16px; }
.narrow .btn.block { margin-top: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; } .actions form { margin: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 8px 12px; color: var(--muted); font-size: .875rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.kv td:not(:first-child), table.kv th[scope=col]:not(:first-child) { text-align: right; }
thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr.total th, tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
.title { font-weight: 600; text-decoration: none; } .title:hover { text-decoration: underline; }
.title { display: inline-block; padding: 12px 0; }  /* 44px-high tap target on tablets */
td[data-label="Lot"] { padding-top: 0; padding-bottom: 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--neutral-bg); color: var(--text); margin-left: 4px; }
.badge.great { background: var(--great-bg); color: var(--great); } .badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad, .badge.risky { background: var(--bad-bg); color: var(--bad); }
.alert-high { border-color: var(--bad); background: var(--bad-bg); } .alert-medium { border-color: var(--warn); background: var(--warn-bg); }
.messages { list-style: none; padding: 0; margin: 0 0 8px; } .msg { padding: 10px 14px; border-radius: 8px; background: var(--good-bg); color: var(--good); margin-bottom: 8px; }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.empty { text-align: center; padding: 32px 16px; } code { background: var(--neutral-bg); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .btn.cta { width: 100%; }  /* Fitts: the main action is a full-width thumb target */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; gap: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 4px max(8px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .tabs a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; min-height: 49px; padding: 4px 0; font-size: .75rem; background: none !important; }
  .tabs a[aria-current="page"] { box-shadow: inset 0 3px 0 var(--primary); border-radius: 0; }
  .tabs svg { display: block; }
  table.lots thead { position: absolute; left: -9999px; }
  table.lots, table.lots tbody, table.lots tr, table.lots td { display: block; width: 100%; }
  table.lots tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 0; background: var(--surface); }
  table.lots td { border: 0; display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; text-align: right; }
  table.lots td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; flex: 0 0 90px; text-align: left; }
  table.lots .val { text-align: right; }
  table.lots td[data-label="Lot"] { display: block; text-align: left; } table.lots td[data-label="Lot"]::before { display: none; }
  table.lots td[data-label="Action"] { display: block; text-align: left; } table.lots td[data-label="Action"]::before { display: block; margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
