/* Quote by Voice · the look of the owner's app.
   Kashtree's colors: night, blue for voice and everyday actions, orange for the one action that commits (approve, send).
   Order of this file: colors · base · top bar · the two panes · conversation · sphere · main button · document side · pages · windows.
   The paper itself (the document) is in sheet.css and stays light in both themes. */

/* ---------- colors: light, then dark ---------- */
:root {
  color-scheme: light;
  --bg: #F3F5FA; --surface: #FFFFFF; --ink: #0E1626; --ink-2: #3B4660; --muted: #5A6580;
  --line: #E1E6EF; --field: #C5CEDF; --track: #E9EDF4;
  --accent: #0A5CE6; --accent-ink: #FFFFFF; --soft: #E8F0FE; --focus: #9DBDF7;
  --cta: #FF6A13; --cta-h: #FF7D33; --cta-ink: #0E1626;
  --warn-bg: #FFF1E8; --warn-ink: #9A3A00; --ok-bg: #E7F7EE; --ok-ink: #11663A; --ok: #1F9D5B; --bad: #B42318; --bad-bg: #FDECEA;
  --sel: #0E1626; --sel-ink: #FFFFFF;
  --shadow: 0 18px 48px rgba(14, 22, 38, .10);
  --glow-a: rgba(10, 92, 230, .16); --glow-b: rgba(255, 106, 19, .12);
  --font: ui-sans-serif, -apple-system, "system-ui", "Segoe UI", Inter, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #070B16; --surface: #111930; --ink: #EEF2FA; --ink-2: #C3CEE4; --muted: #9EABC6;
  --line: #243050; --field: #3A4870; --track: #1A2440;
  --accent: #5B93F5; --accent-ink: #0A1020; --soft: #17254A; --focus: #5B93F5;
  --warn-bg: #3A2412; --warn-ink: #FFB37F; --ok-bg: #12301F; --ok-ink: #8FDDB0; --ok: #4CC98A; --bad: #FF8A7A; --bad-bg: #3A1512;
  --sel: #EEF2FA; --sel-ink: #0A1020;
  --shadow: 0 18px 48px rgba(0, 0, 0, .5);
  --glow-a: rgba(10, 92, 230, .38); --glow-b: rgba(255, 106, 19, .18);
} }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070B16; --surface: #111930; --ink: #EEF2FA; --ink-2: #C3CEE4; --muted: #9EABC6;
  --line: #243050; --field: #3A4870; --track: #1A2440;
  --accent: #5B93F5; --accent-ink: #0A1020; --soft: #17254A; --focus: #5B93F5;
  --warn-bg: #3A2412; --warn-ink: #FFB37F; --ok-bg: #12301F; --ok-ink: #8FDDB0; --ok: #4CC98A; --bad: #FF8A7A; --bad-bg: #3A1512;
  --sel: #EEF2FA; --sel-ink: #0A1020;
  --shadow: 0 18px 48px rgba(0, 0, 0, .5);
  --glow-a: rgba(10, 92, 230, .38); --glow-b: rgba(255, 106, 19, .18);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
