/* OKOLO brief — tokens mirror the Figma "OKOLO" variable collection (Light mode). */
:root {
  --bg: #F6F1E7;
  --surface: #EAE1CF;
  --card: #FFFDF8;
  --text: #3B332A;
  --muted: #7A6B57;
  --line: #3B332A;
  --line-soft: #D8CCB6;
  --accent: #8FB3F0;
  --on-accent: #3B332A;
  --error: #B5452B;
  --cream: #EAE1CF;
  --cocoa: #3B332A;

  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s24: 24px; --s32: 32px; --s48: 48px; --s64: 64px; --s80: 80px;
  --r-card: 20px; --r-screen: 32px; --r-pill: 999px; --stroke: 2px;

  --margin: 24px;
  --gap-opt: 12px;
  --display: 'Nunito', system-ui, sans-serif;
  --body: 'Nunito Sans', system-ui, sans-serif;
}
@media (min-width: 600px) { :root { --margin: 48px; } }
@media (min-width: 1024px) { :root { --margin: 80px; --gap-opt: 24px; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- screen shell ---------- */
.screen {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(var(--s24) + env(safe-area-inset-top)) var(--margin) calc(var(--s24) + env(safe-area-inset-bottom));
  max-width: 1440px; margin: 0 auto;
}
.screen.dark { background: var(--cocoa); color: var(--cream); max-width: none; }
.screen.dark .wrap { max-width: 1440px; }
.center { align-items: center; text-align: center; }
.grow { flex: 1 1 auto; min-height: var(--s24); }

/* header */
.header { display: flex; align-items: center; justify-content: space-between; gap: var(--s16); min-height: 32px; }
.header .logo { height: 22px; width: auto; display: block; }
@media (min-width: 1024px) {
  .header { flex-direction: column; justify-content: center; gap: var(--s24); padding-top: var(--s16); }
  .header .logo { height: 56px; }
}
.eyes { display: flex; gap: 6px; }
.eye { width: 18px; height: 18px; border-radius: 50%; border: var(--stroke) solid var(--line); background: transparent; position: relative; }
.eye.done { background: var(--line); }
.eye.done::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 8px; border-radius: 50%; background: var(--cream); transform: translate(-50%, -50%); }
.eye.current { background: var(--accent); }
@media (min-width: 1024px) { .eye { width: 22px; height: 22px; } .eyes { gap: 8px; } }

/* question */
.q { display: flex; flex-direction: column; gap: var(--s8); margin-top: var(--s32); width: 100%; }
@media (min-width: 1024px) { .q { align-items: center; text-align: center; margin-top: 0; } }
.eyebrow { font: 600 12px/1.4 var(--body); color: var(--muted); display: flex; gap: var(--s8); flex-wrap: wrap; align-items: center; }
@media (min-width: 1024px) { .eyebrow { justify-content: center; } }
.tag { border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: 1px 8px; }
.block-intro { font: 400 14px/1.45 var(--body); color: var(--muted); }
h1, h2 { font-family: var(--display); font-weight: 900; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 40px; line-height: 1.1; }
h2 { font-size: 26px; line-height: 1.15; }
@media (min-width: 1024px) { h2 { font-size: 40px; max-width: 900px; } }
.hint { font: 400 14px/1.45 var(--body); color: var(--muted); margin: 0; max-width: 720px; }
.body-text { font: 400 16px/1.55 var(--body); max-width: 560px; margin: 0; }

.answers { margin-top: var(--s24); width: 100%; display: flex; flex-direction: column; gap: var(--s24); }
@media (min-width: 1024px) { .answers { margin-top: var(--s48); } }
.err { color: var(--error); font: 600 14px/1.4 var(--body); min-height: 20px; margin: var(--s8) 0 0; }
@media (min-width: 1024px) { .err { text-align: center; } }

/* footer */
.footer { display: flex; gap: var(--s12); margin-top: var(--s24); }
.footer .btn.next { flex: 1; }
@media (min-width: 1024px) { .footer { justify-content: space-between; } .footer .btn.next { flex: 0 0 296px; } }
.modelink { background: none; border: 0; padding: var(--s8) 0; color: var(--muted); font: 600 13px/1.4 var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: center; }

/* buttons */
.btn {
  font: 900 16px/1 var(--display); border-radius: var(--r-pill); border: var(--stroke) solid var(--line);
  min-height: 48px; padding: 14px 28px; cursor: pointer; background: transparent; color: var(--text);
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn[disabled] { opacity: .5; cursor: default; }
.dark .btn { border-color: var(--cocoa); }
.dark .btn.ghost { border-color: var(--cream); color: var(--cream); }
.btn.wide { width: 100%; max-width: 420px; }

/* choice cards */
.grid { display: grid; gap: var(--gap-opt); grid-template-columns: 1fr; }
.grid.two { grid-template-columns: 1fr 1fr; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .grid.few { grid-template-columns: repeat(var(--n), 1fr); } }
.card {
  text-align: left; background: var(--card); border: var(--stroke) solid var(--line); border-radius: var(--r-card);
  padding: var(--s16); cursor: pointer; display: flex; flex-direction: column; gap: var(--s4); min-height: 64px; justify-content: center;
  transition: background-color .15s ease, transform .12s ease;
}
.card:active { transform: scale(.99); }
.card[aria-pressed="true"], .card[aria-checked="true"] { background: var(--accent); }
.card .t { font: 700 16px/1.3 var(--body); }
.card .big { font: 900 26px/1.1 var(--display); }
.card .s { font: 400 13px/1.35 var(--body); }
@media (min-width: 1024px) { .card.tall { min-height: 200px; justify-content: flex-end; } .card .big { font-size: 32px; } }
.card .sample { font-size: 44px; line-height: 1; margin-bottom: var(--s8); }
@media (min-width: 1024px) { .card .sample { font-size: 72px; } }
.card svg.illu { width: 100%; max-width: 160px; height: 72px; margin-bottom: var(--s8); }
.swatches { display: flex; height: 56px; border-radius: 12px; overflow: hidden; border: var(--stroke) solid var(--line); margin-bottom: var(--s8); }
.swatches i { flex: 1; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s8); }
@media (min-width: 1024px) { .chips { justify-content: center; gap: var(--s12); } }
.chip {
  border: var(--stroke) solid var(--line); border-radius: var(--r-pill); background: transparent; padding: 9px 16px;
  font: 700 14px/1.2 var(--body); cursor: pointer; min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--line); color: var(--cream); }
