:root {
    --bg-shell: #0e1419;
    --bg-shell-2: #141c22;
    --bg-main: #eef2f4;
    --surface: #ffffff;
    --surface-soft: #f6f8f9;

    --line: #d7dfe5;
    --line-strong: #bcc8d1;

    --text: #111a20;
    --text-muted: #63727c;
    --text-soft: #85939d;

    --cyan: #2fb3dc;
    --cyan-strong: #118ab7;
    --cyan-soft: rgba(47, 179, 220, 0.15);

    --ok: #3b8d63;
    --ok-bg: #ecf7f0;

    --warn: #b47a17;
    --warn-bg: #fff7e6;

    --danger: #ba534d;
    --danger-bg: #fff1ef;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-soft:
        0 1px 2px rgba(17, 26, 32, 0.05),
        0 18px 45px rgba(17, 26, 32, 0.06);

    --shadow-visual:
        0 10px 26px rgba(17, 26, 32, 0.10),
        0 30px 60px rgba(17, 26, 32, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select {
    cursor: pointer;
}

h1, h2, p {
    margin-top: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}

.shell-sidebar {
    padding: 24px 20px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) ,
        linear-gradient(180deg, var(--bg-shell), var(--bg-shell-2));
    color: #edf3f7;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.shell-sidebar__top {
    display: grid;
    gap: 20px;
    margin-bottom: 22px;
}

.shell-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.shell-brand__mark {
    width: 18px;
    height: 18px;
    display: inline-block;
    border: 2px solid var(--cyan);
    position: relative;
    flex: 0 0 auto;
}

.shell-brand__mark::before,
.shell-brand__mark::after {
    content: "";
    position: absolute;
    background: var(--cyan);
}

.shell-brand__mark::before {
    width: 2px;
    height: 24px;
    left: 6px;
    top: -5px;
}

.shell-brand__mark::after {
    height: 2px;
    width: 24px;
    top: 6px;
    left: -5px;
}

.shell-brand__text {
    display: grid;
    gap: 3px;
}

.shell-brand__text strong {
    font-size: 16px;
    letter-spacing: -0.02em;
}

.shell-brand__text span {
    color: #8ea0ab;
    font-size: 12px;
}

.shell-state {
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
}

.shell-state__row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}

.status-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-led--ok {
    background: #54d38a;
    box-shadow: 0 0 10px rgba(84, 211, 138, 0.5);
}

.shell-state strong {
    font-size: 13px;
    letter-spacing: 0.06em;
}

.shell-state p {
    margin-bottom: 0;
    color: #8ea0ab;
    font-size: 12px;
}

.shell-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.shell-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 10px;
    color: #d7e2e8;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    transition:
        background-color 150ms ease-out,
        border-color 150ms ease-out,
        transform 120ms ease-out;
}

.shell-nav a:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
}

.shell-card {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
}

.shell-card__head {
    margin-bottom: 14px;
}

.shell-card__head span {
    color: #91a5b0;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.shell-specs {
    margin: 0;
    display: grid;
    gap: 10px;
}

.shell-specs div {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
}

.shell-specs dt {
    color: #91a5b0;
    font-size: 12px;
}

.shell-specs dd {
    margin: 0;
    color: #f3f7f9;
    font-size: 13px;
    font-variant-numeric: tabular-nums lining-nums;
}

.machine-health {
    display: grid;
    gap: 10px;
}

.machine-health__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.machine-health__label {
    color: #8ea0ab;
    font-size: 12px;
}

.machine-health strong {
    font-size: 13px;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;
    font-variant-numeric: tabular-nums lining-nums;
}

.system-log {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    color: #d8e1e6;
    font-size: 12px;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;
}

.system-log li span {
    color: #78c5df;
}

.main-stage {
    padding: 26px;
}

.hero-banner {
    margin-bottom: 24px;
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(47,179,220,0.14), transparent 28%),
        linear-gradient(180deg, #ffffff, #f7f9fa);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
}

.hero-label {
    margin-bottom: 8px;
    color: var(--cyan-strong);
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-banner h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.hero-text {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 18px;
}

.hero-banner__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #f1f6f8;
    border: 1px solid #d5eaf2;
    color: #2c6578;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(420px, 0.95fr);
    gap: 24px;
    align-items: start;
}

