/* Veyla – planning app. Same brand as the sales page: ivory · nude · pink · white-gold. */
:root {
  --ivory: #FAFAF5; --nude: #E6ECE2; --pink: #D9E4D2; --pink-deep: #AFC3A5;
  --ink: #263329; --ink-soft: #56645A; --gold: #B8935A; --gold-deep: #7A5B2A; --gold-light: #E4CFA6; --white: #FFFFFF;
  --late: #A9434C; --late-bg: #F8DADA; --week: #855510; --week-bg: #FBE8CC; --ok: #356847; --ok-bg: #E2EFE4;
  --info: #3D6E8F; --info-bg: #DCEBF4; --line: #DCE3D6;
  --radius: 16px; --shadow: 0 6px 20px rgba(38, 51, 41, .08);
  --serif: "Bellefair", "Times New Roman", serif;
  --sans: "Assistant", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --tabs-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 16px/1.55 var(--sans);
       padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 12px); }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 17px; font-weight: 700; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
       padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(250, 250, 245, .94);
       backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-family: var(--serif); font-size: 21px; text-decoration: none; }
.tier { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--nude); color: var(--ink-soft); }
.tier.pro { background: var(--gold-deep); color: var(--white); }
.icon-btn { margin-inline-start: auto; border: 0; background: var(--nude); width: 40px; height: 40px; border-radius: 50%;
            font-size: 22px; line-height: 1; cursor: pointer; }

/* layout */
main { max-width: 560px; margin: 0 auto; padding: 18px 16px 8px; outline: none; }
.stack > * + * { margin-top: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.soft { background: var(--nude); border-color: transparent; box-shadow: none; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hello h1 { margin-bottom: 4px; }
.promise { font-size: 13px; color: var(--ink-soft); display: flex; gap: 6px; align-items: flex-start; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.kpi b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.5px; direction: ltr; text-align: right; }
.kpi span { font-size: 13px; color: var(--ink-soft); }
.kpi.bad b { color: var(--late); }
.kpi.good b { color: var(--ok); }
.kpi.wide { grid-column: 1 / -1; }

/* buttons */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; border: 0; border-radius: 999px;
       padding: 13px 20px; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; min-height: 48px; }
.btn-main { background: var(--ink); color: var(--white); }
.btn-gold { background: var(--gold-deep); color: var(--white); }
.btn-ghost { background: transparent; border: 1.5px solid var(--ink); }
.btn-soft { background: var(--nude); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: inherit; }
.btn:focus-visible, .linkbtn:focus-visible, .icon-btn:focus-visible, .tabs button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* forms */
.field { display: block; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field small { display: block; color: var(--ink-soft); font-size: 12px; margin-top: 3px; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white);
                          padding: 11px 12px; min-height: 46px; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--ink); flex: none; }
.seg { display: flex; background: var(--nude); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 9px 6px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.form-grid { display: grid; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }

/* verdict */
.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.s0 { background: var(--nude); color: var(--ink-soft); }
.s1 { background: var(--info-bg); color: var(--info); }
.s2 { background: var(--ok-bg); color: var(--ok); }
.s3 { background: var(--week-bg); color: var(--week); }
.s4 { background: var(--late-bg); color: var(--late); }
.quote h3 { margin-bottom: 2px; }
.quote .price { font-size: 26px; font-weight: 800; direction: ltr; text-align: right; }
.alert { background: var(--late-bg); color: var(--late); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.note { background: var(--ivory); border-radius: 12px; padding: 10px 12px; font-size: 14px; }

/* range bar: low → high, typical tick, her price marker (RTL: low on the right) */
.range { position: relative; height: 34px; margin: 14px 4px 4px; }
.range .bar { position: absolute; inset: 14px 0 auto; height: 6px; border-radius: 6px;
              background: linear-gradient(to left, var(--info-bg), var(--ok-bg) 30%, var(--week-bg) 70%, var(--late-bg)); }
.range .typ { position: absolute; top: 9px; width: 2px; height: 16px; background: var(--ink-soft); }
.range .me { position: absolute; top: 4px; width: 26px; height: 26px; margin-right: -13px; border-radius: 50%;
             background: var(--ink); color: var(--white); font-size: 12px; display: grid; place-items: center; border: 3px solid var(--white); }
.range-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); }

/* locks */
.locked { position: relative; }
.locked .blur { filter: blur(5px); pointer-events: none; user-select: none; }
.lock-over { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.lock-over .card { max-width: 340px; text-align: center; }

/* tables / lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: right; font-weight: 600; color: var(--ink-soft); font-size: 12px; padding: 6px 4px; }
.tbl td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl input { min-height: 40px; padding: 7px 8px; font-size: 15px; }
.num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.x { border: 0; background: none; color: var(--ink-soft); font-size: 20px; cursor: pointer; padding: 4px 8px; }

/* chart */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font: 11px var(--sans); fill: var(--ink-soft); }

