/* Ollie sign-up site — one stylesheet, mobile-first, light + dark via prefers-color-scheme.
   One accent colour, system fonts, no external assets (CSP: self + telegram.org only). */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --ink: #1a1714;
  --ink-soft: #625a51;
  --line: #e6e1d9;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 38rem;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --ink: #f3eee7;
    --ink-soft: #aaa196;
    --line: #2b2823;
    --accent: #f59a5a;
    --accent-ink: #1a1208;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: .15em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .95em; padding: .1em .35em; border-radius: 6px; background: var(--line); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* ── frame ─────────────────────────────────────────────── */
.top, .page, .foot { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.top { padding-top: 1.25rem; padding-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
/* the English / 한국어 switch: two plain links, the current one marked (aria-current) */
.lang { display: inline-flex; gap: .25rem; font-size: .9rem; }
.lang a { color: var(--ink-soft); text-decoration: none; padding: .35rem .6rem; border-radius: 999px; border: 1px solid transparent; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { color: var(--ink); border-color: var(--line); font-weight: 600; }
:lang(ko) h1 { letter-spacing: -0.02em; word-break: keep-all; }
:lang(ko) .sub, :lang(ko) .promises li, :lang(ko) .tiny { word-break: keep-all; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.mark { color: var(--accent); flex: none; }
.mark-bar { fill: var(--accent-ink); }
.page { flex: 1; }
.foot { padding-top: 2rem; padding-bottom: 2rem; color: var(--ink-soft); font-size: .85rem; }

/* ── hero: the whole job on one screen ─────────────────── */
.hero {
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100svh - 4.5rem);
  padding: 1.5rem 0 3rem;
}
h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 4vw + 1.5rem, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}
.sub { font-size: clamp(1.15rem, 1vw + 1rem, 1.35rem); line-height: 1.4; color: var(--ink-soft); max-width: 30ch; text-wrap: pretty; }
.cta { margin-top: 2.25rem; display: flex; flex-direction: column; gap: .9rem; }
.widget { min-height: 40px; }           /* Telegram's large widget is 40px tall; no layout shift */
.widget iframe { display: block; }
.tiny { font-size: .875rem; color: var(--ink-soft); max-width: 44ch; }

/* ── the one section below the fold ────────────────────── */
.promises { padding: 0 0 3rem; }
.promises ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.promises li { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; font-weight: 500; letter-spacing: -0.01em; }

/* ── /welcome, /open, errors: one line, one action ─────── */
.state { padding: 3rem 0 3rem; min-height: calc(100svh - 4.5rem); display: flex; flex-direction: column; justify-content: center; }
.state h1 { font-size: clamp(2.1rem, 3vw + 1.25rem, 3.25rem); }
.btn {
  display: inline-block; padding: .85rem 1.5rem; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; font-size: 1.05rem;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.quiet { margin-top: 2.5rem; font-size: .875rem; }
.quiet a, button.link { color: var(--ink-soft); }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: .875rem; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }

/* ── motion, only for people who haven't asked for less ── */
@media (prefers-reduced-motion: no-preference) {
  .hero > *, .state > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
  .hero > :nth-child(2), .state > :nth-child(2) { animation-delay: .07s; }
  .hero > :nth-child(3), .state > :nth-child(3) { animation-delay: .14s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ── v0.5.6 landing: a chat demo, then short sections ──── */
.bubble { max-width: 30ch; padding: .7rem .95rem; border-radius: 18px; line-height: 1.45; font-size: 1rem; }
.bubble .who { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft); margin-bottom: .15rem; }
.bubble.car { background: var(--line); color: var(--ink); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.me { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; align-self: flex-end; }
.bubble.me .who { color: var(--accent-ink); opacity: .8; }
.hero-bubble { margin-top: 1.5rem; }
.chat { display: flex; flex-direction: column; gap: .6rem; }
.block { padding: 0 0 3rem; }
.block h2, .closing h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin: 0 0 1rem; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.quiet-rows li { color: var(--ink-soft); font-size: .98rem; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .75rem; }
.steps li { counter-increment: s; display: flex; gap: .75rem; align-items: center; font-size: 1.05rem; }
.steps li::before { content: counter(s); flex: none; width: 1.8rem; height: 1.8rem; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .9rem; }
.closing { padding: 1rem 0 4rem; }
.closing h2 { font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem); line-height: 1.1; }
:lang(ko) .bubble, :lang(ko) .rows li, :lang(ko) .steps li, :lang(ko) h2 { word-break: keep-all; }

/* ── /car/live: the car's readings as they arrive ───────── */
.live { padding: 1rem 0 3rem; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.live h1 { font-size: clamp(1.8rem, 3vw + 1rem, 2.6rem); margin: 0; }
.badge { flex: none; font-size: .85rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
.badge[data-state="live"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.badge[data-state="live"]::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .4rem; border-radius: 999px; background: currentColor; vertical-align: .05em; }
.badge[data-state="driving"] { color: var(--ink); border-color: var(--ink-soft); }
.cars { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .75rem; font-size: .9rem; }
.cars a { color: var(--ink-soft); text-decoration: none; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); }
.cars a[aria-current="true"] { color: var(--ink); border-color: var(--ink-soft); font-weight: 600; }
.live .note { margin-top: 1rem; padding: .75rem .9rem; border-radius: 12px; background: var(--line); color: var(--ink); font-size: .95rem; }
.gauges { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.g { position: relative; padding: .75rem .85rem .85rem; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.g .l { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft); }
.g .v { display: block; font-variant-numeric: tabular-nums; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.01em; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-big .v { font-size: clamp(1.8rem, 5vw + .8rem, 2.4rem); }
.g .bar { display: block; height: 4px; margin-top: .5rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.g .bar b { display: block; height: 100%; width: 0; background: var(--accent); }
.g.stale .v { color: var(--ink-soft); }
.panels { display: grid; grid-template-columns: 1fr; gap: .6rem; margin-top: .6rem; }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: .85rem .95rem; margin-top: .6rem; }
.panels .panel { margin-top: 0; }
.panel h2 { font-size: 1rem; margin: 0 0 .5rem; letter-spacing: -0.01em; }
.panel h3 { font-size: .85rem; margin: .9rem 0 .4rem; color: var(--ink-soft); font-weight: 600; }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0; font-size: .95rem; }
.panel dt { color: var(--ink-soft); }
.panel dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.chips li { font-size: .82rem; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line); }
.chips li.core { border-color: var(--ink-soft); }
.chips li.ok { border-color: var(--ink-soft); }
.chips li.wait { color: var(--ink-soft); border-style: dashed; }
.caps .tiny { margin-top: .5rem; max-width: none; }
.mono { font-family: var(--mono); }
:lang(ko) .live .note, :lang(ko) .chips li { word-break: keep-all; }
@media (min-width: 560px) {
  .gauges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g-big { grid-column: span 2; }
  .panels { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .g.tick .v { animation: tick .6s ease-out; }
  @keyframes tick { from { color: var(--accent); } to { color: inherit; } }
}

/* ── /car-phone guide and the car question (feat/car-phone-guide) ── */
.hero-short { min-height: auto; padding: 2rem 0 3rem; }
.hero-short .hero-bubble { margin: .5rem 0 1.25rem; }
.lead { color: var(--ink-soft); margin: 1rem 0 .5rem; max-width: 40ch; }
.more { font-weight: 600; text-decoration: none; }
.steps.need li, .steps.setup li { align-items: flex-start; }
.steps.need li::before, .steps.setup li::before { margin-top: .1rem; }
.steps.need p { margin-top: .25rem; color: var(--ink-soft); font-size: .98rem; }
.steps.need p + p { margin-top: .4rem; }
.steps li > div { min-width: 0; }
.done { margin-top: 1rem; font-weight: 600; }
.note { padding: .75rem .9rem; border-radius: 12px; background: var(--line); color: var(--ink); font-size: .98rem; }
.note.error { margin-top: 1.25rem; }
.cta-row { margin: .25rem 0 1rem; }
.download .tiny { margin-top: .5rem; max-width: none; }
.sha { display: block; margin-top: .25rem; font-size: .78rem; word-break: break-all; }
.phase { font-size: 1rem; margin: 1.5rem 0 .75rem; color: var(--ink-soft); font-weight: 600; }
.steps.phase2 { counter-reset: s 5; }                      /* "In the car" carries on at 6 */
.steps.need p a { white-space: nowrap; }
.cp-what { margin: .5rem 0; }
.detail { margin-top: .4rem; font-size: .9rem; color: var(--ink-soft); }
.detail summary { cursor: pointer; font-weight: 600; }
.detail p { margin: .35rem 0 0; }
.download { margin: .75rem 0 .25rem; padding: .9rem; border: 1px solid var(--line); border-radius: 12px; }
.download .note { margin: 0 0 .5rem; }
.download .cta-row { margin: .75rem 0 0; }
.qr-h { margin: 0 0 .5rem; font-weight: 600; }
.qr-box { width: 11rem; max-width: 100%; background: #fff; border-radius: 8px; line-height: 0; }
.qr-box svg { width: 100%; height: auto; display: block; }
.cmd { display: inline-block; margin: .35rem 0; padding: .3rem .6rem; border-radius: 8px; background: var(--line);
       font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; }
.chip { quotes: "\201C" "\201D"; font-family: var(--mono); font-size: .82rem; }
.gloss { display: block; margin-top: .15rem; font-weight: 600; }
:lang(ko) .detail, :lang(ko) .gloss, :lang(ko) .phase { word-break: keep-all; }
.faq { margin: 0; border-top: 1px solid var(--line); }
.faq dt { font-weight: 600; padding-top: 1rem; }
.faq dd { margin: .3rem 0 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.form { margin-top: 1.75rem; display: flex; flex-direction: column; gap: .4rem; max-width: 26rem; }
.form label { font-weight: 600; font-size: .95rem; margin-top: .6rem; }
.form input:not([type="radio"]), .form select {
  font: inherit; font-size: 1rem; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%;
}
.form [aria-invalid="true"] { border-color: var(--accent); }
.form .tiny { margin-top: .1rem; }
.choice { border: 0; margin: 1rem 0 .5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.choice legend { font-weight: 600; font-size: .95rem; margin-bottom: .5rem; padding: 0; }
.choice label { font-weight: 400; margin: 0; display: inline-flex; gap: .4rem; align-items: center; }
.form .btn { margin-top: 1rem; align-self: flex-start; }
.car-form { justify-content: flex-start; }
.car-line, .phone-line { margin-top: 1.25rem; }
:lang(ko) .lead, :lang(ko) .steps li, :lang(ko) .faq dd, :lang(ko) .note, :lang(ko) .form { word-break: keep-all; }

/* landing: the optional car-phone card at the very bottom */
.extra { padding: 0 0 4rem; }
.extra-card { display: grid; gap: .35rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); text-decoration: none; }
.extra-card:hover, .extra-card:focus-visible { border-color: var(--accent); }
.extra-tag { font-size: .78rem; color: var(--ink-soft); letter-spacing: .02em; }
.extra-card strong { font-size: 1.1rem; letter-spacing: -0.01em; }
.extra-sub { color: var(--ink-soft); }
.extra-card .more { color: var(--accent); margin-top: .25rem; }

/* footer: legal links (the privacy policy set apart in bold, PIPA decree Art. 31), disclaimer, business line */
.foot { display: flex; flex-direction: column; gap: .6rem; border-top: 1px solid var(--line); margin-top: 2rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.foot-links a { color: var(--ink-soft); text-decoration: none; padding: .15rem 0; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-links .foot-privacy { color: var(--ink); }
.foot-disclaimer, .foot-biz { font-size: .8rem; }
.foot-biz a { color: var(--ink-soft); }
.foot-biz span { white-space: nowrap; }            /* keep "사업자등록번호 647-19-01998" on one line */
:lang(ko) .foot p { word-break: keep-all; }
.policy { padding: 1rem 0 3rem; line-height: 1.65; }
.policy h1 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 .5rem; }
.policy h3 { font-size: 1.05rem; margin: 2rem 0 .5rem; }
.policy .policy-meta { color: var(--ink-soft); font-size: .9rem; }
.policy ul { padding-left: 1.2rem; }
.policy .table-wrap { overflow-x: auto; margin: .75rem 0; }
.policy table { border-collapse: collapse; font-size: .85rem; min-width: 32rem; }
.policy th, .policy td { border: 1px solid var(--line); padding: .45rem .55rem; text-align: left; vertical-align: top; }
.policy th { background: color-mix(in srgb, var(--line) 35%, transparent); }