html, body { margin: 0 }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column }
h1, h2, h3 { letter-spacing: -0.03em; font-weight: 650; line-height: 1.15 }
p { margin: 0 }
select, input, textarea, button { font: inherit; color: inherit }
input[type=text], input[type=email], input[type=url], textarea { width: 100%; background: var(--surface); border: 1.5px solid var(--field); border-radius: 12px; padding: 10px 14px; min-height: 48px }
input:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--accent) }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0 }
a { color: var(--accent) }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1.5px solid var(--field); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap }
.btn svg { width: 20px; height: 20px; flex: none }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px }
.btn.big { min-height: 50px; padding: 0 24px; font-size: 16px }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.btn.cta { background: var(--cta); border-color: var(--cta); color: var(--cta-ink) }
.btn.cta:hover { background: var(--cta-h) }
.btn.quiet { background: var(--track); border-color: var(--track); color: var(--muted) }
.btn:disabled { opacity: .5; cursor: not-allowed }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center }
.icon-btn svg { width: 22px; height: 22px }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 550; color: var(--ink-2) }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center }
.row.end { justify-content: flex-end }
.hint { color: var(--muted); font-size: 14px }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2) }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent) }
.banner { background: var(--warn-bg); color: var(--warn-ink); border-radius: 14px; padding: 12px 16px; font-size: 14px }
.status, .step { display: inline-flex; align-items: center; font-size: 13px; font-weight: 650; padding: 4px 11px; border-radius: 999px; white-space: nowrap }
.status { background: var(--warn-bg); color: var(--warn-ink) }
.status.ok, .step.on { background: var(--ok-bg); color: var(--ok-ink) }
.step.off { background: var(--track); color: var(--muted) }
.step.note { background: var(--soft); color: var(--accent) }
.step.warn { background: var(--warn-bg); color: var(--warn-ink) }
.step.bad { background: var(--bad-bg); color: var(--bad) }
.steps { display: contents }

/* ---------- top bar: the three places ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line) }
.bar-in { max-width: 1240px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px 16px }
.brand { justify-self: start; border: 0; background: none; padding: 6px 0; font-weight: 700; font-size: 19px; letter-spacing: -0.035em; cursor: pointer; white-space: nowrap }
.brand span { color: var(--accent) }
.nav { display: flex; gap: 4px }
.nav button { position: relative; border: 0; background: none; padding: 0 14px; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; white-space: nowrap }
.nav button[aria-current=page] { color: var(--ink) }
.nav button[aria-current=page]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--accent) }
.bar-side { justify-self: end; display: flex; align-items: center; gap: 6px; min-width: 0 }
@media (max-width: 759px) {
  .bar-in { grid-template-columns: 1fr auto; padding-top: 6px; padding-bottom: 0; gap: 0 16px }
  .nav { grid-column: 1 / -1; grid-row: 2; gap: 0 }
  .nav button { flex: 1; padding: 0 2px; min-height: 40px; font-size: 13px; letter-spacing: -0.01em }
  .nav button[aria-current=page]::after { left: 8px; right: 8px; bottom: 0 }
}

main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)) }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px 28px }
.foot a { color: inherit }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 50; width: max-content; max-width: min(92vw, 520px); background: var(--sel); color: var(--sel-ink); padding: 12px 18px; border-radius: 14px; font-weight: 550; font-size: 15px; box-shadow: var(--shadow) }

/* ---------- conversation and document: taking turns on a phone, side by side on a computer ---------- */
.panes { display: flex; gap: 4px; background: var(--track); padding: 4px; border-radius: 999px; margin-bottom: 14px }
.panes button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; min-height: 40px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer }
.panes button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(14, 22, 38, .12) }
#pane-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-size: 13px; line-height: 22px }
@media (max-width: 959px) {
  .work[data-pane=talk] > .paper, .work[data-pane=doc] > .talk { display: none }
  .actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(14, 22, 38, .10) }
  .actions-note { width: 100%; font-size: 14px }
  .actions-btns { width: 100% }
  #primary-slot { flex: 1; display: flex } #primary { flex: 1 }
  .menu { bottom: calc(100% + 10px); left: 0 }
  body.has-actions main { padding-bottom: 150px }
  body.has-actions .toast { bottom: calc(132px + env(safe-area-inset-bottom, 0px)) }
}
@media (min-width: 960px) {
  .panes { display: none }
  .work { display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); grid-template-areas: "talk bar" "talk doc"; grid-template-rows: auto 1fr; gap: 14px 28px; align-items: start }
  .talk { grid-area: talk; position: sticky; top: 78px; max-height: calc(100dvh - 94px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 26px 24px 22px; box-shadow: var(--shadow) }
  .actions { grid-area: bar; position: sticky; top: 72px; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 10px 10px 10px 20px; box-shadow: var(--shadow) }
  .paper { grid-area: doc }
  .menu { top: calc(100% + 10px); right: 0 }
}
/* A short laptop screen, as when projecting: tighten the conversation so the sphere and the text box stay in view. */
@media (min-width: 960px) and (max-height: 800px) {
  .talk { gap: 12px; padding: 18px 22px 16px }
  .ask { min-height: 84px }
  .question { font-size: 24px }
  .orb { width: 108px; margin: 16px 0 14px }
}

