:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #5c6962;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --line: #d8ded6;
  --field: #eef3ec;
  --accent: #2f6f58;
  --accent-strong: #245543;
  --gold: #b66f2c;
  --shadow: 0 24px 70px rgba(23, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(47, 111, 88, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff, var(--paper));
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
textarea {
  font: inherit;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app-shell {
  width: min(960px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 32px 0;
}

.home-view,
.practice-view,
.completion-view,
.return-view,
.archive-view {
  width: 100%;
}

.brand-lockup,
.alpha-boundary,
.practice-panel,
.saved-panel,
.archive-panel,
.step-panel,
.completion-summary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.brand-lockup {
  padding: clamp(28px, 6vw, 64px);
  border-left: 6px solid var(--accent);
}

.alpha-boundary {
  margin-top: 16px;
  padding: 20px;
  border-left: 6px solid var(--gold);
}

.alpha-boundary h2 {
  margin-bottom: 10px;
}

.alpha-boundary p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.55;
}

.alpha-boundary p:last-of-type {
  margin-bottom: 0;
}

.kicker,
.panel-label {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.tagline,
.step-copy,
.completion-copy {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.practice-panel,
.saved-panel,
.archive-panel {
  margin-top: 16px;
  padding: 20px;
}

.practice-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.primary-action,
.secondary-action,
.quiet-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  white-space: nowrap;
}

.primary-action {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.secondary-action,
.quiet-action {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.saved-grid,
.completion-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.saved-grid > div,
.completion-summary > div {
  min-height: 92px;
  padding: 16px;
  border-radius: 8px;
  background: var(--field);
}

.saved-grid span,
.completion-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.saved-grid strong,
.completion-summary strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
  line-height: 1.35;
}

.button-row,
.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.practice-header span {
  color: var(--muted);
  font-weight: 800;
}

.step-panel,
.completion-view,
.return-view,
.archive-view {
  padding: clamp(24px, 6vw, 56px);
}

.practice-view h1,
.completion-view h1,
.return-view h1,
.archive-view h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.reflection-input {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.reflection-input span {
  color: var(--muted);
  font-weight: 800;
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px;
  line-height: 1.5;
}

textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(47, 111, 88, 0.28);
  outline-offset: 3px;
}

.form-error {
  margin: 14px 0 0;
  color: #9b2f24;
  font-weight: 800;
}

.completion-view,
.return-view,
.archive-view {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.completion-summary {
  margin-top: 24px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.return-form {
  margin-top: 24px;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  width: 100%;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.choice-group label {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.choice-group input {
  accent-color: var(--accent);
}

.return-note {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background: var(--field);
}

.return-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.return-note strong,
.return-note p {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}

.return-note p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}


.memory-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.memory-list .panel-label {
  margin-top: 14px;
}

.memory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(216, 222, 214, 0.72);
}

.memory-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.memory-row strong,
.memory-row p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.memory-direction,
.memory-action {
  min-width: 0;
}

.memory-action {
  grid-column: 1 / 3;
}

.memory-row p {
  color: var(--muted);
  line-height: 1.45;
}

.limit-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.memory-return {
  justify-self: end;
  min-height: 40px;
  padding: 0 14px;
}

.archive-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.archive-heading h2 {
  margin: 0;
}

.archive-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.archive-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(216, 222, 214, 0.72);
  border-radius: 8px;
  background: var(--field);
}

.archive-row span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.archive-row strong,
.archive-row p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.archive-row p {
  color: var(--muted);
}

.archive-empty {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.archive-view .archive-list {
  margin-top: 24px;
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100vw - 24px, 520px);
    align-items: start;
    padding: 18px 0;
  }

  .practice-panel,
  .saved-grid,
  .completion-summary {
    grid-template-columns: 1fr;
  }

  .practice-panel {
    align-items: stretch;
  }

  .memory-row,
  .archive-heading,
  .archive-row {
    grid-template-columns: 1fr;
  }

  .memory-action {
    grid-column: 1;
  }

  .memory-return {
    justify-self: stretch;
    width: 100%;
  }

  .primary-action,
  .secondary-action,
  .quiet-action {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .practice-header .quiet-action {
    width: auto;
  }

  .choice-group label {
    width: 100%;
  }

  h1 {
    line-height: 1;
  }
}

.privacy-footer {
  width: min(960px, calc(100vw - 32px));
  margin: -20px auto 24px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.privacy-footer a,
.privacy-page a {
  color: var(--accent-strong);
  font-weight: 800;
}

.privacy-page {
  width: min(760px, calc(100vw - 32px));
  margin: 0 auto;
  padding: clamp(28px, 7vw, 72px) 0;
}

.privacy-page h1 {
  font-size: clamp(2.3rem, 7vw, 4.8rem);
}

.privacy-page p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
