/* When Did It Start? — dependency-free, mobile-first styles */

:root {
  --ink: #18201f;
  --muted: #5f6b68;
  --paper: #f7f5ee;
  --paper-deep: #ece8dc;
  --white: #fffef9;
  --green: #174d45;
  --green-dark: #0d3933;
  --green-soft: #dfece7;
  --amber: #f3e7c1;
  --red: #8d2f2a;
  --red-soft: #f5e3df;
  --line: #d6d4ca;
  --shadow: 0 18px 48px rgba(22, 38, 35, 0.10);
  --radius: 20px;
  --radius-small: 12px;
  --max: 1160px;
  --focus: 0 0 0 4px rgba(23, 77, 69, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }

a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 999;
  transform: translateY(-200%);
  padding: .75rem 1rem;
  color: white;
  background: var(--ink);
}
.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.safety-strip {
  background: var(--ink);
  color: white;
  font-size: .88rem;
}
.safety-strip__inner {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 44px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  padding-block: .55rem;
}
.safety-strip a { color: white; font-weight: 750; }
.safety-strip__resources { margin-left: auto; }

.site-header {
  position: relative;
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand, .app-brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand__mark {
  width: 28px;
  height: 28px;
  border: 2px solid var(--green);
  border-radius: 50%;
  position: relative;
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.site-nav { display: flex; gap: 1.25rem; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: .96rem;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: .55rem .8rem;
  border-radius: 10px;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
  padding-block: clamp(3rem, 5vw, 5.25rem);
}
.eyebrow {
  margin: 0 0 .7rem;
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 800px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: .99;
  letter-spacing: -.055em;
  font-weight: 500;
}
.hero__lead {
  max-width: 720px;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}
.privacy-promise {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1.7rem 0;
}
.privacy-promise span {
  padding: .45rem .75rem;
  border: 1px solid #b9cec7;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: .88rem;
  font-weight: 750;
}
.microcopy {
  max-width: 570px;
  margin: .85rem 0 0;
  color: var(--muted);
  font-size: .86rem;
}
.hero__card {
  padding: clamp(1.5rem, 4vw, 2.3rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero__card h2 {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.12;
  font-weight: 500;
}
.hero__card p { color: var(--muted); }
.text-link { font-weight: 750; }

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 780;
  transition: transform 160ms ease, background 160ms ease, border 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button--large { padding: 1rem 1.45rem; font-size: 1.05rem; }
.button--primary { background: var(--green); color: white; }
.button--primary:hover { background: var(--green-dark); color: white; }
.button--secondary {
  background: var(--white);
  color: var(--green-dark);
  border: 1px solid #aac0b9;
}
.button--quiet { background: transparent; color: var(--muted); }
.button--danger { background: var(--red); color: white; }

.how-it-works { padding-block: 2rem 7rem; }
.how-it-works > h2,
.boundary h2,
.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.035em;
}
.how-it-works > h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.steps-grid article {
  padding: 1.5rem;
  background: rgba(255,255,255,.45);
  border-top: 1px solid var(--line);
}
.step-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 800;
}
.steps-grid h3 { margin: 0 0 .45rem; }
.steps-grid p { margin: 0; color: var(--muted); }

.boundary {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 3rem;
  align-items: start;
  padding-block: 4rem;
  border-top: 1px solid var(--line);
}
.boundary h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.boundary > p { margin: .1rem 0; color: var(--muted); font-size: 1.1rem; }

.site-footer {
  margin-top: 5rem;
  padding-block: 3rem;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}
.site-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
.footer-brand { margin: 0; font-weight: 850; font-size: 1.08rem; }
.site-footer p:last-child { color: var(--muted); margin-bottom: 0; }
.site-footer nav {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .8rem 1.25rem;
}
.site-footer nav a { color: var(--ink); font-weight: 650; }

/* Questionnaire */
.app-view { min-height: 100vh; background: var(--paper); }
.app-shell { width: min(calc(100% - 2rem), 780px); margin-inline: auto; padding-bottom: 3rem; }
.app-topline {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.app-safety-note {
  padding: .75rem 1rem;
  border: 1px solid #decf9f;
  background: var(--amber);
  border-radius: var(--radius-small);
  font-size: .88rem;
}
.progress-wrap { margin: 2rem 0 1.2rem; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.progress-track {
  height: 6px;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 999px;
}
#progress-bar {
  height: 100%;
  width: 4%;
  background: var(--green);
  border-radius: inherit;
  transition: width 240ms ease;
}
.question-card {
  min-height: 430px;
  padding: clamp(1.4rem, 5vw, 3rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.question-card h1 {
  margin: 0;
  max-width: 650px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.07;
  font-weight: 500;
  letter-spacing: -.035em;
}
.question-help { color: var(--muted); margin: 1rem 0 1.6rem; }
.app-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.choice-list, .choice-grid {
  display: grid;
  gap: .7rem;
}
.choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice {
  position: relative;
  display: block;
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice span {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
  cursor: pointer;
  font-weight: 670;
  transition: background 140ms ease, border 140ms ease, transform 140ms ease;
}
.choice span::before {
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: .75rem;
  border: 1.5px solid #9da7a4;
  border-radius: 50%;
  background: white;
}
.choice--checkbox span::before { border-radius: 5px; }
.choice input:checked + span {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
}
.choice input:checked + span::before {
  border: 6px solid var(--green);
}
.choice--checkbox input:checked + span::before {
  border: 2px solid var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 4px var(--green-soft);
}
.choice input:focus-visible + span { box-shadow: var(--focus); }
.choice span:hover { transform: translateY(-1px); border-color: #a9bbb6; }

.field-stack { display: grid; gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label, .field-label {
  display: block;
  margin-bottom: .42rem;
  font-weight: 750;
  font-size: .92rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field small { display: block; margin-top: .35rem; color: var(--muted); }
.measurement-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.measurement-row h3 { grid-column: 1 / -1; margin: 0; }
.validation-message {
  margin: 1rem 0 0;
  padding: .75rem 1rem;
  background: var(--red-soft);
  color: #6f211e;
  border-radius: 10px;
  font-weight: 700;
}

/* Report */
.report-actions-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(247,245,238,.96);
  backdrop-filter: blur(10px);
}
.report-actions-bar__inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.report-actions-bar__note { margin: 0; color: var(--muted); font-size: .85rem; }
.report-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
  padding-block: 2rem;
}
.report-document {
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.report-header { padding-bottom: 1.5rem; border-bottom: 2px solid var(--ink); }
.report-header__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.report-url {
  margin: 0;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.report-brand { margin: 0 0 .4rem; font-weight: 850; color: var(--green); }
.report-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -.04em;
}
.report-intro { margin-bottom: 0; color: var(--muted); }
.report-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
}
.report-summary div { padding: .9rem; border-bottom: 1px solid var(--line); }
.report-summary div:nth-child(odd) { border-right: 1px solid var(--line); }
.report-summary dt {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.report-summary dd { margin: .25rem 0 0; font-weight: 730; }
.report-section { padding: 1.3rem 0; border-top: 1px solid var(--line); }
.report-section h2 {
  margin: 0 0 .8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}
.report-section ul { padding-left: 1.2rem; }
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 !important;
}
.timeline li {
  position: relative;
  margin-left: 8px;
  padding: 0 0 1.25rem 1.5rem;
  border-left: 2px solid var(--green-soft);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: .35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}
.timeline-time { display: block; color: var(--green); font-weight: 820; font-size: .86rem; }
.timeline-detail { margin: .2rem 0 0; }
.report-footer {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: .82rem;
}
.report-side { display: grid; gap: 1rem; }
.side-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--white);
}
.side-card h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
.side-card p { color: var(--muted); font-size: .9rem; }
.side-card .button { width: 100%; }
.side-card--danger { border-color: #dfb9b4; background: var(--red-soft); }

/* Interior pages */
.page-main { min-height: 70vh; }
.page-hero { padding-block: clamp(2.75rem, 4.5vw, 4.75rem) 2rem; }
.page-hero h1 { max-width: 880px; font-size: clamp(2.7rem, 6vw, 5rem); line-height: 1.02; }
.page-hero .lead { max-width: 760px; color: var(--muted); font-size: 1.2rem; }
.prose {
  width: min(calc(100% - 2rem), 820px);
  margin-inline: auto;
  padding-bottom: 5rem;
}
.prose h2 {
  margin-top: 3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}
.prose h3 { margin-top: 2rem; }
.prose p, .prose li { color: #3e4947; font-size: 1.04rem; }
.prose blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}
.prose-card {
  margin: 1.3rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--white);
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.resource-card {
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--white);
}
.resource-card h2 { margin: 0 0 .5rem; font-size: 1.3rem; font-family: inherit; font-weight: 800; }
.resource-card p { font-size: .94rem; }
.resource-card .resource-number { color: var(--ink); font-size: 1.1rem; font-weight: 850; }
.resource-card a.button { display: inline-block; margin-top: .35rem; color: white; }
.citation-list li { margin-bottom: 1rem; }
.support-box {
  margin: 2rem 0;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--green);
  color: white;
}
.support-box h2 { margin-top: 0; color: white; }
.support-box p { color: rgba(255,255,255,.84); }
.support-box .button { display: inline-block; background: white; color: var(--green-dark); }
.notice {
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
}
.notice--urgent { border-color: var(--red); background: var(--red-soft); }

/* Responsive */
@media (max-width: 800px) {
  .safety-strip__inner { align-items: flex-start; flex-direction: column; padding-block: .75rem; }
  .safety-strip__resources { margin-left: 0; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    flex-direction: column;
  }
  .site-nav.is-open { display: flex; }
  .hero { grid-template-columns: 1fr; padding-block: 3.5rem; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 4.2rem); }
  .steps-grid, .boundary, .resource-grid { grid-template-columns: 1fr; }
  .boundary { gap: 1rem; }
  .site-footer__grid { flex-direction: column; }
  .choice-grid { grid-template-columns: 1fr; }
  .field-row, .measurement-row { grid-template-columns: 1fr; }
  .measurement-row h3 { grid-column: auto; }
  .question-card { min-height: 390px; }
  .report-actions-bar { position: static; }
  .report-actions-bar__inner { padding-block: 1rem; align-items: flex-start; flex-direction: column; }
  .report-layout { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: 1fr; }
  .report-summary div:nth-child(odd) { border-right: 0; }
}

@media (max-width: 520px) {
  .shell, .app-shell, .site-header, .safety-strip__inner { width: min(calc(100% - 1.2rem), var(--max)); }
  .site-header { min-height: 66px; }
  .button { width: 100%; text-align: center; }
  .app-actions .button { width: auto; }
  .report-buttons { width: 100%; }
  .report-buttons .button { width: 100%; }
  .hero__card { border-radius: 16px; }
}

@media print {
  body { background: white; }
  .safety-strip, .site-header, .site-footer, .report-actions-bar, .report-side { display: none !important; }
  .report-layout { display: block; width: 100%; padding: 0; }
  .report-document { border: 0; box-shadow: none; padding: 0; }
  .report-view { display: block !important; }
  @page { margin: .65in; }
}


/* Questionnaire V2: eight-stage hybrid flow */
.question-card {
  min-height: 0;
}

.stage-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.stage-section {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.stage-section legend {
  padding: 0 .35rem;
  font-weight: 780;
}

.stage-select {
  cursor: pointer;
}

.compact-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.choice--compact {
  flex: 1 1 145px;
}

.choice--compact span {
  min-height: 48px;
  padding: .7rem .85rem;
}

.choice--small span {
  min-height: 46px;
  padding: .65rem .75rem;
  font-size: .9rem;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: 1rem;
}

.expand-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
  overflow: hidden;
}

.expand-panel summary {
  cursor: pointer;
  padding: 1rem;
  font-weight: 800;
  list-style: none;
}

.expand-panel summary::-webkit-details-marker {
  display: none;
}

.expand-panel summary::after {
  content: "+";
  float: right;
  color: var(--green);
  font-size: 1.15rem;
}

.expand-panel[open] summary::after {
  content: "−";
}

.expand-panel > p,
.expand-panel > .check-grid,
.expand-panel > #measurement-details,
.expand-panel > #medication-fields {
  margin-left: 1rem;
  margin-right: 1rem;
}

.expand-panel > p {
  margin-top: 0;
  color: var(--muted);
  font-size: .9rem;
}

.expand-panel > .check-grid,
.expand-panel > #measurement-details,
.expand-panel > #medication-fields {
  margin-bottom: 1rem;
}

.timeline-builder {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
}

.timeline-builder__header,
.event-editor__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.timeline-builder__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.timeline-builder__header p {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.button--small {
  width: auto;
  padding: .62rem .9rem;
  font-size: .88rem;
}

.empty-state {
  margin: 1rem 0 0;
  padding: .9rem;
  color: var(--muted);
  background: var(--paper);
  border-radius: 10px;
}

.event-editor,
.measurement-entry {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.event-editor__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-top: .8rem;
}

.event-detail-field {
  grid-column: 1 / -1;
}

.event-remove {
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font-weight: 750;
}

.measurement-entry h3 {
  margin: 0 0 .8rem;
}

.live-preview {
  padding: 1rem;
  border-radius: var(--radius-small);
  background: var(--green-soft);
}

.live-preview ol {
  margin: .5rem 0 0;
  padding-left: 1.2rem;
}

.live-preview li {
  margin-bottom: .65rem;
}

.live-preview li strong,
.live-preview li span {
  display: block;
}

.live-preview li strong {
  color: var(--green-dark);
  font-size: .84rem;
}

.review-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--green-soft);
}

