:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #0e1014;
  --panel-2: #12151a;
  --line: #252a32;
  --muted: #858d99;
  --text: #f6f8fb;
  --blue: #168cff;
  --blue-deep: #075bcc;
  --ok: #45d38a;
  --danger: #ff5a67;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgba(22,140,255,.11), transparent 29%),
    var(--bg);
  background-size: 56px 56px, 56px 56px, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, textarea, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 36px; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 14px; letter-spacing: .15em; }
.brand strong { color: var(--blue); }
.brand-mark { width: 28px; height: 28px; position: relative; display: inline-block; border: 2px solid var(--blue); transform: rotate(45deg); }
.brand-mark::after { content: ""; position: absolute; inset: 6px; background: var(--blue); }
.status { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.status span { width: 8px; height: 8px; border-radius: 50%; background: #7f8792; box-shadow: 0 0 0 5px rgba(127,135,146,.08); }
.status.ready span { background: var(--ok); box-shadow: 0 0 0 5px rgba(69,211,138,.08); }
.status.error span { background: var(--danger); box-shadow: 0 0 0 5px rgba(255,90,103,.08); }
.hero { padding: 74px 0 56px; display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 50px; }
.eyebrow { grid-column: 1 / -1; margin: 0 0 -12px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .19em; }
h1 { margin: 0; font-size: clamp(54px, 7vw, 108px); line-height: .9; letter-spacing: -.065em; font-weight: 760; }
h1 em { color: transparent; -webkit-text-stroke: 1px #68717e; font-style: normal; }
.lead { margin: 0 0 8px; color: #a8afb9; line-height: 1.65; max-width: 430px; font-size: 17px; }
.workspace { display: grid; grid-template-columns: 1.65fr .85fr; min-height: 490px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.editor-panel { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.monitor-panel { display: flex; flex-direction: column; min-width: 0; background: var(--panel-2); }
.panel-head { min-height: 53px; padding: 0 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.panel-head > div { display: flex; gap: 16px; }
.label { color: #c7ccd3; font-weight: 700; }
.counter { color: var(--muted); }
.text-button { border: 0; color: var(--blue); background: transparent; padding: 8px; cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
textarea { width: 100%; flex: 1; min-height: 320px; padding: 28px; resize: none; border: 0; outline: 0; color: var(--text); background: transparent; font-size: clamp(19px, 2vw, 29px); line-height: 1.47; font-weight: 420; }
textarea::placeholder { color: #424850; }
.controls { min-height: 92px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px,1fr) 125px auto auto; align-items: stretch; }
.controls label { padding: 15px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.controls label span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.controls input, .controls select { min-width: 0; border: 0; outline: 0; background: transparent; color: #dfe4eb; font-size: 12px; }
.controls select { cursor: pointer; }
.primary, .stop { border: 0; padding: 0 24px; cursor: pointer; font-weight: 750; }
.primary { background: var(--blue); color: white; display: flex; gap: 10px; align-items: center; }
.primary:hover { background: #2696ff; }
.primary:disabled { opacity: .48; cursor: wait; }
.stop { color: #f2f3f5; background: #1b1e24; border-left: 1px solid var(--line); }
.stop:disabled { color: #555c66; cursor: default; }
.play-icon { font-size: 11px; }
.wave { height: 118px; margin: 28px 22px 12px; display: flex; align-items: center; justify-content: space-between; gap: 5px; border-bottom: 1px solid var(--line); }
.wave i { display: block; width: 4px; height: 10%; background: #3d4652; transition: height .12s ease, background .12s ease; }
.wave.active i { background: var(--blue); animation: bounce .8s ease-in-out infinite alternate; }
.wave.active i:nth-child(3n) { animation-delay: -.35s; }
.wave.active i:nth-child(4n) { animation-delay: -.6s; }
@keyframes bounce { from { height: 12%; } to { height: 78%; } }
.readout { padding: 10px 22px 18px; display: grid; gap: 13px; }
.readout div { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid #1d2127; padding-bottom: 11px; }
.readout small { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.readout strong { text-align: right; font-size: 11px; font-weight: 650; color: #dfe4ea; }
.log { margin: 0 22px; min-height: 105px; max-height: 142px; overflow: auto; font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; color: #919aa6; }
.log p { margin: 0 0 7px; line-height: 1.45; }
.log time { color: var(--blue); margin-right: 8px; }
.download { margin: auto 22px 22px; min-height: 44px; border: 1px solid #333944; background: transparent; color: #dfe4eb; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.download:hover:not(:disabled) { border-color: var(--blue); color: white; }
.download:disabled { opacity: .35; cursor: default; }
footer { display: flex; gap: 28px; align-items: center; padding-top: 19px; color: #666e78; font-size: 10px; letter-spacing: .08em; }
footer code { color: #aab1bb; }
footer a { margin-left: auto; color: var(--blue); text-decoration: none; }
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 25px; }
  .workspace { grid-template-columns: 1fr; }
  .editor-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .monitor-panel { min-height: 430px; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 1440px); }
  .topbar { height: 68px; }
  .status b { display: none; }
  .hero { padding: 48px 0 35px; }
  h1 { font-size: 52px; }
  .lead { font-size: 15px; }
  .controls { grid-template-columns: 1fr 110px; }
  .controls .key-field { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .primary, .stop { min-height: 62px; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  footer a { margin-left: 0; }
}
