/* ==========================================================================
   Zoom Pro app surface — mint/dark design language (matches the landing page)
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0c0e1a;
  --bg-deep: #0a0c16;
  --card: #141828;
  --text: #edeff9;
  --text-soft: #d5d8e6;
  --muted: #b8bccf;
  --muted-2: #9aa0b8;
  --muted-3: #666c86;
  --faint: #565b72;
  --ghost: #3a3f58;
  --line: rgba(237, 239, 249, 0.07);
  --line-strong: rgba(237, 239, 249, 0.16);
  --field-line: rgba(237, 239, 249, 0.18);
  --accent: #53e6b4;
  --accent-hover: #7ff0cb;
  --accent-ink: #07251b;
  --accent-dim: rgba(83, 230, 180, 0.12);
  --warn: #ffb061;
  --danger: #ff8ca2;
  --pad-x: 48px;
  --dot-bg: rgba(237, 239, 249, 0.18);
  --dot-line: rgba(237, 239, 249, 0.25);
  --track-bg: rgba(237, 239, 249, 0.1);
  --shadow-strong: rgba(0, 0, 0, 0.45);
  --halo: rgba(83, 230, 180, 0.06);
  --wash: rgba(83, 230, 180, 0.05);
  --nav-bg: rgba(12, 14, 26, 0.74);
  --nav-bg-solid: rgba(10, 12, 22, 0.92);
  --nav-border: rgba(237, 239, 249, 0.13);
  --nav-highlight: rgba(255, 255, 255, 0.075);
  --nav-shadow: rgba(0, 0, 0, 0.32);
  --scroll-track: #090b14;
  --scroll-thumb: #2f806d;
  --scroll-thumb-hover: #53e6b4;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
html::-webkit-scrollbar { width: 11px; }
html::-webkit-scrollbar-track {
  background: linear-gradient(180deg, var(--bg-deep), var(--scroll-track) 45%, var(--bg-deep));
}
html::-webkit-scrollbar-thumb {
  min-height: 72px;
  border: 3px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--scroll-thumb), color-mix(in srgb, var(--scroll-thumb) 65%, var(--bg-deep)))
    padding-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scroll-thumb-hover), var(--scroll-thumb)) padding-box;
}
html::-webkit-scrollbar-corner { background: var(--scroll-track); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
input, button, select, textarea { font-family: inherit; }
h1, h2, h3 { margin: 0; font-weight: 750; font-stretch: 110%; letter-spacing: -0.02em; }
p { margin: 0; }

::selection { background: var(--accent-dim); color: var(--text); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 50;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 0 0 9px 9px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: var(--accent-ink); }

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes zpIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes zpPassIn {
  0% { opacity: 0; transform: translateY(28px) scale(0.965); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes zpGlow {
  0% { box-shadow: 0 0 0 0 rgba(83, 230, 180, 0.45); }
  100% { box-shadow: 0 0 0 26px rgba(83, 230, 180, 0); }
}
@keyframes zpPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes zpSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(340%); }
}
@keyframes zpSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Page frame
   ========================================================================== */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(900px 520px at 50% 34%, var(--halo), transparent 65%);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: calc(100% - clamp(24px, 3vw, 56px));
  max-width: 1680px;
  margin: 14px auto 0;
  padding: 0 clamp(16px, 2vw, 30px);
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--nav-border);
  border-radius: 17px;
  background:
    linear-gradient(110deg, var(--nav-highlight), transparent 24%, transparent 72%, var(--wash)),
    var(--nav-bg);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  backdrop-filter: blur(24px) saturate(165%);
  box-shadow:
    0 18px 48px -24px var(--nav-shadow),
    inset 0 1px 0 var(--nav-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  transition: height 0.36s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease;
}
.topbar.is-scrolled {
  height: 58px;
  background: var(--nav-bg-solid);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--nav-border));
  box-shadow:
    0 24px 64px -26px var(--nav-shadow),
    0 8px 24px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 var(--nav-highlight);
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 16%, rgba(255, 255, 255, 0.09) 42%, transparent 64%);
  background-size: 220% 100%;
  background-position: 130% 0;
  opacity: 0.58;
  transition: background-position 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
}
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1.5px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent), rgba(83, 230, 180, 0.28));
  transform: scaleX(var(--app-scroll-progress, 0));
  transform-origin: left center;
  opacity: 0.86;
}
@media (hover: hover) and (pointer: fine) {
  .topbar:hover::before { background-position: -30% 0; opacity: 0.76; }
}

