      :root {
        --ivory: #f7f2e8;
        --card: #fffdf8;
        --charcoal: #191713;
        --ink: #201d18;
        --muted: #6b6357;
        --line: #e2d8c6;
        --gold: #a8823c;
        --gold-soft: #c9a86a;
        --overdue: #9b3b2c;
        --today: #8a6a1c;
        --upcoming: #3f5b4c;
      }

      * {
        box-sizing: border-box;
      }

      html,
      body {
        margin: 0;
        padding: 0;
        background-color: var(--ivory);
        color: var(--ink);
        -webkit-font-smoothing: antialiased;
        font-family:
          ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          sans-serif;
      }

      ::selection {
        background: #e8d9b4;
        color: var(--charcoal);
      }

      .page {
        min-height: 100dvh;
        background:
          radial-gradient(1200px 500px at 50% -180px, #fdf9f0 0%, rgba(253, 249, 240, 0) 70%),
          var(--ivory);
      }

      .shell {
        width: 100%;
        max-width: 46rem;
        margin: 0 auto;
        padding: 0 1.15rem 4rem;
      }

      @media (min-width: 640px) {
        .shell {
          padding: 0 1.5rem 5rem;
        }
      }

      /* ---------- top bar ---------- */

      .topbar {
        background: var(--charcoal);
        color: #f4ecdd;
        border-bottom: 1px solid rgba(201, 168, 106, 0.28);
      }

      .topbar-inner {
        max-width: 46rem;
        margin: 0 auto;
        padding: 0.85rem 1.15rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
      }

      @media (min-width: 640px) {
        .topbar-inner {
          padding: 1rem 1.5rem;
        }
      }

      .wordmark {
        display: flex;
        align-items: baseline;
        gap: 0.45rem;
        line-height: 1;
      }

      .wordmark-name {
        font-family: ui-serif, Georgia, "Times New Roman", serif;
        font-size: 1.32rem;
        letter-spacing: 0.01em;
        color: #fbf6ea;
      }

      .wordmark-by {
        font-size: 0.7rem;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        color: var(--gold-soft);
        white-space: nowrap;
      }

      .demo-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        border: 1px solid rgba(201, 168, 106, 0.55);
        border-radius: 999px;
        padding: 0.32rem 0.6rem;
        font-size: 0.66rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #ecd9ae;
        white-space: nowrap;
      }

      .demo-badge .dot {
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: var(--gold-soft);
      }

      @media (max-width: 420px) {
        .demo-badge {
          font-size: 0.58rem;
          padding: 0.28rem 0.5rem;
          letter-spacing: 0.04em;
        }
        .wordmark-name {
          font-size: 1.15rem;
        }
      }

      @media (max-width: 520px) {
        .topbar-inner {
          flex-direction: column;
          align-items: flex-start;
          gap: 0.55rem;
        }
        .demo-badge {
          align-self: stretch;
          justify-content: center;
        }
      }

      /* ---------- hero ---------- */

      .hero {
        padding: 2.1rem 0 1.4rem;
      }

      @media (min-width: 640px) {
        .hero {
          padding: 3rem 0 1.9rem;
        }
      }

      .eyebrow {
        margin: 0;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.19em;
        text-transform: uppercase;
        color: var(--gold);
      }

      .headline {
        margin: 0.7rem 0 0;
        font-family: ui-serif, Georgia, "Times New Roman", serif;
        font-weight: 500;
        font-size: clamp(2rem, 8vw, 3.05rem);
        line-height: 1.06;
        letter-spacing: -0.015em;
        color: var(--charcoal);
        text-wrap: balance;
      }

      .lede {
        margin: 0.95rem 0 0;
        max-width: 34rem;
        font-size: 1.02rem;
        line-height: 1.55;
        color: var(--muted);
      }

      .hero-actions {
        margin-top: 1.5rem;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.7rem;
      }

      .saved-note {
        font-size: 0.82rem;
        color: var(--muted);
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
      }

      /* ---------- buttons ---------- */

      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        min-height: 2.95rem;
        padding: 0.7rem 1.15rem;
        border-radius: 0.6rem;
        border: 1px solid transparent;
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        font-family: inherit;
        transition:
          transform 0.12s ease,
          background-color 0.15s ease,
          border-color 0.15s ease,
          box-shadow 0.15s ease;
      }

      .btn:active {
        transform: translateY(1px);
      }

      .btn:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
      }

      .btn-primary {
        background: var(--charcoal);
        color: #fbf6ea;
        box-shadow: 0 1px 2px rgba(25, 23, 19, 0.18);
      }

      .btn-primary:hover {
        background: #2c2821;
      }

      .btn-gold {
        background: var(--gold);
        color: #fffaf0;
      }

      .btn-gold:hover {
        background: #97742f;
      }

      .btn-outline {
        background: transparent;
        color: var(--ink);
        border-color: var(--line);
      }

      .btn-outline:hover {
        border-color: var(--gold-soft);
        background: #fdf9f0;
      }

      .btn-quiet {
        background: transparent;
        color: var(--muted);
        border-color: transparent;
        padding-inline: 0.55rem;
        min-height: 2.4rem;
        font-size: 0.85rem;
      }

      .btn-quiet:hover {
        color: var(--ink);
        background: rgba(0, 0, 0, 0.04);
      }

      @media (max-width: 480px) {
        .hero-actions .btn {
          width: 100%;
        }
      }

      /* ---------- add form ---------- */

      .panel {
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 0.85rem;
        padding: 1.15rem;
        box-shadow: 0 1px 2px rgba(25, 23, 19, 0.04);
      }

      .panel[hidden] {
        display: none;
      }

      .panel-title {
        margin: 0;
        font-family: ui-serif, Georgia, "Times New Roman", serif;
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--charcoal);
      }

      .panel-sub {
        margin: 0.3rem 0 0;
        font-size: 0.86rem;
        line-height: 1.5;
        color: var(--muted);
      }

      .reminder {
        margin: 0.9rem 0 0;
        display: flex;
        gap: 0.55rem;
        align-items: flex-start;
        background: #fbf4e2;
        border: 1px solid #ecdcb4;
        border-radius: 0.55rem;
        padding: 0.65rem 0.75rem;
        font-size: 0.82rem;
        line-height: 1.45;
        color: #6d5518;
      }

      .field {
        margin-top: 0.85rem;
      }

      .field-label {
        display: block;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--muted);
        margin-bottom: 0.35rem;
      }

      .input,
      .textarea {
        width: 100%;
        background: #fffefb;
        border: 1px solid var(--line);
        border-radius: 0.5rem;
        padding: 0.72rem 0.8rem;
        font-size: 1rem;
        color: var(--ink);
        font-family: inherit;
      }

      .textarea {
        min-height: 4.4rem;
        resize: vertical;
        line-height: 1.45;
      }

      .input:focus,
      .textarea:focus {
        outline: none;
        border-color: var(--gold);
        box-shadow: 0 0 0 3px rgba(168, 130, 60, 0.16);
      }

      .form-row {
        display: grid;
        gap: 0.85rem;
      }

      @media (min-width: 560px) {
        .form-row {
          grid-template-columns: 1fr 1fr;
        }
      }

      .form-actions {
        margin-top: 1.05rem;
        display: flex;
        gap: 0.6rem;
        flex-wrap: wrap;
      }

      @media (max-width: 480px) {
        .form-actions .btn {
          flex: 1 1 100%;
        }
      }

      .error {
        margin: 0.6rem 0 0;
        font-size: 0.85rem;
        color: var(--overdue);
        font-weight: 600;
      }

      .error[hidden] {
        display: none;
      }

      /* ---------- sections ---------- */

      .sections {
        margin-top: 1.9rem;
        display: flex;
        flex-direction: column;
        gap: 1.9rem;
      }

      .section-head {
        display: flex;
        align-items: baseline;
        gap: 0.6rem;
        padding-bottom: 0.6rem;
        border-bottom: 1px solid var(--line);
      }

      .section-title {
        margin: 0;
        font-family: ui-serif, Georgia, "Times New Roman", serif;
        font-size: 1.42rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        color: var(--charcoal);
      }

      .section-title.is-overdue {
        color: var(--overdue);
      }

      .section-title.is-today {
        color: var(--today);
      }

      .section-title.is-upcoming {
        color: var(--upcoming);
      }

      .section-count {
        margin-left: auto;
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
      }

      .section-hint {
        margin: 0.45rem 0 0;
        font-size: 0.83rem;
        color: var(--muted);
      }

      .cards {
        margin-top: 0.8rem;
        display: flex;
        flex-direction: column;
        gap: 0.7rem;
      }

      .empty {
        margin: 0.8rem 0 0;
        border: 1px dashed var(--line);
        border-radius: 0.7rem;
        padding: 1rem;
        font-size: 0.9rem;
        color: var(--muted);
        background: rgba(255, 253, 248, 0.6);
      }

      /* ---------- card ---------- */

      .card {
        position: relative;
        background: var(--card);
        border: 1px solid var(--line);
        border-left: 4px solid var(--line);
        border-radius: 0.8rem;
        padding: 1rem 1.05rem 1.05rem;
        box-shadow: 0 1px 2px rgba(25, 23, 19, 0.04);
      }

      .card.is-overdue {
        border-left-color: var(--overdue);
      }

      .card.is-today {
        border-left-color: var(--gold);
      }

      .card.is-upcoming {
        border-left-color: var(--upcoming);
      }

      .card.is-done {
        border-left-color: var(--line);
        background: #fbf8f1;
        opacity: 0.92;
      }

      .card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
      }

      @media (max-width: 520px) {
        .card-top {
          flex-direction: column-reverse;
          align-items: flex-start;
          gap: 0.45rem;
        }
        .card-top > div {
          width: 100%;
        }
      }

      .card-name {
        margin: 0;
        font-family: ui-serif, Georgia, "Times New Roman", serif;
        font-size: 1.22rem;
        font-weight: 600;
        line-height: 1.2;
        color: var(--charcoal);
      }

      .card.is-done .card-name {
        color: #5d564a;
        text-decoration: line-through;
        text-decoration-color: rgba(93, 86, 74, 0.4);
      }

      .card-summary {
        margin: 0.35rem 0 0;
        font-size: 0.94rem;
        line-height: 1.5;
        color: #4a443a;
      }

      .pill {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        border-radius: 999px;
        padding: 0.3rem 0.6rem;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        white-space: nowrap;
      }

      .pill-overdue {
        background: #f7e3de;
        color: var(--overdue);
      }

      .pill-today {
        background: #f8eed2;
        color: #7a5c14;
      }

      .pill-upcoming {
        background: #e4ede7;
        color: var(--upcoming);
      }

      .pill-done {
        background: #eeeae0;
        color: #6d6558;
      }

      .card-date {
        margin: 0.6rem 0 0;
        font-size: 0.82rem;
        color: var(--muted);
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: center;
      }

      .card-date strong {
        color: #403a31;
        font-weight: 600;
      }

      .card-actions {
        margin-top: 0.9rem;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
      }

      @media (max-width: 520px) {
        .card-actions {
          flex-direction: column;
        }
        .card-actions .btn {
          width: 100%;
        }
      }

      /* ---------- reschedule ---------- */

      .reschedule {
        margin-top: 0.85rem;
        border-top: 1px dashed var(--line);
        padding-top: 0.85rem;
      }

      .chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-bottom: 0.7rem;
      }

      .chip {
        border: 1px solid var(--line);
        background: #fffefb;
        border-radius: 999px;
        padding: 0.42rem 0.72rem;
        font-size: 0.82rem;
        font-weight: 600;
        color: #4a443a;
        cursor: pointer;
        font-family: inherit;
      }

      .chip:hover {
        border-color: var(--gold-soft);
        background: #fdf6e6;
      }

      .chip:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
      }

      .reschedule-row {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        align-items: center;
      }

      .reschedule-row .input {
        flex: 1 1 10rem;
        width: auto;
      }

      /* ---------- done + footer ---------- */

      .done-section {
        border-top: 1px solid var(--line);
        padding-top: 1.2rem;
      }

      .footer {
        margin-top: 2.6rem;
        padding-top: 1.2rem;
        border-top: 1px solid var(--line);
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
        justify-content: space-between;
      }

      .footer-credit {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
      }

      .footer-brand {
        margin: 0;
        font-family: ui-serif, Georgia, "Times New Roman", serif;
        font-size: 0.98rem;
        letter-spacing: 0.01em;
        color: var(--ink);
      }

      .footer-note {
        margin: 0;
        font-size: 0.8rem;
        line-height: 1.5;
        color: var(--muted);
        max-width: 26rem;
      }

      /* ---------- toast ---------- */

      .toast {
        position: fixed;
        left: 50%;
        bottom: 1.1rem;
        transform: translateX(-50%);
        z-index: 50;
        background: var(--charcoal);
        color: #fbf6ea;
        border-radius: 999px;
        padding: 0.7rem 1.1rem;
        font-size: 0.88rem;
        font-weight: 600;
        box-shadow: 0 8px 24px rgba(25, 23, 19, 0.24);
        max-width: calc(100vw - 2rem);
        text-align: center;
      }

      .toast[hidden] {
        display: none;
      }

      .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;
      }

      @media (prefers-reduced-motion: reduce) {
        .btn:active {
          transform: none;
        }
      }
