:root {
  color: #112a26;
  background: #f5f1e8;
  font: 1rem/1.55 "Avenir Next", Avenir, system-ui, sans-serif;
  --pine: #102d28;
  --ivory: #f5f1e8;
  --ink: #112a26;
  --copper: #ad633c;
  --rust: #884722;
  --sage: #dfe8df;
  --muted: #4d625b;
  --rule: #c9c5b7;
  --paper: #fffcf5;
  --radius-control: .75rem;
  --radius-card: 1.25rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
p { margin: 0; overflow-wrap: anywhere; }
.wrap { width: min(100% - 2.5rem, 67rem); margin-inline: auto; }

.masthead {
  color: var(--pine);
  background: var(--paper);
  border-bottom: 2px solid var(--pine);
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .2rem 1rem;
}

.masthead a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: inherit;
  text-underline-offset: .25em;
}

.masthead .brand {
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -.035em;
  text-decoration: none;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.8rem, 6vw, 4.5rem) 0;
}

.intro img {
  width: clamp(6rem, 22vw, 14rem);
  height: auto;
  border: 2px solid var(--pine);
  border-radius: 50%;
  background: var(--paper);
}

.kicker, .sample-date, h3 {
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.kicker { color: var(--rust); }

h1, h2 {
  color: var(--pine);
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  font-weight: 850;
}

h1 {
  margin: .15em 0 .2em;
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: -.05em;
  line-height: 1.05;
}

.lede { max-width: 39ch; color: var(--muted); font-size: clamp(1rem, 2vw, 1.23rem); }

.inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.1rem;
  padding: .65rem 0;
  border-block: 2px solid var(--pine);
}

#demo-progress { margin-inline-start: auto; font-size: .91rem; color: var(--muted); }

.demo-assumptions { margin-top: .75rem; color: var(--muted); font-size: .85rem; }

.inbox {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(1rem, 4vw, 3rem);
  margin: 1.5rem 0 4rem;
}

h2 { margin: 0 0 .65rem; font-size: 2rem; line-height: 1.15; }
h3 { margin: 0 0 .55rem; color: var(--muted); }
ul { display: grid; gap: .75rem; list-style: none; margin: 0; padding: 0; }

.card {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 2px solid var(--pine);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--pine);
}

.answer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .5rem;
  margin-top: 1rem;
}

.category {
  display: grid;
  gap: .25rem;
  width: 100%;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 650;
}

button, select {
  min-height: 44px;
  padding: .45rem .7rem;
  border: 2px solid var(--pine);
  border-radius: var(--radius-control);
  font: inherit;
}

button {
  color: var(--ivory);
  background: var(--pine);
  font-weight: 650;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--copper);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

