:root {
  color-scheme:light; --page:#f7f8f2; --ink:#1b332a; --muted:#52665b; --line:#d7e0d4;
  --green:#205f48; --dark:#163e32; --soft:#e9f2e7; --error:#97291d;
  font: 100%/1.48 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--ink); background:var(--page);
}
* { box-sizing:border-box }
[hidden] { display:none!important }
body { margin:0 }
body:has(dialog[open]) { overflow:hidden }
button,input,select,textarea { font:inherit; color:inherit }
button,a { -webkit-tap-highlight-color:transparent; touch-action:manipulation }
button { cursor:pointer }
button:disabled { opacity:.64; cursor:wait }
a { color:inherit }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #93732a; outline-offset:3px;
}
.frame { width:min(100% - 32px,1020px); margin-inline:auto }
main.frame { padding:24px 0 max(44px,env(safe-area-inset-bottom)) }
.topbar { background:#fff; border-bottom:1px solid var(--line) }
.topbar-inner { min-height:62px; display:flex; align-items:center; justify-content:space-between; gap:6px }
.wordmark,.home-link { text-decoration:none; display:inline-flex; align-items:center; min-height:44px; gap:8px }
.wordmark { font-weight:730; color:var(--dark); letter-spacing:-.035em }
.brand-leaf { position:relative; display:inline-block; width:29px; height:32px; }
.brand-leaf::before,.brand-leaf::after { position:absolute; content:""; background:var(--green); border-radius:0 90% 0 90%; transform:rotate(5deg) }
.brand-leaf::before { width:16px; height:18px; top:5px; left:1px }
.brand-leaf::after { width:13px; height:17px; top:10px; right:2px; background:#81a676; transform:scaleX(-1) rotate(4deg) }
.home-link { font-size:.875rem; color:var(--green); font-weight:640 }
.home-link span { font-size:1.15rem }
.hero { isolation:isolate; position:relative; overflow:hidden; padding:clamp(24px,4vw,45px); border-radius:22px; color:#fff; background:linear-gradient(120deg,#173e32,#245641 78%,#366747) }
.hero-copy { position:relative; z-index:1; max-width:735px }
.hero h1 { margin:0; font:500 clamp(2.25rem,5.4vw,4.15rem)/.99 Georgia,"Times New Roman",serif; letter-spacing:-.055em; text-wrap:balance }
.hero p { max-width:675px; margin:17px 0 0; font-size:clamp(.93rem,1.65vw,1.06rem); line-height:1.58; color:#eff5ed; }
.hero-art { position:absolute; z-index:0; inset:0 0 0 auto; width:32%; opacity:.6; pointer-events:none; overflow:hidden; mask-image:linear-gradient(90deg,transparent,#000 75%) }
.hero-art i { position:absolute; width:260px; height:420px; border:1px solid #93b695; border-radius:100%; right:-132px; bottom:-290px; transform:rotate(36deg); }
.hero-art i:nth-child(2) { right:-113px; bottom:-126px; transform:rotate(51deg) }
.hero-art i:nth-child(3) { right:-56px; bottom:-179px; transform:rotate(31deg); width:195px }
#survey { padding-top:25px }
.progress-head,.section-heading { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.progress-head { color:var(--muted); font-weight:580; font-size:.875rem }
.progress-head strong { color:var(--green); text-align:right; font-weight:700; }
progress { appearance:none; -webkit-appearance:none; display:block; width:100%; height:7px; border:0; border-radius:8px; overflow:hidden; background:#dce6da; margin:8px 0 26px; color:#347052 }
progress::-webkit-progress-bar {background:#dce6da;border-radius:8px} progress::-webkit-progress-value {background:#347052;border-radius:8px} progress::-moz-progress-bar {background:#347052;border-radius:8px}
.section-heading { margin-bottom:15px }
.section-heading h2 { margin:0; font-size:1.35rem; letter-spacing:-.035em }
.section-heading span { color:var(--muted); font-size:.84rem }
#sections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tile { display:grid; grid-template-columns:44px minmax(0,1fr) 20px; align-items:center; gap:13px; width:100%; min-height:93px; padding:16px; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:0 3px 0 #e6ebe28a,0 8px 17px #24432e06; text-align:left; animation:float 5s ease-in-out infinite; animation-delay:var(--delay,0s) }
@keyframes float { 0%,100% { transform:translateY(0) } 50% { transform:translate(var(--drift,1px),-4px) } }
.tile:focus-visible,.tile:active,.tile.complete,body:has(dialog[open]) .tile { animation-play-state:paused }
@media (hover:hover) { .tile:hover { animation-play-state:paused; } }
.tile:nth-child(even) { --drift:-1.5px; animation-duration:5.7s }
.tile:nth-child(3n) { --drift:1.5px; animation-duration:6.3s }
.tile:hover,.tile:focus-visible { border-color:#8aa791 }
.tile.complete { border-color:#a7c2a8 }
.tile-icon { display:grid; place-items:center; background:var(--tint,#e7efe3); color:var(--accent,#42644c); width:44px; height:44px; border-radius:12px }
.tile-icon svg { width:23px; height:23px }
.tile-title,.tile-meta { display:block }
.tile-title { font-size:1.01rem; font-weight:710; letter-spacing:-.022em;line-height:1.25; text-wrap:pretty }
.tile-meta { color:var(--muted); font-size:.78rem; margin-top:4px }
.tile-symbol { text-align:center; font-size:1.4rem; color:var(--green); line-height:1; }
.tile.complete .tile-symbol { border-radius:50%; background:#deeddc; font-size:.88rem; padding:3px; font-weight:800; }
.send-area { display:flex; justify-content:flex-end; margin-top:24px; }
.primary,.secondary,.close,.skip-btn { border-radius:10px; display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:44px; padding:10px 16px; font-weight:650; text-decoration:none; }
.primary { background:var(--green); color:white; border:1px solid var(--green) }
.primary:hover { background:#174b38 }
.secondary,.close { background:#fff; border:1px solid var(--line) }
.secondary:hover,.close:hover { background:#f3f6f1; border-color:#aebfaf }
#review { padding:12px 20px; gap:18px }
#loading { display:flex; align-items:center; gap:10px; margin-top:26px; color:var(--muted) }
.spinner { width:16px; height:16px; border:2px solid #c2d0c2; border-top-color:var(--green); border-radius:50%; animation:spin 1s linear infinite }
@keyframes spin { to { transform:rotate(360deg) } }
#alert,#confirm-error { color:var(--error); background:#fff1ed; padding:12px 15px; border-radius:10px }
.receipt { margin:24px auto 0; padding:clamp(22px,5vw,42px); background:white; border:1px solid var(--line); border-radius:18px; text-align:center; }
.receipt h2 { margin:12px 0 4px; font-size:clamp(1.45rem,4vw,2.1rem); letter-spacing:-.04em }
.receipt p { color:var(--muted); margin:4px 0 24px; word-break:break-word }
.receipt-check { display:inline-grid; place-items:center; width:49px; height:49px; background:#deeddb; border-radius:50%; color:var(--green); font-size:1.6rem; }
.receipt-actions,.dialog-actions { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
dialog { width:min(calc(100% - 28px),660px); max-width:100%; max-height:calc(100dvh - 32px); color:var(--ink); border:1px solid var(--line); border-radius:19px; padding:0; background:#fff; box-shadow:0 18px 80px #16352635; }
dialog[open] { display:flex; flex-direction:column; }
dialog::backdrop {background:rgb(13 33 24 /.56)}
.dialog-header,.dialog-actions { flex:none; padding:17px 22px }
.dialog-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; border-bottom:1px solid var(--line) }
.dialog-header h2 { margin:0; line-height:1.22; font-size:clamp(1.24rem,3.4vw,1.65rem);letter-spacing:-.033em }
.dialog-header .step { color:var(--green); margin:0 0 4px; font-size:.78rem; font-weight:700 }
.close { flex:none; padding:0; width:42px; height:42px; min-height:42px; font-size:1.4rem; line-height:1; }
.dialog-body { overflow-y:auto; overscroll-behavior:contain; padding:4px 22px 18px; }
.dialog-actions { border-top:1px solid var(--line); justify-content:space-between; align-items:center; background:#f9faf6 }
.confirm-body { padding-top:12px }
.question { margin:0; border:0; padding:19px 0 7px; min-width:0; }
.question+.question { margin-top:10px; border-top:1px solid #e4eae1; }
.question-title { display:block; margin:0; font-weight:680; line-height:1.34; font-size:1.02rem; color:#21392e; }
.field-status { display:inline-flex; align-items:center; gap:4px; color:#68756b; font-size:.75rem; line-height:1.3; margin:4px 0 10px; }
.field-status.answered { color:#216243; font-weight:650 }
.help { margin:0 0 10px; font-size:.875rem; color:var(--muted); }
.choices { display:grid; gap:6px; }
.choice { display:flex; align-items:center; gap:10px; min-height:44px; padding:9px 12px; border:1px solid var(--line); border-radius:9px; cursor:pointer; line-height:1.35; font-size:.94rem }
.choice:has(:checked) { background:var(--soft); border-color:#6f9873; }
.choice input { margin:0; flex:none; width:17px; height:17px; accent-color:var(--green); }
.field { display:block; width:100%; max-width:100%; min-height:46px; padding:10px 12px; border:1px solid #bccbbd; border-radius:9px; background:#fff; }
textarea.field { min-height:92px; resize:vertical }
.skip-btn { min-height:38px; border:0; padding:5px 1px; background:transparent; color:var(--green); font-size:.84rem; text-decoration:underline; text-underline-offset:3px }
.error { margin:6px 0 0; color:var(--error); font-size:.85rem; }
.question.invalid .field,.question.invalid .choice {border-color:#bd5b4d}
#editor-title:focus,#received-title:focus { outline:0 }
@media (max-width:660px) {
  .hero-art { opacity:.28 }
  #sections { grid-template-columns:minmax(0,1fr); gap:9px }
  .tile { min-height:73px; padding:12px; gap:12px }
  #review { width:100% }
  main.frame { padding-top:15px }
  .dialog-header,.dialog-actions { padding:14px 16px }
  .dialog-body { padding-inline:16px }
  #editor { width:100%; max-height:100dvh; height:100dvh; margin:0; border:0; border-radius:0; }
  #editor .dialog-body { flex:1 }
  #editor .dialog-actions { padding-bottom:max(14px,env(safe-area-inset-bottom)) }
}
@media (max-width:360px) {
  .frame { width:calc(100% - 22px) }
  .section-heading span { font-size:.76rem }
  .hero { padding:20px }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; scroll-behavior:auto!important; } }
.marks { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.mark { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:20px; padding:0 5px; border:1px solid #d4ded3; border-radius:6px; color:#5b6a5f; font-size:.70rem; line-height:1; font-weight:630; font-variant-numeric:tabular-nums; }
.mark.answered { background:#e3efdd; border-color:#bfd4ba; color:#285637 }
.mark.skipped { border-style:dashed; background:#f4f3ec; color:#6b675e }

@media (min-width:370px) and (max-width:660px) {
  #sections { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 10px; }
  .tile { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; position:relative; gap:10px; min-height:123px; padding:13px; }
  .tile-icon { width:34px; height:34px; border-radius:10px }
  .tile-icon svg { width:20px; height:20px }
  .tile-body { flex:1; display:flex; flex-direction:column; width:100% }
  .tile-title { font-size:.94rem; }
  .marks { margin-top:auto; padding-top:8px; }
  .tile-symbol { position:absolute; top:12px; right:12px; width:20px; }
}
