/* Cerium site. One palette from the element: polished cerium metal (warm silver), ceria (its pale yellow oxide),
   and the orange of the sparks it throws. */
:root {
  --bg: #0B0A09;
  --text: #F3EFE7;
  --muted: #A39C90;
  --dim: #7A7367;
  --faint: #58524A;
  --line: rgba(255, 244, 224, 0.08);
  --line-strong: rgba(255, 244, 224, 0.14);
  --raised: #181613;
  --field: #0F0E0C;
  --border: #433D36;
  --accent: #E9D29A;
  --accent-ink: #1E1708;
  --ok: #5BC48E;
  --warn: #E9B169;
  --bad: #F0A296;
  --glass: rgba(15, 13, 11, 0.55);
  --glass-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.06), 0 0 0 1px rgba(255, 244, 224, 0.08), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  --radius: 12px;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: rgba(233, 210, 154, 0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* page backdrop: the shader canvas, then a faint grain, then the content */
.backdrop { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; z-index: 0; pointer-events: none; display: block; }
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; }

/* glass surface */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: #F1DDAE; }
.btn-outline { border-color: var(--line-strong); background: rgba(11, 10, 9, 0.35); }
.btn-outline:hover { border-color: rgba(255, 244, 224, 0.26); background: rgba(255, 244, 224, 0.04); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(255, 244, 224, 0.05); }
.btn-danger { border-color: #5A2B28; background: rgba(90, 43, 40, 0.35); color: #FFB4A8; }
.btn-danger:hover { background: rgba(90, 43, 40, 0.55); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn svg { flex-shrink: 0; }

/* fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .label { font-size: 14px; font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--dim); }
.input {
  height: 42px; width: 100%; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--field); color: var(--text); font-size: 14.5px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #6E675C; }
.input:focus { border-color: #8A8173; box-shadow: 0 0 0 3px rgba(233, 210, 154, 0.12); }
.input.mono { font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.02em; }

/* messages */
.note { padding: 10px 14px; border-radius: 9px; font-size: 14px; }
.note-bad { background: rgba(90, 43, 40, 0.35); color: #FFC9BE; box-shadow: inset 0 0 0 1px rgba(240, 162, 150, 0.2); }
.note-ok { background: rgba(91, 196, 142, 0.1); color: #A8E6C3; box-shadow: inset 0 0 0 1px rgba(91, 196, 142, 0.22); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 10, 9, 0.55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 244, 224, 0.06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.brand-tile { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.nav { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.header-left { display: flex; align-items: center; gap: 36px; }
.header-right { display: flex; align-items: center; gap: 8px; }

/* sections */
.section { padding-top: 120px; }
.section-head { max-width: 680px; }
.section-head.center { margin: 0 auto; text-align: center; }
.h2 { margin: 0; font-size: 36px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.lede { margin: 10px 0 0; font-size: 16px; color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* hero: the headline on the left, what it means and what to do on the right, then the viewer */
.hero { padding: 64px 0 0; }
.hero-grid { width: 100%; max-width: 1136px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.hero h1 { margin: 0; font-size: clamp(40px, 4.1vw, 68px); line-height: 0.98; font-weight: 600; letter-spacing: -0.042em; text-wrap: balance; }
.hero-side { padding-bottom: 6px; }
.hero-lede { margin: 0; max-width: 44ch; font-size: 17px; line-height: 1.55; color: #C9C2B6; text-wrap: pretty; }
.hero .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-req { margin: 16px 0 0; font-size: 13px; color: var(--dim); }

/* the viewer: one wide screen showing the clips, with the model's input box drawn to scale */
/* the clip fits the height of the screen, never narrower than 560 px and never wider than 1136 px */
.viewer { width: min(100%, 1136px, max(560px, calc((100svh - 410px) * 16 / 9))); margin: 44px auto 0; }
.viewer-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0D0C0A;
  box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.06), 0 0 0 1px rgba(255, 244, 224, 0.09), 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.viewer-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.6s ease; }
.viewer-slide.is-active { opacity: 1; }
.viewer-slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.viewer-poster { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px 32px;
  background:
    linear-gradient(rgba(255, 244, 224, 0.025) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(255, 244, 224, 0.025) 1px, transparent 1px) 0 0 / 48px 100%,
    radial-gradient(ellipse 70% 60% at 50% 45%, #1E1B16 0%, #0D0C0A 75%); }
.poster-title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.poster-note { margin-top: 2px; font-size: 14px; color: var(--dim); }
/* 320 x 320 pixels of a 1920 x 1080 frame: 16.67% of the width, 29.63% of the height */
.viewer-roi { --c: rgba(233, 210, 154, 0.8); --l: 16px; position: absolute; left: 50%; top: 50%; width: 16.667%; height: 29.63%; transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 0 0 100vmax rgba(5, 4, 3, 0.28);
  background:
    linear-gradient(var(--c), var(--c)) left top / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) left top / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right top / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) right top / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 1.5px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / var(--l) 1.5px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 1.5px var(--l) no-repeat; }
.viewer-roi::before, .viewer-roi::after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(233, 210, 154, 0.55); transform: translate(-50%, -50%); }
.viewer-roi::before { width: 9px; height: 1px; }
.viewer-roi::after { width: 1px; height: 9px; }
.viewer-roi span { position: absolute; left: 50%; top: 100%; margin-top: 10px; transform: translateX(-50%); white-space: nowrap; font-family: var(--mono); font-size: 11px; color: rgba(233, 210, 154, 0.85); font-variant-numeric: tabular-nums; }
.viewer-controls { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.viewer-btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: var(--text); cursor: pointer;
  background: rgba(13, 12, 10, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(255, 244, 224, 0.12); transition: background-color 0.15s; }
.viewer-btn:hover { background: rgba(40, 36, 30, 0.8); }
.viewer-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.viewer-tab { display: flex; flex-direction: column; gap: 10px; padding: 0 0 4px; border: 0; background: none; color: var(--dim); font-size: 14px; text-align: left; cursor: pointer; transition: color 0.2s; }
.viewer-tab:hover, .viewer-tab[aria-selected="true"] { color: var(--text); }
.viewer-tab i { position: relative; display: block; height: 2px; border-radius: 1px; background: rgba(255, 244, 224, 0.12); overflow: hidden; }
.viewer-tab i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--accent); }

/* one page-load moment: the hero settles in once */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero-side, .viewer { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-side { animation-delay: 0.08s; }
  .viewer { animation-delay: 0.16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* features: frosted glass tiles; the first one spans two columns */
.tiles { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; overflow: hidden; padding: 26px 26px 28px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 244, 224, 0.07), rgba(255, 244, 224, 0.015) 55%), rgba(18, 16, 13, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.09), inset 0 0 0 1px rgba(255, 244, 224, 0.07), 0 30px 60px -36px rgba(0, 0, 0, 0.9); }
.tile-wide { grid-column: span 2; }
.tile-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; color: var(--accent);
  background: rgba(233, 210, 154, 0.08); box-shadow: inset 0 0 0 1px rgba(233, 210, 154, 0.18); }
.tile h3 { margin: 22px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.tile p { margin: 8px 0 0; max-width: 46ch; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.tile-wide h3 { font-size: 24px; letter-spacing: -0.025em; }
.tile-wide p { font-size: 15.5px; }

/* requirements: one frosted panel, six cells divided by hairlines */
.req { margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 244, 224, 0.07), rgba(255, 244, 224, 0.015) 55%), rgba(18, 16, 13, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.09), inset 0 0 0 1px rgba(255, 244, 224, 0.07), 0 30px 60px -36px rgba(0, 0, 0, 0.9); }
.req-cell { padding: 26px 26px 28px; box-shadow: inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.req-cell:nth-child(3n) { box-shadow: inset 0 -1px 0 var(--line); }
.req-cell:nth-last-child(-n + 3) { box-shadow: inset -1px 0 0 var(--line); }
.req-cell:last-child { box-shadow: none; }
.req-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: var(--accent);
  background: rgba(233, 210, 154, 0.08); box-shadow: inset 0 0 0 1px rgba(233, 210, 154, 0.18); }
.req dt { margin-top: 18px; font-size: 13px; color: var(--muted); }
.req dd { margin: 4px 0 0; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.req dd span { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 400; letter-spacing: 0; color: var(--dim); }

/* pricing: three frosted cards; the 3-month card is warmed a little */
.plans { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px 28px 28px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 244, 224, 0.07), rgba(255, 244, 224, 0.015) 55%), rgba(18, 16, 13, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.09), inset 0 0 0 1px rgba(255, 244, 224, 0.07), 0 30px 60px -36px rgba(0, 0, 0, 0.9); }
.plan-main { background: linear-gradient(160deg, rgba(233, 210, 154, 0.14), rgba(233, 210, 154, 0.03) 60%), rgba(22, 19, 14, 0.5);
  box-shadow: inset 0 1px 0 rgba(233, 210, 154, 0.32), inset 0 0 0 1px rgba(233, 210, 154, 0.12), 0 36px 70px -36px rgba(0, 0, 0, 0.95); }
.plan h3 { margin: 0; font-size: 15px; font-weight: 500; color: var(--muted); }
.plan-main h3 { color: var(--accent); }
.plan .price { margin-top: 18px; display: flex; align-items: baseline; gap: 10px; }
.plan .price b { font-size: 48px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.plan .price span { font-size: 14px; color: var(--muted); }
.plan .per { margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: #C9C2B6; }
.plan .btn { margin-top: 26px; width: 100%; height: 44px; }
.plans-all { margin: 28px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; color: #C9C2B6; text-align: center; }

/* faq: the heading on top, each question its own frosted tile, two columns */
.faq-head .lede a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.faq { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.faq details { border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 244, 224, 0.06), rgba(255, 244, 224, 0.012) 60%), rgba(18, 16, 13, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.08), inset 0 0 0 1px rgba(255, 244, 224, 0.06); transition: box-shadow 0.2s; }
.faq details:hover, .faq details[open] { box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.1), inset 0 0 0 1px rgba(255, 244, 224, 0.12); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; font-size: 15.5px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex-shrink: 0; transition: transform 0.2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { margin: -6px 22px 20px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* closing */
.closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 56px 48px; border-radius: 16px; }
.closing h2 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.closing p { margin: 6px 0 0; color: var(--muted); }

/* footer */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 40px; padding-bottom: 56px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 64px; font-size: 14px; }
.footer-cols div { display: flex; flex-direction: column; gap: 10px; }
.footer-cols span { font-weight: 500; }
.footer-cols a { color: var(--muted); }
.footer-cols a:hover { color: var(--text); }
.fine { margin: 40px 0 0; font-size: 12.5px; color: var(--faint); }

/* dialog */
dialog.modal { max-width: 440px; width: calc(100% - 32px); padding: 28px; border: 0; border-radius: 14px; color: var(--text); background: #14120F; box-shadow: 0 0 0 1px var(--line-strong), 0 40px 90px -20px rgba(0, 0, 0, 0.95); }
dialog.modal::backdrop { background: rgba(5, 4, 3, 0.7); }
dialog.modal h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
dialog.modal p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }
dialog.modal .row { margin-top: 22px; display: flex; gap: 8px; justify-content: flex-end; }

/* ---------------------------------------------------------------------------------------------------------------
   Sign-in page */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; border-right: 1px solid var(--line); }
.auth-side .panel-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.auth-side > *:not(canvas) { position: relative; }
.auth-side .quote { max-width: 440px; }
.auth-side .quote p:first-child { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.03em; }
.auth-side .quote p + p { margin: 16px 0 0; color: #BAB3A7; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: rgba(11, 10, 9, 0.6); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.auth-box .sub { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); }
.tabs { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #2B2723; color: var(--text); }
.auth-form { margin-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.auth-form .btn { width: 100%; height: 44px; }
.auth-form .row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-form .row a, .linkish { font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.auth-form .row a:hover, .linkish:hover { color: var(--text); }
.auth-foot { margin: 22px 0 0; font-size: 13px; color: var(--dim); }
.auth-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------------------------------------------------------
   Account page */
.acct-main { padding: 36px 0 40px; }
.acct-main h1 { margin: 0; font-size: 36px; font-weight: 600; letter-spacing: -0.03em; }
.acct-main .sub { margin: 8px 0 0; font-size: 16px; color: var(--muted); }
.card { padding: 24px; display: flex; flex-direction: column; }
.card h2 { margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.card .big { margin-top: 14px; font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.card .small { font-size: 14px; color: var(--muted); }
.card .bottom { margin-top: auto; padding-top: 18px; }
.bar { height: 6px; border-radius: 999px; background: #2B2723; overflow: hidden; }
.bar div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #E8A15C, var(--accent)); }
.bar-legend { margin-top: 8px; display: flex; justify-content: space-between; font-size: 12.5px; color: #938C80; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }
.panel { overflow: hidden; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px; }
.panel-head h2, .sec h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.panel-head p, .sec > p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.table-row { display: grid; grid-template-columns: 2fr 1fr 1fr 120px; gap: 16px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--line); font-size: 14.5px; }
.table-row.head { padding: 10px 24px; background: rgba(24, 22, 19, 0.5); font-size: 12.5px; font-weight: 500; color: #938C80; }
.table-row .r { text-align: right; }
.sec { padding: 24px; }
.sec .stack { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.sec .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.state-on { color: var(--ok); }
.state-off { color: var(--muted); }
.secret { padding: 12px 14px; border-radius: 9px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--mono); font-size: 13px; word-break: break-all; }
.loading { padding: 160px 0; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------------------------------------------------------
   The menu demo: the app's window at its real size (860 x 600), scaled down on narrow screens */
.lm-stage { display: flex; justify-content: center; margin-top: 32px; }
.lm-scaler { width: 860px; transform-origin: top left; }
.lm { position: relative; width: 860px; height: 600px; border-radius: 10px; overflow: hidden; background: #12100E; color: var(--text); font-size: 14px; line-height: 1.4; text-align: left;
  box-shadow: 0 0 0 1px rgba(255, 244, 224, 0.09), 0 50px 100px -30px rgba(0, 0, 0, 0.95), 0 0 120px -20px rgba(233, 210, 154, 0.1); }
.lm-title { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 16px; border-bottom: 1px solid rgba(255, 244, 224, 0.07); background: #0E0D0B; }
.lm-title .t { display: flex; align-items: center; gap: 10px; }
.lm-title .t b { font-size: 14px; font-weight: 600; }
.lm-title .t span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.lm-title .w { display: flex; gap: 30px; padding-right: 4px; color: var(--muted); }
.lm-body { display: flex; height: 562px; }
.lm-rail { display: flex; flex-direction: column; width: 216px; flex-shrink: 0; padding: 18px 14px 16px; background: #0E0D0B; border-right: 1px solid rgba(255, 244, 224, 0.07); }
.lm-status { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; background: #171512; box-shadow: 0 0 0 1px rgba(255, 244, 224, 0.05); font-size: 15px; font-weight: 600; }
.lm-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.lm-status.on i { background: var(--ok); }
.lm-run { height: 40px; margin-top: 8px; border: 0; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  background: linear-gradient(180deg, #F1DDAE, #DCC086); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 20px -8px rgba(233, 210, 154, 0.5); }
.lm-run.stop { background: linear-gradient(180deg, #5A2B28, #46211E); color: #F3D3CB; box-shadow: inset 0 1px 0 rgba(255, 220, 210, 0.1); }
.lm-tabs { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; }
.lm-tabs button { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 15px; text-align: left; cursor: pointer; }
.lm-tabs button:hover { color: var(--text); }
.lm-tabs button[aria-current="page"] { background: #221F1B; color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.06), 0 0 0 1px rgba(255, 244, 224, 0.05); }
.lm-user { display: flex; align-items: center; gap: 12px; margin-top: auto; height: 50px; padding: 0 10px; border-radius: 10px; background: #171512; box-shadow: 0 0 0 1px rgba(255, 244, 224, 0.05); }
.lm-user .av { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--field); font-size: 12px; font-weight: 600; }
.lm-user .n { display: flex; flex-direction: column; line-height: 1.3; }
.lm-user .n span { font-size: 12.5px; color: var(--muted); }
.lm-page { flex: 1; min-width: 0; padding: 26px 28px 20px; overflow: auto; }
.lm-h { display: flex; align-items: center; justify-content: space-between; height: 40px; margin: 0 0 14px; }
.lm-h h3 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.lm-well { border-radius: 10px; background: #171512; box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.05), 0 0 0 1px rgba(255, 244, 224, 0.06); }
.lm-page > .lm-well + .lm-well, .lm-gap { margin-top: 16px; }
.lm-wh { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 16px; font-size: 13.5px; font-weight: 600; }
.lm-wh span { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.lm-kv { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 16px; border-top: 1px solid rgba(255, 244, 224, 0.07); font-size: 14px; }
.lm-kv span:last-child { color: var(--muted); }
.lm-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lm-col { display: flex; flex-direction: column; gap: 16px; }
.lm-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lm-cell { position: relative; border-top: 1px solid rgba(255, 244, 224, 0.07); }
.lm-cell:nth-child(2n) { border-left: 1px solid rgba(255, 244, 224, 0.07); }
.lm-pick { height: 77px; padding: 10px 16px 0; }
.lm-pick .l { font-size: 13px; color: var(--muted); }
.lm-select { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 32px; margin-top: 7px; padding: 0 12px; border: 0; border-radius: 7px; background: #2A2622; font-size: 14px; text-align: left; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.06); }
.lm-menu { position: absolute; left: 16px; right: 16px; top: 72px; z-index: 5; padding: 4px; border-radius: 8px; background: #221F1B; box-shadow: 0 0 0 1px rgba(255, 244, 224, 0.1), 0 16px 40px -12px rgba(0, 0, 0, 0.9); }
.lm-menu button { display: block; width: 100%; height: 28px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; font-size: 13.5px; text-align: left; cursor: pointer; }
.lm-menu button:hover, .lm-menu button[aria-selected="true"] { background: rgba(255, 244, 224, 0.07); }
.lm-slider { padding: 10px 16px 12px; }
.lm-slider .top { display: flex; justify-content: space-between; align-items: baseline; }
.lm-slider .top b { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.lm-slider p { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.lm-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; margin: 12px 0 10px; border-radius: 2px; background-color: #2A2622;
  background-image: linear-gradient(#C9AF74, #C9AF74); background-repeat: no-repeat; outline: none; }
.lm-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #EDE8DF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); cursor: pointer; }
.lm-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #EDE8DF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); cursor: pointer; }
.lm-btn { height: 32px; padding: 0 14px; border-radius: 8px; border: 0; background: #2A2622; font-size: 13.5px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 244, 224, 0.06); }
.lm-btn.off { background: #1F1C19; color: var(--dim); cursor: default; box-shadow: none; }
.lm-btn.red { background: #4A2420; color: #F3D3CB; box-shadow: inset 0 1px 0 rgba(255, 220, 210, 0.08); }
.lm-btns { display: flex; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid rgba(255, 244, 224, 0.07); }
.lm-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 6px 16px; border-top: 1px solid rgba(255, 244, 224, 0.07); }
.lm-sw .n { display: flex; flex-direction: column; line-height: 1.35; }
.lm-sw .n span { font-size: 12px; color: var(--muted); }
.lm-toggle { position: relative; flex-shrink: 0; width: 40px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: #2A2622; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 244, 224, 0.06); }
.lm-toggle i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #EDE8DF; transition: left 0.15s; }
.lm-toggle[aria-checked="true"] { background: #C9AF74; }
.lm-toggle[aria-checked="true"] i { left: 21px; }
.lm-field { width: 100%; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--field); font-size: 13.5px; outline: none; box-shadow: inset 0 0 0 1px rgba(255, 244, 224, 0.05); }
.lm-pad { padding: 8px 16px 12px; border-top: 1px solid rgba(255, 244, 224, 0.07); }
.lm-pad .l { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.lm-live { display: flex; align-items: center; height: 132px; padding: 0 16px; border-top: 1px solid rgba(255, 244, 224, 0.07); }
.lm-live .fps { width: 140px; }
.lm-live .fps b { display: block; font-size: 46px; font-weight: 300; line-height: 1; }
.lm-live .fps span { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.lm-graph { position: relative; flex: 1; height: 100px; margin-right: 36px; }
.lm-graph .g { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(255, 244, 224, 0.07); }
.lm-graph .y { position: absolute; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.lm-graph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255, 244, 224, 0.07); }
.lm-stats div { height: 60px; padding: 10px 16px; }
.lm-stats div + div { border-left: 1px solid rgba(255, 244, 224, 0.07); }
.lm-stats span { display: block; font-size: 12.5px; color: var(--muted); }
.lm-stats b { display: block; margin-top: 2px; font-size: 18px; font-weight: 400; }
.lm-log { margin: 0 10px 10px; padding: 8px 12px; border-radius: 7px; background: var(--field); font-family: var(--mono); font-size: 11.5px; line-height: 1.45; color: #CFC8BC; }
.c-ok { color: var(--ok) !important; }
.c-warn { color: var(--warn) !important; }

/* ---------------------------------------------------------------------------------------------------------------
   Narrow screens */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-wide:last-of-type, .tiles .tile-wide ~ .tile-wide { grid-column: auto; }
  .req { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .req-cell, .req-cell:nth-child(3n), .req-cell:nth-last-child(-n + 3) { box-shadow: inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
  .req-cell:nth-child(2n) { box-shadow: inset 0 -1px 0 var(--line); }
  .req-cell:nth-last-child(-n + 2) { box-shadow: inset -1px 0 0 var(--line); }
  .req-cell:last-child { box-shadow: none; }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-left: auto; margin-right: auto; }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sec .two { grid-template-columns: minmax(0, 1fr); }
  .table-row { grid-template-columns: 1.4fr 1fr 90px; }
  .table-row > :nth-child(3) { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .hero { padding-top: 40px; }
  .viewer { margin-top: 32px; }
  .viewer-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
  .viewer-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .viewer-roi span { display: none; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile-wide { grid-column: auto; }
  .req { grid-template-columns: minmax(0, 1fr); }
  .req-cell, .req-cell:nth-child(2n), .req-cell:nth-child(3n), .req-cell:nth-last-child(-n + 2), .req-cell:nth-last-child(-n + 3) { box-shadow: inset 0 -1px 0 var(--line); }
  .req-cell:last-child { box-shadow: none; }
  .section { padding-top: 80px; }
  .h2 { font-size: 28px; }
  .closing { padding: 32px 24px; }
  .footer-cols { gap: 32px; }
  .auth-side { padding: 28px 20px; }
  .auth-main { padding: 32px 16px; }
  .acct-main h1 { font-size: 28px; }
  .header-left { gap: 16px; }
}