/* ---------- the conversation: one question at a time ---------- */
.talk { display: flex; flex-direction: column; gap: 18px; min-width: 0 }
.talk > *, .ask > * { flex-shrink: 0 } /* on a short screen the panel scrolls; nothing gets squeezed */
.setup > summary { list-style: none; cursor: pointer; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 0; min-height: 36px }
.setup > summary::-webkit-details-marker { display: none }
.setup > summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) }
.setup[open] > summary { display: none }
.setup .seg { margin-bottom: 6px }
.seg { display: flex; gap: 2px; background: var(--track); padding: 4px; border-radius: 999px; width: 100% }
.seg button { flex: 1; border: 0; background: none; padding: 0 8px; min-height: 40px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--muted) }
.seg button[aria-pressed=true] { background: var(--sel); color: var(--sel-ink) }
.langs { display: flex; flex-wrap: wrap; gap: 0 8px; justify-content: center; align-items: center; font-size: 14px; color: var(--muted) }
.langs i { font-style: normal }
.langs select { border: 0; background: none; padding: 8px 0; min-height: 40px; font-weight: 650; color: var(--ink); text-decoration: underline; text-decoration-color: var(--field); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer }
.langs select option { color: #0E1626; background: #fff }

.ask { display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; text-align: center; min-height: 96px }
.you { color: var(--muted); font-size: 14px; max-width: 48ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.question { margin: 0; font-size: clamp(23px, 1rem + 1.5vw, 30px); line-height: 1.16; letter-spacing: -0.035em; text-wrap: balance; overflow-wrap: anywhere; transition: opacity .2s ease }
.question.waiting { opacity: .4 }
.notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 10px 14px; font-size: 14px }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center }
.chip { min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--soft); color: var(--ink); font-weight: 600; font-size: 16px; cursor: pointer }
.chip:hover { background: var(--accent); color: var(--accent-ink) }
.calc { background: var(--soft); border-radius: 12px; padding: 8px 14px; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums }
.sumline { color: var(--ink-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums }

/* ---------- the sphere: one of five real states ---------- */
.stage { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center }
.stage::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: -36px; height: 290px; pointer-events: none;
  background: radial-gradient(230px 160px at 50% 46%, var(--glow-a), transparent 70%), radial-gradient(150px 100px at 68% 24%, var(--glow-b), transparent 70%) }
.orb { --lv: 0; position: relative; display: grid; place-items: center; width: clamp(128px, 36vw, 164px); aspect-ratio: 1; margin: 22px 0 20px; border: 0; border-radius: 50%; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle at 34% 26%, #9CC2FF 0%, #3D82F2 34%, #0A5CE6 62%, #0846B3 100%);
  box-shadow: inset 0 -16px 30px rgba(3, 18, 56, .5), inset 0 12px 22px rgba(255, 255, 255, .28), 0 18px 44px rgba(10, 92, 230, .36);
  transform: scale(calc(1 + var(--lv) * .14)); transition: transform .1s linear }