.counter { font: 600 12px/1 var(--body); color: var(--muted); }
@media (min-width: 1024px) { .counter { text-align: center; } }

/* fields */
.field { display: flex; flex-direction: column; gap: var(--s8); width: 100%; text-align: left; }
.field label { font: 700 13px/1.3 var(--body); }
.input, .textarea {
  width: 100%; background: var(--card); border: var(--stroke) solid var(--line); border-radius: var(--r-card);
  padding: 14px 16px; font: 400 16px/1.45 var(--body);
}
.textarea { min-height: 120px; resize: vertical; }
.input.bad, .textarea.bad { border-color: var(--error); }
@media (min-width: 1024px) { .narrow { max-width: 720px; margin: 0 auto; width: 100%; } }

/* sliders */
.slider { display: flex; flex-direction: column; gap: var(--s8); }
.slider .ends { display: flex; justify-content: space-between; font: 700 13px/1.3 var(--body); gap: var(--s16); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; border: var(--stroke) solid var(--line); background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--card) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; border: var(--stroke) solid var(--line); background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--card) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); margin-top: -10px; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); }

/* pairs */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-opt); }
.pair .card { align-items: center; text-align: center; }
.pair svg { width: 100%; height: 64px; }

/* upload */
.drop {
  border: var(--stroke) dashed var(--line); border-radius: var(--r-card); background: var(--card);
  padding: var(--s24) var(--s16); display: flex; flex-direction: column; align-items: center; gap: var(--s8); text-align: center; cursor: pointer;
}
.drop.over { background: var(--surface); }
.drop .plus { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); border: var(--stroke) solid var(--line); display: grid; place-items: center; font: 900 20px/1 var(--display); }
.drop .note { font: 400 12px/1.4 var(--body); color: var(--muted); }
.files { display: flex; flex-direction: column; gap: var(--s8); }
.file { display: flex; justify-content: space-between; align-items: center; gap: var(--s8); border: 1px solid var(--line-soft); border-radius: 12px; padding: 8px 12px; font: 600 13px/1.3 var(--body); }
.file button { background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1; }

.check { display: flex; gap: var(--s12); align-items: flex-start; font: 400 14px/1.45 var(--body); cursor: pointer; text-align: left; }
.check input { width: 22px; height: 22px; accent-color: var(--cocoa); margin: 0; flex: none; }

