:root {
  color-scheme: light;
  --ink: #232b26;
  --muted: #49574e;
  --paper: #f4f2ea;
  --white: #fffdf7;
  --green: #164d39;
  --green-light: #e4eee4;
  --line: #c9d2c3;
  --gold: #d5a64e;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden], [data-edition="private"] .demo-only, [data-edition="demo"] .private-only { display: none !important; }
a { color: var(--green); text-underline-offset: .18em; }
button, input, select { font: inherit; }
button, input, select, summary { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a.button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
:focus-visible { outline: 3px solid #93650c; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }

.wrapper { width: min(71rem, calc(100% - 2.25rem)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; inset-block-start: .5rem; inset-inline-start: .5rem; padding: .6rem; min-height: 44px; background: var(--white); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; border-bottom: 1px solid var(--line); }
.site-header a, .footer a { display: inline-flex; align-items: center; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.brand-mark { min-width: 2.05rem; padding: .27rem .2rem; border: 1px solid #bb9351; color: var(--green); text-align: center; font-size: .67rem; line-height: 1.02; letter-spacing: .06em; }
.daily-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; padding-block: clamp(1.35rem, 5vw, 3.2rem) 1rem; }
.eyebrow { margin-bottom: .35rem; color: var(--green); font-size: .8rem; font-weight: 750; }
h1 { max-width: 17ch; font-family: Georgia, serif; font-weight: 500; font-size: clamp(2.45rem, 6.9vw, 4.65rem); line-height: 1.01; letter-spacing: -.035em; }
h2 { font-family: Georgia, serif; font-size: clamp(1.45rem, 3vw, 1.92rem); line-height: 1.15; font-weight: 500; }
h3 { overflow-wrap: anywhere; font-size: 1rem; }
.intro { margin-top: .68rem; max-width: 44ch; color: var(--muted); }
.context { margin-bottom: 1rem; color: var(--muted); font-size: .89rem; max-width: 63ch; }

.button, .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; gap: .35rem; padding: .45rem .75rem; border: 1px solid transparent; border-radius: .4rem; font-weight: 650; font-size: .88rem; }
.button { text-decoration: none; }
.primary { background: var(--green); color: #fff; border-color: var(--green); }
.text-button { background: transparent; color: var(--green); text-align: center; }
.primary:hover:not(:disabled) { background: #0b3b2a; }
.text-button:hover { background: var(--green-light); }

.daily-layout { display: grid; gap: 1rem; align-items: start; }
.queue, .side-panel { border: 1px solid var(--line); border-radius: .7rem; padding: 1rem; background: var(--white); min-width: 0; }
.queue { border-top: 3px solid var(--gold); }
.queue-heading { display: flex; justify-content: space-between; align-items: start; gap: .7rem; }
#today-label, .queue-summary, .metadata, .habit, #practice-reference { color: var(--muted); }
#today-label { margin-top: .25rem; font-size: .83rem; }
.day-count { flex: 0 0 auto; color: var(--green); font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.queue-tabs { display: flex; flex-wrap: wrap; column-gap: .2rem; margin-top: .65rem; border-bottom: 1px solid var(--line); }
.queue-tabs .text-button { border-radius: .35rem .35rem 0 0; }
.queue-tabs [aria-pressed="true"] { background: var(--green-light); border-bottom-color: var(--green); color: #103c2a; }
.queue-summary { margin-top: .64rem; min-height: 1.5em; font-size: .89rem; }
.reply-list { list-style: none; margin: 0; padding: 0; }
.reply-row { display: grid; gap: .4rem; padding: .72rem 0; border-bottom: 1px solid var(--line); }
.reply-row:last-child { padding-bottom: .14rem; border-bottom: 0; }
.reply-main, .reply-actions { min-width: 0; }
.metadata { margin-top: .16rem; font-size: .82rem; }
.overdue { color: #793c1d; font-weight: 750; }
.reply-actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .18rem; }
.reply-actions .text-button { padding-inline: .54rem; }
.queue-empty { margin-top: .75rem; color: var(--muted); }
.side-panel h2 { margin-bottom: .55rem; }
.habit { margin: .25rem 0 .7rem; padding-inline-start: 1.4rem; }
.habit li { padding-left: .12rem; margin-bottom: .35rem; }
.workshop-link { padding-inline: .2rem; margin-left: -.2rem; }
.form-pair { display: grid; gap: .55rem; }
form label { display: grid; min-width: 0; gap: .22rem; margin-bottom: .6rem; font-size: .88rem; font-weight: 650; }
form input, form select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #819282; background: var(--white); border-radius: .38rem; padding: .42rem .5rem; }
.notice, #fatal { color: #31503c; margin-block: .55rem; min-height: 1.35em; font-size: .9rem; }
#fatal { border-left: 3px solid var(--gold); padding: .4rem .55rem; }
.queue-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: start; margin-block: .3rem 1rem; }
.load-label { display: grid; justify-items: start; cursor: pointer; max-width: 100%; }
.load-label input { width: min(100%, 15rem); min-height: 44px; padding-block: .42rem; }
.load-label:focus-within { outline: 3px solid #93650c; outline-offset: 3px; }
.footer { border-top: 1px solid var(--line); padding-block: .35rem; color: var(--muted); font-size: .85rem; }

@media (min-width: 36rem) {
  .reply-row { grid-template-columns: minmax(12rem, 1fr) auto; align-items: center; }
  .form-pair { grid-template-columns: 1fr 1fr; }
  .queue, .side-panel { padding: 1.15rem; }
}

@media (min-width: 57rem) {
  .daily-layout { grid-template-columns: minmax(0, 1.75fr) minmax(16rem, 1fr); }
}