/* contract checklist */
.contract li { display: flex; gap: 12px; align-items: flex-start; }
.contract li.done b { text-decoration: line-through; color: var(--ink-soft); }
.contract p { font-size: 14px; color: var(--ink-soft); }
.progress { height: 8px; border-radius: 8px; background: var(--nude); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold); }

/* paywall */
.plans { display: grid; gap: 10px; }
.plan { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; background: var(--white); }
.plan.best { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 147, 90, .15); }
.plan .p { font-size: 26px; font-weight: 800; }
.plan ul { margin: 8px 0 12px; padding-inline-start: 18px; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; background: var(--gold-deep); color: var(--white); border-radius: 999px; padding: 2px 10px; }
.guarantee { font-size: 14px; text-align: center; color: var(--ink-soft); }

/* bottom tabs */
.tabs { position: fixed; inset: auto 0 0; z-index: 6; display: flex; background: var(--white); border-top: 1px solid var(--line);
        padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--ink-soft);
               display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.tabs button span { font-size: 20px; line-height: 1; }
.tabs button[aria-current=page] { color: var(--ink); }
.tabs button[aria-current=page] span { transform: scale(1.12); }

/* bottom sheet */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 88vh; border-radius: 22px 22px 0 0;
         background: var(--ivory); color: var(--ink); }
.sheet::backdrop { background: rgba(38, 51, 41, .45); }
#sheet-body { padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); overflow: auto; max-height: 88vh; }
.sheet .close { float: left; border: 0; background: var(--nude); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.menu { list-style: none; padding: 0; margin: 14px 0 0; }
.menu button, .menu a { display: flex; gap: 12px; width: 100%; text-align: right; border: 0; background: var(--white); border-radius: 12px;
                        padding: 14px; margin-bottom: 8px; cursor: pointer; text-decoration: none; font-size: 16px; }

.toast { position: fixed; inset: auto 16px calc(var(--tabs-h) + 18px + env(safe-area-inset-bottom)); z-index: 20; margin: 0 auto;
         max-width: 420px; background: var(--ink); color: var(--white); border-radius: 14px; padding: 12px 16px; text-align: center;
         opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; font-size: 15px; }
.toast.show { opacity: 1; transform: none; }
.noscript { padding: 30px; text-align: center; }

@media (min-width: 700px) { main { padding-top: 28px; } h1 { font-size: 34px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.kpis.mini { grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.kpis.mini .kpi { padding: 8px 6px; text-align: center; }
.kpis.mini b { font-size: 17px; text-align: center; white-space: nowrap; }
.kpis.mini span { font-size: 12px; line-height: 1.3; display: block; }

/* v2: the whole kit */
.countdown .names { font-family: var(--serif); font-size: 19px; color: var(--gold-deep); }
.countdown h1 { font-size: 38px; }
.tasks li.task { display: flex; gap: 12px; align-items: flex-start; }
.task p { font-size: 15px; }
.task .meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.task.done p:first-child { text-decoration: line-through; color: var(--ink-soft); }
.task.late .due { color: var(--late); font-weight: 700; }
.task.soon .due { color: var(--week); font-weight: 700; }
.subnav { overflow-x: auto; }
.subnav button { white-space: nowrap; font-size: 14px; }
.lockcard { border: 1.5px dashed var(--gold-light); background: linear-gradient(180deg, #fff, #F6F7F0); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; border: 1px solid var(--line); background: var(--white); border-radius: 14px; padding: 16px 12px; text-align: right;
        font-weight: 700; font-size: 15px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); min-height: 96px; }
.tile > span { font-size: 26px; }
.tile .lock { position: absolute; top: 8px; left: 10px; font-style: normal; font-size: 13px; }
.closed > li.card { margin-bottom: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.schedule b.num { display: inline-block; min-width: 50px; }
details.card summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.card summary::after { content: "▾"; color: var(--ink-soft); }
details.card[open] summary::after { content: "▴"; }
details.card .list { margin-top: 8px; }
.tbl select { min-height: 40px; padding: 6px 8px; font-size: 14px; }
.list.card { padding: 4px 16px; }
.steps li { display: flex; gap: 12px; align-items: center; }
.steps li > div { flex: 1; }
.steps .tick { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--white); }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); }
.steps li.done b { color: var(--ink-soft); text-decoration: line-through; }
.more-fields summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linkbtn.center { display: block; margin: 0 auto; }
