:root {
  color-scheme: light;
  --page: #f2f6f4;
  --surface: #fff;
  --surface-soft: #edf3f0;
  --ink: #17221f;
  --muted: #687773;
  --line: #d9e3df;
  --green: #16785c;
  --green-dark: #0f6049;
  --green-soft: #e0f3eb;
  --cyan: #087e96;
  --violet: #6855a8;
  --amber: #a16b09;
  --blue: #4567ea;
  --blue-dark: #263d9a;
  --purple: #8150d7;
  --coral: #eb6a67;
  --sun: #f2b84b;
  --red: #a73d47;
  --red-soft: #fbebed;
  --shadow: 0 20px 55px rgba(21, 52, 43, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { background: var(--page); color: var(--ink); margin: 0; min-height: 100vh; }
.authenticated {
  color-scheme: light;
  --page: #f2f4fb;
  --surface: #fff;
  --surface-soft: #eef1f8;
  --ink: #17213a;
  --muted: #69758b;
  --line: #dbe1ed;
  --green: #168872;
  --green-dark: #0d6655;
  --green-soft: #ddf4ed;
  --cyan: #168ca8;
  --violet: #7454c6;
  --amber: #9b690b;
  --red-soft: #fbebed;
  background:
    radial-gradient(circle at 10% 4%, rgba(69, 103, 234, .16), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(129, 80, 215, .13), transparent 27rem),
    radial-gradient(circle at 55% 68%, rgba(22, 166, 150, .09), transparent 35rem),
    #f2f4fb;
}
.authenticated .primary-button { color: #fff; }
button, input { font: inherit; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.appbar {
  align-items: center;
  background: linear-gradient(105deg, rgba(15, 23, 55, .97), rgba(36, 51, 107, .96) 56%, rgba(76, 45, 112, .96));
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand, .login-brand { align-items: center; display: inline-flex; gap: 12px; text-decoration: none; }
.brand > span:last-child, .login-brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong, .login-brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small, .login-brand small { color: var(--muted); font-size: 11px; margin-top: 5px; text-transform: uppercase; letter-spacing: .08em; }
.brand-mark { align-items: center; background: var(--green); border-radius: 11px; color: #fff; display: grid; height: 38px; place-items: center; width: 38px; }
.appbar .brand strong { color: #fff; }
.appbar .brand small { color: rgba(255, 255, 255, .62); }
.appbar .brand-mark { background: linear-gradient(145deg, #58d9c0, #6f83ff); box-shadow: 0 8px 22px rgba(34, 203, 178, .24); color: #101a39; }
.brand-mark svg { height: 29px; width: 29px; }
.brand-mark-large { border-radius: 15px; height: 50px; width: 50px; }
.brand-mark-large svg { height: 38px; width: 38px; }

.appbar-actions { align-items: center; display: flex; gap: 18px; }
.product-nav { align-items: center; display: flex; gap: 5px; }
.product-nav a { border: 1px solid transparent; border-radius: 8px; color: rgba(255,255,255,.7); font-size: 12px; font-weight: 700; padding: 8px 10px; text-decoration: none; }
.product-nav a:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.12); color: #fff; }
.environment { align-items: center; color: rgba(255, 255, 255, .72); display: flex; font-size: 13px; gap: 7px; }
.environment i, .secure-pill i, .quality-badge i { background: var(--green); border-radius: 50%; display: inline-block; height: 8px; width: 8px; }
.identity { border-left: 1px solid rgba(255, 255, 255, .2); color: #fff; display: grid; padding-left: 18px; text-align: right; }
.identity strong { font-size: 13px; }
.identity small { color: rgba(255, 255, 255, .6); font-size: 11px; margin-top: 2px; }
.icon-button { align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .13); border-radius: 9px; color: rgba(255, 255, 255, .8); cursor: pointer; display: flex; height: 38px; justify-content: center; width: 38px; }
.icon-button:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .25); color: #fff; }
.icon-button svg { height: 20px; width: 20px; }

.shell { margin: 0 auto; max-width: 1180px; padding: 52px 24px 72px; }
.footer { color: var(--muted); display: flex; font-size: 12px; justify-content: space-between; margin: 0 auto; max-width: 1180px; padding: 0 24px 28px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; line-height: 1.02; margin-bottom: 12px; }
h2 { font-size: 24px; letter-spacing: -.025em; margin-bottom: 7px; }
h3 { font-size: 16px; margin-bottom: 5px; }
p { color: var(--muted); line-height: 1.6; }
.eyebrow { color: var(--green); display: block; font-size: 11px; font-weight: 750; letter-spacing: .12em; margin-bottom: 10px; text-transform: uppercase; }
.pill, .version-chip, .quality-badge { align-items: center; border-radius: 999px; display: inline-flex; font-size: 12px; font-weight: 700; gap: 7px; padding: 8px 11px; white-space: nowrap; }

.hero-row, .report-title { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 30px; }
.hero-row p, .report-title p { margin-bottom: 0; }
.report-title h1 { overflow-wrap: anywhere; }
.version-chip { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.portal-hero, .report-hero {
  background: linear-gradient(122deg, #111a3c, #273f82 54%, #674080);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
  box-shadow: 0 24px 65px rgba(29, 38, 90, .23);
  color: #fff;
  overflow: hidden;
  padding: 34px 36px;
  position: relative;
}
.portal-hero::after, .report-hero::after {
  background: radial-gradient(circle, rgba(255,255,255,.26) 0 2px, transparent 3px);
  background-size: 18px 18px;
  content: "";
  height: 180px;
  opacity: .32;
  position: absolute;
  right: -30px;
  top: -45px;
  transform: rotate(12deg);
  width: 270px;
}
.portal-hero > *, .report-hero > * { position: relative; z-index: 1; }
.portal-hero .eyebrow, .report-hero .eyebrow { color: #78e3c9; }
.portal-hero p, .report-hero p { color: rgba(255,255,255,.68); }
.portal-hero .version-chip { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.report-hero .quality-badge { box-shadow: 0 8px 25px rgba(0,0,0,.13); }
.back-link { color: var(--muted); display: inline-block; font-size: 13px; margin-bottom: 28px; text-decoration: none; }
.back-link:hover { color: var(--green); }

.alert { border-radius: 12px; line-height: 1.5; margin-bottom: 18px; padding: 13px 16px; }
.alert-error { background: var(--red-soft); border: 1px solid #efcbd0; color: #7c2832; }

.demo-banner {
  align-items: center;
  background: linear-gradient(112deg, #6c4bd2, #4568e8 51%, #15a698);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  box-shadow: 0 22px 55px rgba(67, 75, 171, .25);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: 170px 1fr auto;
  margin: -8px 0 24px;
  min-height: 156px;
  overflow: hidden;
  padding: 24px 28px;
  position: relative;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.demo-banner:hover { box-shadow: 0 28px 70px rgba(67, 75, 171, .34); transform: translateY(-2px); }
.demo-visual { align-items: flex-end; display: flex; gap: 8px; height: 85px; justify-content: center; }
.demo-visual i { animation: demo-bars 2.8s ease-in-out infinite alternate; background: rgba(255,255,255,.78); border-radius: 7px 7px 2px 2px; display: block; height: 35%; width: 11px; }
.demo-visual i:nth-child(2) { animation-delay: -.5s; height: 72%; }
.demo-visual i:nth-child(3) { animation-delay: -1.2s; height: 48%; }
.demo-visual i:nth-child(4) { animation-delay: -.9s; height: 92%; }
.demo-visual i:nth-child(5) { animation-delay: -1.6s; height: 58%; }
.demo-visual i:nth-child(6) { animation-delay: -.2s; height: 78%; }
.demo-visual i:nth-child(7) { animation-delay: -1.1s; height: 42%; }
@keyframes demo-bars { to { transform: scaleY(.55); transform-origin: bottom; } }
.demo-copy { display: grid; }
.demo-copy small { color: #baf8e9; font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.demo-copy strong { font-size: 25px; letter-spacing: -.025em; margin: 7px 0 5px; }
.demo-copy > span { color: rgba(255,255,255,.7); font-size: 13px; }
.demo-action { align-items: center; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; display: flex; font-size: 13px; font-weight: 750; gap: 15px; padding: 12px 14px; }
.demo-action b { font-size: 18px; }

.upload-card { background: rgba(255,255,255,.88); border: 1px solid rgba(91, 106, 177, .2); border-radius: 18px; box-shadow: 0 18px 48px rgba(36, 49, 108, .12); margin-bottom: 48px; overflow: hidden; }
.upload-card input[type="file"] { height: 1px; opacity: 0; position: absolute; width: 1px; }
.drop-zone { align-items: center; background: radial-gradient(circle at 50% -50%, rgba(69, 103, 234, .16), transparent 58%), linear-gradient(145deg, rgba(255,255,255,.7), rgba(243,245,255,.85)); cursor: pointer; display: flex; flex-direction: column; min-height: 250px; justify-content: center; outline: 2px dashed transparent; outline-offset: -13px; padding: 35px; transition: .18s ease; }
.drop-zone:hover, .drop-zone.is-dragging { background-color: #eff1ff; outline-color: rgba(69, 103, 234, .48); }
.upload-icon { align-items: center; background: linear-gradient(145deg, #e4e9ff, #dfd6fb); border-radius: 16px; color: var(--blue); display: flex; height: 56px; justify-content: center; margin-bottom: 18px; width: 56px; }
.upload-icon svg { height: 27px; width: 27px; }
.drop-zone strong { font-size: 19px; }
.drop-zone > span:not(.upload-icon) { color: var(--muted); margin-top: 5px; }
.drop-zone small { color: var(--muted); font-size: 12px; margin-top: 18px; }
.upload-submit { align-items: center; background: var(--surface-soft); border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 14px 18px; }
.upload-submit > span { display: grid; }
.upload-submit small { color: var(--muted); margin-top: 3px; }

.primary-button { align-items: center; background: linear-gradient(110deg, var(--blue), var(--purple)); border: 0; border-radius: 10px; box-shadow: 0 9px 22px rgba(69,103,234,.22); color: #fff; cursor: pointer; display: inline-flex; font-weight: 700; gap: 22px; justify-content: center; padding: 12px 17px; text-decoration: none; transition: .15s ease; }
.primary-button:hover { box-shadow: 0 12px 28px rgba(69,103,234,.31); filter: brightness(1.06); transform: translateY(-1px); }
.primary-button.wide { justify-content: space-between; width: 100%; }

.section-heading { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 4px; }
.section-heading p { font-size: 13px; margin-bottom: 0; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.recording-list { background: rgba(255,255,255,.88); border: 1px solid rgba(91, 106, 177, .18); border-radius: 16px; box-shadow: 0 16px 40px rgba(36,49,108,.09); overflow: hidden; }
.recording-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: 42px minmax(220px, 1fr) 92px 92px 140px 22px; padding: 16px 18px; text-decoration: none; transition: .15s ease; }
.recording-row:last-child { border-bottom: 0; }
.recording-row:hover { background: linear-gradient(90deg, rgba(69,103,234,.07), rgba(129,80,215,.05)); }
.file-icon { align-items: center; background: linear-gradient(145deg, #e4e9ff, #e4daf8); border-radius: 10px; color: var(--blue); display: flex; height: 40px; justify-content: center; width: 40px; }
.file-icon svg { height: 22px; width: 22px; }
.recording-name, .recording-stat { display: grid; min-width: 0; }
.recording-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-name small, .recording-stat small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.recording-stat strong { font-size: 14px; margin-top: 2px; }
.quality-badge { justify-self: start; }
.quality-good { background: var(--green-soft); color: var(--green-dark); }
.quality-attention { background: #fff3d9; color: #7b580b; }
.quality-attention i { background: #b27a08; }
.row-arrow { color: var(--muted); font-size: 20px; }
.empty-state { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; padding: 55px 24px; text-align: center; }
.empty-state .file-icon { margin-bottom: 15px; }
.empty-state p { margin-bottom: 0; }

.summary-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.summary-grid article { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(31,45,96,.08); min-width: 0; overflow: hidden; padding: 17px; position: relative; }
.summary-grid article::before { content: ""; height: 4px; inset: 0 0 auto; position: absolute; }
.summary-grid article:nth-child(1)::before { background: linear-gradient(90deg, #4d72ed, #55bdea); }
.summary-grid article:nth-child(2)::before { background: linear-gradient(90deg, #8b55dc, #d06bc4); }
.summary-grid article:nth-child(3)::before { background: linear-gradient(90deg, #18a58f, #68d4a9); }
.summary-grid article:nth-child(4)::before { background: linear-gradient(90deg, #e76868, #f1b74e); }
.summary-grid span, .summary-grid small { color: var(--muted); display: block; font-size: 11px; }
.summary-grid strong { display: block; font-size: 22px; letter-spacing: -.03em; margin: 8px 0 5px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chart-card, .mini-chart-card, .quality-card, .signal-table-card { background: rgba(255,255,255,.93); border: 1px solid rgba(91,106,177,.17); border-radius: 16px; box-shadow: 0 14px 40px rgba(31,45,96,.09); }
.chart-card { overflow: hidden; padding: 25px 22px 22px; position: relative; }
.chart-card::before { background: linear-gradient(90deg, #4567ea, #8250d8, #16a696, #f0b54b); content: ""; height: 5px; inset: 0 0 auto; position: absolute; }
.chart-header { align-items: flex-start; display: flex; justify-content: space-between; }
.chart-header p { font-size: 13px; margin-bottom: 0; }
.live-values { display: flex; gap: 22px; }
.live-values > span { display: grid; grid-template-columns: 10px auto; column-gap: 7px; }
.live-values small { color: var(--muted); font-size: 11px; }
.live-values strong { grid-column: 2; margin-top: 2px; }
.legend-dot { align-self: center; border-radius: 50%; height: 8px; width: 8px; }
.legend-dot.left { background: var(--green); }
.legend-dot.right { background: var(--cyan); }
.chart-wrap { height: 340px; margin-top: 12px; position: relative; }
.chart-wrap canvas, .mini-chart-card canvas { height: 100%; width: 100%; }
.chart-loading { align-items: center; background: rgba(255,255,255,.8); color: var(--muted); display: flex; inset: 0; justify-content: center; position: absolute; }
.scrubber { accent-color: var(--green); margin: 8px 0 2px; width: 100%; }
.time-axis { color: var(--muted); display: flex; font-size: 11px; justify-content: space-between; }
.time-axis strong { color: var(--ink); }

.report-lower-grid { display: grid; gap: 14px; grid-template-columns: 1.55fr 1fr; margin-top: 14px; }
.mini-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-chart-card { display: grid; grid-template-rows: auto 1fr; min-height: 305px; padding: 18px; }
.mini-chart-card:first-child { background: linear-gradient(145deg, rgba(246,242,255,.98), rgba(255,255,255,.94)); border-color: rgba(129,80,215,.22); }
.mini-chart-card:last-child { background: linear-gradient(145deg, rgba(239,252,248,.98), rgba(255,255,255,.94)); border-color: rgba(22,166,150,.22); }
.mini-chart-card header { align-items: flex-start; display: flex; justify-content: space-between; }
.mini-chart-card header strong { font-size: 13px; }
.mini-chart-card canvas { min-height: 190px; }
.quality-card { background: linear-gradient(145deg, rgba(236,251,246,.98), rgba(255,255,255,.95)); border-color: rgba(22,166,150,.22); padding: 20px; }
.quality-card header p { font-size: 13px; margin-bottom: 0; }
.quality-list { margin-top: 20px; }
.quality-check { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 11px; padding: 10px 0; }
.quality-check:first-child { padding-top: 0; }
.quality-check:last-child { border-bottom: 0; }
.quality-check > span:last-child { display: grid; }
.quality-check small { color: var(--muted); margin-top: 3px; }
.check-icon { align-items: center; border-radius: 50%; display: flex; flex: 0 0 24px; font-size: 12px; font-weight: 800; height: 24px; justify-content: center; }
.check-ok { background: var(--green-soft); color: var(--green); }
.check-warn { background: #fff3d9; color: #7b580b; }
.warnings { background: #fff9eb; border: 1px solid #f1dfb2; border-radius: 10px; color: #6f5312; font-size: 12px; margin-top: 12px; padding: 10px 12px; }
.warnings summary { cursor: pointer; font-weight: 750; }
.warnings ul { line-height: 1.5; margin: 8px 0 0; padding-left: 18px; }

.signal-table-card { margin-top: 14px; overflow: hidden; }
.signal-table-card > header { align-items: center; display: flex; justify-content: space-between; padding: 19px 21px 12px; }
.signal-table-card > header > span { color: var(--muted); font-size: 12px; }
.signal-table { border-top: 1px solid var(--line); }
.signal-table-head, .signal-table-row { display: grid; gap: 12px; grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(90px, 1fr)); padding: 11px 21px; }
.signal-table-head { background: linear-gradient(90deg, #eef1ff, #f2ebfb); color: #536078; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.signal-table-row { border-top: 1px solid var(--line); font-size: 13px; }
.signal-table-row:first-of-type { border-top: 0; }
.signal-table-row span { color: var(--muted); }

.login-body { background: #0d1c18; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(430px, .75fr); min-height: 100vh; }
.login-story { background: linear-gradient(140deg, #0c2b22, #123a2e 55%, #0f2923); color: #fff; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 50px clamp(40px, 7vw, 105px); position: relative; }
.login-story .brand-mark { background: #72d7af; color: #103a2e; }
.login-story .login-brand small { color: rgba(255,255,255,.6); }
.story-copy { max-width: 660px; position: relative; z-index: 2; }
.story-copy .eyebrow { color: #72d7af; }
.story-copy h1 { font-size: clamp(46px, 6vw, 78px); line-height: .98; }
.story-copy p { color: rgba(255,255,255,.7); font-size: 17px; max-width: 560px; }
.story-ribbons { bottom: -12%; left: -12%; opacity: .23; position: absolute; right: -15%; top: 25%; transform: rotate(-9deg); }
.story-ribbons i { border: 2px solid #87e0bd; border-radius: 50%; display: block; height: 44%; margin-top: -17%; transform: skewX(-22deg); width: 110%; }
.login-panel { align-items: center; background: var(--page); display: flex; justify-content: center; padding: 38px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 19px; box-shadow: var(--shadow); max-width: 420px; padding: 38px; width: 100%; }
.secure-pill { background: var(--green-soft); color: var(--green-dark); margin-bottom: 25px; }
.login-card h2 { font-size: 30px; }
.login-card > p { font-size: 14px; margin-bottom: 24px; }
.login-card label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 7px; margin-bottom: 16px; }
.login-card input { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); outline: none; padding: 13px 14px; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,120,92,.12); }
.login-note { color: var(--muted); display: block; line-height: 1.5; margin-top: 17px; text-align: center; }
.error-state { min-height: 430px; }
.error-code { color: var(--green); font-size: 68px; font-weight: 800; letter-spacing: -.06em; }

.workspace-intro { margin-bottom: 30px; max-width: 700px; }
.workspace-intro h1 { font-size: clamp(40px, 5vw, 64px); }
.workspace-intro p { font-size: 16px; }
.tool-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-card { background: rgba(255,255,255,.94); border: 1px solid rgba(91,106,177,.2); border-radius: 24px; box-shadow: 0 22px 55px rgba(31,45,96,.12); color: var(--ink); min-height: 400px; overflow: hidden; padding: 34px; position: relative; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.tool-card::before { content: ""; height: 7px; inset: 0 0 auto; position: absolute; }
.tool-card::after { border-radius: 50%; content: ""; filter: blur(1px); height: 260px; opacity: .18; position: absolute; right: -95px; top: -105px; width: 260px; }
.tool-card-recorder::before { background: linear-gradient(90deg, #4568e8, #7851d3, #16a698); }
.tool-card-recorder::after { background: linear-gradient(135deg, #4568e8, #16a698); }
.tool-card-generator::before { background: linear-gradient(90deg, #8150d7, #e66b94, #f1b64b); }
.tool-card-generator::after { background: linear-gradient(135deg, #8150d7, #f1b64b); }
.tool-card:hover { box-shadow: 0 28px 70px rgba(31,45,96,.18); transform: translateY(-4px); }
.tool-card > * { position: relative; z-index: 1; }
.tool-icon { align-items: center; background: linear-gradient(145deg, #e6ebff, #e4daf8); border-radius: 18px; color: var(--blue); display: flex; height: 68px; justify-content: center; margin-bottom: 45px; width: 68px; }
.tool-card-generator .tool-icon { background: linear-gradient(145deg, #eee5ff, #fff0d8); color: var(--purple); }
.tool-icon svg { height: 36px; width: 36px; }
.tool-status { align-items: center; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 999px; display: flex; font-size: 11px; font-weight: 750; gap: 7px; padding: 7px 10px; position: absolute; right: 26px; top: 27px; }
.tool-status i { background: var(--green); border-radius: 50%; height: 7px; width: 7px; }
.tool-card > strong { display: block; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; line-height: 1.05; margin-bottom: 15px; }
.tool-card p { font-size: 14px; margin-bottom: 30px; max-width: 460px; }
.tool-action { align-items: center; color: var(--blue); display: inline-flex; font-size: 13px; font-weight: 800; gap: 13px; }
.tool-card-generator .tool-action { color: var(--purple); }
.tool-action b { font-size: 20px; transition: transform .15s ease; }
.tool-card:hover .tool-action b { transform: translateX(4px); }
.workspace-note { font-size: 12px; margin: 22px 4px 0; }

.generator-hero { background: linear-gradient(122deg, #21123f, #5b348e 54%, #a14e78); }
.generator-summary { display: grid; gap: 12px; grid-template-columns: 2fr repeat(3, 1fr); margin-bottom: 16px; }
.generator-summary article { background: rgba(255,255,255,.93); border: 1px solid rgba(91,106,177,.18); border-radius: 14px; box-shadow: 0 10px 30px rgba(31,45,96,.07); min-width: 0; padding: 16px 18px; }
.generator-summary span, .generator-summary small { color: var(--muted); display: block; font-size: 11px; }
.generator-summary strong { display: block; font-size: 20px; margin: 7px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.json-workbench { background: rgba(255,255,255,.94); border: 1px solid rgba(91,106,177,.2); border-radius: 18px; box-shadow: 0 18px 50px rgba(31,45,96,.11); overflow: hidden; }
.json-toolbar { align-items: center; display: flex; gap: 24px; justify-content: space-between; padding: 22px 24px 18px; }
.json-toolbar h2, .json-toolbar p { margin-bottom: 0; }
.json-toolbar p { font-size: 12px; }
.json-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.json-actions input[type="file"] { height: 1px; opacity: 0; position: absolute; width: 1px; }
.secondary-button { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 700; justify-content: center; padding: 11px 14px; }
.secondary-button:hover { background: var(--surface-soft); border-color: #b9c3d7; }
.json-status { align-items: center; border-bottom: 1px solid; border-top: 1px solid; display: flex; font-size: 12px; font-weight: 700; gap: 8px; padding: 10px 24px; }
.json-status i { border-radius: 50%; height: 8px; width: 8px; }
.json-status-valid { background: #e9f8f3; border-color: #ccecdf; color: #12644f; }
.json-status-valid i { background: #1a9877; }
.json-status-error { background: var(--red-soft); border-color: #efcbd0; color: #7c2832; }
.json-status-error i { background: #bc4754; }
.json-editor-label { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.json-editor { background: #11182c; border: 0; color: #dce7ff; display: block; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 13px; line-height: 1.55; min-height: 590px; outline: none; padding: 24px; resize: vertical; tab-size: 2; width: 100%; }
.json-editor:focus { box-shadow: inset 0 0 0 2px rgba(111,131,255,.55); }
.json-workbench-footer { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 20px; justify-content: space-between; padding: 12px 18px; }
.text-button { background: transparent; border: 0; color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 800; white-space: nowrap; }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-story { min-height: 42vh; padding: 35px; }
  .story-copy { margin-top: 70px; }
  .story-copy h1 { font-size: 44px; }
  .login-panel { padding: 28px 20px; }
  .recording-row { grid-template-columns: 42px minmax(150px, 1fr) 80px 140px 22px; }
  .recording-row .recording-stat:nth-of-type(3) { display: none; }
  .report-lower-grid { grid-template-columns: 1fr; }
  .demo-banner { grid-template-columns: 120px 1fr; }
  .demo-action { display: none; }
  .product-nav { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 350px; }
  .generator-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .json-toolbar { align-items: flex-start; flex-direction: column; }
  .json-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .appbar { height: 64px; padding: 0 16px; }
  .environment, .identity { display: none; }
  .shell { padding: 34px 16px 55px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 6px; padding: 0 16px 24px; }
  .hero-row, .report-title, .chart-header { align-items: stretch; flex-direction: column; gap: 15px; }
  .report-title h1 { font-size: 31px; }
  .version-chip, .quality-badge { align-self: flex-start; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 270px; }
  .recording-row { grid-template-columns: 40px minmax(0, 1fr) 22px; }
  .recording-row .recording-stat, .recording-row .quality-badge { display: none; }
  .upload-submit { align-items: stretch; flex-direction: column; gap: 12px; }
  .drop-zone { min-height: 230px; padding: 28px 18px; text-align: center; }
  .signal-table { overflow-x: auto; }
  .signal-table-head, .signal-table-row { min-width: 720px; }
  .login-card { padding: 28px 22px; }
  .login-story { min-height: 38vh; }
  .story-copy { margin-top: 50px; }
  .story-copy h1 { font-size: 37px; }
  .story-copy p { display: none; }
  .demo-banner { gap: 15px; grid-template-columns: 72px 1fr; min-height: 132px; padding: 20px; }
  .demo-visual { gap: 4px; height: 62px; }
  .demo-visual i { width: 6px; }
  .demo-copy strong { font-size: 20px; }
  .demo-copy > span { font-size: 11px; }
  .brand > span:last-child small { display: none; }
  .brand strong { font-size: 14px; }
  .tool-card { min-height: 330px; padding: 28px 24px; }
  .tool-icon { margin-bottom: 36px; }
  .tool-status { right: 20px; top: 22px; }
  .generator-summary { grid-template-columns: 1fr 1fr; }
  .generator-summary article:first-child { grid-column: 1 / -1; }
  .json-actions { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .json-actions .primary-button { grid-column: 1 / -1; }
  .json-editor { font-size: 11px; min-height: 520px; padding: 16px; }
  .json-workbench-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --page:#101615; --surface:#18211f; --surface-soft:#202b28; --ink:#f2f7f5; --muted:#a9b7b2; --line:#34423e; --green:#66d2aa; --green-dark:#8be4c0; --green-soft:#173d32; --cyan:#62d4ea; --violet:#b6a7f4; --amber:#f0c66d; --red-soft:#402428; --shadow:0 20px 55px rgba(0,0,0,.35); }
  .appbar { background: rgba(24,33,31,.91); }
  .brand-mark, .primary-button { color: #10231d; }
  .primary-button:hover { background: #7addb6; }
  .alert-error { border-color:#6d3b42; color:#ffbdc4; }
  .quality-attention, .check-warn { background:#493a17; color:#f1cf7a; }
  .warnings { background:#3b311a; border-color:#5c4b24; color:#efd17f; }
  .chart-loading { background:rgba(24,33,31,.82); }
  .login-panel { background:var(--page); }
  .login-body { background:#0d1c18; }
  .authenticated .appbar { background: linear-gradient(105deg, rgba(15, 23, 55, .97), rgba(36, 51, 107, .96) 56%, rgba(76, 45, 112, .96)); }
}
