@font-face { font-family: "DM Sans"; src: url("assets/dm-sans.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("assets/dm-serif-display-italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  color-scheme: light;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
.app-shell { position: fixed; top: var(--viewport-top, 0px); inset-inline: 0; height: var(--viewport-height, 100dvh); display: flex; flex-direction: column; overflow: hidden; }
body.summary-mode .app-shell { position: static; height: auto; min-height: 100dvh; overflow: visible; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--terracotta-deep); outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: 14px; left: 20px; padding: 14px 20px; background: var(--ink); color: var(--cream); border-radius: 25px; transform: translateY(-200%); opacity: 0; pointer-events: none; }
.skip-link:focus { transform: none; opacity: 1; pointer-events: auto; }
.site-header { width: 100%; max-width: 500px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 26px 0; flex-shrink: 0; }
.wordmark { display: block; width: 64px; height: 44px; background: var(--ink); mask: url("assets/olive-wordmark.png") center / contain no-repeat; font-size: 0; }
main { width: 100%; max-width: 500px; margin: 0 auto; padding: 0 26px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.summary-mode main { padding-bottom: 32px; }
#setup { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.introduction { padding: 30px 0 34px; text-align: center; }
h1 { font-weight: 400; font-size: 32px; line-height: 1.12; letter-spacing: -1px; margin: 0; }
h1 em { color: var(--terracotta); display: inline-block; font: italic 400 66px/1.06 var(--serif); letter-spacing: -2px; }
#setup .introduction { container-type: inline-size; padding: 28px 0 0; text-align: left; flex-shrink: 0; }
#setup-title { font-size: clamp(16px, 6cqi, 27px); line-height: 1.25; letter-spacing: -.035em; white-space: nowrap; }
#setup-title em { color: var(--terracotta-deep); margin: 0; font-size: 1.2em; line-height: 1.1; letter-spacing: -.045em; }
#creation-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.creation-space {
  --top-fade: 32px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #91a37880 transparent;
  margin-inline: -8px;
  padding: 42px 8px 56px;
  scroll-padding: 42px 0 56px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--top-fade), #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 var(--top-fade), #000 calc(100% - 48px), transparent);
}
.composer { flex-shrink: 0; padding: 16px 0 max(18px, env(safe-area-inset-bottom)); position: relative; }
.writing-space { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 32px; background: rgb(var(--cream-rgb) / .85); }
.writing-space:focus-within { border-color: var(--terracotta-deep); box-shadow: 0 0 0 1px var(--terracotta-deep); }
#description { width: 100%; min-width: 0; height: 44px; padding: 10px 10px; border: 0; border-radius: 0; background: transparent; font-size: 17px; line-height: 24px; letter-spacing: -.2px; }
#description::placeholder { color: var(--muted); opacity: 1; }
#description:focus { outline: none; }
.add-descriptor { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--terracotta-button); color: var(--button-ink); transition: background 150ms ease; }
.add-descriptor:hover:not(:disabled) { background: var(--terracotta-deep); }
.add-descriptor:disabled { background: var(--mint); color: #68765e; cursor: default; }
.add-descriptor:focus-visible { outline-offset: 2px; }
.create-action { margin-top: 10px; }
.concept-cloud { display: flex; flex-direction: column; gap: 17px; padding: 3px 1px; }
.concept-category { display: flex; flex-direction: column; }
.concept-group, .chosen-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 15px 10px; }
.concept-chip { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; max-width: 100%; border: 1px solid #91a378b3; border-radius: 40px; padding: 10px 14px; background: transparent; font-size: 16px; line-height: 1.25; letter-spacing: -.35px; text-align: left; transform: rotate(var(--tilt, -2deg)); transition: background 160ms ease, border-color 160ms ease; }
.concept-chip .mark { flex-shrink: 0; font-size: 18px; line-height: 1; }
.concept-chip > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.concept-chip:hover { background: rgb(var(--sage-rgb) / .7); border-color: var(--line); }
.concept-chip[aria-pressed="true"] { background: var(--mint); border-color: var(--line); }
.concept-chip[aria-pressed="true"]:hover { background: #d2dfc4; }
.chosen-panel { margin-bottom: 20px; }
.chosen-cloud { padding: 3px 1px; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 22px; width: 100%; min-height: 56px; padding: 15px 24px; border: 1px solid var(--terracotta-button); border-radius: 40px; color: var(--button-ink); background: var(--terracotta-button); font-size: 16px; line-height: 1.4; transition: background 150ms ease; }
.primary-button:hover { background: var(--terracotta-deep); }
.primary-button span[aria-hidden="true"] { font-size: 25px; line-height: 1; }
.validation { font-size: 13px; color: #7d3b22; line-height: 1.5; margin: 0 0 15px; text-align: center; }
.validation:empty { display: none; }
#summary-title:focus { outline: none; }
.noscript-note { text-align: center; padding: 20px; }
@media (min-width: 700px) {
  .site-header { padding-top: 30px; }
  .introduction { padding-top: 43px; padding-bottom: 43px; }
  h1 { font-size: 35px; }
  h1 em { font-size: 74px; }
}
@media (max-width: 350px) {
  main { padding-inline: 22px; }
  .site-header { padding-inline: 22px; }
  .introduction { padding-top: 22px; padding-bottom: 28px; }
  h1 { font-size: 29px; }
  h1 em { font-size: 59px; }
  .concept-chip { font-size: 15px; padding-inline: 12px; }
}
.compact-viewport:not(.summary-mode) .site-header { padding-top: max(10px, env(safe-area-inset-top)); }
.compact-viewport:not(.summary-mode) .wordmark { width: 48px; height: 32px; }
.compact-viewport #setup .introduction { padding: 14px 0 0; }
.compact-viewport .creation-space { --top-fade: 16px; padding-top: 24px; scroll-padding-top: 24px; }
.compact-viewport .composer { padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.compact-viewport .concept-cloud { gap: 14px; }
.compact-viewport .concept-group, .compact-viewport .chosen-cloud { gap: 12px 10px; }
.compact-viewport .composer .primary-button { min-height: 48px; padding-block: 11px; }
.keyboard-open .composer { padding-bottom: 10px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The selected words become a voice: the result keeps the same quiet canvas. */
body.summary-mode .site-header { max-width: 664px; }
body.summary-mode main { max-width: 664px; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
#summary .introduction { padding: 46px 0 28px; text-align: left; }
#summary-title { font-size: 31px; line-height: 1.2; letter-spacing: -1px; }
#summary-title em { margin-top: 3px; font-size: clamp(52px, 11vw, 76px); letter-spacing: -.055em; }
.persona-framing { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.persona-bio p { margin: 0 0 23px; font-size: 18px; line-height: 1.75; letter-spacing: -.2px; overflow-wrap: anywhere; }
.persona-bio p:last-child { margin-bottom: 0; }
.refine-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; margin: 28px auto 0; padding: 10px 18px; border: 0; border-radius: 24px; background: transparent; font-size: 14px; color: var(--muted); }
.refine-button:hover { background: rgb(var(--sage-rgb) / .65); color: var(--ink); }
.refine-button span { font-size: 19px; }
.primary-button:disabled { cursor: wait; opacity: .65; }
#persona-result { animation: arrive 320ms ease-out both; }

/* Sign-up and account fields echo the creation composer. */
.form-field label { display: block; margin-bottom: 9px; font-size: 16px; line-height: 1.4; }
.form-field input:not([type="checkbox"]) { display: block; width: 100%; height: 54px; padding: 12px 22px; border: 1px solid var(--line); border-radius: 32px; background: rgb(var(--cream-rgb) / .85); font-size: 17px; line-height: 24px; letter-spacing: -.2px; }
.form-field input:not([type="checkbox"]):focus { outline: none; border-color: var(--terracotta-deep); box-shadow: 0 0 0 1px var(--terracotta-deep); }
.form-field input[aria-invalid="true"] { border-color: var(--terracotta-deep); }
.field-help, .field-error { margin: 8px 0 0; font-size: 13px; line-height: 1.5; }
.field-help { color: var(--muted); }
/* Error text is a deeper rust than the accent so small type stays readable over the shadowed paper. */
.field-error, .form-error { color: #7d3b22; }
.form-check { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.form-check input { width: 24px; height: 24px; margin: 0; accent-color: var(--terracotta-button); cursor: pointer; }
.form-check input[aria-invalid="true"] { outline: 1px solid var(--terracotta-deep); outline-offset: 1px; }
.form-check input:focus-visible { outline: 2px solid var(--terracotta-deep); outline-offset: 3px; }
.form-check label { margin: 0; font-size: 15px; line-height: 1.6; cursor: pointer; }
.form-check a { text-underline-offset: 3px; }
.form-check .field-error { grid-column: 2; }
.form-error { margin: 0; padding: 14px 18px; border: 1px solid var(--terracotta-deep); border-radius: 20px; background: rgb(var(--cream-rgb) / .9); font-size: 15px; line-height: 1.5; }
.form-error:focus { outline: none; box-shadow: 0 0 0 1px var(--terracotta-deep); }
.link-button { display: inline-flex; align-items: center; min-height: 44px; margin: 4px 0 0; padding: 0; border: 0; background: none; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.link-button:focus-visible { outline: 2px solid var(--terracotta-deep); outline-offset: 3px; }
.link-button:disabled { cursor: default; color: var(--muted); opacity: .6; text-decoration: none; }

/* Sign-up continues the bio's paper. */
.signup { margin-top: 48px; padding-top: 36px; border-top: 1px solid rgb(145 163 120 / .5); }
.signup h2 { margin: 0 0 24px; font-weight: 400; font-size: 26px; line-height: 1.2; letter-spacing: -.7px; }
.signup-form { display: flex; flex-direction: column; gap: 24px; }
.signup .primary-button { margin-top: 4px; }
.signup-done:focus { outline: none; }
.signup-done h2 { margin-bottom: 12px; }
.signup-done p { margin: 0; font-size: 18px; line-height: 1.6; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 700px) {
  #summary .introduction { padding-top: 58px; }
  .persona-bio p { font-size: 20px; }
}
@media (max-width: 350px) {
  #summary .introduction { padding-top: 34px; }
  #summary-title { font-size: 28px; }
  .persona-bio p { font-size: 17px; }
  .signup h2 { font-size: 24px; }
  .form-field input:not([type="checkbox"]) { padding-inline: 18px; }
}

/* Creation stage: the same sunlit paper, built from the visitor's own words. */
html.stage-open { overflow: hidden; }
#setup.is-launching #chosen .concept-chip { visibility: hidden; }
.creation-stage { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; color: var(--ink); }
.creation-stage.is-lifting { pointer-events: none; }
.stage-backdrop { position: absolute; top: 0; bottom: -96px; left: -20%; right: -20%; background: var(--cream); overflow: hidden; border-radius: 0 0 50% 50% / 0 0 96px 96px; }
/* Both surfaces include the curtain's curved tail, so the copy stays aligned
   and textured all the way through the lift instead of ending at the viewport. */
body > .page-atmosphere, .stage-backdrop > .page-atmosphere { height: calc(100vh + 96px); height: calc(100lvh + 96px); }
.stage-backdrop > .page-atmosphere { position: absolute; left: 20vw; width: 100vw; z-index: 0; }
.stage-thread { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stage-thread-path { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-linecap: round; opacity: .52; transition: opacity .6s ease; }
.stage-thread-head { fill: var(--terracotta); opacity: 0; transition: opacity .4s ease; }
.is-weaving .stage-thread-head { opacity: .85; }
.is-failed .stage-thread-path, .is-still .stage-thread-path { opacity: .12; }
.stage-top { position: relative; width: 100%; max-width: 664px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 26px 0; flex-shrink: 0; }
.stage-wordmark { display: block; width: 64px; height: 44px; background: var(--ink); mask: url("assets/olive-wordmark.png") center / contain no-repeat; }
.stage-content { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 760px; margin: 0 auto; padding: 12px 26px 104px; text-align: center; }
.stage-lockup { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 0; }
.stage-lead, .stage-word { display: grid; width: 100%; }
/* The outgoing word clears before the next arrives, so two phrases never overlap. */
.stage-lead > span, .stage-word > span { grid-area: 1 / 1; align-self: center; opacity: 0; transform: translateY(.22em); transition: opacity .45s ease .2s, transform .7s cubic-bezier(.22,1,.36,1) .2s; }
.stage-lead > span.is-current, .stage-word > span.is-current { opacity: 1; transform: none; }
.stage-lead > span.is-leaving, .stage-word > span.is-leaving { opacity: 0; transform: translateY(-.14em); transition: opacity .18s ease, transform .3s ease-in; }
.stage-lead { font-size: clamp(24px, 6.6vw, 36px); line-height: 1.2; letter-spacing: -.03em; }
.stage-word { margin-top: 4px; font: italic 400 clamp(52px, 14vw, 100px)/1.12 var(--serif); letter-spacing: -.03em; color: var(--terracotta); overflow-wrap: anywhere; }
.stage-word > span { justify-self: center; width: max-content; white-space: nowrap; }
.stage-word > span.is-long { width: auto; max-width: 100%; white-space: normal; font-size: .56em; line-height: 1.16; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stage-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 8px; max-width: 560px; margin: 30px 0 0; padding: 0; list-style: none; }
.stage-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 36px; padding: 7px 14px; border: 1px solid #91a378b3; border-radius: 40px; font-size: 14px; line-height: 1.25; letter-spacing: -.2px; color: var(--muted); overflow-wrap: anywhere; transition: background .5s ease, border-color .5s ease, color .5s ease; }
.stage-chip.is-overflow { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.stage-chip.is-woven { border-color: var(--line); color: var(--ink); }
.stage-chip.is-active, .stage-chip.is-landing { background: var(--mint); border-color: var(--line); color: var(--ink); }
.stage-chip.is-landing { transition: none; }
.stage-message { width: 100%; max-width: 440px; min-height: calc(1.5em + 26px); font-size: 15px; line-height: 1.5; }
.stage-status { min-height: 1.5em; margin: 26px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); transition: opacity .24s ease; }
.stage-status.is-changing { opacity: 0; }
.creation-stage .persona-error { margin-top: 26px; }
.creation-stage .persona-error p { margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.stage-button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 52px; padding: 13px 26px; border: 0; border-radius: 40px; background: var(--terracotta-button); color: var(--button-ink); font-size: 16px; line-height: 1.4; transition: background 150ms ease; }
.stage-button:hover { background: var(--terracotta-deep); }
.stage-button:disabled { cursor: wait; opacity: .6; }
.stage-button span { font-size: 22px; line-height: 1; }
.creation-stage button:focus-visible { outline-color: var(--terracotta-deep); }
.is-entering .stage-top, .is-entering .stage-lockup, .is-entering .persona-loading, .is-entering .stage-thread { animation: arrive 600ms 280ms cubic-bezier(.22,1,.36,1) both; }
.is-lifting .stage-content, .is-lifting .stage-top, .is-lifting .stage-thread { opacity: 0; transition: opacity .32s ease; }
#summary.is-staged #refine { position: fixed; z-index: 6; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); margin: 0; transform: translateX(-50%); color: var(--muted); white-space: nowrap; }
#summary.is-staged #refine:hover { background: rgb(var(--sage-rgb) / .65); color: var(--ink); }
#summary.is-staged #refine:focus-visible { outline-color: var(--terracotta-deep); }
/* Finish the content entrance during the short lift, with no extra reading delay. */
#summary.is-revealing .introduction { animation: arrive 180ms 80ms cubic-bezier(.22,1,.36,1) both; }
#summary.is-revealing #persona-framing { animation: arrive 180ms 80ms cubic-bezier(.22,1,.36,1) both; }
#summary.is-revealing .persona-bio p { animation: arrive 200ms 80ms cubic-bezier(.22,1,.36,1) both; }
#summary.is-revealing .persona-bio p + p { animation-delay: 80ms; }
#summary.is-revealing #refine { animation: arrive 180ms 100ms ease-out both; }
#summary.is-revealing #signup { animation: arrive 200ms 120ms cubic-bezier(.22,1,.36,1) both; }
@media (min-width: 700px) {
  .stage-top { padding-top: 30px; }
  .stage-words { margin-top: 38px; }
  .stage-chip { font-size: 15px; }
}
@media (max-height: 620px) {
  .stage-content { padding-bottom: 76px; }
  .stage-word { font-size: clamp(44px, 11vh, 80px); }
  .stage-words { margin-top: 18px; }
  .stage-status { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #persona-result { animation: none; }
}