.control-column,
.visual-column {
    display: grid;
    gap: 24px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.panel--control {
    padding: 0 24px 24px;
}

.panel--visual,
.panel--result {
    padding: 0 20px 20px;
}

.panel-head {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
}

.panel-head > div {
    min-width: 0;
}

.panel-code {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.panel-head h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.panel-head p {
    margin-bottom: 0;
    color: var(--text-soft);
    font-size: 13px;
    text-align: right;
}

.form-block {
    padding-top: 24px;
    border-bottom: 1px solid #edf1f3;
    padding-bottom: 24px;
}

.form-block:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.block-head {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
    align-items: start;
}

.block-head span {
    color: var(--text-soft);
    font-size: 13px;
}

.block-head strong {
    font-size: 16px;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.segment {
    position: relative;
    min-height: 50px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 12px;
    border-right: 1px solid var(--line-strong);
    background: #fff;
    transition:
        background-color 150ms ease-out,
        color 150ms ease-out;
}

.segment:last-child {
    border-right: 0;
}

.segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segment span {
    font-size: 14px;
    font-weight: 600;
}

.segment small {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-soft);
}

.segment--active {
    background: linear-gradient(180deg, #123241, #0f222c);
    color: #ffffff;
}

.segment--active small {
    color: #a7d0df;
}

.segment--disabled {
    background: var(--surface-soft);
    color: var(--text-soft);
    cursor: not-allowed;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

.field:last-child {
    margin-bottom: 0;
}

.field__label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

input,
select {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition:
        border-color 150ms ease-out,
        box-shadow 150ms ease-out,
        background-color 150ms ease-out;
}

input:hover,
select:hover {
    border-color: #98aab7;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(17, 138, 183, 0.20);
    outline-offset: 2px;
}

.input-unit {
    display: grid;
    grid-template-columns: 1fr auto;
}

.input-unit input {
    border-radius: 10px 0 0 10px;
}

.input-unit span {
    min-width: 50px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 12px;
}

.inline-summary {
    margin-top: 4px;
    padding: 14px 15px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfcfc, #f5f8f9);
    border: 1px solid #e5edf1;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.inline-summary strong {
    color: var(--text);
}

.form-actions {
    padding-top: 22px;
}

.primary-button,
.secondary-button {
    border: 0;
    border-radius: 12px;
    min-height: 52px;
    font-weight: 720;
    transition:
        background-color 150ms ease-out,
        transform 120ms ease-out,
        color 150ms ease-out;
}

.primary-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: linear-gradient(180deg, var(--cyan), var(--cyan-strong));
    color: #ffffff;
}

.primary-button:hover:not(:disabled) {
    filter: brightness(0.98);
}

.primary-button:active:not(:disabled) {
    transform: scale(0.985);
}

.primary-button:disabled {
    background: #c0ccd3;
    cursor: not-allowed;
}

.secondary-button {
    min-width: 180px;
    padding: 0 16px;
    background: #eff4f6;
    color: #174457;
    border: 1px solid #d3e6ee;
}

.secondary-button:hover {
    background: #e8f0f4;
}

.micro-note {
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 12px;
}

.machine-visual {
    position: relative;
    overflow: hidden;
    min-height: 460px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 20% 20%, rgba(47,179,220,0.12), transparent 30%),
        linear-gradient(180deg, #f8fbfc, #eef3f6 70%);
    border: 1px solid #e0e7eb;
    box-shadow: var(--shadow-visual);
}

.tech-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(17,26,32,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17,26,32,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.25));
    pointer-events: none;
}

.visual-hud {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hud-chip {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(8, 24, 32, 0.90);
    color: #dff5fb;
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.06em;
}

.hud-chip--muted {
    background: rgba(255,255,255,0.85);
    color: #32434d;
}

.machine-scene {
    position: relative;
    height: 320px;
    display: grid;
    place-items: center;
    padding-top: 44px;
}

.machine-floor {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: 260px;
    height: 140px;
    background: linear-gradient(180deg, #d7e0e6, #c9d3d9);
    transform: translateX(-50%) skewX(-28deg);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.machine-shadow {
    position: absolute;
    left: 50%;
    bottom: 18px;
    width: 220px;
    height: 34px;
    background: radial-gradient(ellipse at center, rgba(17,26,32,0.22), rgba(17,26,32,0));
    transform: translateX(-50%);
    filter: blur(5px);
}

.machine-body {
    position: relative;
    width: 240px;
    height: 230px;
    transform: translateY(2px);
}

.machine-body__top {
    position: absolute;
    left: 18px;
    top: 0;
    width: 176px;
    height: 26px;
    background: linear-gradient(180deg, #f0f5f8, #dde7ed);
    transform: skewX(-32deg);
    border-radius: 8px 8px 0 0;
    border: 1px solid #c9d4db;
    border-bottom: 0;
}

.machine-body__side {
    position: absolute;
    top: 22px;
    right: 0;
    width: 48px;
    height: 185px;
    background: linear-gradient(180deg, #d4dee5, #bfccd5);
    transform: skewY(33deg);
    border: 1px solid #bcc8d1;
    border-left: 0;
}

.machine-window {
    position: absolute;
    left: 0;
    top: 24px;
    width: 190px;
    height: 190px;
    border: 1px solid #bcc8d1;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.66), rgba(233,241,246,0.96)),
        linear-gradient(90deg, #eef3f6, #dde6ec);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
    overflow: hidden;
}

.machine-column {
    position: absolute;
    left: 22px;
    top: 16px;
    width: 44px;
    height: 126px;
    border-radius: 8px;
    background: linear-gradient(180deg, #d6e0e7, #b7c5cf);
}

.machine-table {
    position: absolute;
    left: 58px;
    bottom: 30px;
    width: 100px;
    height: 24px;
    background: linear-gradient(180deg, #788995, #52646f);
    border-radius: 6px;
    transform: skewX(-18deg);
}

.workpiece {
    position: absolute;
    left: 28px;
    top: -20px;
    width: 36px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(180deg, #2e5f76, #17485e);
    box-shadow: 0 0 18px rgba(23,72,94,0.18);
}

.spindle-group {
    position: absolute;
    right: 26px;
    top: 20px;
    width: 42px;
    height: 130px;
}

.spindle-head {
    position: absolute;
    top: 0;
    left: 2px;
    width: 38px;
    height: 36px;
    background: linear-gradient(180deg, #d2dde4, #bccad3);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.spindle-shaft {
    position: absolute;
    top: 28px;
    left: 18px;
    width: 6px;
    height: 42px;
    background: linear-gradient(180deg, #83939d, #546570);
    border-radius: 99px;
}

.tool {
    position: absolute;
    top: 66px;
    left: 12px;
    width: 18px;
    height: 58px;
    background:
        repeating-linear-gradient(
            180deg,
            #0c2f40,
            #0c2f40 6px,
            #2fb3dc 6px,
            #2fb3dc 12px
        );
    clip-path: polygon(24% 0, 76% 0, 100% 68%, 50% 100%, 0 68%);
    filter: drop-shadow(0 8px 8px rgba(17,26,32,0.16));
    transform-origin: 50% 20%;
}

.tool--spin {
    animation: toolSpin 1.8s linear infinite;
}

.cut-zone {
    position: absolute;
    bottom: -2px;
    left: 2px;
    width: 36px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47,179,220,0.34), rgba(47,179,220,0));
    animation: pulseZone 1.5s ease-in-out infinite;
}

.feed-path {
    position: absolute;
    left: 72px;
    bottom: 48px;
    width: 84px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47,179,220,0), rgba(47,179,220,0.95), rgba(47,179,220,0));
    animation: scanFeed 2.2s linear infinite;
}

.visual-telemetry {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.visual-telemetry article {
    padding: 12px 12px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(188, 200, 209, 0.85);
    backdrop-filter: blur(8px);
}

.visual-telemetry span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.visual-telemetry strong {
    font-size: 14px;
    font-weight: 760;
    font-variant-numeric: tabular-nums lining-nums;
}

.state-pill {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.state-pill--ok {
    color: var(--ok);
    border-color: #b7dfc6;
    background: var(--ok-bg);
}

.state-pill--warn {
    color: var(--warn);
    border-color: #eed39d;
    background: var(--warn-bg);
}

.result-empty {
    min-height: 250px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    padding: 30px 20px;
    color: var(--text-soft);
}

.result-empty__symbol {
    margin-bottom: 16px;
    color: #c3ced6;
    font-size: 42px;
    line-height: 1;
}

.result-empty strong {
    margin-bottom: 6px;
    color: var(--text-muted);
}

.result-empty p {
    max-width: 290px;
    margin-bottom: 0;
}

.result-content {
    padding-top: 18px;
}

.metric-board {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 12px;
}

.metric-card {
    min-height: 128px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfcfd, #f4f7f9);
    border: 1px solid #e1e8ec;
}

.metric-card--featured {
    grid-row: span 2;
    background:
        radial-gradient(circle at top right, rgba(47,179,220,0.18), transparent 34%),
        linear-gradient(180deg, #122c39, #0f2028);
    color: #ffffff;
    border-color: rgba(255,255,255,0.04);
}

.metric-card span {
    display: block;
    margin-bottom: 18px;
    color: var(--text-soft);
    font-size: 12px;
}

.metric-card--featured span {
    color: #a9c1cc;
}

.metric-card div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.metric-card strong {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums lining-nums;
}

.metric-card small {
    color: var(--text-soft);
    font-size: 11px;
}

.metric-card--featured small {
    color: #aac4d1;
}

.status-panel {
    margin-top: 16px;
    padding: 16px;
    border-left: 4px solid;
    border-radius: 0 12px 12px 0;
    font-size: 13px;
    line-height: 1.6;
}

.status-panel strong {
    display: block;
    margin-bottom: 4px;
}

.status-panel--ok {
    color: #245d41;
    background: var(--ok-bg);
    border-color: var(--ok);
}

.status-panel--warn {
    color: #6a4607;
    background: var(--warn-bg);
    border-color: var(--warn);
}

.result-controls {
    padding-top: 16px;
}

.calc-note {
    margin-top: 10px;
    padding: 15px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfcfd, #f2f6f8);
    border: 1px solid #e1e9ed;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.about-strip {
    margin-top: 24px;
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #10171d, #14222a);
    color: #eaf2f5;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 28px;
    box-shadow: var(--shadow-soft);
}

.about-strip__right {
    color: #c3d0d6;
}

.notice-bar {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.10);
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 16px;
}

.notice-bar strong {
    color: #ffffff;
}

.hidden {
    display: none !important;
}

.machine-visual.is-active .cut-zone {
    background: radial-gradient(circle, rgba(47,179,220,0.58), rgba(47,179,220,0));
}

.machine-visual.is-warning .cut-zone {
    background: radial-gradient(circle, rgba(212,146,33,0.55), rgba(212,146,33,0));
}

.machine-visual.is-warning .tool {
    background:
        repeating-linear-gradient(
            180deg,
            #523609,
            #523609 6px,
            #f3af3b 6px,
            #f3af3b 12px
        );
}

.machine-visual.is-warning .hud-chip:first-child,
.machine-visual.is-warning .hud-chip--muted {
    background: rgba(98, 62, 8, 0.92);
    color: #fff2cf;
}

.machine-visual.is-warning .visual-telemetry article {
    border-color: rgba(202, 168, 102, 0.75);
    background: rgba(255, 249, 237, 0.88);
}

.machine-visual.is-idle .feed-path {
    opacity: 0.35;
}

@keyframes toolSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseZone {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.55;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.95;
    }
}

@keyframes scanFeed {
    0% {
        transform: translateX(-18px);
        opacity: 0.40;
    }
    50% {
        transform: translateX(12px);
        opacity: 1;
    }
    100% {
        transform: translateX(-18px);
        opacity: 0.40;
    }
}

@media (max-width: 1320px) {
    .app-shell {
        grid-template-columns: 248px minmax(0, 1fr);
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .visual-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .shell-sidebar {
        padding: 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }

    .shell-nav {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-stage {
        padding: 18px;
    }

    .hero-banner,
    .about-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hero-banner {
        padding: 22px 18px;
    }

    .hero-text {
        font-size: 16px;
    }

    .panel--control,
    .panel--visual,
    .panel--result {
        padding-left: 16px;
        padding-right: 16px;
    }

    .panel-head {
        min-height: 78px;
        align-items: flex-start;
        padding-top: 16px;
        padding-bottom: 16px;
        flex-direction: column;
    }

    .panel-head p {
        text-align: left;
    }

    .block-head {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .segmented,
    .field-row,
    .metric-board,
    .visual-telemetry,
    .shell-nav,
    .notice-bar {
        grid-template-columns: 1fr;
    }

    .metric-card--featured {
        grid-row: auto;
    }

    .machine-visual {
        min-height: 520px;
    }

    .machine-scene {
        height: 280px;
    }

    .visual-telemetry {
        position: static;
        padding: 18px;
    }

    .about-strip {
        padding: 22px 18px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .primary-button:hover:not(:disabled),
    .secondary-button:hover {
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
