:root {
  color-scheme: light;
  --paper: #f3f0e8;
  --paper-deep: #e9e4d9;
  --ink: #17211d;
  --muted: #4f5b54;
  --line: #858881;
  --forest: #183f31;
  --forest-2: #245a45;
  --lime: #d7e8aa;
  --white: #fffdf8;
  --danger: #8a3b32;
  --focus: #176c55;
  --control-radius: 8px;
  --section-radius: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

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

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

button,
input,
textarea,
select,
summary,
a {
  outline: 3px solid transparent;
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--focus);
}

[data-focus-target] {
  scroll-margin-top: 24px;
}

[data-focus-target]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

.now-panel [data-focus-target]:focus {
  outline-color: var(--lime);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: var(--control-radius);
  cursor: pointer;
}

button[disabled] {
  cursor: wait;
  opacity: 0.62;
}

button:active:not([disabled]) {
  filter: brightness(0.88);
}

h1,
h2,
h3,
p,
dd,
strong,
a,
summary {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
dd {
  text-wrap: pretty;
}

form {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 680;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  line-height: 1.45;
}

textarea {
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--forest-2);
}

input::placeholder,
textarea::placeholder {
  color: #5b655f;
  opacity: 1;
}

.purpose-shell {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 0 max(56px, calc(36px + env(safe-area-inset-bottom)));
}

.purpose-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--lime);
  background: var(--forest);
  font-family: Georgia, serif;
  font-size: 18px;
}

.wordmark strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 13px;
}

.header-meta form {
  margin: 0;
}

.quiet-button,
.quiet-link,
.detail-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
}

.quiet-button:hover,
.quiet-link:hover,
.detail-back:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.feedback,
.noscript-note,
.read-only-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

.feedback {
  display: none;
  border-color: var(--danger);
  color: var(--danger);
  background: #f5e8e4;
}

.feedback.visible {
  display: block;
}

.feedback[data-tone="success"] {
  border-color: var(--forest-2);
  color: var(--forest);
  background: #e6eddf;
}

.section-label {
  margin: 0 0 8px;
  color: var(--forest-2);
  font-size: 13px;
  font-weight: 760;
}

.primary-action,
.light-action,
.dark-secondary-action,
.achievement-action,
.abandon-action,
.quiet-step-action {
  width: fit-content;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 740;
}

.primary-action {
  color: var(--white);
  background: var(--forest);
}

.primary-action:hover {
  background: var(--forest-2);
}

.light-action {
  color: var(--forest);
  background: var(--lime);
}

.light-action:hover {
  background: #e3efc5;
}

.dark-secondary-action {
  color: var(--white);
  border: 1px solid rgba(255, 253, 248, 0.55);
  background: transparent;
}

.dark-secondary-action:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.achievement-action {
  color: var(--forest);
  border: 1px solid var(--forest);
  background: transparent;
}

.achievement-action:hover {
  color: var(--white);
  background: var(--forest);
}

.abandon-action {
  color: var(--danger);
  border: 1px solid var(--danger);
  background: transparent;
}

.abandon-action:hover {
  color: var(--white);
  background: var(--danger);
}

.quiet-step-action {
  color: var(--forest);
  border: 1px solid var(--line);
  background: transparent;
}

.quiet-step-action:hover {
  border-color: var(--forest);
  background: var(--paper-deep);
}

.compact-field {
  max-width: 240px;
}