.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: var(--text); justify-self: start; }
.brand:hover { color: var(--text); }
.brand-lockup { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 14px rgba(83, 230, 180, 0.2);
}
.brand-name { font-weight: 780; font-stretch: 114%; font-size: 15px; letter-spacing: 0.015em; white-space: nowrap; }
.brand-by {
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-3);
}

.service {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: 999px;
  background: var(--wash);
}
.service::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: zpPulse 2.2s ease-in-out infinite;
}
.service.is-unknown { color: var(--muted-2); }
.service.is-down { color: var(--warn); }

.topbar-status { position: relative; z-index: 1; display: flex; align-items: center; justify-self: end; gap: 12px; min-width: 0; }

.who {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: zpFade 0.3s ease both;
}
@keyframes zpFade { from { opacity: 0; } to { opacity: 1; } }

.topbar-lock {
  cursor: pointer;
  background: var(--wash);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted-2);
  padding: 7px 11px;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.topbar-lock:hover { color: var(--text); border-color: rgba(83, 230, 180, 0.34); background: var(--accent-dim); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1;
  padding: 16px 28px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  font-weight: 600;
}
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn--secondary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--ghost {
  background: none;
  border: none;
  color: var(--muted-3);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
}
.btn--ghost:hover { color: var(--text); }
.btn--block { width: 100%; }

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: zpSpin 0.7s linear infinite;
}

/* small utility buttons (copy chips etc.) */
.u-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-2);
  background: transparent;
  border: 1px solid var(--field-line);
  padding: 7px 14px;
  border-radius: 8px;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.u-btn:hover { border-color: var(--accent); color: var(--accent); }
.u-btn.is-copied { border-color: rgba(83, 230, 180, 0.6); color: var(--accent); }
.u-btn.is-failed { border-color: rgba(255, 140, 162, 0.6); color: var(--danger); }
.u-btn-open { text-decoration: none; }
.u-btn-lg { font-size: 15px; padding: 17px 26px; border-radius: 12px; }

/* ==========================================================================
   Feedback
   ========================================================================== */

.feedback {
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  animation: zpIn 0.3s ease both;
}
.feedback--error { color: var(--warn); }

/* ==========================================================================
   State routing
   ========================================================================== */

body[data-state='locked'] .view-app,
body:not([data-state='locked']) .view-locked,
body:not([data-state='creating']) .creating,
body:not([data-state='created']) .meeting {
  display: none;
}

body[data-state='creating'] .workspace-head,
body[data-state='creating'] .history,
body[data-state='creating'] .page-note,
body[data-state='created'] .action-hint {
  display: none;
}

/* Created: the fresh-meeting card leads; "Create another" becomes a quiet
   action underneath it (prototype layout — no headline above the card). */
body[data-state='created'] .workspace { display: flex; flex-direction: column; }
body[data-state='created'] .workspace-head { display: contents; }
body[data-state='created'] .workspace-copy { display: none; }
body[data-state='created'] .stub-panel { display: none; }
body[data-state='created'] .meeting { order: 1; }
body[data-state='created'] .workspace-actions { order: 2; margin-top: 26px; }
body[data-state='created'] .workspace > .feedback { order: 3; }
body[data-state='created'] .workspace-actions .btn--secondary {
  width: auto;
  align-self: center;
  margin: 0 auto;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-2);
  padding: 8px 12px;
}
body[data-state='created'] .workspace-actions .btn--secondary:hover:not(:disabled) {
  color: var(--accent);
  transform: none;
}
body[data-state='created'] .workspace-actions .btn--secondary::before { content: "+ "; }

/* ==========================================================================
   State 1 — locked
   ========================================================================== */

.view-locked {
  width: 560px;
  max-width: 100%;
  text-align: center;
}

.eyebrow-center {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  animation: zpIn 0.5s ease both;
}