.orb svg { grid-area: 1 / 1; width: 38%; height: 38%; display: none; filter: drop-shadow(0 2px 4px rgba(3, 18, 56, .35)) }
.orb[data-state=idle] [data-g=mic], .orb[data-state=rec] [data-g=stop], .orb[data-state=trans] [data-g=dots], .orb[data-state=think] [data-g=dots], .orb[data-state=speak] [data-g=wave] { display: block }
.orb::before, .orb::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--accent); opacity: .22; pointer-events: none }
.orb::after { inset: -26px; opacity: 0 }
.orb:focus-visible { outline-offset: 16px }
.orb:disabled { cursor: default }
.orb[data-off=true] { filter: grayscale(1); opacity: .5; cursor: not-allowed }
/* Recording: the sphere turns orange and both rings follow the measured volume (--lv is set from the microphone, 0 to 1). */
.orb[data-state=rec] { background: radial-gradient(circle at 34% 26%, #FFCBA6 0%, #FF9150 34%, #FF6A13 62%, #CF4C00 100%); box-shadow: inset 0 -16px 30px rgba(86, 28, 0, .45), inset 0 12px 22px rgba(255, 255, 255, .3), 0 18px 44px rgba(255, 106, 19, .4) }
.orb[data-state=rec]::before { border-color: var(--cta); opacity: calc(.3 + var(--lv) * .6); transform: scale(calc(1 + var(--lv) * .35)); transition: transform .1s linear, opacity .1s linear }
.orb[data-state=rec]::after { border-color: var(--cta); opacity: calc(var(--lv) * .4); transform: scale(calc(1 + var(--lv) * .5)); transition: transform .1s linear, opacity .1s linear }
/* Transcribing and preparing the reply: the wait has no measurable progress, so the ring only turns. */
.orb[data-state=trans]::before, .orb[data-state=think]::before { border-width: 3px; border-color: var(--accent) var(--accent) transparent transparent; opacity: 1; animation: orb-turn 1s linear infinite }
.orb[data-state=think]::before { border-color: var(--cta) transparent transparent transparent; animation-duration: 1.5s }
.orb[data-state=think] [data-g=dots] circle { animation: orb-dot 1.2s ease-in-out infinite }
.orb[data-state=think] [data-g=dots] circle:nth-child(2) { animation-delay: .2s }
.orb[data-state=think] [data-g=dots] circle:nth-child(3) { animation-delay: .4s }
/* Replying: rings travel outward while the device is really speaking. */
.orb[data-state=speak]::before, .orb[data-state=speak]::after { inset: -12px; opacity: 0; animation: orb-ring 1.6s ease-out infinite }
.orb[data-state=speak]::after { animation-delay: .8s }
@keyframes orb-turn { to { transform: rotate(360deg) } }
@keyframes orb-dot { 0%, 100% { opacity: .35 } 40% { opacity: 1 } }
@keyframes orb-ring { from { transform: scale(1); opacity: .55 } to { transform: scale(1.42); opacity: 0 } }
.orb-state { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; min-height: 27px }
.orb-hint { color: var(--muted); font-size: 14px; max-width: 42ch; text-wrap: balance }
.partial { color: var(--muted); font-style: italic; font-size: 14px; min-height: 0 }
@media (prefers-reduced-motion: reduce) {
  .orb, .orb::before, .orb::after, .orb svg circle { animation: none !important; transition: none !important }
  .orb, .orb[data-state=rec]::before, .orb[data-state=rec]::after { transform: none }
  .question { transition: none }
}

.compose { display: flex; flex-direction: column; gap: 8px }
.box { position: relative }
.box #say { display: block; min-height: 88px; resize: none; border-radius: 18px; padding-right: 60px }
.send-btn { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center }
.send-btn svg { width: 22px; height: 22px }
.send-btn:disabled { opacity: .45; cursor: not-allowed }
.compose-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between }
@media (min-width: 960px) { .box #say { min-height: 56px } }
.aloud { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); min-height: 44px }
.aloud input { width: 20px; height: 20px; accent-color: var(--accent) }

.fold { border-top: 1px solid var(--line); padding-top: 12px }
.fold > summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 4px 0 }
.fold > .grid2 { margin-top: 12px }
#need-box[data-done=true] > summary { color: var(--ok-ink); list-style: none; cursor: default; pointer-events: none }
#need-box[data-done=true] > summary::-webkit-details-marker { display: none }
.need { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 10px 0 0; padding: 0 }
.need li { background: var(--warn-bg); color: var(--warn-ink); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600 }
#log { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-height: 320px; overflow-y: auto }
.msg { padding: 10px 14px; border-radius: 16px; max-width: 92%; overflow-wrap: anywhere; font-size: 15px }
.msg.agent { background: var(--soft); align-self: flex-start; border-bottom-left-radius: 6px }
.msg.you { background: var(--sel); color: var(--sel-ink); align-self: flex-end; border-bottom-right-radius: 6px }
.msg.note { color: var(--muted); font-size: 13px; padding: 0; align-self: center; text-align: center }

