:root {
    color-scheme: light;
    --paper: #f5f4ee;
    --paper-deep: #eceae2;
    --ink: #0d0f0d;
    --muted: #6e706a;
    --line: rgba(13, 15, 13, .25);
    --lime: #ccff00;
    --lime-deep: #b8ed00;
    --danger: #ff5f4a;
    --white: #fbfaf5;
    --page: 1440px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --safe-top: max(10px, env(safe-area-inset-top));
    --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; overflow-x: hidden; scroll-behavior: smooth; background: var(--paper); }
body {
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 82% 7%, rgba(204, 255, 0, .10), transparent 28rem),
        linear-gradient(180deg, #f7f6f0, var(--paper));
    color: var(--ink);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { display: block; }

.ops-shell {
    width: min(calc(100% - 32px), var(--page));
    margin: 0 auto;
    padding: var(--safe-top) 0 var(--safe-bottom);
}

.ops-header {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 118px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    overflow: hidden;
    border: 1px solid var(--ink);
    background: linear-gradient(100deg, #0b0d0b 0%, #11150e 60%, #223607 100%);
    color: var(--white);
    box-shadow: 7px 7px 0 var(--lime);
}

.ops-header::after {
    position: absolute;
    right: 11%;
    bottom: 0;
    width: 114px;
    height: 5px;
    background: var(--lime);
    content: "";
}

.ops-brand { display: flex; min-width: 0; align-items: center; gap: 18px; }
.ops-logo {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    place-items: center;
    border: 8px solid var(--white);
    outline: 1px solid var(--ink);
    background: var(--lime);
    color: var(--ink);
    box-shadow: 4px 4px 0 rgba(204, 255, 0, .78);
    transform: rotate(-2deg);
}
.ops-logo svg { width: 39px; height: 39px; }
.ops-brand-copy { min-width: 0; }
.ops-kicker, .eyebrow, .stat-label, .stat-index, .console-code {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.ops-kicker { display: flex; align-items: center; gap: 10px; color: var(--lime); }
.ops-kicker::before { width: 24px; height: 2px; background: var(--danger); content: ""; }
.ops-wordmark { margin-top: 6px; font-size: clamp(24px, 3.5vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: .96; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.ops-wordmark span.ops-by-tag { display: inline-flex !important; margin-left: 0; padding: 4px 8px !important; background: var(--lime) !important; color: var(--ink) !important; font-size: 11px !important; font-weight: 800 !important; letter-spacing: .1em !important; text-transform: uppercase !important; border-radius: 2px !important; vertical-align: middle !important; }
.ops-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.session-badge { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid rgba(255,255,255,.28); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.session-badge i { position: relative; display: block; width: 8px; height: 8px; contain: paint; isolation: isolate; border-radius: 50%; background: #f2b84b; }
.session-badge i::after { position: absolute; inset: -4px; z-index: -1; border-radius: 50%; background: currentColor; content: ""; opacity: .2; transform: scale(.8); pointer-events: none; }
.session-badge.is-live i { color: var(--lime); background: var(--lime); }
.session-badge.is-live i::after { animation: pulse 1.8s ease-in-out infinite; }
.session-badge.is-error i { background: var(--danger); box-shadow: 0 0 0 5px rgba(255,95,74,.12); }
.icon-button { display: grid; width: 46px; height: 46px; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.65); border-radius: 0; background: transparent; color: var(--white); cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:active:not(:disabled) { transform: translateY(1px); }
.icon-button:disabled { cursor: wait; opacity: .45; }

.ops-nav {
    display: grid;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-top: 22px;
    overflow: hidden;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}
.nav-tab { display: flex; min-width: 0; min-height: 60px; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; transition: background .16s var(--ease), color .16s var(--ease); }
.nav-tab:last-child { border-right: 0; }
.nav-tab svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav-tab.active { background: var(--lime); color: var(--ink); }

.hero-section { display: grid; min-width: 0; min-height: 360px; grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr); align-items: center; gap: 42px; padding: 58px 10.5% 44px; }
.eyebrow { margin: 0; color: var(--muted); }
.hero-copy h1 { max-width: 870px; margin: 16px 0 22px; font-size: clamp(64px, 8vw, 120px); font-weight: 500; letter-spacing: -.078em; line-height: .82; }
.hero-description { max-width: 650px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.system-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.system-chips span { display: inline-flex; min-height: 30px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); background: rgba(255,255,255,.24); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime-deep); }
.hero-mark { position: relative; display: grid; width: min(280px, 100%); aspect-ratio: 1; justify-self: center; place-items: center; border: 1px solid rgba(13,15,13,.13); border-radius: 50%; transform: rotate(-7deg); }
.mark-grid { display: grid; grid-template-columns: repeat(2, 54px); gap: 26px; }
.mark-grid i { width: 54px; height: 54px; border: 1px solid rgba(13,15,13,.15); border-radius: 8px; }
.hero-mark > span { position: absolute; right: -34px; bottom: 36px; width: 150px; height: 8px; background: rgba(204,255,0,.5); }

.stats-grid { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.stat-card { position: relative; display: flex; min-width: 0; min-height: 190px; flex-direction: column; justify-content: flex-end; padding: 24px 20px 22px; overflow: hidden; border-right: 1px solid var(--line); }
.stat-card:last-child { border-right: 0; }
.stat-index { position: absolute; top: 13px; left: 14px; color: var(--muted); }
.stat-card strong { display: block; max-width: 100%; overflow: visible; font-size: clamp(38px, 4.8vw, 70px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; white-space: nowrap; }
.stat-label { display: block; margin-top: 16px; color: var(--ink); }
.stat-card small { display: block; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stat-accent::after { position: absolute; top: 0; right: 0; width: 34px; height: 7px; background: var(--lime); content: ""; }

.workspace-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .45fr); gap: 18px; padding: 54px 0 30px; }
.console-card, .mini-panel { min-width: 0; border: 1px solid var(--ink); background: rgba(255,255,255,.24); }
.console-card::before { display: block; width: 100%; height: 8px; background: var(--lime); content: ""; }
.console-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 26px 28px 0; }
.console-heading h2 { margin: 6px 0 0; font-size: clamp(28px, 3.5vw, 46px); font-weight: 600; letter-spacing: -.055em; line-height: 1; }
.console-code { flex: 0 0 auto; color: var(--muted); }
.console-description { max-width: 780px; margin: 0; padding: 16px 28px 26px; color: var(--muted); line-height: 1.65; }
.target-form { border-top: 1px solid var(--ink); }
.target-form label { display: block; padding: 14px 20px 0; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.input-row { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.ops-input { width: 100%; min-width: 0; min-height: 66px; padding: 0 20px; border: 0; border-radius: 0; outline: 0; background: var(--white); color: var(--ink); font-size: 15px; }
.ops-input::placeholder { color: #96978f; }
.ops-input:focus { box-shadow: inset 0 0 0 3px var(--lime); }
.primary-button, .secondary-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 14px; border-radius: 0; cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.primary-button { min-width: 220px; padding: 0 20px; border: 0; border-left: 1px solid var(--ink); background: var(--lime); }
.primary-button b { font-size: 18px; font-weight: 500; }
.primary-button:active:not(:disabled), .secondary-button:active:not(:disabled) { transform: translateY(1px); }
.primary-button:disabled, .secondary-button:disabled { cursor: wait; opacity: .5; }
.btn-svg-icon { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 2.2; }
.result-box { padding: 22px 28px; border-top: 1px solid var(--ink); border-left: 8px solid #f0b543; background: #11140f; color: var(--white); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.65; }
.result-box[hidden] { display: none; }
.result-box[data-tone="success"] { border-left-color: var(--lime); }
.result-box[data-tone="error"] { border-left-color: var(--danger); }
.result-box[data-tone="loading"] { border-left-color: #60a5fa; }
.result-header-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.result-icon-svg { width: 22px; height: 22px; flex: 0 0 auto; }
.result-box[data-tone="success"] .result-icon-svg { color: var(--lime); stroke: var(--lime); }
.result-box[data-tone="error"] .result-icon-svg { color: var(--danger); stroke: var(--danger); }
.result-box[data-tone="loading"] .result-icon-svg { color: #60a5fa; stroke: #60a5fa; }
.result-kicker { color: var(--lime); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.result-title { margin: 2px 0 8px; font-family: "Plus Jakarta Sans", sans-serif; font-size: 18px; font-weight: 700; }
.result-line { color: #c9ccc2; word-break: break-word; }
.side-stack { display: grid; min-width: 0; gap: 18px; }
.mini-panel { display: flex; min-height: 190px; flex-direction: column; justify-content: space-between; padding: 24px; }
.pulse-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; }
.pulse-value strong { overflow: visible; font-size: clamp(34px, 4vw, 54px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; white-space: nowrap; }
.pulse-value span { padding-bottom: 2px; color: var(--muted); font-size: 13px; font-weight: 700; }
.secondary-button { width: 100%; padding: 0 15px; border: 1px solid var(--ink); background: transparent; }
.lime-panel { background: var(--lime); }
.lime-panel h3 { max-width: 260px; margin: 24px 0 12px; font-size: 24px; letter-spacing: -.045em; line-height: 1.05; }
.lime-panel p:last-child { margin: 0; color: #373a31; font-size: 12px; line-height: 1.6; }
.settings-output { min-height: 300px; }
.ops-footer { display: flex; justify-content: space-between; gap: 20px; padding: 16px 2px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }

.inline-svg-icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 8px; flex-shrink: 0; }
.result-user-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; margin-bottom: 12px; padding: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; }
.result-avatar-wrapper { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.result-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--lime); background: #1a1a1a; display: block; }
.result-avatar-fallback { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--lime); background: #ccff00; color: #0d100d; display: grid; place-items: center; font-size: 20px; font-weight: 800; text-transform: uppercase; }
.result-user-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.result-user-name { font-size: 16px; font-weight: 700; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-user-handle { font-size: 13px; color: var(--lime); font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-detail-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.12); }
.result-detail-item { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #e5e7eb; font-family: monospace; }
.result-detail-item label { display: flex; align-items: center; color: var(--muted); font-family: sans-serif; font-size: 12px; font-weight: 600; }
.result-detail-item strong { max-width: 68%; color: #ffffff; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.action-row { display: grid; border-top: 1px solid var(--ink); }
.action-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-row .primary-button, .action-row .secondary-button, .action-row .danger-button { width: 100%; min-height: 58px; border-top: 0; }
.action-row > * + * { border-left: 1px solid var(--ink); }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.action-grid.padded { padding: 20px; border-top: 1px solid var(--ink); }
.tall { min-height: 92px; flex-direction: column; gap: 7px; }
.tall b { font-size: 14px; }
.tall span { color: var(--muted); font-size: 9px; }
.primary-button.tall span { color: #313821; }
.danger-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid var(--ink); border-radius: 0; background: var(--danger); color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.danger-button:disabled { cursor: wait; opacity: .5; }
.master-summary { margin: 0 28px 24px; padding: 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); }
.compare-inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; border-top: 1px solid var(--ink); }
.compare-inputs span { display: grid; height: 100%; min-width: 58px; place-items: center; border-inline: 1px solid var(--ink); background: var(--lime); font-size: 11px; font-weight: 800; }
.full-button { width: 100%; min-height: 58px; border-top: 1px solid var(--ink); border-left: 0; }
.pulse-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 28px 26px; border-top: 1px solid var(--ink); }
.pulse-strip > div { display: flex; align-items: baseline; gap: 8px; }
.pulse-strip strong { font-size: clamp(44px, 7vw, 78px); line-height: 1; }
.pulse-strip span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.result-box[data-tone="warning"] { border-left-color: #f0b543; }
.result-box[data-tone="warning"] .result-symbol { color: #f0b543; }
.result-symbol { display: grid; width: 24px; height: 24px; place-items: center; color: var(--lime); font-size: 20px; font-weight: 800; }
.confirmation-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(5, 7, 5, .78); backdrop-filter: blur(7px); }
.confirmation-card { width: min(100%, 590px); padding: 28px; border: 1px solid var(--ink); background: var(--paper); box-shadow: 9px 9px 0 var(--lime); }
.confirmation-card h2 { margin: 10px 0; font-size: clamp(30px, 6vw, 48px); letter-spacing: -.05em; }
.confirmation-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.confirmation-card .action-row { margin: 22px -28px -28px; }
.confirmation-meta { margin-top: 18px; padding: 16px; background: var(--ink); color: var(--white); }
.warning-mark { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 18px; background: var(--danger); font-size: 28px; font-weight: 800; }

@keyframes pulse { 50% { opacity: 0; transform: scale(1.8); } }
@keyframes spinRot { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.result-icon-svg.spin { animation: spinRot 1s linear infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.ops-header, .ops-nav, .hero-copy, .stats-grid, .workspace-grid { animation: rise .34s var(--ease) both; }
.ops-nav { animation-delay: .04s; }.hero-copy { animation-delay: .08s; }.stats-grid { animation-delay: .12s; }.workspace-grid { animation-delay: .16s; }

@media (hover: hover) and (pointer: fine) {
    .nav-tab:hover { background: var(--lime); color: var(--ink); }
    .primary-button:hover:not(:disabled), .secondary-button:hover:not(:disabled) { background: var(--lime-deep); }
}

@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
}

[data-page-hidden] .session-badge.is-live i::after { animation-play-state: paused; }

@media (max-width: 900px) {
    .ops-shell { width: min(calc(100% - 20px), var(--page)); }
    .ops-header { min-height: 94px; padding: 14px; box-shadow: 4px 4px 0 var(--lime); }
    .ops-logo { width: 56px; height: 56px; border-width: 6px; }
    .ops-logo svg { width: 30px; height: 30px; }
    .ops-wordmark { font-size: 30px; }
    .ops-wordmark span, .session-badge { display: none; }
    .ops-nav { display: flex; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-snap-type: x proximity; }
    .ops-nav::-webkit-scrollbar { display: none; }
    .nav-tab { min-width: 96px; min-height: 62px; flex: 0 0 96px; flex-direction: column; justify-content: center; gap: 5px; padding: 7px; text-align: center; scroll-snap-align: start; }
    .nav-tab span { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hero-section { min-height: 290px; grid-template-columns: 1fr; padding: 40px 8px 34px; }
    .hero-copy h1 { font-size: clamp(52px, 15.8vw, 78px); }
    .hero-mark { display: none; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .stat-card { min-height: 148px; padding: 22px 14px 16px; }
    .stat-card:nth-child(2) { border-right: 0; }
    .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .stat-card strong { font-size: clamp(42px, 13vw, 64px); }
    .stat-label { margin-top: 16px; font-size: 8px; }
    .workspace-grid { grid-template-columns: 1fr; padding-top: 34px; }
    .side-stack { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .action-row.three { grid-template-columns: 1fr; }
    .action-row.three > * + *, .action-row.two > * + * { border-left: 0; border-top: 1px solid var(--ink); }
}

@media (max-width: 560px) {
    .ops-shell { width: calc(100% - 12px); }
    .ops-header { gap: 8px; }
    .ops-brand { gap: 10px; }
    .ops-logo { width: 48px; height: 48px; border-width: 5px; }
    .ops-logo svg { width: 27px; height: 27px; }
    .ops-wordmark { font-size: clamp(22px, 7vw, 27px); }
    .ops-kicker { font-size: 8px; }
    .icon-button { width: 44px; height: 44px; }
    .hero-section { padding: 34px 8px 28px; }
    .hero-copy h1 { margin: 12px 0 18px; font-size: clamp(48px, 16vw, 68px); line-height: .86; }
    .hero-description { font-size: 13px; line-height: 1.6; }
    .system-chips { margin-top: 18px; }
    .system-chips span { min-height: 28px; font-size: 8px; }
    .stat-card { min-height: 142px; }
    .stat-card strong { font-size: clamp(38px, 12.5vw, 54px); }
    .console-heading { padding: 22px 18px 0; }
    .console-heading h2 { font-size: 30px; }
    .console-code { display: none; }
    .console-description { padding: 14px 18px 20px; font-size: 12px; }
    .target-form label { padding-left: 15px; }
    .input-row { grid-template-columns: 1fr; }
    .ops-input { min-height: 58px; padding: 0 15px; font-size: 16px; }
    .primary-button { min-width: 0; min-height: 58px; border-top: 1px solid var(--ink); border-left: 0; }
    .result-box { padding: 18px; }
    .side-stack { grid-template-columns: 1fr; }
    .mini-panel { min-height: 174px; }
    .ops-footer { flex-direction: column; gap: 5px; }
    .action-grid, .action-row.two, .compare-inputs { grid-template-columns: 1fr; }
    .compare-inputs span { min-height: 38px; border: 0; border-block: 1px solid var(--ink); }
    .master-summary { margin-inline: 18px; }
    .pulse-strip { align-items: stretch; flex-direction: column; padding-inline: 18px; }
    .confirmation-card { padding: 22px; }
    .confirmation-card .action-row { margin: 20px -22px -22px; }
    .result-detail-item { align-items: flex-start; flex-direction: column; gap: 4px; }
    .result-detail-item strong { max-width: 100%; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