.view-locked .title {
  font-size: clamp(30px, 5vw, 38px);
  margin-bottom: 10px;
  animation: zpIn 0.5s 0.06s ease both;
}

.lede {
  font-size: 15px;
  color: var(--muted-2);
  margin-bottom: 40px;
  animation: zpIn 0.5s 0.12s ease both;
}

.unlock-form { animation: zpIn 0.5s 0.18s ease both; }

.unlock-row { display: flex; gap: 12px; align-items: stretch; }

.input-shell {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--field-line);
  border-radius: 12px;
  padding: 0 8px 0 20px;
  transition: border-color 0.16s ease;
}
.input-shell:focus-within { border-color: var(--accent); }

.input-shell input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--text);
  padding: 19px 0;
}
.input-shell input::placeholder { color: var(--muted-3); letter-spacing: 0.12em; }

.reveal-btn {
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 10px 12px;
  transition: color 0.16s ease;
}
.reveal-btn:hover { color: var(--accent); }

.unlock-btn { padding: 0 32px; font-size: 16px; }

.unlock-form .feedback { margin-top: 14px; }

.locked-footnote {
  margin-top: 36px;
  font-size: 14px;
  color: var(--muted-3);
  animation: zpIn 0.5s 0.24s ease both;
}

/* ==========================================================================
   States 2–4 — workspace
   ========================================================================== */

.view-app {
  width: 680px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.workspace { text-align: center; }

.workspace-head { animation: zpIn 0.4s ease both; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow.is-neutral { color: var(--muted-2); }
.eyebrow.is-error { color: var(--warn); }
.eyebrow.is-welcome {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.workspace-copy .title {
  font-size: clamp(30px, 5vw, 40px);
  margin-bottom: 14px;
  text-wrap: balance;
}

.meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-3);
  line-height: 1.8;
}

.workspace-actions { margin-top: 34px; }

.workspace-actions .btn {
  width: 100%;
  font-size: 20px;
  font-weight: 750;
  padding: 25px;
  border-radius: 14px;
}
.workspace-actions .btn--primary { box-shadow: 0 16px 44px rgba(83, 230, 180, 0.22); }
.workspace-actions .btn--primary:hover:not(:disabled) { transform: translateY(-1px); }
.workspace-actions .btn--secondary { font-size: 16px; padding: 18px; box-shadow: none; }

.action-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-3);
  margin-top: 16px;
}

.action-reason {
  font-size: 13.5px;
  color: var(--muted-2);
  margin-top: 16px;
}

/* Created view: the availability note becomes a small mono strip line. */
.action-reason.is-strip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-3);
}

/* Cooldown / quota-out stand-ins for the big create button (prototype). */
.stub-panel {
  width: 100%;
  box-sizing: border-box;
  font-size: 19px;
  font-weight: 700;
  color: var(--muted-2);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 14px;
  animation: zpIn 0.3s ease both;
}
.stub-panel.is-dim { color: var(--muted-3); }
.stub-mono { font-family: var(--mono); color: var(--accent); }

.workspace > .feedback { margin-top: 20px; }

/* ==========================================================================
   State 3 — creating
   ========================================================================== */

.creating {
  animation: zpIn 0.4s ease both;
}

.creating-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
  animation: zpPulse 1.6s ease-in-out infinite;
}

/* Queue visual — one dot per request, yours is the large accent dot. */
.queue-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: -4px 0 30px;
  animation: zpIn 0.3s ease both;
}
.queue-dots { display: inline-flex; align-items: center; gap: 14px; }
.q-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot-bg);
  border: 1px solid var(--dot-line);
  transition: background 0.3s ease, transform 0.3s ease;
}
.q-dot.is-you {
  width: 13px;
  height: 13px;
  background: var(--accent);
  border-color: var(--accent);
  animation: zpPulse 1.6s ease-in-out infinite;
}
.q-arrow { color: var(--ghost); font-family: var(--mono); font-size: 11px; }
.queue-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-left: 6px;
}

.creating-elapsed {
  font-family: var(--mono);
  font-size: clamp(64px, 14vw, 96px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.creating-typical {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-3);
  margin-bottom: 36px;
}

.track {
  height: 4px;
  border-radius: 2px;
  background: var(--track-bg);
  overflow: hidden;
  position: relative;
}
.track::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 34%;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: zpSweep 1.4s linear infinite;
}

