:root {
  --canvas: #f4f4f4;
  --surface: #fff;
  --ink: #171717;
  --muted: #4a4a4a;
  --line: #dedede;
  --control-line: #858585;
}
body { background: var(--canvas); color: var(--ink); }
header { background: #111; border-bottom: 1px solid #333; }
header h1 { letter-spacing: -.035em; }
header p { color: #d4d4d4; }
section, details, fieldset { background: var(--surface); border-color: var(--line); }
section { box-shadow: 0 2px 6px #00000009; }
small, .stage-status { color: var(--muted); }
input, select, button { background: var(--surface); color: var(--ink); border-color: var(--control-line); }
input::placeholder { color: #666; }
button:disabled { background: #ebebeb; color: #666; border-color: #aaa; }
:where(input, select, button, summary):focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}
.primary, .tabbar [aria-current="page"] { background: #171717; color: #fff; border-color: #171717; }
.hero { background: #efefef; }
.bottom-tabs, .actions { background: var(--surface); border-top: 1px solid var(--line); }
.bottom-tabs button { line-height: 1.25; }
.row { border-color: var(--line); }
.chart-toggle { background: #eee; }
.track { background: #e6e6e6; }
.track span, .trend button { background: #222; }
.track .recovered { background: #16803b; }
.track .loss { background: #c93434; }
.track .gap { background: #d39b00; }
#shared-fgdb-help { background: #f1f1f1; border-radius: 8px; padding: 10px; }
.google-button { background: #fff; color: #1f1f1f; border-color: #747775; }
.google-button:active { background: #edf2fa; }
.danger, #notice { color: #8f2424; }
.danger, input:invalid { border-color: #8f2424; }
.login-help { margin: 8px 0 12px; padding: 0 10px; font-size: 14px; }
.login-help summary { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.login-help summary span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--control-line); border-radius: 50%; font-weight: 700; }
.login-help p { margin: 0 0 10px; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-field button { position: absolute; inset: 0 0 0 auto; width: 44px; margin: 0; padding: 0; display: grid; place-items: center; background: transparent; border-color: transparent; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 9px; flex: none; }
.brew-profile { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.profile-initials { display:grid; place-items:center; min-width:48px; height:48px; border-radius:50%; background:#171717; color:#fff; font-weight:700; }
.brew-profile h2 { overflow-wrap:anywhere; }
.team-count { color:var(--muted); font-size:13px; font-weight:400; }
.batch-card { padding:12px; font-weight:650; }
.batch-card small { margin-top:4px; font-weight:400; }
.result-scores { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.result-scores > div { border:1px solid var(--line); border-radius:10px; padding:9px; background:#f4f4f4; }
.result-scores strong { display:block; font-size:clamp(17px,5vw,25px); overflow-wrap:anywhere; margin:5px 0; }
#teamResult .row output { white-space:normal; text-align:right; }
.open-dashboard .brand { padding-top:12px; padding-bottom:12px; }
.open-dashboard .brand h1 { font-size:22px; }
.open-dashboard .brand img { width:32px; height:32px; }
.open-dashboard .brand p { display:none; }
.open-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:4px 0 14px; }
.open-heading h2 { font-size:clamp(20px,5.6vw,26px); line-height:1.15; overflow-wrap:anywhere; }
.open-heading small { margin-top:5px; }
#openRefresh { flex:none; width:44px; padding:0; font-size:24px; margin:0; }
#openEmpty { text-align:center; padding:12px 0; }
#openEmpty img { border-radius:10px; }
#openEmpty h3 { margin:8px 0 2px; font-size:17px; }
#teamNew { width:100%; margin:10px 0 0; }
#lastBatchReport { display:block; width:100%; padding:12px 0 0; border:none; margin:0; text-align:left; }
#lastBatchReport > strong { font-size:18px; }
#lastBatchDate { margin-top:4px; }
#lastBatchScores { margin-bottom:0; }
#pdfReportControls input[type="checkbox"] { width:18px; min-height:18px; margin:0 6px 0 0; vertical-align:middle; }

.bottom-tabs button { flex: 1 1 0; min-width: 0; padding-inline: 4px; font-size: clamp(11px, 3.3vw, 15px); }