.review-card dl {
  margin: 0;
}

.review-card dl div {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(23, 77, 69, .16);
}

.review-card dl div:last-child {
  border-bottom: 0;
}

.review-card dt {
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.review-card dd {
  margin: 0;
  font-weight: 700;
}

.review-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .88rem;
}

.skip-button {
  margin-inline: auto;
}

.is-hidden {
  display: none;
}

@media (max-width: 700px) {
  .check-grid,
  .event-editor__grid {
    grid-template-columns: 1fr;
  }

  .event-detail-field {
    grid-column: auto;
  }

  .timeline-builder__header {
    flex-direction: column;
  }

  .button--small {
    width: 100%;
  }

  .review-card dl div {
    grid-template-columns: 1fr;
    gap: .2rem;
  }
}

@media (max-width: 520px) {
  .app-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .app-actions .button {
    width: 100%;
  }

  .skip-button {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #continue-button {
    grid-column: 2;
    grid-row: 1;
  }

  #back-button {
    grid-column: 1;
    grid-row: 1;
  }

  .compact-choice-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* Home Screen installation */
.install-trigger {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1rem;
  padding: .2rem 0;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: .22em;
}

.install-trigger:hover {
  color: var(--green-dark);
}

.install-trigger__icon {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-size: 1.05rem;
  line-height: 1;
  text-decoration: none;
}

.install-dialog[hidden] {
  display: none;
}

.install-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: end center;
  padding: 1rem;
}

.install-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 25, 23, .58);
  backdrop-filter: blur(4px);
}

.install-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 24px 80px rgba(13, 25, 23, .28);
}

.install-dialog__close {
  position: absolute;
  top: .8rem;
  right: .9rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
}

.install-dialog__app-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  background: var(--paper);
}

.install-dialog__app-icon::before {
  content: "";
  width: 38px;
  height: 38px;
  border: 4px solid var(--green);
  border-radius: 50%;
}

.install-dialog__app-icon span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
}

.install-dialog h2 {
  margin: 0;
  max-width: 430px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 7vw, 2.35rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.035em;
}

.install-dialog__panel > p:not(.eyebrow) {
  color: var(--muted);
}

.install-steps {
  display: grid;
  gap: .75rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: .75rem;
  align-items: center;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.install-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.install-dialog__privacy {
  font-size: .86rem;
}

.install-dialog__panel > .button {
  width: 100%;
}

.install-dialog-open {
  overflow: hidden;
}

@media (min-width: 700px) {
  .install-dialog {
    place-items: center;
  }
}

@media (display-mode: standalone) {
  .install-trigger {
    display: none;
  }
}