.creating-subtitle {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-top: 36px;
}

.creating-stay {
  font-size: 13.5px;
  color: var(--muted-3);
  margin-top: 8px;
}

.request-id {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ghost);
}

/* ==========================================================================
   State 4 — the created meeting
   ========================================================================== */

.meeting {
  text-align: left;
  margin-top: 8px;
  background: var(--card);
  border: 1px solid rgba(83, 230, 180, 0.35);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 70px var(--shadow-strong);
  animation: zpPassIn 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both,
    zpGlow 1s 0.15s ease-out both;
}

.meeting-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 32px;
  background: rgba(83, 230, 180, 0.09);
  border-bottom: 1px dashed rgba(83, 230, 180, 0.35);
}

.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.tag-new { color: var(--accent); }
.tag-past { color: var(--muted-3); font-weight: 500; font-size: 10px; }

.meeting-top .meta { color: var(--muted-2); letter-spacing: 0.04em; }

.meeting-body { padding: 20px 32px 32px; }

.creds { margin: 0; display: flex; flex-direction: column; }

.cred {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.cred dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-3);
}
.cred dd {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cred-value {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cred-value.is-empty { color: var(--muted-3); }

.meeting-cta { display: flex; gap: 12px; margin-top: 28px; }
.meeting-cta .btn {
  flex: 1;
  font-size: 17px;
  font-weight: 750;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(83, 230, 180, 0.2);
}

/* ==========================================================================
   State 5 — history
   ========================================================================== */

.history { margin-top: 44px; animation: zpIn 0.5s 0.2s ease both; }

.history-toggle {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  padding: 18px 4px 6px;
  text-align: left;
  color: inherit;
}
.history-toggle:disabled { cursor: default; }

.history-labels { display: flex; flex-direction: column; gap: 5px; }

.history-heading {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-3);
}

.history-sub { font-size: 12px; color: var(--faint); }

.history-affordance {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-2);
  transition: color 0.16s ease;
}
.history-toggle:hover:not(:disabled) .history-affordance { color: var(--accent); }

.history-panel { padding: 8px 0 0; }
.history-panel.is-opening { animation: zpIn 0.25s ease both; }

.history-item { border-bottom: 1px solid var(--line); padding: 15px 4px; }
.history-item:last-child { border-bottom: none; }

.history-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.history-item-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-3);
}

.history-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
  margin-bottom: 12px;
}
.history-field { display: flex; flex-direction: column; gap: 4px; }
.history-field > span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.history-field > b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history-actions .u-btn { font-size: 12px; padding: 6px 13px; border-radius: 7px; }

/* ==========================================================================
   Footers
   ========================================================================== */

.page-note {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--faint);
}

/* Persistent allowance strip above the trademark footer (prototype). */
.quota-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 52px;
  padding: 22px var(--pad-x);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  animation: zpIn 0.4s ease both;
}
.quota-strip b { font-weight: 700; color: var(--text); }
.quota-strip b.is-ok { color: var(--accent); }
.quota-strip b.is-warn { color: var(--warn); }

body[data-state='locked'] .quota-strip { display: none; }