/* intro / final */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s24); max-width: 560px; margin: 0 auto; width: 100%; }
.hero .logo { width: min(300px, 80%); height: auto; color: var(--cream); }
.hero .mark { width: 96px; height: 96px; }
.hero h1 { font-size: clamp(32px, 6vw, 48px); }
.lang { display: flex; gap: var(--s8); justify-content: center; }
.lang .chip { border-color: var(--cream); color: var(--cream); padding: 7px 14px; min-height: 36px; }
.lang .chip[aria-pressed="true"] { background: var(--cream); color: var(--cocoa); }
.socials { display: flex; gap: 10px; justify-content: center; }
.social { width: 44px; height: 44px; border-radius: 50%; border: var(--stroke) solid currentColor; display: grid; place-items: center; opacity: .9; }
.social svg { width: 20px; height: 20px; }
.sign { font: 900 16px/1 var(--display); letter-spacing: .04em; }
.demo-note { font: 600 12px/1.4 var(--body); opacity: .7; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(59, 51, 42, .45); display: grid; place-items: center; padding: var(--margin); z-index: 10; }
.modal { background: var(--bg); border: var(--stroke) solid var(--line); border-radius: var(--r-screen); padding: var(--s32); max-width: 480px; display: flex; flex-direction: column; gap: var(--s16); }
.modal .row { display: flex; gap: var(--s12); flex-wrap: wrap; }
.modal .row .btn { flex: 1; }

.fade { animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } .btn, .card { transition: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* v0.2 fixes */
html.dark-page, html.dark-page body { background: var(--cocoa); }
.hero .logo { margin-bottom: var(--s8); }
.hero h1 { position: relative; z-index: 0; }
.br-mob { display: none; }
@media (max-width: 599px) { .br-mob { display: inline; } }
.date-box { position: relative; width: 100%; }
.date-box .input { padding-right: 48px; min-height: 52px; -webkit-appearance: none; appearance: none; text-align: left; }
.date-box .date-ico { position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); pointer-events: none; color: var(--text); }
.date-box input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.date-box input::-webkit-date-and-time-value { text-align: left; }
@media (max-width: 599px) { .hero h1 { font-size: clamp(24px, 7.6vw, 34px); } .hero h1 .nw { white-space: nowrap; } }

/* v0.3 typography: no orphans, break by meaning, no syllable hyphens */
h1, h2, .sheet h2 { text-wrap: balance; }
p, .hint, .block-intro, label, .sr-q, .sr-a { text-wrap: pretty; }
body { hyphens: none; -webkit-hyphens: none; overflow-wrap: break-word; }
.btn, .chip { white-space: nowrap; }
.hero h1 .nw { white-space: nowrap; }
@media (max-width: 599px) { .hero h1 { font-size: clamp(24px, 7.6vw, 34px); } }
.hero .body-text { max-width: 640px; }

/* history button */
.hist-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 12px; border: var(--stroke) solid var(--line); border-radius: var(--r-pill); background: var(--card); cursor: pointer; color: var(--text); }
.hist-btn .chev { font: 900 14px/1 var(--display); transition: transform .2s; }
.hist-btn:hover .chev { transform: translateY(2px); }
@media (min-width: 1024px) { .hist-btn { padding: 8px 14px 8px 16px; gap: 10px; } .hist-btn .chev { font-size: 18px; } }
.edit-banner { background: var(--surface); border-radius: 14px; padding: 10px 14px; font: 600 13px/1.4 var(--body); margin-top: var(--s16); text-align: left; }
@media (min-width: 1024px) { .edit-banner { max-width: 720px; margin: var(--s16) auto 0; width: 100%; text-align: center; } }

/* answers sheet */
body.no-scroll { overflow: hidden; }
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(59, 51, 42, 0); transition: background .3s ease; }
.sheet-bg.open { background: rgba(59, 51, 42, .45); }
.sheet { position: absolute; left: 0; right: 0; top: 0; max-height: 88vh; max-height: 88dvh; display: flex; margin: 0 auto; max-width: 720px;
  background: var(--bg); border: var(--stroke) solid var(--line); border-top: 0; border-radius: 0 0 28px 28px;
  transform: translateY(-105%); transition: transform .45s cubic-bezier(.34, 1.4, .64, 1); }
