/* Hush in the browser. Same paper, ink and hairlines as the desktop app (ui/app.css)
   and the landing page (site/styles.css). Coral is kept for the primary action and the period. */
:root {
  --bg: #F2EEE6; --surface: #FAF8F3; --surface-2: #E9E3D8;
  --ink: #141312; --ink-2: #56514A; --ink-3: #6B655C; --line: #D9D2C5; --line-2: #C9C1B2;
  --coral: #FF6B57; --coral-deep: #E8523E; --accent: #FF6B57;
  --ok: #2E8F62; --err: #C2412F;
  --night: #151413; --night-ink: #EDE8DF; --night-dim: rgba(237,232,223,.62);
  --radius-sm: 6px; --radius: 14px; --radius-pill: 999px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 16px;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--sans); letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: rgba(255,107,87,.18); }
.mono { font-family: var(--mono); }
.period { color: var(--coral); }
.eyebrow { font: 500 11px/1.4 var(--mono); color: var(--ink-3); letter-spacing: .07em; text-transform: uppercase; }
kbd {
  font: 500 11.5px/1 var(--mono); color: inherit;
  display: inline-flex; align-items: center; padding: 3px 7px; margin: 0 2px;
  border: 1px solid currentColor; border-bottom-width: 2px; border-radius: var(--radius-sm);
  opacity: .8; vertical-align: 1px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* Top bar */
.bar { border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font: 400 28px/1 var(--serif); letter-spacing: -0.02em; text-decoration: none; }
.wordmark img { width: 24px; height: 24px; }
.wordmark .name { white-space: nowrap; }
.wordmark .tag { font: 500 10.5px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: var(--radius-pill); padding: 4px 7px; margin-left: 6px; align-self: center; }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; font: 400 12.5px/1.3 var(--mono); color: var(--ink-2); }
.who #who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 38px; padding: 0 17px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease), transform .14s var(--ease);
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn.lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn.small { height: 30px; padding: 0 13px; font-size: 12.5px; border-radius: 8px; }
.btn.ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.ink:hover { background: #2a2826; }
.btn.coral { background: var(--coral); color: var(--ink); border-color: var(--coral); }
.btn.coral:hover { background: var(--coral-deep); border-color: var(--coral-deep); }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn .g { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin-left: -8px; }
.btn .g svg { width: 14px; height: 14px; stroke: none; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { color: var(--ink); }

.msg { min-height: 1.4em; font-size: 14px; color: var(--err); }
.msg:empty { min-height: 0; }

/* Signed out */
.hero { padding: 72px 0 56px; }
/* A film still beside the hero on wide screens, captioned like the landing's figures */
.plate { display: none; }
@media (min-width: 940px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 64px; }
  .hero > :not(.plate) { grid-column: 1; }
  .plate { display: block; grid-column: 2; grid-row: 1 / span 6; align-self: end; margin: 0; }
  .plate img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; filter: saturate(.82) sepia(.22) contrast(1.12) brightness(.9); }
  .plate figcaption { display: flex; gap: 10px; align-items: baseline; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
  .plate .fig-n { flex: none; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
  .plate .line { font: 400 19px/1.25 var(--serif); letter-spacing: -0.005em; }
}
.hero h1 { font: 400 clamp(54px, 10vw, 112px)/.94 var(--serif); letter-spacing: -0.025em; margin: 14px 0 22px; }
.hero .lede { font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 31em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 32px 0 18px; }
.hero .fine { font-size: 13.5px; color: var(--ink-2); max-width: 40em; }
.hero .msg { margin-top: 12px; }
.steps { list-style: none; margin: 0 0 64px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.steps li { padding: 22px 24px 28px 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps .n { display: block; margin-bottom: 10px; }
.steps p { font-size: 15px; color: var(--ink-2); max-width: 22em; }
.steps strong { display: block; font: 400 25px/1.15 var(--serif); color: var(--ink); margin-bottom: 6px; font-weight: 400; }

/* Signed in */
.app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 28px; padding-bottom: 64px; }
@media (min-width: 940px) { .app { grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; padding-top: 32px; } }

.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 56vh; min-height: 220px;
  background: var(--night); border-radius: var(--radius); overflow: hidden;
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity .3s var(--ease); }
.cam-off { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; color: var(--night-dim); font-size: 14.5px; }
.cam-off img { width: 44px; height: 44px; opacity: .9; }
.cam-off .btn { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.rec { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-pill); background: rgba(21,20,19,.72); color: var(--night-ink); font: 500 11.5px/1 var(--mono); letter-spacing: .05em; }
.rec::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--night-ink); }
@media (prefers-reduced-motion: no-preference) { .rec::before { animation: blink 1s steps(2, start) infinite; } }
@keyframes blink { to { visibility: hidden; } }

