:root {
  color-scheme: light;
  --paper: #f9f9f7;
  --ink: #212120;
  --muted: #5d5d57;
  --line: #d4d4cd;
  --strong-line: #adada5;
  --field: #fff;
  --soft: #efefea;
  --primary: #242421;
  --on-primary: #fff;
  font: 100%/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button, input, select, textarea { color: inherit; }
a { color: inherit; text-underline-offset: .2em; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
button:disabled { cursor: default; opacity: .5; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font: normal clamp(2.55rem, 7vw, 4.45rem)/.99 Georgia, "Times New Roman", serif; letter-spacing: -.06em; }
h2 { font-size: 1.15rem; line-height: 1.3; }
h3 { font-size: 1rem; line-height: 1.35; }
ul { margin: .5rem 0 0; padding-inline-start: 1.25rem; }
.shell { width: min(100%, 66rem); margin: auto; padding-inline: clamp(1.15rem, 4vw, 3rem); }
.masthead { display: flex; justify-content: space-between; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: max(1rem, env(safe-area-inset-top)) 0 .65rem; }
.wordmark { font: 1.45rem/1 Georgia, "Times New Roman", serif; white-space: nowrap; text-decoration: none; }
.navigation { display: flex; flex-wrap: wrap; gap: 0 clamp(.9rem, 3vw, 2.15rem); border-bottom: 1px solid var(--line); }
.navigation a { font-size: .94rem; padding: .73rem 0 .64rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.navigation a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
main { padding-block: clamp(1.8rem, 5vw, 3.5rem) 3.15rem; min-height: 64vh; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.1rem; margin-bottom: 1.9rem; }
.page-header p { margin-top: .65rem; }
.muted, .status { color: var(--muted); }
.small { font-size: .875rem; }
.button, .link-button { min-height: 2.65rem; border: 1px solid var(--strong-line); border-radius: 2px; background: transparent; padding: .38rem .85rem; text-decoration: none; }
.button { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: .95rem; }
.button:hover, .link-button:hover { background: var(--soft); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.button.primary:hover { opacity: .88; }
.link-button { padding-inline: .35rem; border-color: transparent; font-size: .875rem; text-decoration: underline; text-underline-offset: .2em; }
.button:focus-visible { outline-color: var(--ink); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, .34fr); gap: clamp(1.5rem, 5vw, 3.4rem); }
.layout > *, .form-grid > *, .day-main { min-width: 0; }
.week-select { display: flex; flex-wrap: wrap; gap: .15rem .85rem; border-top: 1px solid var(--strong-line); border-bottom: 1px solid var(--line); }
.week-select button { border: none; border-bottom: 2px solid transparent; background: none; min-height: 2.75rem; padding: .25rem .07rem; font-size: .875rem; color: var(--muted); }
.week-select button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.date-range { padding-block: .6rem; border-bottom: 1px solid var(--line); }
.days { list-style: none; padding: 0; margin: 0; }
.day { display: grid; grid-template-columns: 5.15rem minmax(0, 1fr); gap: .85rem; padding: .83rem 0; border-bottom: 1px solid var(--line); }
.day-label { font-weight: 600; font-size: .875rem; }
.day-label time { display: block; color: var(--muted); font-weight: 400; }
.day-main { display: flex; flex-direction: column; align-items: flex-start; gap: .28rem; }
.day-title { display: flex; justify-content: space-between; align-items: baseline; gap: .55rem; width: 100%; }
.day-title strong { font-weight: 600; }
.day-title .done { color: var(--muted); white-space: nowrap; }
.day-actions { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: center; }
.day-actions .link-button { padding: 0 .2rem; min-height: 2.4rem; }
.session-details { width: 100%; margin-top: .35rem; }
.session-details > summary { font-size: .875rem; text-decoration: underline; text-underline-offset: .16em; }
.session-details[open] > summary { margin-bottom: .5rem; }
.lift-lines { border-top: 1px solid var(--line); margin: .5rem 0; }
.lift-line { padding: .55rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.lift-line p + p { margin-top: .13rem; }
.side-section { padding: .75rem 0 1.1rem; border-top: 1px solid var(--strong-line); }
.side-section + .side-section { margin-top: .45rem; }
.side-section p { margin-top: .45rem; }
.side-section dl { margin: .55rem 0 0; }
.side-section dl div { padding: .45rem 0; display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); }
.side-section dt { font-size: .875rem; }
.side-section dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-size: .875rem; }
.notice { border-left: 2px solid var(--ink); padding: .4rem .75rem; }
.rule-section { border-top: 1px solid var(--strong-line); padding-top: .85rem; margin-top: 1.45rem; }
.rule-section > p { margin-top: .4rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .85rem; }
.history, .benchmarks, .guide-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--strong-line); }
.entry { border-bottom: 1px solid var(--line); padding: .85rem 0; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: .7rem 1rem; }
.entry-head > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.entry-head h2, .entry-head h3 { font-size: 1.04rem; }
.entry .entry-actions { display: flex; flex-wrap: wrap; gap: .25rem .55rem; }
.entry .entry-actions .link-button { padding-inline: 0; }
.entry p + p { margin-top: .25rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1rem; }
.filter-row label { flex: 1; min-width: 9rem; }
label { display: grid; gap: .27rem; font-size: .875rem; min-width: 0; }
input, select, textarea {
  width: 100%; min-height: 2.75rem; padding: .45rem .55rem;
  background-color: var(--field); border: 1px solid var(--strong-line); border-radius: 2px;
  font-size: 1rem;
}
select { appearance: none; padding-inline-end: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 1.05rem center, right .7rem center; background-size: .35rem .35rem; background-repeat: no-repeat; }
input[type="date"] { appearance: none; min-width: 0; }
input.check { width: 1rem; min-height: 1rem; margin: 0 .35rem 0 0; vertical-align: -.14em; accent-color: var(--ink); }
textarea { min-height: 4.8rem; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.form-grid .wide { grid-column: 1 / -1; }
.calculator-result { margin: 1rem 0; padding: .75rem 0; border-block: 1px solid var(--line); }
.calculator-result .number { font: 2rem/1 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
.calculator-result p + p { margin-top: .32rem; }
.section-spacing { margin-top: 1.5rem; }
.steps { list-style: none; padding: 0; margin: .65rem 0 0; }
.flow-step { border-top: 1px solid var(--line); padding: .75rem 0; }
.flow-step h3 { margin-bottom: .55rem; }
.flow-step .inline-actions { margin: 0; }
.flow-step .button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.flow-step p + p { margin-top: .3rem; }
.flow-step .flow-result { margin-top: .55rem; }
.guide-list details { border-bottom: 1px solid var(--line); padding: .62rem 0; }
.guide-list summary { font-weight: 550; }
.guide-list p { padding: .38rem 0 0; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding-block: .8rem max(1.5rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
dialog { width: min(calc(100% - 1.5rem), 37rem); max-height: calc(100% - 1.5rem); padding: 1.15rem clamp(1rem, 4vw, 1.75rem); color: var(--ink); background: var(--paper); border: 1px solid var(--strong-line); border-radius: 2px; }
dialog::backdrop { background: #20202070; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.dialog-header h2 { font: 1.75rem/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.form-error { border-left: 2px solid var(--ink); margin: .75rem 0 0; padding-left: .65rem; }
.row-note { margin: .45rem 0 .7rem; }
.set-list { margin-top: .65rem; }
.set-list li { padding: .22rem 0; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.skip-link:focus { position: absolute; z-index: 1; padding: .5rem; background: var(--paper); }
.wrap { overflow-wrap: anywhere; }
@media (max-width: 43rem) {
  .layout { grid-template-columns: 1fr; }
  .aside { order: 2; }
  .page-header { align-items: flex-start; }
}
@media (max-width: 25rem) {
  .shell { padding-inline: .88rem; }
  .page-header { flex-wrap: wrap; }
  .day { grid-template-columns: 4.25rem minmax(0, 1fr); gap: .45rem; }
  .entry-head { flex-wrap: wrap; }
  .navigation { gap: 0 .8rem; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --paper: #1c1c1a; --ink: #f0f0eb; --muted: #b6b6ae; --line: #454541; --strong-line: #666660; --field: #252523; --soft: #323230; --primary: #e7e7df; --on-primary: #20201e; }
  dialog::backdrop { background: #0009; }
}
