/* SoundForge Engineer studio theme. Palette from the approved mockups. */
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans.woff") format("woff"); font-weight: 100 1000; font-style: normal; font-display: swap; }
:root {
  --charcoal: #101619;
  --charcoal-2: #0b1013;
  --panel: #1d252b;
  --panel-2: #222c33;
  --panel-3: #283239;
  --line: #34414a;
  --line-2: #46535c;
  --orange: #ff7900;
  --orange-2: #ff9a3d;
  --cyan: #00cdd6;
  --gold: #ddaa45;
  --text: #e9edf0;
  --muted: #a9b5bc;
  --faint: #7f8c94;
  --ok: #3ccf7a;
  --warn: #f2b33d;
  --bad: #ff5d5d;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px rgba(0,0,0,.35);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Thai", "Noto Sans CJK SC", sans-serif;
  --glow-cyan: 0 0 18px rgba(0,205,214,.35);
  --glow-gold: 0 0 18px rgba(221,170,69,.32);
  --glow-orange: 0 0 22px rgba(255,121,0,.38);
  --ease-out: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--charcoal); color: var(--text); font: 15px/1.5 var(--font); }
body { min-height: 100vh; }
a { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--orange); color: #111; padding: 8px 14px; border-radius: 6px; z-index: 100; font-weight: 700; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar */
.topbar { display: flex; align-items: center; gap: 18px; height: 60px; padding: 0 18px; background: linear-gradient(#141b1f, #10171a); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -.3px; white-space: nowrap; }
.brand svg { width: 34px; height: 26px; }
.brand em { font-style: normal; color: var(--orange); }
.topnav { display: flex; gap: 4px; margin-inline-start: 20px; }
.topnav a { color: var(--muted); text-decoration: none; padding: 18px 14px; border-bottom: 3px solid transparent; font-weight: 600; }
.topnav a[aria-current="page"], .topnav a:hover { color: var(--text); border-bottom-color: var(--orange); }
.topbar .spacer { flex: 1; }
.lang-select { background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; max-width: 170px; }
.mode-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.mode-switch button { background: transparent; border: 0; padding: 6px 12px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.mode-switch button[aria-pressed="true"] { background: var(--orange); color: #111; }
.user { display: flex; align-items: center; gap: 10px; }
.user form { margin: 0; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; cursor: pointer; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.sidebar { background: #121a1e; border-inline-end: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.sidebar .new { margin-bottom: 14px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.sidebar nav a svg { width: 20px; height: 20px; flex: none; stroke: var(--muted); }
.sidebar nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(255,121,0,.18), rgba(255,121,0,.04)); box-shadow: inset 3px 0 0 var(--orange); }
.sidebar nav a[aria-current="page"] svg { stroke: var(--orange); }
.sidebar nav a:hover { background: var(--panel); }
.sidebar .foot { margin-top: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 13px; color: var(--muted); }
main { padding: 20px; min-width: 0; }

/* ---------- panels and controls */
.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.panel h2, .panel h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: .6px; text-transform: uppercase; color: var(--text); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel h2 small, .panel h3 small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.studio-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 330px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); padding: 9px 16px; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 40px; }
.btn:hover { border-color: var(--muted); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #160c02; border-color: #ff8f2e; box-shadow: 0 6px 18px rgba(255,121,0,.25); }
.btn.cyan { border-color: rgba(0,205,214,.6); color: var(--cyan); }
.btn.gold { border-color: rgba(221,170,69,.6); color: var(--gold); }
.btn.danger { border-color: rgba(255,93,93,.5); color: #ff9c9c; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn.block { width: 100%; }
label { display: block; font-weight: 600; margin: 10px 0 6px; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; background: var(--charcoal-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; color: var(--text); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--orange); vertical-align: middle; }
input[type=range] { width: 100%; accent-color: var(--orange); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: rgba(60,207,122,.5); background: rgba(60,207,122,.08); }
.chip.warn { color: var(--warn); border-color: rgba(242,179,61,.5); background: rgba(242,179,61,.08); }
.chip.bad { color: var(--bad); border-color: rgba(255,93,93,.5); background: rgba(255,93,93,.08); }
.chip.run { color: var(--orange); border-color: rgba(255,121,0,.5); background: rgba(255,121,0,.08); }
.chip.info { color: var(--cyan); border-color: rgba(0,205,214,.5); background: rgba(0,205,214,.08); }
.chip.gold { color: var(--gold); border-color: rgba(221,170,69,.5); }
.status { border: 1px solid var(--line); border-inline-start: 4px solid var(--cyan); background: var(--charcoal-2); padding: 10px 14px; border-radius: 8px; margin: 10px 0; overflow-wrap: anywhere; }
.status.error { border-inline-start-color: var(--bad); }
.notice { border: 1px dashed var(--line-2); padding: 10px 14px; border-radius: 8px; color: var(--muted); font-size: 13px; }

/* ---------- stats */
.stat { text-align: center; padding: 14px 8px; }
.stat b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.5px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.ok b { color: var(--ok); } .stat.warn b { color: var(--warn); } .stat.run b { color: var(--orange); } .stat.cyan b { color: var(--cyan); }

/* ---------- tables */
.table-wrap { overflow-x: auto; position: relative; }  /* contains absolutely positioned screen-reader text */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr:hover td { background: rgba(255,255,255,.015); }
td .muted, .muted { color: var(--muted); }
.progress { height: 8px; background: var(--charcoal-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--orange)); }
.meter { height: 10px; background: var(--charcoal-2); border-radius: 3px; overflow: hidden; position: relative; }
.meter > i { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, #12b5a3, #d9c43a 75%, #ff7900 92%); }

/* ---------- waveform and transport */
.wave-panel { padding: 0; overflow: hidden; }
.wave-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.wave-wrap { position: relative; height: 150px; background: radial-gradient(ellipse at center, #121c21, #0d1417); cursor: pointer; }
.wave-wrap canvas { width: 100%; height: 100%; display: block; }
.transport { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.transport .play { width: 46px; height: 46px; border-radius: 50%; background: var(--orange); border: 0; color: #160c02; cursor: pointer; display: grid; place-items: center; }
.transport .time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); min-width: 150px; }
.ab { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.ab button { background: transparent; border: 0; padding: 8px 14px; color: var(--muted); font-weight: 700; cursor: pointer; }
.ab button[aria-pressed="true"] { background: var(--orange); color: #160c02; }
.ab button.ref[aria-pressed="true"] { background: var(--gold); }

/* ---------- metrics */
.big-lufs { font-size: 44px; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; line-height: 1.05; letter-spacing: -1.5px; text-shadow: 0 0 24px rgba(0,205,214,.45); }
.metric-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.metric-row:last-child { border-bottom: 0; }
.metric-row .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.checks li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 13px; }
.checks { list-style: none; padding: 0; margin: 0; }

/* ---------- engine diagram */
.engine-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--charcoal-2); border: 1px solid var(--line); border-radius: 10px; }
.engine-tabs button { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.engine-tabs button[aria-pressed="true"][data-path="digital"] { border-color: var(--cyan); color: var(--cyan); background: rgba(0,205,214,.08); }
.engine-tabs button[aria-pressed="true"][data-path="analogue"] { border-color: var(--gold); color: var(--gold); background: rgba(221,170,69,.08); }
.engine-tabs button[aria-pressed="true"][data-path="hybrid"] { border-color: var(--orange); color: var(--orange); background: rgba(255,121,0,.08); }
.flow { position: relative; display: flex; align-items: stretch; gap: 10px; overflow-x: auto; padding: 8px 2px 4px; }
.flow .node { flex: 0 0 auto; min-width: 104px; padding: 10px; border-radius: 10px; text-align: center; font-size: 12px; font-weight: 700; background: #141c21; border: 1px solid var(--line-2); position: relative; }
.flow .node.digital { border-color: rgba(0,205,214,.7); box-shadow: 0 0 14px rgba(0,205,214,.18) inset; color: #bff8fb; }
.flow .node.analogue { border-color: rgba(221,170,69,.7); box-shadow: 0 0 14px rgba(221,170,69,.16) inset; color: #f6dfae; }
.flow .node.shared { border-color: var(--line-2); }
.flow .node.off { opacity: .35; box-shadow: none; }
.flow .node small { display: block; font-weight: 500; color: var(--muted); }
.flow .arrow { align-self: center; color: var(--faint); }

/* ---------- module rack */
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.module { background: linear-gradient(180deg, #232d34, #1a2228); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; position: relative; }
.module.analogue { background: linear-gradient(180deg, #2a2620, #1e1b17); border-color: #5b4b2c; }
.module.analogue::before { content: ""; position: absolute; inset: 6px; border-radius: 6px; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0 2px, transparent 2px 4px); }
.module.digital { border-color: #2a5054; }
.module header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.module header label { margin: 0; flex: 1; font-size: 14px; }
.module .fam { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.module .fam.digital { color: var(--cyan); } .module .fam.analogue { color: var(--gold); } .module .fam.shared { color: var(--muted); }
.module.off .params { opacity: .45; }
.module.unavailable { opacity: .5; }
.param { display: grid; grid-template-columns: 1fr 78px; gap: 8px; align-items: center; margin: 6px 0; }
.param label { grid-column: 1 / -1; margin: 0; font-weight: 500; font-size: 12px; color: var(--muted); }
.param input[type=number] { padding: 5px 6px; font-variant-numeric: tabular-nums; font-size: 13px; }
.knob-row { display: flex; gap: 10px; flex-wrap: wrap; }
.eq-band { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 6px; margin: 6px 0; align-items: end; }
.eq-band select, .eq-band input { padding: 5px; font-size: 12px; }
.vu { height: 56px; border-radius: 6px; background: radial-gradient(ellipse at bottom, #f3e3b8, #cdb680); position: relative; overflow: hidden; border: 2px solid #3f3424; }
.vu i { position: absolute; bottom: -4px; inset-inline-start: 50%; width: 2px; height: 56px; background: #2b1d0c; transform-origin: bottom center; transition: transform .12s linear; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- charts */
.chart { width: 100%; height: 180px; display: block; background: #0f171b; border-radius: 8px; border: 1px solid var(--line); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; margin-top: 6px; }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-inline-end: 6px; }

/* ---------- console */
.console { position: relative; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.strip { flex: 0 0 170px; background: linear-gradient(180deg, #222c33, #182025); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.strip h3 { font-size: 13px; margin: 0; overflow-wrap: anywhere; text-transform: none; letter-spacing: 0; }
.strip .row { display: flex; gap: 6px; }
.strip .row .btn { flex: 1; padding: 4px; min-height: 30px; font-size: 12px; }
.strip .btn[aria-pressed="true"].mute { background: #b33; color: #fff; }
.strip .btn[aria-pressed="true"].solo { background: var(--warn); color: #111; }
.strip .btn[aria-pressed="true"].pol { background: var(--cyan); color: #111; }
.strip .fader { writing-mode: vertical-lr; direction: rtl; height: 150px; width: 36px; margin: 6px auto; }
.strip small { color: var(--muted); }

/* ---------- misc */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card-link { display: block; padding: 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.card-link:hover { border-color: var(--orange); }
.card-link b { display: block; margin-bottom: 4px; }
.card-link span { color: var(--muted); font-size: 13px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); }
.dropzone.drag { border-color: var(--orange); background: rgba(255,121,0,.05); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--muted); font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--orange); }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px; max-width: 560px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.coming-soon { opacity: .6; }
.explain li { margin-bottom: 8px; }
.explain small { color: var(--muted); display: block; }
.toast { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; background: var(--panel-3); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 10px; z-index: 50; max-width: 420px; }

/* ---------- responsive */
@media (max-width: 1200px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; position: fixed; inset: 60px 0 0 0; z-index: 30; overflow-y: auto; }
  .sidebar.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .topnav { display: none; }
  .cols-3, .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .mode-switch, .user .who { display: none; }
}
@media (max-width: 560px) {
  main { padding: 16px; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { gap: 8px; padding: 0 10px; }
  .brand span { display: none; }
  .lang-select { max-width: 120px; }
  .transport .time { min-width: 0; }
  .param { grid-template-columns: 1fr 70px; }
}
@media (forced-colors: active) { .chip, .btn, .panel { border: 1px solid CanvasText; } }

/* ---------- operating modes */
body[data-mode="guided"] .pro-only { display: none !important; }
body[data-mode="professional"] .guided-only { display: none !important; }
.steps { margin: 0 0 16px; padding: 14px 14px 14px 36px; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.steps li { color: var(--muted); }
body[data-mode="guided"] .module .params { display: none; }
body[data-mode="guided"] .module { padding-bottom: 8px; }
@media (max-width: 900px) { #midRow { grid-template-columns: minmax(0, 1fr) !important; } }
.preset { text-align: start; display: block; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); cursor: pointer; }
.preset b { display: block; }
.preset span { color: var(--muted); font-size: 13px; }
.preset[aria-pressed="true"] { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); background: rgba(255,121,0,.08); }
@media (max-width: 1000px) { #batchGrid { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 1000px) { #regGrid, #profGrid { grid-template-columns: minmax(0, 1fr) !important; } }
.checks li > .chip, .checks li > span:last-child { flex-shrink: 0; }
.checks li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.eq-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eq-band > button { grid-column: 1 / -1; }
.btn svg { width: 18px; height: 18px; flex: none; stroke: currentColor; }

/* Right-to-left: measurements, times and signal flow stay left-to-right and isolated from surrounding text. */
.num, .stat b, .transport .time, .big-lufs, .metric-row .v, .param input[type=number] { unicode-bidi: isolate; direction: ltr; }
[dir=rtl] .num, [dir=rtl] .metric-row .v { text-align: end; }
.flow, .console, .wave-wrap, canvas { direction: ltr; }
/* Version rows carry several actions; let them wrap under the title instead of widening the page. */
#versions .checks li { flex-wrap: wrap; }
#versions .checks li > span:last-child { flex-shrink: 1; min-width: 0; }

/* ======================================================================
   Sign-in page
   ====================================================================== */
.login-body { background: #0c1215; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(380px, .85fr); gap: 28px; padding: 28px; align-items: stretch;
  background: radial-gradient(ellipse 60% 50% at 62% 40%, rgba(255,121,0,.10), transparent 70%), radial-gradient(ellipse 50% 50% at 30% 60%, rgba(0,205,214,.07), transparent 70%), #0c1215; }
.hero { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: calc(100vh - 56px); padding: 34px 36px 22px; border-radius: 22px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, rgba(16,22,25,.2), rgba(12,18,21,.7)); }
.hero-scape { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-head { max-width: 640px; }
.hero h1 { font-size: clamp(36px, 4.6vw, 66px); line-height: 1.04; margin: 0 0 18px; border-inline-start: 4px solid var(--orange); padding-inline-start: 26px; letter-spacing: -1.1px; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--orange); text-shadow: 0 0 34px rgba(255,121,0,.45); }
.hero p.lead { color: #c9d2d7; font-size: 18px; line-height: 1.55; max-width: 34em; margin: 0; padding-inline-start: 30px; }
.carousel { position: relative; }
.slide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.slide.from-right { animation: slideIn .45s var(--ease-out); }
.slide.from-left { animation: slideInL .45s var(--ease-out); }
@keyframes slideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.feature { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px 14px; align-items: center; align-content: start; padding: 18px; border-radius: 16px; min-width: 0;
  background: linear-gradient(180deg, rgba(27,36,42,.86), rgba(17,24,28,.92)); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.feature h2 { font-size: 17px; margin: 2px 0 6px; line-height: 1.25; letter-spacing: -.2px; font-weight: 700; }
.feature > div { display: contents; }
.feature h2 { grid-column: 2; }
.feature p { grid-column: 1 / -1; color: var(--muted); margin: 0; font-size: 14px; line-height: 1.5; }
.ftile { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; }
.ftile svg { width: 32px; height: 32px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.feature.cyan { border-color: rgba(0,205,214,.4); box-shadow: inset 0 -30px 40px -30px rgba(0,205,214,.25); }
.feature.cyan .ftile { background: radial-gradient(circle at 50% 40%, rgba(0,205,214,.32), rgba(0,205,214,.08)); box-shadow: var(--glow-cyan), inset 0 0 0 1px rgba(0,205,214,.4); }
.feature.cyan svg { stroke: #5ff2f8; }
.feature.orange { border-color: rgba(255,121,0,.42); box-shadow: inset 0 -30px 40px -30px rgba(255,121,0,.25); }
.feature.orange .ftile { background: radial-gradient(circle at 50% 40%, rgba(255,121,0,.34), rgba(255,121,0,.08)); box-shadow: var(--glow-orange), inset 0 0 0 1px rgba(255,121,0,.45); }
.feature.orange svg { stroke: #ffb066; }
.feature.gold { border-color: rgba(221,170,69,.4); box-shadow: inset 0 -30px 40px -30px rgba(221,170,69,.22); }
.feature.gold .ftile { background: radial-gradient(circle at 50% 40%, rgba(221,170,69,.32), rgba(221,170,69,.08)); box-shadow: var(--glow-gold), inset 0 0 0 1px rgba(221,170,69,.42); }
.feature.gold svg { stroke: #f3d189; }
.carousel-bar { display: flex; align-items: center; gap: 16px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.carousel-bar .spacer { flex: 1; }
.dots { display: flex; gap: 4px; }
.dot { width: 24px; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--faint); transition: all .25s var(--ease-out); }
.dot[aria-current]::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 10px rgba(255,121,0,.8); }
.count b { color: var(--text); }
.slide-title { color: var(--text); }
.nav-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(29,37,43,.8); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--ease-out), box-shadow .2s; }
.nav-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-arrow.next { background: var(--orange); border-color: var(--orange); color: #160c02; box-shadow: var(--glow-orange); }
.nav-arrow:hover { transform: scale(1.06); }
[dir=rtl] .nav-arrow svg { transform: scaleX(-1); }

.signin { position: relative; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(180deg, rgba(27,35,41,.96), rgba(18,25,29,.97)); border: 1px solid var(--line-2); border-radius: 22px; padding: 34px 38px; box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05); }
.signin::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,121,0,.55), transparent 30%, transparent 70%, rgba(0,205,214,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.signin-top { position: absolute; top: 18px; inset-inline-end: 18px; }
.lang-wrap { position: relative; display: inline-flex; align-items: center; }
.lang-wrap svg { position: absolute; inset-inline-start: 10px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; pointer-events: none; }
.lang-wrap .lang-select { padding-inline-start: 34px; height: 40px; border-radius: 10px; background: rgba(16,22,25,.8); }
.brand.big { font-size: 30px; gap: 12px; margin-top: 28px; letter-spacing: -.6px; font-weight: 700; }
.brand.big svg { width: 44px; height: 34px; filter: drop-shadow(0 0 8px rgba(255,121,0,.6)); }
.mark-path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 1.4s .2s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .mark-path { stroke-dashoffset: 0; } }
.signin h2 { font-size: 34px; margin: 34px 0 6px; letter-spacing: -.8px; font-weight: 700; }
.signin > p.muted { font-size: 16px; margin: 0 0 12px; }
.field { position: relative; }
.field input { padding-inline-start: 46px; height: 54px; font-size: 16px; border-radius: 12px; background: rgba(10,15,18,.8); transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,121,0,.15); outline: none; }
.field > svg { position: absolute; inset-inline-start: 15px; top: 17px; width: 20px; height: 20px; stroke: var(--muted); }
.field .reveal { position: absolute; inset-inline-end: 6px; top: 7px; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.field .reveal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.field .reveal:hover { color: var(--text); }
.signin-btn { height: 56px; font-size: 18px; width: 100%; margin-top: 24px; border-radius: 12px; position: relative; overflow: hidden; }
.signin-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signin-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-100%); }
.signin-btn:hover::after { animation: sheen .9s var(--ease-out); }
@keyframes sheen { to { transform: translateX(100%); } }
.private { display: flex; gap: 10px; margin: 20px 0 0; color: var(--muted); font-size: 14px; }
.private svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: var(--orange); stroke-width: 2; }
.private b { color: var(--text); }
.signin-links { display: flex; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.signin-links button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: none; border: 0; color: var(--text); padding: 8px 10px; cursor: pointer; border-radius: 8px; font-weight: 500; }
.signin-links button + button { border-inline-start: 1px solid var(--line); border-radius: 0; }
.signin-links button[aria-expanded="true"] { color: var(--orange); }
.signin-links svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.help-panel { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(10,15,18,.6); border: 1px solid var(--line); animation: fadeUp .3s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) {
  .login { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .hero { min-height: 0; padding: 26px 20px 20px; }
  .hero-head { margin-bottom: 200px; }
  .signin { order: -1; padding: 28px 22px; }
  .signin h2 { margin-top: 22px; }
}
@media (max-width: 760px) {
  .slide { grid-template-columns: minmax(0, 1fr); }
  .hero p.lead { padding-inline-start: 0; font-size: 16px; }
  .hero h1 { padding-inline-start: 16px; letter-spacing: -1px; }
  .hero-head { margin-bottom: 150px; }
  .signin-top { position: static; display: flex; justify-content: flex-end; }
  .brand.big { margin-top: 10px; font-size: 24px; }
  .carousel-bar { gap: 8px; }
  .slide-title { display: none; }
  .signin-links button + button { border-inline-start: 0; }
}

/* ======================================================================
   Mastering studio visuals
   ====================================================================== */
.panel-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.wave-wrap { height: 176px; background: radial-gradient(ellipse 80% 90% at 50% 50%, #13212a, #0b1114 75%); overflow: hidden; }
.wave-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.ph-bubble { position: absolute; bottom: 8px; transform: translateX(-50%); background: #0d1418; border: 1px solid rgba(255,121,0,.7); color: var(--text); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; box-shadow: 0 0 12px rgba(255,121,0,.35); pointer-events: none; z-index: 2; }
.chip.ghost { border-style: dashed; }
.transport .play { width: 50px; height: 50px; background: radial-gradient(circle at 40% 35%, #ffa04a, var(--orange)); box-shadow: 0 0 0 4px rgba(255,121,0,.15), var(--glow-orange); transition: transform .15s var(--ease-out); }
.transport .play:hover { transform: scale(1.06); }
.transport .play:active { transform: scale(.96); }
.btn.icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ab button b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: rgba(255,255,255,.08); margin-inline-end: 4px; }
.ab button[aria-pressed="true"] b { background: rgba(0,0,0,.2); }
.meters { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.m-lab { color: var(--muted); }
.lvl-row { display: flex; gap: 8px; align-items: center; color: var(--muted); font-weight: 700; font-size: 12px; }
.lvl { position: relative; flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #0fb8a6, #00cdd6 45%, #ddaa45 75%, #ff7900 90%, #ff4d4d); overflow: hidden; }
.lvl > i { position: absolute; inset-block: 0; inset-inline-end: 0; width: 100%; background: #0b1114; transition: width .05s linear; }
.lvl > b { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; inset-inline-start: -4px; opacity: .85; }
.m-text { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 760px) { .meters { grid-template-columns: minmax(0, 1fr); } .m-text { white-space: normal; } }

/* engine diagram */
.engine-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.engine-tabs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flow { display: block; padding: 6px 0 2px; border-radius: 12px; }
.eng { position: relative; display: grid; grid-template-columns: 112px repeat(var(--cols), minmax(76px, 1fr)) 124px; grid-template-rows: auto auto auto auto; column-gap: 22px; row-gap: 6px; align-items: center;
  min-width: calc(var(--cols) * 98px + 280px); padding: 14px 12px; border-radius: 12px; background: radial-gradient(ellipse at 50% 40%, rgba(0,205,214,.06), transparent 60%), radial-gradient(ellipse at 50% 90%, rgba(221,170,69,.06), transparent 60%), #0e161a; border: 1px solid var(--line); }
.eng-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.eng > div { position: relative; z-index: 1; }
.eng-io { grid-row: 1 / 5; align-self: center; padding: 12px 10px; border-radius: 12px; background: linear-gradient(180deg, #1f2930, #151d22); border: 1px solid var(--line-2); text-align: center; }
.eng-io.in { grid-column: 1; }
.eng-io.out { grid-column: -2 / -1; border-color: rgba(255,121,0,.55); box-shadow: 0 0 20px rgba(255,121,0,.15); }
.eng-io b { display: block; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; }
.eng-io small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.eng-shared { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.eng-shared li { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(255,121,0,.1); color: #ffc08a; font-variant-numeric: tabular-nums; }
.eng-lane { grid-column: 2 / -2; font-size: 12.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.eng-lane small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.eng-lane.digital { color: var(--cyan); text-shadow: 0 0 12px rgba(0,205,214,.5); }
.eng-lane.analogue { color: var(--gold); text-shadow: 0 0 12px rgba(221,170,69,.45); margin-top: 8px; }
.eng-idle { grid-column: 2 / -2; height: 64px; display: grid; place-items: center; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--faint); font-size: 12px; }
.eng-node { min-height: 74px; padding: 8px 6px; border-radius: 10px; text-align: center; background: linear-gradient(180deg, #19242a, #121a1f); border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: box-shadow .3s, opacity .3s; }
.eng-node b { font-size: 11.5px; line-height: 1.2; font-weight: 700; }
.eng-node small { font-size: 10.5px; color: var(--muted); }
.eng-node .glyph svg { width: 26px; height: 20px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eng-node.digital { border-color: rgba(0,205,214,.55); color: #c9fbfd; }
.eng-node.digital .glyph svg { stroke: var(--cyan); }
.eng-node.analogue { border-color: rgba(221,170,69,.55); color: #f7e2b5; background: linear-gradient(180deg, #2a251d, #1b1814); }
.eng-node.analogue .glyph svg { stroke: var(--gold); }
.eng-node.digital.on { box-shadow: 0 0 18px rgba(0,205,214,.28), inset 0 0 14px rgba(0,205,214,.12); }
.eng-node.analogue.on { box-shadow: 0 0 18px rgba(221,170,69,.26), inset 0 0 14px rgba(221,170,69,.12); }
.eng-node.off { opacity: .42; border-style: dashed; }
.wire, .wire-glow, .wire-flow { fill: none; stroke-linecap: round; }
.wire { stroke-width: 2; opacity: .55; }
.wire-glow { stroke-width: 7; opacity: .14; }
.wire-flow { stroke-width: 2.4; stroke-dasharray: 3 15; animation: flowDash 1.6s linear infinite; }
.flow.live .wire-flow { animation-duration: .55s; }
@keyframes flowDash { to { stroke-dashoffset: -36; } }
[dir=rtl] .wire-flow { animation-direction: normal; }
.c-digital { stroke: var(--cyan); } .c-analogue { stroke: var(--gold); } .c-out { stroke: var(--orange); }
.wire-dot.c-digital { fill: var(--cyan); } .wire-dot.c-analogue { fill: var(--gold); } .wire-dot.c-out { fill: var(--orange); }
.wire-dot { stroke: none; }
.hw { margin-top: 10px; }
.engine-panel .flow { overflow-x: auto; }

/* chain cards */
.rack { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.module { border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.module.digital:not(.off) { box-shadow: inset 0 1px 0 rgba(0,205,214,.18); }
.module.analogue:not(.off) { box-shadow: inset 0 1px 0 rgba(221,170,69,.2); }
.mviz-wrap { position: relative; margin: 4px 0 6px; }
.mviz { display: block; width: 100%; height: 62px; border-radius: 8px; background: linear-gradient(180deg, #0c1418, #10191d); border: 1px solid rgba(255,255,255,.05); }
.module.analogue .mviz { background: linear-gradient(180deg, #17130e, #120f0b); }
.mread { position: absolute; inset-inline-end: 6px; bottom: 4px; font-size: 11px; font-weight: 600; color: var(--text); background: rgba(10,15,18,.75); padding: 1px 6px; border-radius: 5px; }
.output-bar { margin-top: 14px; padding: 4px 14px 10px; border-radius: 12px; background: rgba(10,15,18,.5); border: 1px solid var(--line); }
.render-btn { height: 46px; font-size: 16px; }
.render-btn svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.progress > i { box-shadow: 0 0 12px rgba(255,121,0,.6); transition: width .4s var(--ease-out); }

/* metrics */
.metrics-panel { background: radial-gradient(ellipse 90% 40% at 20% 0%, rgba(0,205,214,.08), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--panel)); }
.checks .chip.ok::before { content: "✓"; }
.checks .chip.warn::before { content: "!"; }
.checks .chip.bad::before { content: "×"; }

/* presets */
.preset { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; align-items: center; transition: border-color .2s, background .2s; }
.preset .picon { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.05); }
.preset .picon svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.preset[aria-pressed="true"] .picon { background: rgba(255,121,0,.18); }
.preset[aria-pressed="true"] .picon svg { stroke: var(--orange); }
.preset:hover { border-color: var(--muted); }
.google-btn { width: 100%; height: 54px; font-size: 16px; background: #f4f6f8; color: #1f2328; border-color: #f4f6f8; border-radius: 12px; margin-top: 8px; }
.google-btn:hover { background: #fff; border-color: #fff; }
.google-btn svg { width: 22px; height: 22px; stroke: none !important; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 18px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field input[type=email] { width: 100%; background: rgba(10,15,18,.8); border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); padding-inline-start: 46px; height: 54px; font-size: 16px; }

/* ---------- billing and admin */
.section-title { font-size: 15px; letter-spacing: .6px; text-transform: uppercase; margin: 22px 0 10px; display: flex; gap: 8px; align-items: baseline; }
.section-title small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.balance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.balance-grid .stat { background: rgba(10,15,18,.5); border: 1px solid var(--line); border-radius: 12px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.plan { position: relative; padding: 20px; border-radius: 16px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.plan h3 { margin: 0; font-size: 18px; }
.plan-price { font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.plan-price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan-blurb { margin: 0; color: var(--text); }
.plan-per { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.plan .btn { margin-top: auto; }
.plan.sub { border-color: rgba(0,205,214,.35); }
.plan.best { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), 0 16px 40px rgba(255,121,0,.15); }
.plan-flag { position: absolute; top: -11px; inset-inline-start: 18px; background: var(--orange); color: #160c02; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kpi { padding: 14px; border-radius: 12px; background: rgba(10,15,18,.5); border: 1px solid var(--line); }
.kpi span { display: block; color: var(--muted); font-size: 12.5px; }
.kpi b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi.gold b { color: var(--gold); } .kpi.cyan b { color: var(--cyan); } .kpi.orange b { color: var(--orange); } .kpi.bad b { color: var(--bad); }
.split-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 10px 0 6px; background: var(--charcoal-2); }
.split-bar i { display: block; height: 100%; }
@media (max-width: 760px) { .balance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- storage, deletion and legal pages */
.plan-storage{margin:0 0 12px;color:var(--muted);font-size:.85rem}
.storage-panel{margin-top:16px}
.storage-row{display:flex;justify-content:space-between;gap:12px;font-size:.9rem;color:var(--muted)}
.storage-bar{height:10px;border-radius:6px;background:rgba(255,255,255,.06);margin-top:6px;overflow:hidden}
.storage-bar i{display:block;height:100%;width:0;border-radius:6px;background:linear-gradient(90deg,var(--cyan),var(--gold));transition:width .6s var(--ease,ease)}
.storage-bar.warn i{background:linear-gradient(90deg,var(--gold),#ff7900)}
.sub-title{font-size:1rem;margin:18px 0 10px}.sub-title small{color:var(--muted);font-weight:400;margin-inline-start:8px}
.addons{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.addon{display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.02)}
.addon b{font-size:1.25rem}.addon small{color:var(--muted)}.addon.on{border-color:var(--cyan)}
.danger-zone{margin-top:16px}.danger-zone summary{cursor:pointer;color:#ff8a7a;margin:6px 0}
.danger-zone label{display:block;margin:8px 0 6px;color:var(--muted);font-size:.9rem}
.btn.danger{border-color:#a8433a;color:#ffb3a8}.btn.danger:hover{background:rgba(168,67,58,.18)}
.legal-links{display:flex;flex-wrap:wrap;gap:16px;margin:20px 0 8px;font-size:.85rem}.legal-links a{color:var(--muted)}
.legal-body{background:var(--charcoal);color:var(--text,#e8eef0);margin:0}
.legal-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:16px clamp(16px,4vw,48px);border-bottom:1px solid var(--line)}
.legal-top nav{display:flex;flex-wrap:wrap;gap:14px}.legal-top a{color:var(--muted);text-decoration:none}
.legal-top a[aria-current]{color:var(--text,#e8eef0);text-decoration:underline;text-underline-offset:4px}
.legal-brand{font-weight:500;color:var(--text,#e8eef0)!important}
.legal{max-width:72ch;margin:0 auto;padding:32px 16px 64px;line-height:1.7}
.legal h2{font-size:1.1rem;margin-top:28px}.legal a{color:var(--cyan)}
.legal-meta,.legal-note{color:var(--muted);font-size:.9rem}.legal-note{margin-top:32px;border-top:1px solid var(--line);padding-top:12px}

/* ------------------------------------------------------------- loudness recommendation */
.recommend-row{display:grid;grid-template-columns:1fr;gap:6px;padding:10px 0 4px;border-bottom:1px solid var(--line);margin-bottom:4px}
.recommend-ctl{display:flex;gap:10px;flex-wrap:wrap}.recommend-ctl select{flex:1;min-width:200px}
.recommend-note{border:1px solid rgba(0,205,214,.35);background:rgba(0,205,214,.06);border-radius:10px;padding:10px 12px;font-size:.9rem}
.recommend-note ul{margin:6px 0;padding-inline-start:18px}.recommend-note p{margin:4px 0 0}
.rec-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px}
.rec-tag{font-size:.75rem;padding:2px 8px;border-radius:6px;background:rgba(0,205,214,.16);color:var(--cyan)}
.rec-tag.adj{background:rgba(221,170,69,.16);color:var(--gold)}

/* upload health */
.health-note{margin:4px 0 14px;border:1px solid rgba(242,179,61,.45);background:rgba(242,179,61,.07);border-radius:12px;padding:12px 16px}
.health-note.problem{border-color:rgba(255,93,93,.55);background:rgba(255,93,93,.07)}
.health-note h2{font-size:1rem;margin:0 0 4px}.health-note.problem h2{color:#ff9c9c}.health-note.caution h2{color:var(--warn)}
.health-note p{margin:0 0 6px}.health-note ul{margin:0;padding-inline-start:18px;display:grid;gap:6px}
.health-note li.problem b{color:#ff9c9c}.health-note li.caution b{color:var(--warn)}
.health-confirm{margin-top:14px;border:1px solid rgba(255,93,93,.55);background:rgba(255,93,93,.08);border-radius:12px;padding:12px 14px}
.health-confirm h3{margin:0 0 6px;color:#ff9c9c}.health-confirm p{margin:0 0 10px}
.health-actions{display:flex;gap:10px;flex-wrap:wrap}

/* sign-in code */
.code-form{margin:14px 0 6px;padding:12px 14px;border:1px solid rgba(0,205,214,.35);border-radius:12px;background:rgba(0,205,214,.05)}
.code-form h3{margin:0 0 4px;font-size:1rem}.code-form .hint{margin:0 0 8px}
.code-row{display:flex;gap:10px;flex-wrap:wrap}.code-row input{flex:1;min-width:150px;font-size:1.25rem;letter-spacing:.2em;font-variant-numeric:tabular-nums}

/* ---------- device compatibility: phones, tablets, Mac and PC (from tests/e2e_devices.py) */
/* Touch and pointer targets at least 24 by 24 CSS pixels. */
input[type=checkbox], input[type=radio] { width: 24px; height: 24px; margin: 0; }
input[type=range] { height: 24px; }
details > summary { padding: 4px 0; min-height: 24px; }
.legal-links a, .legal-top a, .legal-brand, main .panel > a, main .panel p > a, #recent a, .list a { display: inline-block; padding-block: 3px; min-height: 24px; }
/* iPhone and iPad Safari zoom into any field under 16 px when it is focused. */
@media (hover: none) and (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }
  .btn, .menu-btn, .mode-switch button, .engine-tabs button { min-height: 40px; }
}
.lang-select { flex-shrink: 0; min-width: 88px; }
.user { min-width: 0; flex-shrink: 1; }
.user .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.panel-head { flex-wrap: wrap; gap: 10px; }
.engine-tabs { flex-wrap: wrap; max-width: 100%; }
.chip { max-width: 100%; overflow-wrap: anywhere; }
/* Tablets in landscape and small laptops: the full header no longer fits beside the workspace links. */
/* The workspace links repeat the sidebar, so they give way first. */
.mode-switch, .user .btn, .chip.balance { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 1400px) {
  .user .who { display: none; }
  .topnav { display: none; }
  .topbar { gap: 12px; }
}
/* Small phones (iPhone SE, Galaxy S9): the balance lives on Plans and billing in the menu. */
@media (max-width: 480px) {
  .user .balance { display: none !important; }
  .lang-select { min-width: 0; max-width: 104px; padding-inline: 6px; }
  .topbar { gap: 6px; padding: 0 8px; }
  .user .btn.small { padding-inline: 8px; }
}
@media (max-width: 480px) { .metric-row, .checks li { flex-wrap: wrap; gap: 6px; } .chip { white-space: normal; } }

/* How it works card: fixed at the top right, scrolls on its own, follows the reader from page to page */
.guide-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.guide-btn > span:first-child { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--orange); color: #111; font-weight: 800; }
.guide { position: fixed; top: 72px; right: 16px; z-index: 40; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px);
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 18px 48px rgba(0,0,0,.55); }
.guide[hidden] { display: none; }
.guide-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.guide-head h2 { margin: 0; font-size: 17px; }
.guide-close { width: 40px; height: 40px; border: 0; border-radius: var(--radius-s); background: var(--panel-3); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.guide-close:hover, .guide-close:focus-visible { background: var(--line-2); }
.guide-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px 18px; }
.guide .flow { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.guide .flow li { counter-increment: step; position: relative; padding: 0 0 0 40px; }
.guide .flow li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: #111; font-weight: 800; font-size: 14px; }
.guide .flow li:not(:last-child)::after { content: "\2193"; display: block; margin: 6px 0 6px -30px; color: var(--orange-2); font-size: 18px; line-height: 1; }
.guide .flow b, .guide .flow a b { display: block; color: var(--text); }
.guide .flow a { text-decoration: none; display: inline-block; min-height: 24px; }
.guide .flow span, .guide .extras span { display: block; color: var(--muted); font-size: 14px; }
.guide h3 { margin: 18px 0 8px; font-size: 14px; color: var(--muted); }
.guide .extras { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide .extras a { color: var(--cyan); font-weight: 700; display: inline-block; min-height: 24px; }
@media (max-width: 1679px) { .guide-label { display: none; } .guide-btn { padding-inline: 8px; } }
@media (max-width: 720px) { .guide { top: 64px; right: 8px; width: calc(100vw - 16px); max-height: 62vh; max-height: 62dvh; } }
@media (max-width: 480px) { .brand span { display: none; } .lang-select { max-width: 80px; } .topbar { gap: 4px; } }

/* Under construction */
.construction { max-width: 520px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.construction h1 { margin: 18px 0 10px; }
.construction-bar { margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--orange); border-radius: var(--radius-s); background: rgba(255,140,40,.1); }
.switch-row { display: flex; gap: 10px; align-items: center; min-height: 40px; font-weight: 700; cursor: pointer; }

/* Player tools: loop length, zoom, monitoring and volume */
.tools-row { gap: 12px 16px; padding-top: 8px; }
.tool-group { display: inline-flex; align-items: center; gap: 6px; }
select.compact { width: auto; max-width: 240px; padding-block: 6px; }
.zoom-read { min-width: 2.6em; text-align: center; }
.vol { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.vol label { margin: 0; font-weight: 600; }
.vol input[type=range] { width: 96px; accent-color: var(--orange); }
#monoBtn[aria-pressed="true"] { background: var(--cyan, #00cdd6); color: #04181a; border-color: transparent; }
.live-tag { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.1); margin-inline-start: 2px; }
.ab button[aria-pressed="true"] .live-tag { background: rgba(0,0,0,.2); }
.wave-scroll { padding: 4px 16px 0; }
.wave-scroll input { width: 100%; accent-color: var(--orange); }
.preview-note { margin: 0; padding: 0 16px 10px; }
.save-profile { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.save-profile h3 { margin: 0 0 4px; }
.save-row { display: flex; gap: 8px; align-items: center; }
.save-row input { flex: 1; min-width: 0; }
@media (max-width: 760px) { .vol input[type=range] { width: 72px; } .tools-row { gap: 10px; } }
#loopLen { width: 9.5em; }
#simSelect.compact { width: 15em; }
@media (max-width: 760px) { .ab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } .ab button { padding: 8px 10px; } }

/* Live rack (professional): chain strip on the left, selected tool on the right */
.live-rack .panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ab.mini button { padding: 6px 10px; font-size: 13px; }
.lr { display: grid; grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 10px; }
.lr-strip { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; background: #121a1f; border: 1px solid var(--line); border-radius: 12px; }
.lr-io { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.lr-lvl { color: var(--text); }
.lr-slot { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px 6px 6px; border-radius: 9px; border: 1px solid transparent; background: #1a2328; }
.lr-slot.sel { border-color: var(--orange); background: #232017; box-shadow: inset 3px 0 0 var(--orange); }
.lr-slot.unavailable { opacity: .45; }
.lr-open { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; background: none; border: 0; padding: 6px 2px; color: var(--muted); cursor: pointer; text-align: start; font: inherit; }
.lr-slot.on .lr-open { color: var(--text); }
.lr-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-read { font-size: 11px; color: var(--muted); white-space: nowrap; }
.lr-gr { position: absolute; inset-inline: 40px 10px; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.04); overflow: hidden; }
.lr-gr i { display: block; height: 100%; width: 0; background: var(--gold); margin-inline-start: auto; transition: width .06s linear; }
.lr-power { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); background: #0e1418; display: grid; place-items: center; cursor: pointer; padding: 0; }
.lr-power i { width: 10px; height: 10px; border-radius: 50%; background: #3a464e; transition: background .15s, box-shadow .15s; }
.lr-power[aria-pressed="true"] i { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.lr-slot.digital .lr-power[aria-pressed="true"] i { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.lr-slot.analogue .lr-power[aria-pressed="true"] i { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.lr-power:disabled { cursor: not-allowed; }
.lr-editor { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; background: linear-gradient(180deg, #1f282e, #161d22); min-width: 0; }
.lr-editor.digital { border-color: #2a5054; }
.lr-editor.analogue { border-color: #5b4b2c; background: linear-gradient(180deg, #27231d, #1a1713); }
.lr-editor.off .lr-knobs, .lr-editor.off .lr-scope { opacity: .5; }
.lr-head { display: flex; align-items: center; gap: 10px; }
.lr-head h3 { margin: 0; font-size: 17px; }
.lr-editor > .hint { margin: 6px 0 10px; }
.lr-scope-wrap { position: relative; }
.lr-scope { height: 190px; cursor: crosshair; touch-action: none; }
.lr-gr-read { position: absolute; top: 8px; inset-inline-end: 10px; font-size: 12px; color: var(--gold); }
.lr-knobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin-top: 14px; }
.knob { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,.025); }
.knob label { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); min-height: 2.4em; display: flex; align-items: center; }
.knob-dial { width: 72px; height: 72px; cursor: ns-resize; touch-action: none; border-radius: 50%; outline-offset: 3px; }
.knob-dial svg { width: 100%; height: 100%; overflow: visible; }
.k-track { fill: none; stroke: #2b363d; stroke-width: 5; stroke-linecap: round; }
.k-val { fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255,121,0,.6)); }
.lr-editor.digital .k-val { stroke: var(--cyan); filter: drop-shadow(0 0 4px rgba(0,205,214,.55)); }
.lr-editor.analogue .k-val { stroke: var(--gold); filter: drop-shadow(0 0 4px rgba(221,170,69,.55)); }
.k-cap { fill: #2a343b; stroke: #44515a; stroke-width: 1; }
.knob-dial.turning .k-cap, .knob-dial:focus-visible .k-cap { stroke: var(--text); }
.k-tick { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.knob-val { width: 84px; padding: 4px 6px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
.knob small { font-size: 10.5px; }
.lr-editor .eq-list { margin-top: 12px; }
@media (max-width: 900px) { .lr { grid-template-columns: minmax(0, 1fr); } .lr-scope { height: 150px; } }
@media (max-width: 760px) { .lr-knobs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lr-open { flex-direction: column; align-items: flex-start; gap: 1px; }
.lr-slot .lr-read { font-size: 11px; }
.lr-knobs { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.lr-editor .eq-band { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; align-items: center; }
.lr-editor .eq-band > button { grid-column: auto; }
.eq-head { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 0; }
@media (max-width: 760px) { .lr-editor .eq-band { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lr-editor .eq-band > button { grid-column: 1 / -1; } .eq-head { display: none; } }
.lr-slot .lr-read.mread { position: static; background: none; padding: 0; font-weight: 500; color: var(--muted); }
.lr-slot.on .lr-read.mread { color: #c9d3d9; }

/* Guided assistant */
.assist { border-color: rgba(255,121,0,.45); box-shadow: inset 0 1px 0 rgba(255,121,0,.2); }
.as-step { margin-top: 14px; }
.as-step h3 { margin: 0 0 8px; font-size: 14px; }
.as-step h3 small { font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1px solid var(--line-2); background: #161e23; color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #160c02; }
.chip-btn:disabled { opacity: .45; cursor: not-allowed; }
#asGo { margin-top: 16px; }
.as-list { margin: 0 0 12px; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 14px; }
.as-ab { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.as-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.as-actions .btn { flex: 1 1 auto; }
.as-done { padding: 12px; border-radius: 12px; background: rgba(0,205,214,.07); border: 1px solid rgba(0,205,214,.35); }
.as-done h3 { color: var(--cyan); }
