:root {
  color-scheme: light;
  --bg: #e8eee8;
  --ink: #172b22;
  --muted: #63746a;
  --paper: #f8faf5;
  --line: #bacac0;
  --accent: #dfef71;
  --accent-ink: #1c3025;
  --forest: #294d3a;
  --white: #fff;
  --danger: #a4473b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #172620;
    --ink: #e5eee3;
    --muted: #a6b8a9;
    --paper: #22372b;
    --line: #486154;
    --accent: #d6e76f;
    --accent-ink: #1c3025;
    --forest: #d5e6d6;
    --white: #fff;
    --danger: #ff9c8e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #172620;
  --ink: #e5eee3;
  --muted: #a6b8a9;
  --paper: #22372b;
  --line: #486154;
  --accent: #d6e76f;
  --accent-ink: #1c3025;
  --forest: #d5e6d6;
  --white: #fff;
  --danger: #ff9c8e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px "DM Sans",
    sans-serif;
}
main {
  max-width: 720px;
  margin: auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 32px;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
}
header {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  font-size: 20px;
}
.wordmark span,
footer span {
  color: var(--forest);
}
.quiet {
  border: 0;
  background: transparent;
  color: var(--ink);
  min-height: 44px;
  padding: 8px;
}
.hero {
  position: relative;
  padding: 56px 0 52px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.hero .eyebrow span {
  float: right;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font:
    clamp(54px, 12vw, 88px) / 0.95 "DM Serif Display",
    Georgia,
    serif;
  letter-spacing: -0.04em;
  margin-top: 32px;
}
h1 em {
  font-weight: 400;
  color: var(--forest);
}
.hero p {
  margin-top: 22px;
  color: var(--muted);
  max-width: 235px;
  line-height: 1.5;
}
.stamp {
  position: absolute;
  right: 5%;
  bottom: 40px;
  width: 90px;
  height: 90px;
  border: 1px solid var(--forest);
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  transform: rotate(15deg);
  color: var(--forest);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 38px 0 20px;
}
h2 {
  font:
    30px / 1.1 "DM Serif Display",
    Georgia,
    serif;
  margin-top: 8px;
}
h2 span {
  font:
    12px "DM Sans",
    sans-serif;
  color: var(--muted);
}
.primary {
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  min-height: 46px;
  padding: 0 17px;
  white-space: nowrap;
}
.empty {
  border: 1px dashed var(--line);
  text-align: center;
  padding: 30px 12px;
  color: var(--muted);
}
.empty > span {
  font-size: 28px;
}
.empty p {
  margin: 8px 0 4px;
  color: var(--ink);
}
small {
  font-size: 12px;
}
.list-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  margin-bottom: 8px;
}
.case-icon {
  font-size: 28px;
}
.list-info {
  flex: 1;
  min-width: 0;
}
.list-info strong,
.list-info small {
  display: block;
}
.list-info small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  margin: 7px 0;
}
.progress {
  height: 4px;
  background: var(--line);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--forest);
}
.arrow {
  font-size: 22px;
}
.templates {
  margin-top: 48px;
}
#templates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.template {
  min-height: 145px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: left;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.template-number {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.template strong {
  font:
    23px "DM Serif Display",
    Georgia,
    serif;
  margin: auto 0 10px;
}
.template > span:last-child {
  font-size: 11px;
  color: var(--muted);
  width: 100%;
}
.template b {
  float: right;
  color: var(--ink);
  font-size: 17px;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 55px;
  padding-top: 20px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
}
dialog {
  width: min(94vw, 520px);
  max-height: 90dvh;
  border: 1px solid var(--line);
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 24px;
}
form label:not(.sr-only) {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 18px 0;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
}
.actions,
.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}
.detail-count {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.add {
  display: flex;
  gap: 8px;
  margin: 20px 0;
}
.add input {
  margin: 0;
}
.add button {
  font-size: 24px;
}
.items {
  padding: 0;
  list-style: none;
}
.items li {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.items label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-height: 48px;
}
.items input {
  width: 20px;
  height: 20px;
  accent-color: var(--forest);
}
.items input:checked + span {
  text-decoration: line-through;
  color: var(--muted);
}
.remove {
  color: var(--muted);
}
.danger {
  color: var(--danger);
}
.hint {
  color: var(--muted);
  font-size: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#notice:not(:empty) {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: var(--paper);
  padding: 12px;
  border: 1px solid var(--line);
}
@media (max-width: 400px) {
  .hero .eyebrow span {
    display: none;
  }
  .stamp {
    width: 72px;
    height: 72px;
    font-size: 8px;
  }
  .template {
    min-height: 130px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Account sheet: maps Pack's tokens onto the shared account sheet (css/account.css). */
:root {
  --acct-bg: var(--paper);
  --acct-field: var(--bg);
  --acct-raised: var(--bg);
  --acct-raised-on: var(--paper);
  --acct-ink: var(--ink);
  --acct-muted: var(--muted);
  --acct-faint: var(--muted);
  --acct-line: var(--line);
  --acct-line-strong: var(--line);
  --acct-accent: var(--forest);
  --acct-danger: var(--danger);
  --acct-primary: var(--accent);
  --acct-on-primary: var(--accent-ink);
  --acct-seg-on: var(--ink);
  --acct-on-seg-on: var(--paper);
  --acct-scrim: rgba(0, 0, 0, 0.55);
  --acct-shadow: none;
  --acct-font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --acct-font-display: "DM Serif Display", Georgia, serif;
  --acct-font-label: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --acct-display-size: 2.75rem;
  --acct-display-weight: 400;
  --acct-display-tracking: -0.04em;
  --acct-accent-style: italic;
  --acct-label-size: 0.66rem;
  --acct-label-weight: 700;
  --acct-label-tracking: 0.14em;
  --acct-sheet-width: 32rem;
  --acct-sheet-margin: auto;
  --acct-sheet-gutter: 32px;
  --acct-sheet-radius: 0;
  --acct-handle: none;
  --acct-enter: acct-fade;
  --acct-radius: 0;
  --acct-btn-radius: 0;
  --acct-seg-radius: 0;
  --acct-btn-h: 50px;
}