.field-help,
.activation-consent {
  margin: -2px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

/* First activation */

.activation {
  width: min(100%, 760px);
  min-height: 640px;
  padding: 64px 0 80px;
}

.activation-intro {
  max-width: 680px;
}

.activation-intro h1 {
  max-width: 22ch;
  margin: 0;
  font-size: 40px;
  font-weight: 710;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.activation-intro > p:last-child {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.activation-form {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.activation-status {
  display: none;
  gap: 12px;
}

.js .activation-status {
  display: grid;
}

.activation-status > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.activation-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activation-progress li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.activation-progress li span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 12px;
  font-weight: 750;
}

.activation-progress li[aria-current="step"] {
  color: var(--ink);
  font-weight: 700;
}

.activation-progress li[aria-current="step"] span,
.activation-progress li.completed span {
  color: var(--white);
  border-color: var(--forest);
  background: var(--forest);
}

.activation-step {
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin: 34px 0 0;
  padding: 0;
  border: 0;
}

.activation-step[hidden],
.activation-submit[hidden],
.activation-consent[hidden] {
  display: none;
}

.activation-step legend {
  max-width: 26ch;
  margin: 0;
  padding: 0;
  font-size: 26px;
  font-weight: 730;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.activation-step > p {
  margin: -4px 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

.activation-step .optional-field {
  margin-top: 4px;
}

.activation-step .optional-field small,
.purpose-form label small,
.new-purpose-commitment label small {
  color: var(--muted);
  font-weight: 500;
}

.step-controls {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.js .step-controls {
  display: flex;
}

.activation-submit {
  margin-top: 24px;
}

.activation-summary {
  display: none;
  max-width: 680px;
  margin-top: 30px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--white);
}

.js .activation-summary {
  display: grid;
  gap: 14px;
}

.activation-summary[hidden] {
  display: none;
}

.activation-summary h2 {
  margin: 0;
  font-size: 17px;
}

.activation-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
}

.activation-summary dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.activation-summary dd {
  margin: 0;
  line-height: 1.5;
}

.activation-consent {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--muted);
}

/* Returning owner's current action */

.daily-focus {
  padding: 42px 0 0;
}

.action-context {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 10px;
}

.action-context p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.action-context a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
}

.action-context a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.now-panel {
  padding: 34px 36px 36px;
  border-radius: var(--section-radius);
  color: var(--white);
  background: var(--forest);
}

.now-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 710;
}

.now-heading time {
  color: rgba(255, 253, 248, 0.76);
  font-weight: 500;
}

.now-panel h1 {
  max-width: 24ch;
  margin: 14px 0 0;
  font-size: 34px;
  font-weight: 720;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.done-definition {
  display: grid;
  gap: 6px;
  max-width: 64ch;
  margin: 18px 0 0;
  color: rgba(255, 253, 248, 0.86);
  font-size: 17px;
  line-height: 1.55;
}

.done-definition span {
  color: var(--lime);
  font-size: 13px;
  font-weight: 720;
}

.empty-guidance {
  max-width: 60ch;
  margin: 16px 0 0;
  color: rgba(255, 253, 248, 0.78);
  line-height: 1.6;
}

.commitment-form,
.blocker-form {
  display: grid;
  gap: 12px;
  max-width: 680px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.evidence-form label,
.commitment-form label,
.blocker-form > label,
.blocker-form .decision-options legend {
  color: var(--lime);
}

.evidence-form .field-help {
  color: rgba(255, 253, 248, 0.72);
}

.latest-result {
  max-width: 680px;
  margin: 20px 0 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.latest-result span {
  color: var(--lime);
  font-size: 13px;
  font-weight: 720;
}

.latest-result p {
  margin: 7px 0 0;
  color: var(--white);
  font-size: 17px;
  line-height: 1.55;
}

.outcome-entry {
  max-width: 680px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.outcome-entry > h2 {
  margin: 0;
  color: var(--lime);
  font-size: 1rem;
}

.outcome-entry > p {
  max-width: 60ch;
  margin: 7px 0 0;
  color: rgba(255, 253, 248, 0.76);
  font-size: 0.875rem;
  line-height: 1.55;
}

.outcome-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  margin-top: 16px;
}

.outcome-choice {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--control-radius);
}

.outcome-choice[open] {
  grid-column: 1 / -1;
  border-color: rgba(255, 255, 255, 0.72);
}

.outcome-choice summary {
  display: grid;
  min-height: 68px;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  color: var(--white);
  cursor: pointer;
  list-style-position: inside;
}

.outcome-choice summary strong {
  font-size: 0.9rem;
}

.outcome-choice summary small {
  color: rgba(255, 253, 248, 0.68);
  font-weight: 500;
  line-height: 1.35;
}

.outcome-choice summary:hover {
  background: rgba(255, 255, 255, 0.06);
}

.outcome-choice .evidence-form,
.outcome-choice .blocker-form {
  display: grid;
  gap: 12px;
  max-width: none;
  margin: 0;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.decision-options {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

.decision-options legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 680;
}

.decision-options label {
  display: flex;
  min-height: 52px;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--control-radius);
  color: var(--white);
  cursor: pointer;
  font-weight: 500;
}

.decision-options label:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.decision-options input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--lime);
}

.decision-options label > span {
  display: grid;
  gap: 2px;
}

.decision-options strong {
  font-size: 14px;
}

.decision-options small {
  color: rgba(255, 253, 248, 0.68);
  font-weight: 500;
}

.outcome-decision {
  display: grid;
  gap: 12px;
}

.outcome-decision[hidden] {
  display: none;
}

.review-guidance {
  margin: 0;
  color: rgba(255, 253, 248, 0.76);
  line-height: 1.55;
}

.reflection-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 36px;
  margin-top: 24px;
  padding: 28px 30px;
  border-radius: var(--section-radius);
  background: var(--paper-deep);
}