.site-foot {
  padding: 20px var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 11.5px;
  color: var(--faint);
  border-top: 1px solid var(--line);
}
.site-foot-brand {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-foot-brand a { color: var(--faint); }
.site-foot-brand a:hover { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 720px) {
  :root { --pad-x: 20px; }

  main { padding: 36px 20px; }

  .unlock-row { flex-direction: column; }
  .unlock-btn { padding: 17px; }

  .meeting-top,
  .meeting-body { padding-left: 20px; padding-right: 20px; }

  .cred { grid-template-columns: 1fr; gap: 6px; padding: 12px 0; }

  .meeting-cta { flex-direction: column; }

  .topbar,
  .topbar.is-scrolled {
    top: 8px;
    display: flex;
    width: calc(100% - 16px);
    height: 58px;
    margin-top: 8px;
    padding: 0 10px 0 14px;
    gap: 10px;
    border-radius: 15px;
  }
  .brand-by { display: none; }
  .brand { flex: none; }
  .brand-name { font-size: 14px; }
  .topbar-controls { margin-inline-start: auto; }
  .theme-toggle-track { width: 52px; height: 28px; padding-inline: 6px; }
  .theme-toggle-thumb { width: 20px; height: 20px; }
  :root[data-theme="light"] .theme-toggle-thumb { transform: translate3d(24px, -50%, 0); }
  .topbar-status { flex: none; gap: 7px; }
  .service { max-width: 104px; overflow: hidden; text-overflow: ellipsis; font-size: 8.5px; letter-spacing: 0.055em; padding: 6px 7px; }
  .who { display: none; }
  .topbar-lock { font-size: 11px; padding: 6px 8px; }

  .quota-strip { gap: 10px 26px; }

  .site-foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Light theme — same identity, inverted surfaces. Tokens only; every rule
   above already reads from them.
   ========================================================================== */

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f9;
  --bg-deep: #e6e9f0;
  --card: #ffffff;
  --text: #0f1220;
  --text-soft: #232838;
  --muted: #464c60;
  --muted-2: #5d6479;
  --muted-3: #878ea3;
  --faint: #9aa0b3;
  --ghost: #c3c8d4;
  --line: rgba(15, 18, 32, 0.09);
  --line-strong: rgba(15, 18, 32, 0.17);
  --field-line: rgba(15, 18, 32, 0.2);
  --accent: #0aa376;
  --accent-hover: #078b64;
  --accent-ink: #ffffff;
  --accent-dim: rgba(10, 163, 118, 0.12);
  --warn: #b56a12;
  --danger: #c62a4c;
  --dot-bg: rgba(15, 18, 32, 0.12);
  --dot-line: rgba(15, 18, 32, 0.18);
  --track-bg: rgba(15, 18, 32, 0.09);
  --shadow-strong: rgba(10, 14, 30, 0.16);
  --halo: rgba(10, 163, 118, 0.07);
  --wash: rgba(10, 163, 118, 0.06);
  --nav-bg: rgba(245, 246, 249, 0.72);
  --nav-bg-solid: rgba(245, 246, 249, 0.94);
  --nav-border: rgba(15, 18, 32, 0.13);
  --nav-highlight: rgba(255, 255, 255, 0.72);
  --nav-shadow: rgba(42, 50, 72, 0.16);
  --scroll-track: #e8ebf1;
  --scroll-thumb: #318c72;
  --scroll-thumb-hover: #0aa376;
}

body { transition: background 0.5s ease, color 0.5s ease; }
html.theme-shift *,
html.theme-shift *::before,
html.theme-shift *::after {
  transition-duration: 0.45s !important;
  transition-property: background-color, background-image, border-color, color, fill, stroke, box-shadow, opacity !important;
  transition-timing-function: ease !important;
}

/* ==========================================================================
   Topbar controls — theme
   ========================================================================== */

.topbar-controls {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
}

.theme-toggle {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  color: var(--muted-2);
  transition: color 0.2s ease;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 58px;
  height: 30px;
  padding: 0 7px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: var(--wash);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.theme-toggle:hover .theme-toggle-track { border-color: rgba(83, 230, 180, 0.4); }
.theme-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 10px var(--accent-dim);
  transform: translate3d(0, -50%, 0);
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}
:root[data-theme="light"] .theme-toggle-thumb { transform: translate3d(28px, -50%, 0); }
.theme-ico {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  transition: opacity 0.3s ease;
}
.theme-ico-moon { opacity: 1; color: var(--accent-ink); }
.theme-ico-sun { opacity: 0.5; }
:root[data-theme="light"] .theme-ico-moon { opacity: 0.5; color: inherit; }
:root[data-theme="light"] .theme-ico-sun { opacity: 1; color: var(--accent-ink); }

@media (max-width: 720px) {
  .theme-toggle-track { width: 52px; height: 28px; padding-inline: 6px; }
  .theme-toggle-thumb { width: 20px; height: 20px; }
  :root[data-theme="light"] .theme-toggle-thumb { transform: translate3d(24px, -50%, 0); }
}
