:root {
  --ink: #20231f; --muted: #6f746d; --paper: #f4f4ef; --panel: #fff; --green: #275f4b;
  --green-dark: #194434; --mint: #dbe9df; --line: #dfe1da; --orange: #ed7c45; --danger: #9f3d36;
  --shadow: 0 16px 45px rgba(39, 48, 41, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% 0%, #fff8e8, transparent 32rem), var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-header { min-height: 68px; padding: 13px clamp(18px, 5vw, 70px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(39,95,75,.12); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: Georgia, serif; font-size: 1.25rem; text-decoration: none; }
.brand-dot { width: 17px; height: 17px; border: 5px solid var(--green); border-radius: 50%; box-shadow: 9px 8px 0 -5px var(--orange); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.release { color: var(--muted); font-size: .75rem; }
main { width: min(980px, calc(100% - 36px)); margin: auto; }
.login-shell { min-height: calc(100vh - 69px); display: grid; grid-template-columns: 1.2fr minmax(310px, .72fr); align-items: center; gap: clamp(45px, 9vw, 120px); padding: 64px 0; }
.login-copy h1, .tracker-heading h1 { margin: 10px 0 18px; font: 500 clamp(3rem, 7vw, 6rem)/.93 Georgia, serif; letter-spacing: -.055em; }
.login-copy > p:last-child { max-width: 540px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.eyebrow { margin: 0; color: var(--green); font-size: .73rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.login-panel { padding: clamp(25px, 5vw, 40px); }
.login-panel h2, .state h2 { margin: 0 0 7px; font: 500 1.65rem Georgia, serif; }
.muted, .fine-print { color: var(--muted); line-height: 1.5; }
.fine-print { margin: 17px 0 0; text-align: center; font-size: .76rem; }
label { display: block; margin: 18px 0 7px; font-size: .84rem; font-weight: 750; }
input, select { width: 100%; min-height: 44px; padding: 10px 13px; color: var(--ink); border: 1px solid #c7cbc3; border-radius: 9px; background: white; }
input:focus, select:focus, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(237,124,69,.35); outline-offset: 2px; border-color: var(--green); }
.button { min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; }
.login-panel .button-primary { width: 100%; margin-top: 23px; }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-quiet { color: var(--green); border-color: var(--line); background: white; }
.button-small { min-height: 35px; padding: 5px 10px; font-size: .78rem; }
.tracker { padding: clamp(42px, 7vw, 74px) 0; }
.tracker-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 27px; }
.tracker-heading h1 { margin-bottom: 0; font-size: clamp(2.8rem, 7vw, 4.8rem); }
.date-field { width: 155px; margin: 0; color: var(--muted); }
.date-field input { margin-top: 7px; }
.quick-add { display: grid; grid-template-columns: 1fr 180px auto; gap: 9px; padding: 12px; margin-bottom: 24px; }
.quick-add input, .quick-add select { border-color: transparent; background: #f5f6f2; }
.habit-list, .archive-list { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.habit-card { padding: 20px; box-shadow: 0 8px 28px rgba(39,48,41,.05); transition: border-color .2s; }
.habit-card.is-complete { border-color: #a8cab4; }
.habit-top { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.check-button { width: 45px; height: 45px; border: 2px solid #b9c5bb; border-radius: 14px; color: white; background: white; font-size: 1.4rem; font-weight: 850; }
.is-complete .check-button { border-color: var(--green); background: var(--green); }
.habit-title h2 { margin: 0 0 4px; font: 500 1.3rem Georgia, serif; overflow-wrap: anywhere; }
.stats { display: flex; gap: 13px; margin: 0; color: var(--muted); font-size: .76rem; }
.stat strong { color: var(--green); font-size: .9rem; }
.text-button { padding: 7px; border: 0; color: var(--muted); background: transparent; font-size: .76rem; }
.text-button:hover { color: var(--danger); }
.count-tracker { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 17px 0 0 59px; padding: 12px 14px; border-radius: 11px; background: #f5f6f2; font-size: .84rem; font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--green); background: white; font-size: 1.25rem; }
.stepper output { min-width: 20px; text-align: center; font-weight: 850; }
.note-form { margin: 14px 0 0 59px; }
.note-form label { margin: 0 0 6px; color: var(--muted); font-size: .72rem; }
.note-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.note-row input { min-height: 38px; padding: 7px 11px; font-size: .84rem; }
.state { min-height: 220px; padding: 36px; display: grid; place-items: center; align-content: center; text-align: center; }
.state p { margin: 5px auto 18px; color: var(--muted); }
.empty-mark { margin-bottom: 10px; color: var(--green); font-size: 2rem; }
.spinner { width: 27px; height: 27px; border: 3px solid var(--mint); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.archive-section { margin-top: 32px; color: var(--muted); }
.archive-section summary { padding: 10px 2px; cursor: pointer; font-weight: 750; }
.archive-list { margin-top: 8px; }
.archive-list li { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notice { position: fixed; right: 20px; bottom: 20px; z-index: 5; max-width: min(400px, calc(100% - 40px)); padding: 13px 17px; border-radius: 11px; color: white; background: var(--green); box-shadow: var(--shadow); }
.notice[data-kind="error"] { background: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; } }
@media (max-width: 700px) {
  .site-header { padding-inline: 18px; } .login-shell { grid-template-columns: 1fr; gap: 35px; padding: 45px 0; }
  .login-copy h1 { font-size: clamp(3rem, 15vw, 5rem); } .quick-add { grid-template-columns: 1fr auto; }
  .quick-add select { grid-column: 1 / -1; grid-row: 2; } .quick-add .button { grid-column: 2; grid-row: 1; }
}
@media (max-width: 470px) {
  main { width: min(100% - 24px, 980px); } .release { max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tracker-heading { align-items: start; flex-direction: column; } .date-field { width: 100%; }
  .habit-card { padding: 16px; } .habit-top { gap: 10px; } .check-button { width: 42px; height: 42px; }
  .count-tracker, .note-form { margin-left: 0; } .note-row { grid-template-columns: 1fr; } .note-row button { width: 100%; }
}