.reflection-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.reflection-copy > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.review-form {
  display: grid;
  gap: 12px;
}

.paper-options label {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.paper-options label:hover {
  border-color: var(--forest);
  background: var(--white);
}

.paper-options input[type="radio"] {
  accent-color: var(--forest);
}

.purpose-context {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}

.purpose-context > summary {
  display: flex;
  min-height: 72px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 28px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.purpose-context > summary::-webkit-details-marker {
  display: none;
}

.context-title-group {
  display: grid;
  gap: 5px;
}

.context-title {
  max-width: 30ch;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.context-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
}

.purpose-context > summary:hover .context-toggle {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.context-toggle .when-open {
  display: none;
}

.purpose-context[open] .context-toggle .when-closed {
  display: none;
}

.purpose-context[open] .context-toggle .when-open {
  display: inline;
}

.purpose-context-body {
  padding-top: 8px;
}

.purpose-context-body > .quiet-link {
  margin-top: 4px;
}

.purpose-context h2 {
  max-width: 30ch;
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.purpose-definition {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 34px;
  margin: 28px 0 0;
}

.purpose-definition div {
  min-width: 0;
}

.purpose-definition dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.purpose-definition dd {
  margin: 0;
  line-height: 1.6;
}

.purpose-management {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.purpose-management > summary,
.new-purpose-disclosure > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.purpose-management > summary:hover,
.new-purpose-disclosure > summary:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding: 20px 0 8px;
}

.management-grid section {
  min-width: 0;
}

.management-grid h3 {
  margin: 0;
  font-size: 17px;
}

.management-grid p {
  min-height: 42px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.management-grid form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

/* No focus, portfolio, and history */

.empty-purpose {
  max-width: 780px;
  min-height: 480px;
  padding: 64px 0;
}

.empty-purpose h1 {
  max-width: 24ch;
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.empty-purpose > p:not(.section-label) {
  max-width: 60ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.focus-choices {
  display: grid;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.focus-choices article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.focus-choices article > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.focus-choices article span {
  color: var(--muted);
  line-height: 1.45;
}

.purpose-title-link,
.purpose-row-body h3 a,
.evidence-timeline a {
  color: inherit;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
}

.purpose-title-link:hover,
.purpose-row-body h3 a:hover,
.evidence-timeline a:hover {
  text-decoration-color: currentColor;
}

.focus-choices button,
.purpose-row-actions button {
  padding: 0 14px;
  color: var(--forest);
  border: 1px solid var(--forest);
  background: transparent;
  font-weight: 700;
}

.focus-choices button:hover,
.purpose-row-actions button:hover {
  color: var(--white);
  background: var(--forest);
}

.empty-purpose > .new-purpose-disclosure {
  width: min(100%, 620px);
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.history-disclosure,
.timeline-disclosure {
  border-bottom: 1px solid var(--line);
}

.history-disclosure > summary,
.timeline-disclosure > summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 720;
  list-style-position: inside;
}

.history-disclosure > summary small,
.timeline-disclosure > summary small {
  color: var(--muted);
  font-weight: 500;
}

.history-disclosure > summary:hover span,
.timeline-disclosure > summary:hover span {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.portfolio,
.evidence-timeline {
  padding: 18px 0 48px;
}

.portfolio-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.portfolio-tools {
  display: grid;
  justify-items: end;
  gap: 4px;
  width: min(100%, 440px);
}

.portfolio-tools .export-link {
  font-size: 13px;
  font-weight: 700;
}

.portfolio h2,
.evidence-timeline h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.new-purpose-disclosure {
  width: min(100%, 440px);
}

.portfolio-heading > .new-purpose-disclosure > summary {
  justify-content: flex-end;
}

.purpose-form.compact {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--white);
}

.new-purpose-commitment {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.new-purpose-commitment legend {
  margin-bottom: 12px;
  padding: 0;
  color: var(--forest);
  font-size: 14px;
  font-weight: 740;
}

.purpose-list {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.purpose-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.purpose-row-marker {
  width: 10px;
  height: 10px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  color: var(--forest);
  font-size: 12px;
}

.purpose-row.current .purpose-row-marker {
  border-color: var(--forest);
  background: var(--forest);
  box-shadow: 0 0 0 5px rgba(24, 63, 49, 0.1);
}

.purpose-row.achieved .purpose-row-marker {
  width: 18px;
  height: 18px;
  border: 0;
}

.purpose-row.abandoned .purpose-row-marker {
  border-style: dashed;
}

.purpose-row-body > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.purpose-row-body h3 {
  margin: 4px 0;
  font-size: 18px;
}

.purpose-row-body p,
.list-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.purpose-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.purpose-row-actions small {
  color: var(--muted);
}

.row-abandon summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.row-abandon[open] {
  padding: 12px;
  border: 1px solid var(--danger);
  border-radius: var(--control-radius);
  background: var(--white);
}

.row-abandon form {
  display: grid;
  width: min(320px, 70vw);
  gap: 12px;
  margin-top: 8px;
}

.archive-heading {
  margin: 28px 0 0;
  padding: 18px 0 2px;
  color: var(--muted);
  font-size: 14px;
}

.evidence-timeline ol {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.evidence-timeline li {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.evidence-timeline time {
  color: var(--muted);
  font-size: 13px;
}

.evidence-timeline strong {
  display: block;
  margin-bottom: 4px;
}

.evidence-timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* Login keeps the same quiet working-paper vocabulary as Personal. */

.login-shell {
  width: min(680px, calc(100% - 40px));
}

.login-local-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.login-panel {
  width: min(100%, 520px);
  margin: 72px auto 0;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.login-panel h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
}

.login-panel > p {
  max-width: 52ch;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-panel > .feedback {
  margin-top: 20px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.login-form .primary-action {
  margin-top: 8px;
}

/* Purpose detail shares the same restrained vocabulary. */

.detail-shell {
  width: min(880px, calc(100% - 40px));
}

.detail-back {
  color: var(--forest);
  font-weight: 700;
}

.detail-hero {
  padding: 52px 0 38px;
  border-bottom: 1px solid var(--line);
}

.detail-hero h1 {
  max-width: 22ch;
  margin: 0;
  font-size: 38px;
  font-weight: 720;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.detail-status {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 720;
}

.detail-definition {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 30px 0 0;
}

.detail-definition > div {
  min-width: 0;
}

.detail-definition dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.detail-definition dd {
  margin: 0;
  line-height: 1.6;
}

.purpose-edit {
  margin-top: 30px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.purpose-edit > summary,
.detail-history > summary {
  min-height: 52px;
  color: var(--forest);
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
}

.purpose-edit > summary {
  display: inline-flex;
  align-items: center;
}

.purpose-edit > summary:hover,
.detail-history > summary:hover strong {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.purpose-edit form {
  display: grid;
  gap: 12px;
  max-width: 680px;
  padding: 20px 0 8px;
}

.purpose-edit form > p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.detail-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section h2 {
  margin: 0;
  font-size: 26px;
}

.detail-section-intro {
  max-width: 68ch;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-history-section {
  padding-block: 18px;
}

.detail-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style-position: inside;
}

.detail-history > summary > span {
  display: grid;
  gap: 3px;
}

.detail-history > summary .section-label {
  margin: 0;
}

.detail-history > summary strong {
  color: var(--ink);
  font-size: 1.125rem;
}

.detail-history > summary > small {
  color: var(--muted);
  font-weight: 500;
}

.detail-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.detail-list li {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list li:last-child {
  border-bottom: 0;
}

.detail-list-meta {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-list-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.detail-list-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-list-body p + p {
  margin-top: 7px;
}

.checkin-audit {
  margin-top: 12px;
}

.checkin-audit > summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--forest);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.checkin-audit > summary:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.checkin-audit dl {
  display: grid;
  gap: 14px;
  margin: 2px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--white);
}

.checkin-audit dl > div {
  display: grid;
  grid-template-columns: minmax(100px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
}

.checkin-audit dt {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.checkin-audit dd {
  display: grid;
  gap: 8px;
  margin: 0;
}

.checkin-audit dd > span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  line-height: 1.5;
}

.checkin-audit dd small {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

/* Keep the product's authored-work-sheet voice on titles and major headings.
   Controls, labels, and body copy remain sans-serif for compact readability. */
.activation-intro h1,
.now-panel h1,
.empty-purpose h1,
.portfolio h2,
.evidence-timeline h2,
.purpose-row-body h3,
.login-panel h1,
.detail-hero h1,
.detail-section h2,
.live-intro h1 {
  font-family: Georgia, "Times New Roman", serif;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .purpose-shell,
  .detail-shell {
    width: min(100% - 28px, 680px);
    padding-top: 14px;
  }

  .activation {
    padding-top: 48px;
  }

  .activation-intro h1 {
    font-size: 34px;
  }

  .activation-progress li {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    text-align: center;
  }

  .activation-progress li small {
    display: block;
    min-height: 2.4em;
    line-height: 1.2;
  }

  .now-panel {
    padding: 28px 24px 30px;
  }

  .now-panel h1 {
    font-size: 30px;
  }

  .reflection-panel {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .management-grid {
    grid-template-columns: 1fr;
  }

  .management-grid p {
    min-height: 0;
  }

  .purpose-definition,
  .detail-definition,
  .activation-summary dl {
    grid-template-columns: 1fr;
  }

  .portfolio-heading {
    display: grid;
  }

  .portfolio-heading > .new-purpose-disclosure > summary {
    justify-content: flex-start;
  }

  .portfolio-tools {
    justify-items: start;
  }
}

@media (max-width: 520px) {
  .purpose-shell,
  .detail-shell {
    width: calc(100% - 24px);
  }

  .purpose-header {
    align-items: flex-start;
  }

  .activation {
    min-height: 0;
    padding: 22px 0 max(56px, calc(36px + env(safe-area-inset-bottom)));
  }

  .activation-intro h1,
  .empty-purpose h1 {
    font-size: 28px;
  }

  .activation-intro .section-label,
  .activation-intro > p:last-child {
    display: none;
  }

  .activation-form {
    margin-top: 20px;
    padding-top: 16px;
  }

  .activation-progress {
    display: none;
  }

  .activation-step {
    margin-top: 20px;
  }

  .activation-step legend {
    font-size: 22px;
  }

  .step-controls {
    align-items: stretch;
  }

  .step-controls button,
  .activation-submit,
  .evidence-form > button,
  .commitment-form > button,
  .blocker-form > button,
  .outcome-decision > button,
  .review-form > button,
  .management-grid form > button,
  .purpose-edit form > button,
  .login-form > button {
    width: 100%;
  }

  .daily-focus {
    padding-top: 28px;
  }

  .action-context {
    align-items: flex-start;
  }

  .now-panel {
    margin-inline: -12px;
    padding-inline: 24px;
    border-radius: 0;
  }

  .now-panel h1 {
    font-size: 27px;
  }

  .outcome-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outcome-choice[open] {
    grid-column: 1 / -1;
  }

  .outcome-choice summary {
    min-height: 76px;
    padding-inline: 10px;
  }

  .outcome-choice summary small {
    font-size: 12px;
  }

  .reflection-panel {
    margin-inline: -12px;
    padding: 24px;
    border-radius: 0;
  }

  .purpose-context-heading,
  .history-disclosure > summary,
  .timeline-disclosure > summary {
    display: grid;
  }

  .focus-choices article,
  .purpose-row,
  .evidence-timeline li,
  .detail-list li {
    grid-template-columns: 1fr;
  }

  .purpose-row-marker {
    display: none;
  }

  .purpose-row-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .row-abandon form {
    width: 100%;
  }

  .detail-hero {
    padding-top: 42px;
  }

  .detail-hero h1 {
    font-size: 32px;
  }

  .detail-history > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-block: 10px;
  }

  .checkin-audit dl > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .login-shell {
    width: calc(100% - 24px);
  }

  .login-panel {
    margin-top: 38px;
    padding-block: 28px;
  }

  footer {
    display: grid;
  }
}

@media (forced-colors: active) {
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible,
  a:focus-visible {
    outline: 3px solid CanvasText;
    box-shadow: none;
  }

  .decision-options label,
  .outcome-choice,
  .purpose-row.current .purpose-row-marker {
    border: 2px solid CanvasText;
  }

  [data-focus-target]:focus {
    outline: 3px solid CanvasText;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button,
  a,
  input,
  textarea,
  select,
  summary {
    transition: color 180ms ease-out, background-color 180ms ease-out, border-color 180ms ease-out, opacity 180ms ease-out;
  }
}