button:hover:not(:disabled) { background: #264b41; }
button:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--copper); }
button.quiet { color: var(--pine); background: transparent; box-shadow: none; }
button.quiet:hover { background: var(--sage); }
button:disabled { color: #4d625b; background: #e7e9e3; border-color: #adb9b1; cursor: default; box-shadow: none; }
select { width: min(100%, 16rem); color: var(--pine); background: var(--paper); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }

.answer-result {
  margin-top: 1rem;
  padding: .5rem .7rem;
  border: 1px solid var(--pine);
  border-left-width: 3px;
  border-radius: var(--radius-control);
  background: var(--sage);
  color: var(--pine);
  font-weight: 650;
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  button:active:not(:disabled) { transform: none; }
}

@media (max-width: 42rem) {
  .inbox { grid-template-columns: 1fr; gap: 1.5rem; }
  .sample-date { width: 100%; }
  #demo-progress { margin-inline-start: 0; margin-inline-end: auto; }
}

@media (max-width: 26rem) {
  .intro { grid-template-columns: minmax(0, 1fr) 3.5rem; align-items: start; gap: .65rem; }
  .intro img { width: 100%; }
}

/* Submission story. The inbox styles above also serve the hands-on web demo. */
.submission { font-variant-numeric: lining-nums tabular-nums; }
.submission .wrap { width: min(100% - 3rem, 72rem); }
.skip-link {
  position: absolute; z-index: 50; top: .5rem; left: .5rem;
  padding: .7rem 1rem; color: var(--ivory); background: var(--pine);
  transform: translateY(-180%); border-radius: .5rem;
}
.skip-link:focus { transform: none; }
.landing-masthead nav { min-height: 76px; }
.landing-masthead .brand { gap: .6rem; }
.landing-masthead .brand img { border: 1.5px solid var(--pine); border-radius: 50%; background: var(--ivory); }
.nav-links { display: flex; align-items: center; gap: 2rem; font-size: .88rem; font-weight: 700; }
.nav-links a { gap: .45rem; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }
.landing-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
  align-items: center; gap: 4rem; padding-block: 5rem 6rem;
}
.hero-copy .kicker { display: flex; align-items: center; gap: .6rem; letter-spacing: .095em; }
.edition-dot { width: .5rem; height: .5rem; background: var(--rust); border-radius: 50%; }
.landing-hero h1 { margin: 1.3rem 0 1.6rem; font-size: clamp(3.8rem, 8.2vw, 6.65rem); line-height: .99; letter-spacing: -.065em; }
.landing-hero h1 span { display: block; color: var(--rust); }
.hero-lede { max-width: 33ch; font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 1rem; color: var(--pine); font-weight: 750; text-underline-offset: .4em; }
.hero-scroll { margin-top: 2rem; min-height: 44px; }
.hero-character { position: relative; padding-top: 3rem; }
.character-note { position: absolute; top: 0; right: 0; font: italic 1.25rem/1.2 Georgia, serif; color: var(--rust); transform: rotate(6deg); }
.portrait-ring { overflow: hidden; border: 2px solid var(--pine); border-radius: 50%; background: #e6dac1; box-shadow: 10px 10px 0 var(--sage); }
.portrait-ring img { display: block; width: 100%; height: auto; }
.character-quote { position: relative; width: 103%; margin: -1.7rem 0 0 -1.2rem; padding: 1rem 1.4rem; background: var(--pine); color: var(--ivory); border-radius: 1rem; transform: rotate(-3deg); box-shadow: 4px 4px 0 var(--copper); }
.character-quote .small-label { color: #d3c4a5; }
.character-quote p { margin-top: .35rem; font-size: 1.35rem; line-height: 1.25; font-weight: 750; letter-spacing: -.025em; }
.small-label { display: block; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; line-height: 1.4; }
.story-rail { position: sticky; top: 0; z-index: 20; border-block: 1px solid var(--rule); background: var(--paper); }
.story-rail nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rail-label { margin-right: auto; color: var(--muted); font: italic 1rem Georgia, serif; }
.story-rail a { display: inline-flex; gap: .5rem; align-items: center; min-height: 58px; padding-inline: .4rem; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 750; }
.story-rail a span { color: var(--rust); font-size: .68rem; }
.story-rail a:hover, .story-rail a[aria-current] { color: var(--pine); border-bottom-color: var(--rust); }
.story { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 7vw, 7rem); padding-block: clamp(4rem, 8vw, 7.5rem); scroll-margin-top: 3.6rem; }
.story + .story { border-top: 1px solid var(--rule); }
.story:nth-child(even) .story-copy { order: 2; }
.story-copy { min-width: 0; }
.story-number { display: flex; align-items: center; gap: 1rem; color: var(--rust); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.story-number span { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--rust); border-radius: 50%; font-size: .85rem; letter-spacing: 0; }
.story-copy h2 { margin: 1.3rem 0 1.2rem; max-width: 12ch; font-size: clamp(2.4rem, 4.2vw, 3.8rem); line-height: 1.03; letter-spacing: -.05em; }
.story-explanation { max-width: 37ch; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.story-outcome { border-top: 1px dashed var(--rule); margin-top: 2rem; padding-top: 1.25rem; }
.story-outcome .small-label { color: var(--rust); }
.story-outcome strong { display: block; color: var(--pine); font-size: 3.5rem; line-height: 1.15; font-weight: 850; letter-spacing: -.055em; }
.story-outcome p { margin-top: .35rem; max-width: 33ch; color: var(--muted); font-size: .82rem; }
.app-scene { min-width: 0; overflow: hidden; background: var(--paper); border: 2px solid var(--pine); border-radius: 1.5rem; box-shadow: 6px 6px 0 var(--pine); }
.scene-topbar { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; background: var(--paper); border-bottom: 1px solid var(--rule); }
.scene-avatar { width: 44px; height: 44px; overflow: hidden; border: 1px solid var(--pine); border-radius: 50%; background: var(--ivory); flex-shrink: 0; }
.scene-avatar img { display: block; width: 100%; height: auto; }
.scene-topbar strong { display: block; color: var(--pine); font-size: .95rem; line-height: 1.2; font-weight: 800; }
.scene-topbar div > span { display: block; margin-top: .2rem; font-size: .67rem; color: var(--muted); }
.scene-example { margin-left: auto; border: 1px solid var(--rule); border-radius: 1rem; padding: .2rem .5rem; color: var(--muted); font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; }
.scene-body { padding: 1.35rem; background-color: var(--sage); background-image: radial-gradient(#b9c9bb .7px, transparent .7px); background-size: 14px 14px; }
.purchase-receipt { margin: 0 0 1.4rem 1.5rem; padding: 1rem; border: 1px solid #b9c9bb; border-top: 3px solid var(--copper); background: var(--paper); box-shadow: 0 3px 0 #bdcbbc; }
.purchase-receipt .small-label { color: var(--muted); font-size: .58rem; }
.purchase-receipt > div { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: .3rem; }
.purchase-receipt strong { font-size: .9rem; }
.purchase-receipt b { font-size: 1.35rem; font-weight: 800; letter-spacing: -.025em; }
.message { width: fit-content; max-width: 94%; border-radius: 1rem; padding: 1rem 1.1rem; }
.message-author { display: block; margin-bottom: .35rem; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.message p { font-size: .93rem; line-height: 1.65; }
.message-julius { background: var(--paper); border: 1px solid #c5cdbf; border-bottom-left-radius: .15rem; }
.message-julius .message-author { color: var(--rust); }
.message-person { margin: .8rem 0 0 auto; color: var(--ivory); background: var(--pine); border-bottom-right-radius: .15rem; }
.message-person .message-author { color: #ccdbcd; }
.scene-caption { display: flex; gap: .35rem; margin: 1.15rem .2rem 0; color: #3f5b49; font-size: .62rem; line-height: 1.6; }
.example-disclosure { border-top: 1px solid var(--rule); padding-block: 1rem 3.5rem; color: var(--muted); font-size: .72rem; }
.example-disclosure p + p { margin-top: .3rem; }
.how-section { padding-block: 5rem; background: var(--sage); scroll-margin-top: 3.6rem; }
.how-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: .8rem 6rem; align-items: end; }
.how-intro .kicker { grid-column: 1 / -1; }
.how-intro h2, .try-section h2 { margin: .6rem 0 0; font-size: clamp(2.6rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: -.05em; }
.how-intro > p:last-child { max-width: 38ch; color: #3f5b49; font-size: 1rem; }
.how-steps { counter-reset: none; list-style: none; margin: 3.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.how-steps li { padding-top: 1.3rem; border-top: 1px solid #9eb39f; }
.step-marker { font-size: .72rem; font-weight: 750; color: var(--rust); }
.how-steps h3 { margin: .8rem 0 .65rem; font-size: 1.1rem; font-weight: 800; color: var(--pine); letter-spacing: -.025em; text-transform: none; }
.how-steps p { max-width: 30ch; color: #3f5b49; font-size: .88rem; line-height: 1.75; }
.technology { display: inline-block; margin-top: 1.2rem; padding: .2rem .5rem; border: 1px solid #9eb39f; border-radius: .4rem; color: #3f5b49; font-size: .65rem; font-weight: 700; }
.try-section { padding-block: 5.5rem 6rem; background: var(--pine); color: var(--ivory); scroll-margin-top: 3.6rem; }
.try-section .kicker { color: #d6a67b; }
.try-section h2 { color: var(--ivory); }
.try-section :focus-visible { outline-color: var(--ivory); outline-offset: 5px; }
.try-intro { margin-top: 1.3rem; color: #c4d2c5; font-size: 1.05rem; }
.try-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 3rem; }
.try-option { display: flex; flex-direction: column; padding: 1.8rem; border: 1px solid #587268; border-radius: 1.2rem; }
.try-option .small-label { color: #c5ae83; }
.try-option h3 { margin: .8rem 0 .8rem; color: var(--ivory); font-size: 1.75rem; text-transform: none; letter-spacing: -.04em; font-weight: 800; line-height: 1.2; }
.try-option > p:not(.small-label) { color: #c4d2c5; font-size: .92rem; max-width: 40ch; line-height: 1.8; }
.hosted-option { background: #1b3a31; border-color: #9eb39f; }
.button-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: .8rem 1rem; border: 2px solid var(--ivory); border-radius: .75rem; background: var(--ivory); color: var(--pine); font-size: .88rem; font-weight: 750; text-decoration: none; }
.button-link:hover { background: #e4d7ba; border-color: #e4d7ba; }
.hosted-option .button-link { margin-top: auto; }
.hosted-option .button-link, .source-option pre { margin-top: 1.5rem; }
.option-footnote { display: block; margin-top: .65rem; color: #b4c7b7; font-size: .67rem; }
.source-option pre { overflow: auto; margin-bottom: 1.25rem; color: #d3e0d3; font-size: .78rem; line-height: 1.7; }
.outline-link { margin-top: auto; background: transparent; border-color: #7f9887; color: var(--ivory); }
.outline-link:hover { color: var(--pine); }
.landing-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding-block: 1.8rem; color: var(--muted); font-size: .72rem; }
.landing-footer a { display: inline-flex; min-height: 44px; align-items: center; color: var(--pine); gap: .4rem; text-underline-offset: .25em; }
.landing-footer .brand { text-decoration: none; font-size: 1rem; font-weight: 850; letter-spacing: -.03em; }

/* Native chat form in /web. */
.web-conversation { margin-top: 2rem; padding: clamp(1rem, 3vw, 1.5rem); border: 2px solid var(--pine); border-radius: var(--radius-card); background: var(--paper); }
.web-conversation h2 { font-size: 1.65rem; }
.web-question { display: grid; gap: .75rem; margin-top: 1rem; }
.web-question label { display: grid; gap: .4rem; font-weight: 650; }
.web-question textarea, .web-question input { display: block; width: 100%; min-height: 48px; padding: .65rem .75rem; color: var(--pine); background: var(--paper); border: 2px solid var(--pine); border-radius: var(--radius-control); font: inherit; }
.web-question textarea { min-height: 100px; resize: vertical; }
.web-question input { width: min(100%, 24rem); }
.web-question button { justify-self: start; }
.chat-reply { margin-block: 1rem; padding: 1rem; border-left: 3px solid var(--pine); border-radius: .5rem; background: var(--sage); white-space: pre-wrap; }
.web-error { margin-block: 1rem; padding: .8rem 1rem; border: 1px solid #a54b2f; border-radius: .5rem; background: #f4e1d5; color: #7e301a; }

@media (min-width: 64rem) {
  .story-copy { position: sticky; top: 7rem; }
}
@media (max-width: 52rem) {
  .submission .wrap { width: min(100% - 2.5rem, 72rem); }
  .landing-hero { gap: 2rem; padding-block: 4rem; }
  .landing-hero h1 { font-size: clamp(3rem, 7.4vw, 5rem); }
  .character-note { font-size: 1.05rem; }
  .character-quote { width: 108%; padding: .85rem 1rem; }
  .character-quote p { font-size: 1.05rem; }
  .character-quote .small-label { font-size: .55rem; }
  .story { gap: 2.5rem; }
  .scene-body { padding: 1rem; }
  .message { max-width: 100%; padding: .9rem; }
  .message p { font-size: .87rem; }
  .how-intro { gap: .8rem 2.5rem; }
  .how-steps { gap: 1.3rem; }
}
@media (max-width: 40rem) {
  .submission .wrap { width: min(100% - 2rem, 32rem); }
  .landing-masthead nav { min-height: 68px; }
  .landing-masthead .brand { font-size: 1.05rem; }
  .landing-masthead .brand img { width: 32px; height: 32px; }
  .nav-links { gap: 1rem; font-size: .73rem; }
  .nav-links a:first-child { display: none; }
  .landing-hero { grid-template-columns: 1fr; gap: 2.2rem; padding-block: 2.5rem 3.25rem; }
  .hero-copy .kicker { font-size: .63rem; }
  .landing-hero h1 { font-size: clamp(3.55rem, 12vw, 5.4rem); }
  .hero-lede { max-width: 31ch; font-size: 1.05rem; }
  .hero-scroll { margin-top: 1.3rem; }
  .hero-character { width: min(74%, 20rem); margin: 0 auto; padding-top: 1.2rem; }
  .character-note { top: .2rem; right: -2rem; font-size: 1rem; }
  .character-quote { width: 110%; margin-top: -1.1rem; }
  .character-quote p { font-size: 1.1rem; }
  .rail-label { display: none; }
  .story-rail nav { gap: .6rem; }
  .story-rail a { gap: .3rem; min-height: 52px; padding-inline: .1rem; font-size: .75rem; }
  .story-rail a span { font-size: .62rem; }
  .story { grid-template-columns: 1fr; gap: 2rem; padding-block: 3rem; }
  .story:nth-child(even) .story-copy { order: initial; }
  .story-copy h2 { max-width: 14ch; font-size: 2.8rem; }
  .story-explanation { max-width: 37ch; font-size: .94rem; }
  .story-outcome { margin-top: 1.3rem; }
  .story-outcome strong { font-size: 3rem; }
  .story-outcome p { max-width: 40ch; }
  .scene-topbar { padding: .8rem 1rem; }
  .scene-body { padding: 1.1rem; }
  .message { max-width: 94%; }
  .message p { font-size: .9rem; }
  .example-disclosure { padding-bottom: 2.5rem; font-size: .66rem; }
  .how-section { padding-block: 3rem; }
  .how-intro { grid-template-columns: 1fr; gap: 1rem; }
  .how-intro h2, .try-section h2 { font-size: 2.8rem; }
  .how-intro h2 { margin-top: 0; }
  .how-intro > p:last-child { max-width: 36ch; font-size: .94rem; }
  .how-steps { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
  .how-steps li { display: grid; grid-template-columns: 2rem 1fr; column-gap: .6rem; }
  .step-marker { grid-row: 1 / 4; margin-top: .1rem; }
  .how-steps h3 { margin-top: 0; }
  .how-steps p { max-width: 36ch; }
  .technology { justify-self: start; margin-top: .75rem; }
  .try-section { padding-block: 3rem; }
  .try-options { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2rem; }
  .try-option { padding: 1.4rem; }
  .try-option h3 { font-size: 1.55rem; }
  .try-option > p:not(.small-label) { font-size: .88rem; }
  .landing-footer { gap: .3rem 1.5rem; padding-block: 1.25rem; }
  .landing-footer p { order: 3; width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .submission { scroll-behavior: smooth; }
  .button-link, .story-rail a { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
}
