* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 16px/1.55 var(--body); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button, input { min-height: 46px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font: 600 clamp(2rem, 3vw, 3.1rem)/1.12 var(--heading); letter-spacing: -.035em; margin-bottom: 22px; }
h2 { font: 600 2rem/1.2 var(--heading); letter-spacing: -.025em; }
h3 { font-size: 1.15rem; }
a { color: var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px; background: white; z-index: 10; }
.skip-link:focus { top: 12px; }
.brand { display: inline-flex; flex-shrink: 0; gap: 10px; align-items: center; color: var(--ink); font: 700 30px/1 var(--heading); letter-spacing: -.05em; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; overflow: hidden; position: relative; display: inline-block; flex: 0 0 auto; }
.brand-mark img { position: absolute; width: 104px; height: 104px; max-width: none; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.brand-dot { color: var(--gold); }
.entry-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(320px, 39%) 1fr; }
.entry-aside { background: var(--soft); padding: 42px clamp(32px, 5vw, 90px); display: flex; flex-direction: column; }
.entry-story { margin: auto 0; padding: 70px 0 40px; max-width: 360px; }
.entry-story h2 { font-size: clamp(2.1rem, 3.1vw, 3rem); line-height: 1.16; }
.entry-story p, .aside-foot, .lead, .muted { color: var(--muted); }
.aside-foot { font-size: .875rem; margin: 20px 0 0; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 650; color: var(--primary); margin-bottom: 18px; }
.entry-main { background: var(--paper); padding: 60px clamp(28px, 7vw, 120px); display: flex; align-items: center; outline: none; }
.entry-form { width: 100%; max-width: 600px; margin: auto; }
.lead { max-width: 540px; margin-bottom: 30px; font-size: 1.05rem; }
.field { display: grid; gap: 8px; font-weight: 600; margin-bottom: 24px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--small-radius); padding: 12px 14px; background: var(--paper); color: var(--ink); font-weight: 400; }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.required { color: var(--muted); font-size: .75rem; font-weight: 400; margin-left: 5px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; padding: 12px 22px; border-radius: var(--small-radius); font-weight: 650; text-decoration: none; }
.button.primary { background: var(--primary); color: white; }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { background: white; border-color: var(--line); color: var(--primary); }
.full { width: 100%; }
.text-button { border: 0; background: transparent; color: var(--primary); padding: 8px 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.form-error { color: var(--danger); padding: 12px 14px; background: #fff4f3; border-radius: var(--small-radius); margin: 16px 0; }
.form-error[hidden] { display: none; }
.form-success { color: var(--primary); background: var(--soft); border-radius: var(--small-radius); padding: 12px 14px; }
.access-note { margin: 28px 0 0; color: var(--muted); font-size: .9rem; }
.entry-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; font-size: .875rem; color: var(--muted); }
.choices { border: 0; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.choice { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input { accent-color: var(--primary); width: 20px; height: 20px; min-height: 20px; flex-shrink: 0; }
.choice strong, .choice span span { display: block; }
.choice span span { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.entry-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 32px; }
.small { font-size: .85rem; }
.privacy-note { border-left: 3px solid var(--gold); padding: 14px 18px; background: var(--gold-light); font-size: .9rem; margin-bottom: 28px; }
.steps { list-style: none; display: grid; gap: 16px; padding: 0; margin: 10px 0 32px; font-size: .9rem; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 12px; }
.steps span { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.steps [aria-current] { color: var(--primary); font-weight: 650; }
.steps [aria-current] span { background: var(--primary); color: white; border-color: var(--primary); }
.review { margin: 0; }
.review div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.review dt { font-size: .875rem; color: var(--muted); }
.review dd { margin: 7px 0; font-size: 1.1rem; font-weight: 600; }
.save-status { font-size: .85rem; color: var(--muted); min-height: 1.5em; margin: 10px 0 0; }
.loading { min-height: 100svh; display: grid; place-items: center; }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 5vw; gap: 24px; background: white; border-bottom: 1px solid var(--line); }
.app-header > div { display: flex; gap: 24px; align-items: center; }
.home { max-width: 1100px; padding: 60px 30px; margin: 0 auto; outline: none; }
.catalog-section { margin-top: 60px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-heading h2 { font-size: 1.7rem; }
.pill { display: inline-block; font-size: .75rem; color: var(--amber); background: var(--gold-light); border-radius: 5px; padding: 4px 8px; }
.challenge-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 32px; }
.challenge-list article { background: white; border: 1px solid var(--line); padding: 24px; border-radius: var(--radius); }
.challenge-list h3 { margin-bottom: 0; margin-top: 12px; }
.reply-list { border-top: 1px solid var(--line); }
.reply-list details { padding: 18px 4px; border-bottom: 1px solid var(--line); }
.reply-list summary { cursor: pointer; min-height: 32px; }
.reply-list summary .pill { margin-left: 12px; }
.reply-list details p { margin-top: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: var(--small-radius); color: var(--muted); }
.home-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.mail-main { max-width: 1000px; padding: 50px 28px; margin: auto; outline: none; }
.sender-note { display: grid; gap: 4px; padding: 18px 0 26px; overflow-wrap: anywhere; }
.sender-note > span { color: var(--muted); font-size: .85rem; }
.mail-compose, .mail-review { max-width: 680px; }
.mail-preview { margin: 28px 0; background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mail-brand { padding: 28px 32px; border-bottom: 3px solid var(--gold); }
.mail-content { padding: 32px; }
.mail-content h2 { font-size: 26px; margin-bottom: 28px; overflow-wrap: anywhere; }
.mail-content > p:not(.eyebrow) { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.mail-signature { margin-top: 32px; }
.mail-preview > footer { padding: 22px 32px; background: var(--soft); color: var(--muted); font-size: .8rem; }
.confirm-send { display: flex; gap: 12px; align-items: center; margin: 24px 0; }
.confirm-send input { width: 20px; min-width: 20px; min-height: 20px; accent-color: var(--primary); }
.mail-result { padding: 28px; background: var(--soft); border-radius: var(--radius); }
.access-shell { max-width: 620px; margin: auto; padding: 30px 24px; }
.access-shell > header { margin-bottom: 40px; }
.access-card { padding: 36px; background: white; border: 1px solid var(--line); border-radius: var(--radius); outline: none; }
.access-card > .text-button { margin-top: 20px; }
.login-access-actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; }
@media (max-width: 800px) {
  .entry-layout { grid-template-columns: 1fr; }
  .entry-aside { padding: 22px 26px; }
  .entry-aside .brand { font-size: 27px; }
  .entry-story, .aside-foot, .steps { display: none; }
  .entry-main { align-items: flex-start; padding: 30px 26px 50px; }
  .entry-form { max-width: 600px; }
  .entry-top { margin-bottom: 28px; }
  .entry-actions .small { max-width: 145px; }
  .app-header { padding: 16px 24px; }
  .app-header .brand { font-size: 27px; }
  .app-header > div > span { display: none; }
  .home { padding: 36px 24px; }
  .challenge-list { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; align-items: flex-start; margin-bottom: 24px; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
