:root {
  color-scheme: light;
  --bg: #efeae1;
  --bg-raised: #f7f4ee;
  --ink: #1c1916;
  --muted: #4e463d;
  --line: #d9d0c2;
  --glow: rgba(125, 46, 22, 0.07);
  --green: #16332f;
  --green-2: #214640;
  --cream: #f4f0e8;
  --cream-soft: #d5e3dc;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow: 0 1px 0 rgba(28, 25, 22, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141311;
    --bg-raised: #211e1a;
    --ink: #f3efe6;
    --muted: #c9bbaa;
    --line: #3c352d;
    --glow: rgba(231, 181, 164, 0.08);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 0% -10%, var(--glow), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

button,
a,
input,
textarea {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid #c46a45;
  outline-offset: 3px;
}

::selection {
  background: #e7c7b6;
  color: #1c1916;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--green);
  color: var(--cream);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  z-index: 5;
}

.skip:focus {
  transform: none;
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: calc(0.85rem + env(safe-area-inset-top)) 1.25rem 2rem;
  flex: 1;
}

.screen.has-dock .wrap {
  padding-bottom: 8.5rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.wordmark,
.kicker,
.say-label,
.minute h2,
.section-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wordmark {
  margin: 0;
  color: var(--ink);
}

.kicker,
.say-label,
.section-label {
  margin: 0 0 0.7rem;
  color: var(--muted);
}

h1,
h2,
.line,
.after-more,
.row strong {
  font-family: var(--serif);
  font-weight: 560;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lede {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--ink);
}

.fine,
.row span,
.follow p,
.prose p,
.prose li,
.helpline small,
.note-card p,
.name-ask,
.status {
  color: var(--muted);
}

.fine {
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

#screen-home .wrap {
  display: flex;
  flex-direction: column;
}

#screen-home .actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 2.25rem;
}

.btn,
.text-btn,
.row,
.helpline,
.chip {
  font-family: var(--sans);
}

.btn {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 3.35rem;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 680;
  line-height: 1.2;
  cursor: pointer;
}

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

.btn.primary {
  background: var(--green);
  color: var(--cream);
}

.btn.ghost,
.text-btn {
  background: transparent;
  color: var(--ink);
}

.btn.ghost {
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.text-btn {
  border: 0;
  padding: 0.2rem 0;
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

button.link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  cursor: pointer;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

#screen-support h1,
#screen-notes h1,
#screen-situations h1 {
  font-size: clamp(2rem, 6.2vw, 2.8rem);
}

.prose h3 {
  margin: 1.15rem 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 560;
}

fieldset.field {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.row {
  width: 100%;
  text-align: left;
  background: var(--bg-raised);
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.row strong {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.row span {
  font-size: 0.95rem;
}

.line {
  margin: 0.2rem 0 1.4rem;
  font-size: clamp(1.7rem, 5.5vw, 2.45rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  user-select: text;
}

.safety {
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #f3e1d4;
  color: #3d2118;
  font-weight: 680;
  line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
  .safety {
    background: #3d241c;
    color: #f6e6dc;
  }
}

.follow {
  margin: 0 0 1.15rem;
  padding-top: 0.2rem;
}

.follow h2,
.prose h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.follow p,
.prose p,
.prose li {
  margin: 0.4rem 0 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.prose h2 {
  margin-top: 2rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose a {
  color: inherit;
}

.jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0.4rem;
}

.jumps a {
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.helpline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raised);
  color: inherit;
  text-decoration: none;
}

.helpline strong {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
}

.helpline small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.helpline .num {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
}

.callout {
  margin-top: 0.9rem;
  padding: 1rem;
  border-radius: 16px;
  background: var(--green);
  color: var(--cream);
}

.callout p,
.callout a,
.callout strong {
  color: var(--cream);
}

.callout p {
  margin: 0.35rem 0 0;
}

.callout a {
  font-weight: 750;
}

.dock {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 0.75rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.dock-inner {
  width: min(40rem, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#screen-after {
  background: var(--green);
  color: var(--cream);
}

#screen-after .kicker,
#screen-after .fine,
#screen-after .name-ask,
#screen-after .name-line {
  color: var(--cream-soft);
}

#screen-after h1 {
  color: var(--cream);
  font-size: clamp(2.15rem, 7.4vw, 3.15rem);
}

.after-more {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  line-height: 1.4;
  color: var(--cream);
}

.name-line {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.minute {
  margin-top: 1.5rem;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 16px;
  background: var(--green-2);
}

.minute h2 {
  color: var(--cream-soft);
}

.minute p {
  margin: 0;
  color: var(--cream);
  line-height: 1.45;
}

#screen-after .dock {
  background: color-mix(in srgb, var(--green) 90%, transparent);
  border-top-color: rgba(244, 240, 232, 0.16);
}

#screen-after .btn.primary {
  background: var(--cream);
  color: var(--green);
}

#screen-after .btn.ghost,
#screen-after .text-btn {
  color: var(--cream);
}

#screen-after .btn.ghost {
  box-shadow: inset 0 0 0 1.5px rgba(244, 240, 232, 0.38);
}

.name-ask {
  margin-top: 1.4rem;
}

.name-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.name-row .btn {
  width: auto;
  min-width: 5.5rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field > span,
.check {
  font-size: 0.95rem;
  font-weight: 700;
}

input[type="text"],
input[type="datetime-local"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  color: var(--ink);
  font: 1rem/1.4 var(--sans);
  padding: 0.75rem 0.8rem;
}

textarea {
  min-height: 6.2rem;
  resize: vertical;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.8rem;
  background: var(--bg-raised);
  font-size: 0.95rem;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip:has(input:checked) {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}

.chip:has(input:focus-visible) {
  outline: 3px solid #c46a45;
  outline-offset: 2px;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 650;
}

.check input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.note-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raised);
  padding: 0.9rem 1rem 1rem;
}

.note-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 560;
}

.note-card p {
  margin: 0.35rem 0 0;
}

.note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.private {
  margin-top: 0.7rem;
}

.private summary {
  cursor: pointer;
  font-weight: 700;
}

.status {
  min-height: 1.3rem;
  margin: 0.4rem 0 0;
}

.blank {
  white-space: pre-wrap;
  font-family: var(--sans);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  overflow-x: auto;
}

details.sources {
  margin-top: 1.5rem;
}

details.sources summary {
  cursor: pointer;
  font-weight: 700;
}

.noscript {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raised);
}

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

@media (min-width: 720px) {
  .helpline .num {
    font-size: 1.15rem;
  }
}
