:root {
  color-scheme: light;
  --forest: #153f32;
  --green: #196047;
  --leaf: #dcede0;
  --paper: #fff;
  --canvas: #f3f6f2;
  --ink: #1b2b24;
  --muted: #52655a;
  --line: #d5dfd7;
  --gold: #f7e7c2;
  --gold-ink: #694813;
  --radius: 14px;
  font: 100%/1.5 Inter, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box }
body { margin: 0; color: var(--ink); background: var(--canvas) }
button, select, input, textarea { font: inherit; color: inherit }
button, summary, select { cursor: pointer }
button, .link-button { touch-action: manipulation }
a, .text-btn { color: var(--green); text-underline-offset: .2em }
a:hover, .text-btn:hover { text-decoration-thickness: 2px }
:focus-visible { outline: 3px solid #197751; outline-offset: 3px }
button:disabled, input:disabled { cursor: default }
button:disabled { opacity: .6 }
h1,h2,h3,p,dl,dd { margin: 0 }
h1,h2,h3 { letter-spacing: -.035em; line-height: 1.18 }
h1 { font-size: clamp(2rem,4vw,3.15rem); font-weight: 650 }
h2 { font-size: 1.45rem; font-weight: 650 }
h3 { font-size: 1.1rem; font-weight: 650 }
.masthead { color: #f4fbf6; background: var(--forest); border-bottom: 3px solid #a2c6a9 }
.mast-inner { max-width: 100rem; margin: auto; padding: 1rem clamp(1rem,4vw,3.8rem); display: flex; align-items: center; justify-content: space-between; gap: .75rem }
.brand, .identity, .row, .toolbar, .tabs, .panel-title, .check, .filter-head, .lock-label { display: flex; align-items: center }
.brand { gap: .7rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -.035em }
.book-mark { position: relative; display: inline-flex; flex-direction: column; justify-content: center; gap: 3px; padding-left: 9px; width: 28px; height: 28px; border: 1.5px solid #cfe8d6; border-radius: 4px; background: #d1e8d5; }
.book-mark::before { content: ""; position: absolute; inset: 0 auto 0 5px; width: 1px; background: #83aa8f }
.book-mark i { width: 11px; height: 2px; border-radius: 1px; background: var(--forest) }
.book-mark i:last-child { width: 7px }
.identity { gap: .5rem; font-size: .88rem; font-weight: 550; color: #e3f2e7 }
.avatar { width: 1.85rem; height: 1.85rem; display: grid; place-items: center; border-radius: 50%; background: #cfe5d1; color: #214737; font-size: .85rem; font-weight: 700 }
main { max-width: 100rem; margin: auto; padding: clamp(1.3rem,3vw,2.7rem) clamp(1rem,4vw,3.8rem) 4rem }
.loading { color: var(--muted); padding: 2rem 0 }
.caption, .muted, .meta { color: var(--muted) }
.caption, .meta, .count, .pill, .table-footer, .code-hint { font-size: .875rem }
.caption { font-weight: 550 }
.help { font-size: .94rem; color: var(--muted) }
.row, .toolbar, .tabs, .filter-head { flex-wrap: wrap; gap: .6rem }
.space-between { justify-content: space-between }
.head-group { display: grid; gap: .45rem }
.page-head { align-items: end; margin-bottom: 1.5rem }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.65rem; padding: .5rem 1rem; border: 1px solid #aebdb1; border-radius: 8px; background: var(--paper); color: var(--ink); font-size: .94rem; font-weight: 600 }
.btn:hover { background: #edf3ee; border-color: #839989 }
.btn.primary { color: #fff; background: var(--green); border-color: var(--green) }
.btn.primary:hover { background: #154e3c }
.btn.small { min-height: 2.25rem; font-size: .875rem; padding: .3rem .7rem }
.text-btn { border: 0; background: transparent; padding: .2rem 0; text-align: left; font: inherit; font-weight: 600; text-decoration: underline }
.back { margin: 0 0 1.1rem; font-size: .9rem }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius) }
.padded { padding: clamp(1rem,2.8vw,1.8rem) }
.tabs { gap: .35rem; padding: .65rem .8rem; border-bottom: 1px solid var(--line) }
.tab { display: inline-flex; align-items: center; gap: .5rem; border: 0; padding: .55rem .75rem; border-radius: 7px; color: var(--muted); background: transparent; font-size: .94rem; font-weight: 550 }
.tab:hover { background: #f0f5f0 }
.tab[aria-pressed=true] { color: var(--forest); background: var(--leaf) }
.count { display: inline-grid; place-items: center; min-width: 1.35rem; padding: 0 .22rem; border-radius: 5px; background: #fff9; font-variant-numeric: tabular-nums }
.grid-scroll { overflow: auto; max-width: 100%; max-height: 65vh; scrollbar-color: #8da597 var(--canvas); scrollbar-width: auto }
.orders { border-spacing: 0; width: max-content; min-width: 100%; font-size: .94rem; text-align: left }
.orders th, .orders td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); max-width: 25rem; vertical-align: middle; overflow-wrap: anywhere }
.orders th { position: sticky; top: 0; z-index: 1; background: #edf3ee; color: #44594c; font-size: .875rem; font-weight: 600; white-space: nowrap }
.orders td { background: var(--paper) }
.orders tr:hover td { background: #f6f9f6 }
.orders :is(th,td):first-child { position: sticky; left: 0; z-index: 2; min-width: 9rem; max-width: 15rem; border-right: 1px solid #c8d5cb }
.orders th:first-child { z-index: 3 }
.orders .note-cell { width: 20rem; min-width: 15rem; white-space: pre-line }
.orders .single { white-space: nowrap }
.orders .bool { text-align: center }
.table-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .65rem 1rem; color: var(--muted) }
.pill { display: inline-flex; align-items: center; width: fit-content; padding: .15rem .65rem; font-weight: 600; border-radius: 99px; white-space: nowrap; background: #e8efe9; color: #354e3c }
.pill.warm { background: var(--gold); color: var(--gold-ink) }
.pill.green { background: var(--leaf); color: var(--forest) }
.bool-mark { display: inline-grid; place-items: center; vertical-align: middle; width: 1.15rem; height: 1.15rem; border: 1.5px solid #87978b; color: white; border-radius: 4px; font-size: .95rem; line-height: 1 }
.bool-mark.on { background: var(--green); border-color: var(--green) }
.empty { padding: clamp(2rem,6vw,4.2rem) 1rem; display: grid; justify-items: center; gap: .6rem; text-align: center }
.empty h2 { font-size: 1.4rem }
.empty .btn { margin-top: .5rem }
.field { display: grid; gap: .32rem; min-width: 0; align-content: start; font-size: .91rem; font-weight: 600 }
.field input, .field textarea, .field select, .enroll-code { display: block; width: 100%; min-width: 0; padding: .62rem .72rem; color: var(--ink); border: 1px solid #a3b3a7; border-radius: 7px; background: #fff; font: 400 1rem/1.45 Inter,"Segoe UI",Arial,sans-serif }
.field input:focus, .field textarea:focus, .field select:focus, .enroll-code:focus { outline: 2px solid var(--green); outline-offset: 1px }
.field textarea { resize: vertical; min-height: 5.4rem }
.field select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg,transparent 50%,#446250 50%),linear-gradient(135deg,#446250 50%,transparent 50%); background-position: calc(100% - 1rem) 50%,calc(100% - .72rem) 50%; background-size: .3rem .3rem; background-repeat: no-repeat }
.pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem 1rem }
.stack { display: grid; align-content: start; gap: 1rem; min-width: 0 }
.view { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(16rem,.8fr); gap: 1.25rem; align-items: start; max-width: 78rem }
.side { background: #edf3ed }
.side dl, .join-demo dl { display: grid; gap: .85rem }
.side dt, .join-demo dt { color: var(--muted); font-size: .875rem }
.side dd { overflow-wrap: anywhere }
.memo { white-space: pre-line; overflow-wrap: anywhere }
.check { gap: .65rem; min-height: 2.2rem; width: fit-content; line-height: 1.4 }
.check input { flex: none; width: 1.2rem; height: 1.2rem; accent-color: var(--green); margin: 0 }
.check input:disabled { opacity: 1 }
.next-card { border: 1px solid #dbc390; border-left: 4px solid #bf8d3c; border-radius: 10px; background: #fff8e9; padding: 1rem 1.1rem }
.next-card.complete { border-color: #a4c6ae; background: #edf5ee }
.next-text { font-size: 1.15rem; font-weight: 600; margin: .55rem 0; white-space: pre-wrap; overflow-wrap: anywhere }
.separated { border-top: 1px solid var(--line); padding-top: 1rem }
.disclosure > summary { font-weight: 600; color: var(--green); width: fit-content; min-height: 2rem }
.disclosure[open] > summary { margin-bottom: .65rem }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem }
.error { border: 1px solid #dab5a9; border-radius: 8px; padding: .8rem 1rem; background: #fff1eb; color: #742d1d; white-space: pre-line }
.conflict-list { margin: .5rem 0; padding-left: 1.15rem; overflow-wrap: anywhere }
.notice:not(:empty) { position: fixed; z-index: 9; right: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); background: var(--forest); color: white; padding: .75rem 1rem; border-radius: 9px; box-shadow: 0 5px 25px #1b332428 }
.enroll { display: grid; grid-template-columns: minmax(0,1.06fr) minmax(0,.94fr); max-width: 64rem; margin: clamp(.5rem,5vw,4rem) auto; overflow: hidden }
.join-form { padding: clamp(1.4rem,4.5vw,3rem); display: grid; align-content: center; justify-items: start; gap: 1.15rem }
.join-form h1 { font-size: clamp(2rem,3.2vw,2.65rem) }
.join-form .field { width: 100% }
.join-form .help { max-width: 34ch }
.join-demo { padding: clamp(1.4rem,3.8vw,2.5rem); background: var(--forest); color: #f4fbf4; display: grid; align-content: center; gap: 1rem }
.join-demo > .caption { color: #c9e6d0 }
.sample-card { padding: 1.2rem; color: var(--ink); background: #f6f9f5; border-radius: 10px; box-shadow: 0 12px 25px #082a1d44 }
.sample-card h2 { margin: .3rem 0 .85rem }
.sample-card dl { grid-template-columns: 1fr; gap: .7rem }
.sample-note { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .75rem }
.sample-note p { margin-top: .2rem; font-weight: 550 }
.inline-error:empty { display: none }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0 }
@media (max-width: 800px) { .view { grid-template-columns: minmax(0,1fr) } .enroll { grid-template-columns: minmax(0,1fr) minmax(0,.8fr) } }
@media (max-width: 660px) {
  .enroll { grid-template-columns: minmax(0,1fr); margin: .25rem auto }
  .join-demo { padding: 1.2rem 1.4rem }
  .join-demo dl { grid-template-columns: 1fr 1fr }
  .mast-inner { padding-block: .75rem }
  .pair { grid-template-columns: minmax(0,1fr) }
  .tabs { gap: .1rem; padding: .55rem }
  .tab { padding: .5rem; min-height: 2.75rem }
  .toolbar { margin-top: .3rem }
  .grid-scroll { max-height: 61vh }
  .orders :is(th,td):first-child { min-width: 7.5rem; max-width: 9rem }
  .actions .btn,.check { min-height: 2.75rem }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important } }