.sheet-bg.open .sheet { transform: none; }
.sheet-in { display: flex; flex-direction: column; gap: var(--s12); padding: calc(var(--s24) + env(safe-area-inset-top)) var(--margin) var(--s12); width: 100%; min-height: 0; }
@media (min-width: 1024px) { .sheet-in { padding: var(--s48) 40px var(--s16); } }
.sheet h2 { font-size: 24px; }
.sheet-list { display: flex; flex-direction: column; gap: var(--s8); overflow-y: auto; min-height: 0; padding: 2px; margin: 0 -2px; overscroll-behavior: contain; }
.sheet-group { font: 700 11px/1.3 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: var(--s8) 0 0; }
.sheet-row { display: flex; align-items: center; gap: var(--s12); text-align: left; width: 100%; background: var(--card); border: var(--stroke) solid var(--line-soft); border-radius: 16px; padding: 12px 12px 12px 16px; cursor: pointer; color: var(--text); flex: none; }
.sheet-row:hover, .sheet-row:focus-visible { border-color: var(--line); }
.sr-col { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sr-q { font: 700 13px/1.35 var(--body); }
.sr-a { font: 400 13px/1.35 var(--body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-edit { font: 700 12px/1 var(--body); flex: none; }
.sheet-row.now { background: var(--accent); border-color: var(--line); }
.sheet-next { font: 600 12px/1.4 var(--body); color: var(--muted); text-align: center; margin: var(--s4) 0 0; }
.sheet-close { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font: 700 12px/1 var(--body); color: var(--text); padding: var(--s8); align-self: center; }
.sheet-close span { width: 40px; height: 4px; border-radius: 2px; background: var(--line-soft); }

/* sending */
.sending .hero { gap: var(--s24); }
.mark-wrap { width: 160px; height: 160px; }
@media (min-width: 1024px) { .mark-wrap { width: 240px; height: 240px; } }
.mark-anim { width: 100%; height: 100%; animation: hop 3s ease-in-out infinite; transform-origin: 50% 90%; }
.mark-anim .m-eye { animation: look 3s ease-in-out infinite; }
@keyframes hop { 0%, 23%, 50%, 73%, 100% { transform: none; } 12% { transform: translateY(-18%) rotate(-8deg); } 62% { transform: translateY(-18%) rotate(8deg); } }
@keyframes look { 0%, 100% { transform: none; } 30%, 43% { transform: translateX(-4px); } 50%, 87% { transform: translateX(4px); } }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.steps li { display: flex; align-items: center; gap: 10px; font: 400 14px/1.4 var(--body); color: var(--muted); }
.steps li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: var(--stroke) solid var(--line-soft); flex: none; box-sizing: border-box; }
.steps li.done { color: var(--text); } .steps li.done::before { background: var(--line); border-color: var(--line); }
.steps li.now { color: var(--text); font-weight: 700; } .steps li.now::before { background: var(--accent); border-color: var(--line); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .mark-anim, .mark-anim .m-eye, .steps li.now::before { animation: none; } .sheet, .sheet-bg { transition: none; } }

/* date picker */
.date-btn { display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; min-height: 52px; }
.date-btn .dv.ph { color: var(--muted); }
.date-box .date-ico { position: static; transform: none; flex: none; }
.cal { margin-top: var(--s8); background: var(--card); border: var(--stroke) solid var(--line); border-radius: var(--r-card); padding: var(--s16); display: flex; flex-direction: column; gap: var(--s12); }
.cal[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; font: 900 16px/1 var(--display); }
.cal-nav { border: var(--stroke) solid var(--line); background: none; border-radius: var(--r-pill); width: 36px; height: 30px; font: 900 16px/1 var(--display); cursor: pointer; color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .wd { font: 700 11px/20px var(--body); color: var(--muted); }
.day { height: 38px; border-radius: var(--r-pill); border: var(--stroke) solid transparent; background: none; font: 400 14px/1 var(--body); color: var(--text); cursor: pointer; }
.day:hover { border-color: var(--line-soft); }
.day.today { border-color: var(--line-soft); }
.day.past { opacity: .5; }
.day.sel { background: var(--accent); border-color: var(--line); font-weight: 700; opacity: 1; }
.cal-foot { display: flex; justify-content: space-between; }
.cal-foot button { background: none; border: 0; font: 700 13px/1 var(--body); cursor: pointer; color: var(--text); padding: 8px 0; }
.cal-clear { color: var(--muted) !important; }
.date-box .date-btn { padding-right: 16px; }
@media (max-width: 374px) { .footer .btn { padding-left: 18px; padding-right: 18px; } .footer .btn.next { min-width: 0; } }

/* v0.4 */
.sheet-scroll { position: relative; display: flex; min-height: 0; flex: 1 1 auto; }
.sheet-list { flex: 1; padding-right: 16px; scrollbar-width: none; }
.sheet-list::-webkit-scrollbar { display: none; }
.sbar { position: absolute; top: 4px; bottom: 4px; right: 0; width: 4px; border-radius: 2px; background: var(--line-soft); }
.sbar[hidden] { display: none; }
.sbar span { display: block; width: 100%; border-radius: 2px; background: var(--cocoa); }
.date-err { color: var(--error); font: 600 13px/1.4 var(--body); margin: var(--s8) 0 0; text-align: left; }
.date-err:empty { display: none; }
.date-btn.bad { border-color: var(--error); }
.check span { text-wrap: balance; }

/* v0.5: reliable taps */
button, .card, .chip, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .btn.shake { animation: none; } }
a.social{color:inherit;text-decoration:none}
.social.soon{opacity:.45}