/* ---------- one main button for the moment, the rest under "More" ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px }
.actions-note { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 600; font-size: 15px }
.actions-note::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none }
.actions-note[data-tone=ok]::before { background: var(--ok) }
.actions-note[data-tone=warn]::before { background: var(--cta) }
.actions-note[data-tone=note]::before { background: var(--accent) }
.actions-note[data-tone=bad]::before { background: var(--bad) }
.actions-btns { display: flex; gap: 8px; align-items: center; margin-left: auto }
.more-wrap { position: relative }
.menu { position: absolute; z-index: 40; min-width: 264px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px; box-shadow: var(--shadow) }
.menu > * { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border: 0; background: none; border-radius: 12px; font-weight: 550; font-size: 15px; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer }
.menu > *:hover, .menu > *:focus-visible { background: var(--track) }

/* ---------- the document side ---------- */
.paper { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.doc-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center }
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.flow h3 { font-size: 19px; margin: 0 }
.flow .doc { margin-top: 10px }
.next { display: grid; gap: 10px }
.next > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.next b { font-weight: 650 }
.next span { color: var(--ink-2); font-size: 14px }
.next summary { cursor: pointer; font-weight: 600; font-size: 14px }
.bizbox { border-top: 0; padding-top: 0 }

/* ---------- My documents and Settings ---------- */
.page { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px }
.page h1 { font-size: 30px; margin: 10px 0 2px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px }
.card h2 { font-size: 19px; margin: 0 }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 20px; margin: 0 }
.facts dt { color: var(--muted) }
.facts dd { margin: 0; overflow-wrap: anywhere }
.doclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.doclist a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none }
.dl-main { display: flex; flex-direction: column; min-width: 0 }
.dl-main b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.dl-main small { color: var(--muted); font-size: 14px }

/* ---------- windows: sign in, finish the account, choose a plan ---------- */
dialog { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); padding: 0; width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow) }
dialog::backdrop { background: rgba(7, 11, 22, .6) }
#auth { width: min(440px, calc(100vw - 32px)) }
dialog form { padding: 28px; display: flex; flex-direction: column; gap: 16px }
dialog h2 { font-size: 24px; margin: 0 0 6px; text-wrap: balance }
dialog h3 { font-size: 16px; margin: 0 0 6px }
#d-terms { display: flex; flex-direction: column; gap: 10px }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.plan { border: 1px solid var(--line); border-radius: 18px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 6px }
.plan input { accent-color: var(--accent) }
.plan:has(input:checked) { border: 2px solid var(--ink); padding: 17px }
.plan:has(input:disabled) { opacity: .5; cursor: not-allowed }
.plan .pn { font-size: 18px; font-weight: 620; letter-spacing: -0.02em }
.plan .pp { font-size: 36px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums }
.plan .pp small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0 }
.plan ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2) }
.terms { max-height: 170px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; background: var(--bg) }
.terms p + p { margin-top: 8px }
.form-err { color: var(--bad); font-size: 14px; font-weight: 550; min-height: 1.2em }
@media (max-width: 480px) { .plans { grid-template-columns: minmax(0, 1fr) } dialog form { padding: 20px } }

/* someone other than the named customer signed: said plainly to the owner */
.flow p.warn, #flow p.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 10px 12px; font-size: 14px }
