* { box-sizing: border-box; }
:root { color-scheme: light; --ink: #182640; --muted: #526178; --blue: #2c50c9; --blue-dark: #203ea4; --line: #d4dce7; --paper: #fff; --danger: #a5243b; }
html { min-height: 100%; background: #f4f6f9; }
body { margin: 0; color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.5; }
button, input { font: inherit; }
button { touch-action: manipulation; cursor: pointer; }
button:disabled { cursor: default; color: #667287; background: #e9edf3; border-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #3157d5; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.site-header { background: #1b3067; color: white; border-bottom: 3px solid #4065da; }
.header-inner { width: min(1000px, calc(100% - 48px)); min-height: 62px; margin: auto; display: flex; align-items: center; gap: 24px; }
h1 { display: flex; align-items: center; gap: 10px; font-size: 20px; line-height: 1.25; letter-spacing: -.03em; }
.brand-mark { font-size: 12px; font-weight: 800; letter-spacing: .02em; border: 1px solid #8297cf; border-radius: 4px; padding: 5px; }
.header-inner p { color: #d0daf6; font-size: 13px; }
.catalog-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-left: auto; padding: 8px 0 8px 8px; color: #fff; font-size: 14px; text-underline-offset: 4px; white-space: nowrap; }
.catalog-link:hover { color: #d0daf6; }
.catalog-link:focus-visible { outline-color: #fff; }
.app-shell { width: min(1000px, calc(100% - 48px)); margin: 28px auto 48px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.workspace-heading > div { min-width: 0; }
h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.04em; }
.summary { color: var(--muted); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.summary span[aria-hidden] { padding: 0 8px; color: #738097; }
.summary strong { color: var(--ink); font-weight: 650; }
.button { min-width: 44px; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; line-height: 1.4; font-weight: 700; }
.primary { background: var(--blue); color: white; }
.primary:hover:not(:disabled) { background: var(--blue-dark); }
.secondary { color: #2547ac; background: #e8edfb; }
.secondary:hover:not(:disabled) { background: #dbe4fc; }
.quiet { color: var(--muted); background: transparent; }
.quiet:hover:not(:disabled) { background: #e5eaf2; color: var(--ink); }
#export-button { flex-shrink: 0; }
.add-form { display: grid; grid-template-columns: minmax(0, 1fr) 110px 80px; align-items: end; gap: 7px 12px; padding: 0 0 18px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 14px; font-weight: 700; color: #3b4b65; }
.field input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #b5c2d4; border-radius: 5px; background: white; padding: 9px 11px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.field input::placeholder { color: #697486; opacity: 1; }
.field input:hover { border-color: #7b8ba6; }
.field input[aria-invalid='true'] { border-color: var(--danger); }
.form-help { color: var(--muted); font-size: 12px; }
.add-form > .form-help, .add-form > .form-error { grid-column: 1 / -1; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 650; }
.list-heading { display: flex; justify-content: space-between; gap: 16px; padding: 10px 18px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 650; }
.agenda-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.agenda-item { position: relative; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item.is-current { border-left-color: var(--blue); background: #f1f5ff; }
.item-select { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(65px, auto); width: 100%; min-height: 58px; text-align: left; align-items: center; gap: 12px; padding: 14px 18px 14px 15px; background: transparent; border: 0; color: var(--ink); }
.item-select:hover { background: #e9effc; }
.item-select:focus-visible { position: relative; outline-offset: -4px; z-index: 1; }
.item-number { color: #586983; font-size: 13px; font-variant-numeric: tabular-nums; }
.item-title { min-width: 0; }
.item-name { display: block; font-size: 17px; font-weight: 680; overflow-wrap: anywhere; }
.item-duration { justify-self: end; max-width: 200px; text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.item-duration small { color: var(--muted); font-weight: 450; font-size: 12px; }
.item-marker { display: block; color: var(--blue); font-size: 12px; font-weight: 750; letter-spacing: .03em; margin-bottom: 2px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 16px 7px 62px; border-top: 1px solid #dce3f1; }
.item-actions .button { padding: 8px 12px; }
.item-actions .remove-item { color: var(--danger); margin-left: auto; }
.item-actions .remove-item:hover { background: #ffe9ed; }
.activity-timer { margin: 0 18px 0 65px; padding: 10px 0 13px; border-top: 1px solid #d5def0; }
.timer-heading { display: flex; align-items: center; gap: 9px; }
.timer-heading h3 { font-size: 12px; font-weight: 700; color: #465a7d; }
.status-badge { color: #455878; font-size: 12px; font-weight: 750; padding: 2px 7px; border-radius: 4px; background: #e0e7f3; }
.status-badge[data-state='running'] { color: #076349; background: #d8f2e7; }
.status-badge[data-state='paused'] { color: #795005; background: #fff0c7; }
.status-badge[data-state='complete'] { color: #2547ac; background: #dce6ff; }
.current-label { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; margin-top: 3px; }
.timer-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 5px 0 12px; }
.timer-display { color: #1b326f; font-size: clamp(48px, 6vw, 70px); font-weight: 760; font-variant-numeric: tabular-nums; line-height: 1.08; letter-spacing: -.055em; overflow-wrap: anywhere; min-width: 0; }
.timer-display.is-long { font-size: clamp(24px, 4vw, 42px); }
.timer-controls { display: flex; gap: 7px; flex-shrink: 0; }
.timer-controls .button { min-width: 76px; }
.progress-track { height: 5px; background: #d5dff0; overflow: hidden; }
.progress-bar { width: 0; height: 100%; background: var(--blue); }
.timer-context { color: #526580; font-size: 12px; margin-top: 7px; overflow-wrap: anywhere; }
.timer-help { color: var(--muted); font-size: 12px; margin-top: 12px; }
.workspace-footer { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; font-size: 12px; color: var(--muted); }
.empty-state { background: white; padding: 23px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.empty-state h3 { font-size: 17px; letter-spacing: -.015em; }
.empty-state p { font-size: 16px; margin: 5px 0 14px; color: var(--muted); }
#timer-home { background: #eaf0fc; border-left: 3px solid #abbbe9; }
#timer-home .activity-timer { margin: 0 20px; padding-top: 15px; border-top: 0; }
.edit-dialog { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; box-shadow: 0 20px 65px #14274440; }
.edit-dialog::backdrop { background: #14274499; }
.edit-dialog form { display: grid; gap: 17px; padding: 24px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 22px; }
.dialog-heading button { font-size: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; min-height: 44px; padding: 10px 15px; background: white; color: var(--blue); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 750px) {
  .header-inner p { display: none; }
}
@media (max-width: 650px) {
  .header-inner { min-height: 53px; width: calc(100% - 28px); gap: 12px; }
  h1 { font-size: 18px; gap: 7px; }
  .brand-mark { padding: 3px; }
  .app-shell { width: calc(100% - 24px); margin: 16px auto 28px; }
  .workspace-heading { gap: 8px; margin-bottom: 14px; }
  h2 { font-size: 23px; }
  .summary { font-size: 12px; margin-top: 3px; }
  .summary span[aria-hidden] { padding: 0 4px; }
  #export-button { padding-inline: 11px; }
  .add-form { grid-template-columns: minmax(0, 1fr) 73px 57px; gap: 6px 7px; padding-bottom: 14px; }
  .add-button { padding-inline: 6px; }
  .field input { padding-inline: 9px; }
  .list-heading { padding: 8px 10px; gap: 9px; }
  .list-heading span:last-child { flex-shrink: 0; }
  .item-select { grid-template-columns: 23px minmax(0, 1fr) minmax(52px, auto); gap: 8px; padding: 11px 10px 11px 9px; }
  .item-name { font-size: 16px; }
  .item-number { font-size: 12px; }
  .item-duration { max-width: 90px; font-size: 16px; }
  .activity-timer { margin: 0 11px 0 40px; padding: 8px 0 10px; }
  .timer-main { gap: 8px; flex-wrap: wrap; padding: 5px 0 9px; }
  .timer-display { font-size: 46px; }
  .timer-controls { gap: 3px; }
  .timer-controls .button { min-width: 44px; padding: 8px; }
  .item-actions { gap: 1px; padding: 4px 7px 5px 32px; }
  .item-actions .button { padding-inline: 8px; }
  .empty-state { padding: 18px 13px; }
  .empty-state h3 { font-size: 17px; }
  .empty-state p { margin-bottom: 12px; }
  .workspace-footer { margin-top: 14px; }
}
@media (max-width: 360px) {
  .brand-mark { display: none; }
  .activity-timer { margin-left: 13px; }
  .item-actions { padding-left: 5px; }
  .timer-controls .button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