.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }
.checks span { display: inline-flex; align-items: center; gap: 6px; }
.checks span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.checks .ok { color: var(--ink); }
.checks .ok::before { background: var(--ok); border-color: var(--ok); }

.hold {
  margin-top: 18px; width: 100%; height: 68px; border-radius: var(--radius-pill);
  border: 1px solid var(--coral); background: var(--coral); color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 22px;
  font: 500 18px/1 var(--sans); letter-spacing: -0.01em;
  user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .14s var(--ease);
}
.hold:hover:not(:disabled) { background: var(--coral-deep); border-color: var(--coral-deep); }
.hold:active:not(:disabled) { transform: scale(.995); }
.hold .key { font: 400 13px/1 var(--mono); opacity: .75; }
.hold.on, .hold.on:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hold.busy { background: transparent; border-color: var(--line-2); color: var(--ink-2); cursor: progress; }
.hold:disabled:not(.busy) { background: transparent; border-color: var(--line-2); color: var(--ink-3); cursor: default; }

.subtitle { margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0 20px; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.sub-text { margin-top: 10px; font: 400 clamp(26px, 3.4vw, 36px)/1.18 var(--serif); letter-spacing: -0.01em; min-height: 1.18em; overflow-wrap: anywhere; }
.sub-text .placeholder { color: var(--ink-3); }
.sub-text.typing::after { content: ''; display: inline-block; width: 2px; height: .9em; margin-left: 3px; background: var(--ink); vertical-align: -0.08em; }
.sub-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.sub-alts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.sub-alts:empty { display: none; }
.chip { border: 1px solid var(--line-2); background: transparent; border-radius: 12px; padding: 5px 11px; font-size: 13px; line-height: 1.4; color: var(--ink-2); text-align: left; max-width: 100%; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.main .msg { margin-top: 12px; }

/* Side panels */
.side { display: flex; flex-direction: column; }
.panel { border-top: 1px solid var(--line); padding: 18px 0 24px; }
.panel:first-child { border-top: 0; padding-top: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.panel h2 { font: 400 27px/1.1 var(--serif); letter-spacing: -0.015em; }
.panel p.help { font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.count { font: 400 11.5px/1 var(--mono); color: var(--ink-3); }

.history { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.history li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history .t { font: 400 11.5px/1.9 var(--mono); color: var(--ink-3); white-space: nowrap; }
.history .x { font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.history .x.none { color: var(--ink-3); }
.history .cp { border: 0; background: none; padding: 2px 0 0; font: 400 11.5px/1.6 var(--mono); color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.history .cp:hover { color: var(--ink); }
.empty { font-size: 14px; color: var(--ink-3); padding: 6px 0; }

.field { display: block; width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; font-size: 14px; line-height: 1.45; }
.field:focus { outline: none; border-color: var(--ink); }
textarea.field { resize: vertical; min-height: 96px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.row .grow { flex: 1 1 140px; min-width: 0; }
.saved { font: 400 11.5px/1.3 var(--mono); color: var(--ink-3); }
details.prompt { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
details.prompt summary { cursor: pointer; padding: 9px 12px; font: 500 12px/1.4 var(--mono); color: var(--ink-2); list-style: none; display: flex; justify-content: space-between; gap: 8px; }
details.prompt summary::-webkit-details-marker { display: none; }
details.prompt summary::after { content: '+'; color: var(--ink-3); }
details.prompt[open] summary::after { content: '\2212'; }
details.prompt pre { margin: 0; padding: 0 12px 12px; max-height: 180px; overflow: auto; white-space: pre-wrap; font: 400 12px/1.5 var(--mono); color: var(--ink-2); }

.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 18px; padding-bottom: 28px; font: 400 12px/1.5 var(--mono); color: var(--ink-3); }

@media (max-width: 719px) {
  .hero { padding: 44px 0 36px; }
  .hero .lede { font-size: 17px; }
  .hero .actions .btn { width: 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li { padding: 18px 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .app { padding-top: 16px; gap: 28px; }
  .stage { aspect-ratio: 4 / 3; border-radius: 12px; }
  .hold { height: 64px; font-size: 17px; }
  .hold .key { display: none; }
  .who .mail-full { display: none; }
}
