/* Layout: one daily logbook column — scoreboard strip on top, tabbed sheets below, two columns on wide screens. */
/* Light only, by request. System font: San Francisco on iPhone/Mac, Segoe on Windows, Roboto on Android. */
:root {
  --bg: #F4F5F7; --surface: #FFFFFF; --sunk: #F7F8FA; --ink: #16181D; --muted: #6B7280; --line: #E3E5E9;
  --accent: #2457D6; --accent-ink: #FFFFFF; --accent-soft: #E8EEFC;
  --good: #16803C; --good-soft: #DFF3E6; --warn: #B45309; --bad: #C2362F; --bad-soft: #FBE7E5;
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 12px;
  color-scheme: light;
}

html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
.app { max-width: 1000px; margin: 0 auto; padding-block: 20px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 18px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.brand { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand h1 { font-family: var(--f-display); font-weight: 700; font-size: 34px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.brand .date { color: var(--muted); font-size: 14px; }
.banner { padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.banner.warn { background: var(--bad-soft); }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--surface); padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.stat .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat .v { font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 17px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.stat .s { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat .v { font-size: 28px; } }

/* Sideways-only scrolling strip with no scrollbar; the active underline is an inset shadow so nothing pokes out vertically. */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; font-weight: 600; font-size: 15px; color: var(--muted); text-decoration: none; padding: 10px 12px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.view { display: grid; gap: 14px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { display: grid; gap: 14px; min-width: 0; }
@media (max-width: 760px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; display: grid; gap: 10px; min-width: 0; }
.label { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }

.daybar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daybar .title { flex: 1; min-width: 0; }
.daybar h2 { font-family: var(--f-display); font-weight: 700; font-size: 28px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.daybar .sub { color: var(--muted); font-size: 13px; }
.why { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--r) var(--r) 0; font-style: italic; }

button, select, input, textarea { font: inherit; color: inherit; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.icon-btn { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-btn:hover { border-color: var(--muted); }
input, select, textarea { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; box-sizing: border-box; }
textarea { resize: vertical; min-height: 72px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: 13px; color: var(--muted); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > input, .inline > select { flex: 1; min-width: 0; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); cursor: pointer; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg button.good[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: var(--surface); }
.seg button.bad[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: var(--surface); }

.habit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding-block: 6px; border-top: 1px solid var(--line); }
.habit:first-child { border-top: 0; }
.habit .seg button { flex: 0 0 auto; padding: 6px 12px; }
.habit .name { font-weight: 500; }
.habit .streak { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.note-good { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--bad-soft); font-size: 14px; }

.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.tasks li.done span { text-decoration: line-through; color: var(--muted); }
.tasks input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.tasks .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 0 4px; }

.calhead { display: flex; align-items: center; gap: 8px; }
.calhead h2 { flex: 1; font-family: var(--f-display); font-weight: 700; font-size: 26px; text-transform: uppercase; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal button { aspect-ratio: 1 / 1; max-width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; cursor: pointer; display: grid; grid-template-rows: auto 1fr auto; padding: 5px; text-align: left; }
.cal button.out { opacity: .4; }
.cal button.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal .num { font-family: var(--f-mono); font-size: 12px; }
.cal .wk { font-size: 10px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; align-self: end; }
.pips { display: flex; gap: 4px; }
.pip { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid transparent; box-sizing: border-box; }
.pip.done { background: var(--good); } .pip.miss { background: var(--bad); } .pip.planned { border-color: var(--muted); } .pip.rest { background: var(--line); }
.pip.clean { background: var(--accent); border-radius: 2px; } .pip.slip { background: var(--bad); border-radius: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.big { font-family: var(--f-display); font-weight: 700; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: 22px; color: var(--muted); }
.bar { height: 14px; background: var(--sunk); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--good); border-radius: 99px; transition: width .4s ease; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts div { display: grid; }
.facts b { font-family: var(--f-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.facts span { font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .facts { grid-template-columns: minmax(0, 1fr); } }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding-block: 8px; border-top: 1px solid var(--line); }
.ledger .d { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.ledger .amt { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.ledger .amt.neg { color: var(--bad); }
.ledger .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px; }
.ledger .x.confirm { color: var(--bad); border: 1px solid var(--bad); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .wide { grid-column: 1 / -1; }

.week { display: grid; gap: 6px; }
.week label { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 14px; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: reduce) { .bar > div { transition: none; } }
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);color-scheme:light}
body{margin:0}
[hidden]{display:none!important}

/* ---------- additions: header, daily card, gym, budget, charts, sign-in ---------- */
.brand-actions { display: flex; align-items: center; gap: 10px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.daily { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .daily { grid-template-columns: minmax(0, 1fr); } }
.daily blockquote { margin: 0; font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.daily cite { font-style: normal; font-size: 13px; color: var(--muted); }
.daily .verse blockquote { font-size: 16px; }
.daily .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.credit { font-size: 11px; color: var(--muted); }
.credit a { color: inherit; }

.lifts { display: grid; gap: 6px; }
.lift { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding-block: 6px; border-top: 1px solid var(--line); }
.lift:first-child { border-top: 0; }
.lift .nums { font-family: var(--f-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lift .pr { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--good); text-transform: uppercase; margin-left: 6px; }
.lift-form { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 6px; align-items: end; }
@media (max-width: 520px) { .lift-form { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lift-form .ex { grid-column: 1 / -1; } .lift-form button { grid-column: 1 / -1; } }
.lift-form label span { font-size: 11px; color: var(--muted); }
.x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 0 4px; line-height: 1; }

.budget-row { display: grid; gap: 4px; padding-block: 8px; border-top: 1px solid var(--line); }
.budget-row:first-child { border-top: 0; }
.budget-row .top { display: flex; justify-content: space-between; gap: 10px; }
.budget-row .amt { font-family: var(--f-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 99px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; }
.meter > div { height: 100%; border-radius: 99px; background: var(--good); }
.meter.warn > div { background: var(--warn); }
.meter.over > div { background: var(--bad); }
.over-label { color: var(--bad); font-weight: 600; }
.cat-edit { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 6px; align-items: center; }
.exp-form { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: end; }
@media (max-width: 520px) { .exp-form { grid-template-columns: 1fr 1fr; } .exp-form button { grid-column: 1 / -1; } }

.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--f-mono); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent-soft); }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .end-label { fill: var(--ink); font-size: 12px; font-family: var(--f-mono); font-weight: 500; }
.chart .col { fill: var(--accent); }
.chart .col.dim { fill: var(--line); }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.empty-chart { color: var(--muted); font-size: 14px; padding: 20px 0; text-align: center; }
.pr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pr-table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.pr-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.pr-table td.n { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
.table-scroll { overflow-x: auto; }

.devices { list-style: none; margin: 0; padding: 0; }
.devices li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-block: 8px; border-top: 1px solid var(--line); }
.devices li:first-child { border-top: 0; }

.signin { min-height: 100vh; display: grid; place-items: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.signin .card { width: 100%; max-width: 360px; display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-sizing: border-box; }
.signin h1 { font-family: var(--f-display); font-weight: 700; font-size: 32px; text-transform: uppercase; letter-spacing: .02em; }
.signin .btn.primary { padding: 12px; font-size: 16px; }
.signin .or { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.err { color: var(--bad); font-size: 14px; margin: 0; }

/* ---------- clean system type: no condensed caps ---------- */
.brand h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; }
.daybar h2, .calhead h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; }
.signin h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stat .v small { font-size: 14px; font-weight: 500; }
.big { font-size: 40px; letter-spacing: -0.02em; }
.label, .stat .k { letter-spacing: .04em; }
.panel { border-color: transparent; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .04); }
.board { border: 0; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .04); }
.lift .nums, .ledger .amt, .budget-row .amt, .facts b, .pr-table td.n, .cal .num { font-variant-numeric: tabular-nums; }

/* iPhone zooms into any field under 16px and then the page can be dragged sideways. */
input, select, textarea { font-size: 16px; }
