:root {
  --canvas: #101011;
  --sidebar: #171718;
  --surface: #18181a;
  --surface-raised: #1d1d20;
  --surface-soft: #141416;
  --ink: #f1f1f3;
  --muted: #929298;
  --subtle: #696970;
  --line: #2b2b30;
  --line-strong: #3b3b42;
  --purple: #5d29f0;
  --purple-hover: #7142f4;
  --purple-soft: rgba(93, 41, 240, .14);
  --yellow: #f4c542;
  --green: #2ac47d;
  --green-soft: rgba(42, 196, 125, .1);
  --red: #f06b70;
  --amber: #e7b83e;
  --amber-soft: rgba(231, 184, 62, .09);
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid rgba(122, 102, 255, .58); outline-offset: 2px; }
::selection { background: rgba(104, 84, 247, .4); color: #fff; }
* { scrollbar-color: #44444c #171719; scrollbar-width: thin; }

.app-frame { display: grid; grid-template: 64px minmax(0, 1fr) / 248px minmax(0, 1fr); min-height: 100vh; }
.topbar { position: sticky; z-index: 30; top: 0; grid-column: 1 / -1; display: grid; grid-template-columns: 248px 1fr auto; height: 64px; border-bottom: 1px solid var(--line); background: #161617; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 18px; border-right: 1px solid var(--line); color: inherit; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 5px); align-items: end; gap: 3px; width: 23px; height: 23px; padding: 4px; border: 1px solid #414147; border-radius: 4px; background: #1c1c1f; }
.brand-mark span { display: block; height: 7px; border-radius: 1px; background: var(--purple); }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 10px; }
.brand-mark.large { width: 42px; height: 42px; grid-template-columns: repeat(3, 8px); gap: 4px; padding: 7px; }
.brand-mark.large span:nth-child(1) { height: 12px; }
.brand-mark.large span:nth-child(2) { height: 24px; }
.brand-mark.large span:nth-child(3) { height: 18px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 14px; letter-spacing: -.02em; font-weight: 620; }
.brand-copy small { margin-top: 5px; color: #74747b; font: 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.topbar-center { display: flex; align-items: center; gap: 9px; padding-left: 22px; color: #74747b; font-size: 11px; }
.topbar-center i { color: #44444a; font-style: normal; }
.topbar-center strong { color: #bdbdc2; font-weight: 500; }
.account-area { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.session-clock { color: #77777e; font-size: 10px; }
.runtime-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: #a3a3a9; font: 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.runtime-chip > i { width: 6px; height: 6px; border-radius: 50%; background: #75757d; }
.runtime-chip.live { border-color: rgba(42, 196, 125, .24); background: var(--green-soft); color: #7cdaad; }
.runtime-chip.live > i { background: var(--green); box-shadow: 0 0 0 3px rgba(42, 196, 125, .11); }
.runtime-chip.hosted { border-color: rgba(93, 41, 240, .35); background: var(--purple-soft); color: #b7a6fa; }
.runtime-chip.hosted > i { background: #8060f5; box-shadow: 0 0 0 3px rgba(93, 41, 240, .12); }
.runtime-chip.demo { border-color: rgba(231, 184, 62, .28); background: var(--amber-soft); color: #e1bd61; }
.runtime-chip.demo > i { background: var(--amber); }
.account-button { display: flex; align-items: center; gap: 9px; min-width: 172px; min-height: 36px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 4px; background: #1b1b1d; color: #dedee2; font-size: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.account-button:hover { border-color: #484850; background: #202023; }
.account-button svg { width: 15px; height: 15px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 1.6; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #686870; box-shadow: 0 0 0 3px rgba(104, 104, 112, .12); }
.status-dot.connected { background: var(--green); box-shadow: 0 0 0 3px rgba(42, 196, 125, .12); }

.sidebar { position: sticky; top: 64px; display: flex; flex-direction: column; height: calc(100vh - 64px); padding: 28px 17px 16px; overflow: auto; border-right: 1px solid var(--line); background: var(--sidebar); }
.kicker { display: block; color: #8d7eff; font: 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; }
.kicker.dark { color: #727279; }
.sidebar-intro { padding: 0 7px; }
.sidebar-intro h1 { margin: 11px 0 7px; font-size: 19px; line-height: 1.15; letter-spacing: -.035em; font-weight: 580; }
.sidebar-intro p { margin: 0 0 27px; color: #7e7e85; font-size: 10px; line-height: 1.55; }
.workflow-nav { position: relative; display: flex; flex-direction: column; gap: 6px; }
.workflow-nav::before { position: absolute; top: 27px; bottom: 27px; left: 23px; width: 1px; background: #303035; content: ""; }
.workflow-step { position: relative; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 12px; min-height: 56px; padding: 8px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #77777e; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.workflow-step:hover { border-color: #303036; background: #1b1b1e; color: #aaaab0; }
.workflow-step .step-number { z-index: 1; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #3a3a40; border-radius: 6px; background: var(--sidebar); color: #77777f; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; transition: border-color .15s, background .15s, color .15s; }
.workflow-step > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.workflow-step strong { color: #c5c5ca; font-size: 11px; font-weight: 550; }
.workflow-step small { font-size: 9px; }
.workflow-step.active { border-color: rgba(93, 41, 240, .34); background: linear-gradient(90deg, rgba(93, 41, 240, .11), rgba(93, 41, 240, .025)); color: #9999a0; }
.workflow-step.active .step-number { border-color: rgba(117, 75, 244, .8); background: var(--purple-soft); color: #b9a6ff; box-shadow: 0 0 0 3px rgba(93, 41, 240, .08); }
.workflow-step.complete .step-number { border-color: rgba(42, 196, 125, .38); background: rgba(42, 196, 125, .08); color: #62d39d; font-size: 0; }
.workflow-step.complete .step-number::after { content: "✓"; font: 10px/1 sans-serif; }
.security-note { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin-top: auto; padding: 14px 12px; border: 1px solid var(--line); border-radius: 4px; background: #1b1b1d; }
.security-note svg { width: 18px; fill: none; stroke: #77777e; stroke-linejoin: round; stroke-width: 1.4; }
.security-note div { display: flex; flex-direction: column; gap: 5px; }
.security-note strong { color: #bebec3; font-size: 10px; font-weight: 550; }
.security-note span { color: #717178; font-size: 8px; line-height: 1.5; }
.sidebar-footer { display: flex; justify-content: space-between; margin-top: 15px; padding: 0 3px; color: #57575e; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .13em; }

.workspace { min-width: 0; padding: 36px clamp(22px, 4vw, 58px) 25px; }
.mode-banner { display: grid; grid-template-columns: 38px 1fr; gap: 13px; max-width: 1260px; margin: 0 auto 19px; padding: 12px 14px; border: 1px solid rgba(231, 184, 62, .25); border-radius: 4px; background: var(--amber-soft); }
.mode-banner-icon { display: grid; height: 30px; place-items: center; border: 1px solid rgba(231, 184, 62, .3); border-radius: 3px; color: #e3bd5b; font: 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.mode-banner div { display: flex; flex-direction: column; gap: 4px; }
.mode-banner strong { color: #e8d7a5; font-size: 10px; font-weight: 570; }
.mode-banner p { margin: 0; color: #9b8c68; font-size: 9px; line-height: 1.45; }
.mode-banner code { padding: 1px 4px; border-radius: 3px; background: rgba(0, 0, 0, .22); color: #d6c28d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.workspace-heading { display: flex; justify-content: space-between; gap: 30px; max-width: 1260px; margin: 0 auto 24px; }
.workspace-heading h2 { margin: 9px 0 7px; font-size: clamp(27px, 3vw, 36px); line-height: 1.08; letter-spacing: -.045em; font-weight: 570; }
.workspace-heading p { max-width: 650px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.route-badge { display: flex; align-items: center; align-self: flex-end; padding: 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); }
.service-logo { display: grid; width: 34px; height: 34px; padding: 5px; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .07); border-radius: 5px; }
.service-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.service-logo.hf { background: #ffd21e; }
.service-logo.rp { padding: 0; background: var(--purple); }
.route-line { position: relative; width: 54px; height: 1px; margin: 0 7px; background: #44444b; }
.route-line::after { position: absolute; top: -3px; right: 0; width: 7px; height: 7px; border-top: 1px solid #55555c; border-right: 1px solid #55555c; transform: rotate(45deg); content: ""; }
.route-line i { position: absolute; top: -2px; left: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--purple); animation: travel 2s ease-in-out infinite; }
@keyframes travel { 0%, 15% { transform: translateX(0); opacity: 0; } 35% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(31px); opacity: 0; } }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(315px, .85fr); gap: 16px; max-width: 1260px; margin: 0 auto; align-items: start; }
.primary-column, .secondary-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.muted-card { background: #151517; }
.muted-card .card-header, .muted-card .manifest-locked, .muted-card .destination-body { opacity: .58; }
.card-header { display: flex; justify-content: space-between; gap: 18px; align-items: center; min-height: 76px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-header > div:first-child { display: flex; align-items: center; gap: 13px; }
.section-index { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: #818188; font: 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.card-header h3 { margin: 0; font-size: 13px; letter-spacing: -.015em; font-weight: 590; }
.card-header p { margin: 5px 0 0; color: #7f7f86; font-size: 9px; }
.card-status { padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 3px; color: #85858c; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.card-status.ready { border-color: rgba(42, 196, 125, .28); background: var(--green-soft); color: #6bd59f; }

.source-form { display: grid; grid-template-columns: minmax(250px, 1fr) 145px auto; gap: 11px; align-items: end; padding: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { color: #8b8b92; font: 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.field > small { color: #6f6f76; font-size: 8px; line-height: 1.45; }
.input-shell { display: flex; align-items: center; height: 41px; border: 1px solid #37373d; border-radius: 3px; background: #121214; transition: border-color .15s, box-shadow .15s; }
.input-shell:focus-within { border-color: #6f5aff; box-shadow: 0 0 0 3px rgba(104, 84, 247, .12); }
.input-shell > span { padding-left: 11px; color: #717178; font: 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.input-shell input { width: 100%; height: 100%; min-width: 0; padding: 0 11px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.input-shell input::placeholder { color: #5d5d64; }
.input-shell input:disabled { color: #77777e; -webkit-text-fill-color: #77777e; opacity: 1; cursor: not-allowed; }
.mono-input input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 41px; padding: 0 15px; border: 1px solid transparent; border-radius: 3px; background: var(--purple); color: #fff; font-size: 10px; font-weight: 580; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; }
.button:hover:not(:disabled) { background: var(--purple-hover); }
.button:disabled { cursor: not-allowed; opacity: .38; }
.button svg { width: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.button.loading span::after { display: inline-block; width: 11px; overflow: hidden; vertical-align: bottom; animation: dots 1.2s steps(4, end) infinite; content: "…"; }
@keyframes dots { 0% { width: 0; } 100% { width: 11px; } }
.source-result { display: grid; grid-template-columns: 1.6fr 2fr; gap: 20px; margin: 0 18px 18px; padding: 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-soft); }
.commit-block { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.commit-block span, .source-result dt { color: #74747b; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.commit-block code { overflow: hidden; color: #b1b1b7; font: 9px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; }
.source-result dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.source-result dl div { display: flex; flex-direction: column; gap: 7px; }
.source-result dd { margin: 0; font-size: 10px; font-weight: 600; }

.selection-total { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.selection-total strong { font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.selection-total span { color: #77777e; font-size: 8px; }
.manifest-locked { display: flex; flex-direction: column; align-items: center; padding: 42px 20px 45px; text-align: center; }
.empty-icon { display: grid; width: 43px; height: 43px; margin-bottom: 14px; place-items: center; border: 1px dashed #3d3d43; border-radius: 50%; }
.empty-icon svg { width: 20px; fill: none; stroke: #77777e; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.2; }
.manifest-locked strong { color: #b6b6bc; font-size: 11px; font-weight: 560; }
.manifest-locked p { max-width: 380px; margin: 7px 0 0; color: #74747b; font-size: 9px; line-height: 1.5; }
.manifest-toolbar { display: flex; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.filter-group { display: flex; gap: 4px; flex-wrap: wrap; }
.filter { padding: 7px 9px; border: 0; border-radius: 3px; background: transparent; color: #7f7f86; font-size: 8px; cursor: pointer; }
.filter:hover { color: #d8d8dc; background: #222225; }
.filter.active { background: var(--purple-soft); color: #b0a6ff; }
.search-field { display: flex; align-items: center; width: 165px; height: 31px; border: 1px solid #34343a; border-radius: 3px; background: #141416; }
.search-field svg { width: 14px; margin-left: 9px; fill: none; stroke: #77777e; stroke-width: 1.3; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; padding: 0 7px; color: var(--ink); font-size: 9px; }
.manifest-actions { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #151517; }
.check-label { display: flex; align-items: center; gap: 8px; color: #909097; font-size: 8px; cursor: pointer; }
.check-label input, .file-name input { position: absolute; opacity: 0; }
.check-label > span, .file-check { display: grid; width: 14px; height: 14px; place-items: center; border: 1px solid #48484f; border-radius: 2px; background: #111113; }
.check-label input:checked + span, .file-name input:checked + .file-check { border-color: var(--purple); background: var(--purple); }
.check-label input:checked + span::after, .file-name input:checked + .file-check::after { width: 6px; height: 3px; border-bottom: 1.5px solid #fff; border-left: 1.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); content: ""; }
.text-button { padding: 4px 0; border: 0; border-bottom: 1px solid #56565e; background: transparent; color: #aaaab0; font-size: 8px; cursor: pointer; }
.text-button:hover { color: #fff; border-color: #a4a4aa; }
.text-button.danger { color: var(--red); border-color: rgba(240, 107, 112, .4); }
.file-table { max-height: 330px; overflow: auto; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) 86px 80px; align-items: center; min-height: 42px; padding: 0 16px; border-bottom: 1px solid #27272b; }
.file-row:last-child { border-bottom: 0; }
.file-head { position: sticky; z-index: 2; top: 0; min-height: 30px; background: #171719; color: #6e6e75; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.file-item:hover { background: #1d1d20; }
.file-name { display: flex; align-items: center; gap: 10px; min-width: 0; font: 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; cursor: pointer; }
.file-name code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-kind { color: #73737a; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.file-size { color: #9a9aa1; font: 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; }
.file-empty { padding: 32px; color: #77777e; font-size: 9px; text-align: center; }

.private-badge { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid rgba(42, 196, 125, .25); border-radius: 3px; background: var(--green-soft); color: #68d39e; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.private-badge svg { width: 11px; fill: none; stroke: currentColor; stroke-linejoin: round; stroke-width: 1.25; }
.destination-body { padding: 17px; }
.destination-body .field + .field { margin-top: 15px; }
.owner-input { position: relative; }
.owner-input input { padding-right: 38px; }
.verified-mark { position: absolute; right: 10px; display: grid; width: 18px; height: 18px; padding: 0 !important; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green) !important; font: 10px/1 sans-serif !important; }
.destination-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 19px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--line); }
.destination-facts div { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 11px; background: #151517; }
.destination-facts div:nth-child(3) { grid-column: 1 / -1; }
.destination-facts span { color: #73737a; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.destination-facts strong { overflow: hidden; font-size: 9px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.accent-value { color: #9d8fff; }

.relay-card { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: 4px; background: #171719; }
.relay-visual, .relay-copy, .relay-summary, .start-button, .start-note { position: relative; }
.relay-visual { display: grid; grid-template-columns: auto minmax(25px, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 26px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.relay-endpoint { display: flex; align-items: center; gap: 9px; min-width: 0; }
.relay-endpoint > span:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.relay-endpoint strong { font-size: 9px; font-weight: 590; white-space: nowrap; }
.relay-endpoint small { color: #74747b; font: 7px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.destination-endpoint { justify-content: flex-end; text-align: left; }
.relay-node { display: grid; flex: 0 0 auto; width: 36px; height: 36px; padding: 5px; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-radius: 5px; }
.relay-node img { display: block; width: 100%; height: 100%; object-fit: contain; }
.source-node { background: #ffd21e; }
.dest-node { padding: 0; background: var(--purple); }
.relay-track { display: flex; align-items: center; justify-content: space-evenly; height: 1px; min-width: 22px; background: #414148; }
.relay-track i { width: 3px; height: 3px; border-radius: 50%; background: #8d70f6; }
.relay-track i:nth-child(2) { opacity: .65; }
.relay-track i:nth-child(3) { opacity: .35; }
.relay-copy h3 { margin: 9px 0 9px; font-size: 19px; line-height: 1.15; letter-spacing: -.03em; font-weight: 540; }
.relay-copy p { margin: 0; color: #85858c; font-size: 9px; line-height: 1.62; }
.relay-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 19px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.relay-summary div { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 0; }
.relay-summary div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.relay-summary span { color: #717178; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.relay-summary strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.start-button { width: 100%; }
.start-note { display: flex; align-items: flex-start; gap: 7px; margin: 11px 0 0; color: #6f6f76; font-size: 7px; line-height: 1.4; }
.start-note svg { flex: 0 0 auto; width: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.1; }

.transfer-card { max-width: 1260px; margin: 16px auto 0; padding: 22px; }
.transfer-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: #9d8fff; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(104, 84, 247, .14); } }
.transfer-header h3 { margin: 9px 0 5px; font-size: 18px; letter-spacing: -.025em; }
.transfer-header p { margin: 0; color: var(--muted); font-size: 9px; }
.progress-track { display: block; width: 100%; height: 6px; margin: 23px 0 16px; overflow: hidden; border: 0; border-radius: 3px; appearance: none; background: #29292e; }
.progress-track::-webkit-progress-bar { background: #29292e; }
.progress-track::-webkit-progress-value { background: var(--purple); transition: width .5s ease; }
.progress-track::-moz-progress-bar { background: var(--purple); transition: width .5s ease; }
.transfer-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 3px; }
.transfer-stats div { display: flex; flex-direction: column; gap: 7px; padding: 12px; }
.transfer-stats div + div { border-left: 1px solid var(--line); }
.transfer-stats span, .current-object > div > span { color: #74747b; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.transfer-stats strong { font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.current-object { display: grid; grid-template-columns: 58px 1fr auto; gap: 13px; align-items: center; margin-top: 12px; padding: 12px; border-radius: 3px; background: #141416; }
.object-index { color: #7b7b82; font: 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.current-object > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.current-object code { overflow: hidden; font: 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.stream-state { color: var(--green); font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.recovery-panel { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 12px; padding: 13px; border: 1px solid rgba(93, 41, 240, .28); border-radius: 3px; background: rgba(93, 41, 240, .07); }
.recovery-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 5px; background: var(--purple-soft); color: #a78ffa; }
.recovery-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.recovery-panel > div:nth-child(2) { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.recovery-panel span { color: #9d86f4; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.recovery-panel strong { font-size: 10px; font-weight: 580; }
.recovery-panel code { overflow: hidden; color: #9a9aa1; font: 8px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.recovery-panel small { color: #6f6f76; font-size: 7px; line-height: 1.45; }
.recovery-copy { border-color: rgba(93, 41, 240, .35); color: #b19cf8; }
.completion-panel { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; margin-top: 14px; padding: 14px; border: 1px solid rgba(42, 196, 125, .27); border-radius: 3px; background: var(--green-soft); }
.completion-panel.demo-result { border-color: rgba(231, 184, 62, .28); background: var(--amber-soft); }
.completion-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; }
.demo-result .completion-mark { background: var(--amber); color: #2f260c; }
.completion-mark svg { width: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.completion-panel > div:nth-child(2) { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.completion-panel span { color: #63d49e; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.demo-result span { color: #dfbb62; }
.completion-panel strong { font-size: 12px; }
.completion-panel code { overflow: hidden; color: #919198; font: 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { padding: 9px 11px; border: 1px solid rgba(42, 196, 125, .32); border-radius: 3px; background: #171719; color: #69d5a0; font-size: 8px; cursor: pointer; }
.demo-result .copy-button { border-color: rgba(231, 184, 62, .3); color: #dfbb62; }
.workspace-footer { display: flex; justify-content: space-between; max-width: 1260px; margin: 21px auto 0; color: #5f5f66; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }

.auth-dialog { width: min(850px, calc(100vw - 32px)); max-width: none; padding: 0; overflow: hidden; border: 1px solid #333339; border-radius: 6px; background: transparent; box-shadow: var(--shadow); }
.auth-dialog::backdrop { background: rgba(4, 4, 5, .82); backdrop-filter: blur(4px); }
.auth-layout { display: grid; grid-template-columns: .9fr 1.1fr; min-height: 540px; }
.auth-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 33px; overflow: hidden; border-right: 1px solid var(--line); background: #141416; }
.auth-story::after { position: absolute; right: -95px; bottom: -95px; width: 250px; height: 250px; border: 1px solid rgba(104, 84, 247, .18); border-radius: 50%; box-shadow: 0 0 0 31px rgba(104, 84, 247, .025), 0 0 0 62px rgba(104, 84, 247, .015); content: ""; }
.dialog-close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 30px; height: 30px; border: 0; background: transparent; color: #73737a; font-size: 22px; cursor: pointer; }
.dialog-close:hover { color: #fff; }
.auth-story h2 { margin: 11px 0 12px; font-size: 32px; line-height: 1; letter-spacing: -.045em; font-weight: 560; }
.auth-story p { max-width: 330px; margin: 0; color: #85858c; font-size: 10px; line-height: 1.68; }
.security-list { position: relative; z-index: 1; display: flex; flex-direction: column; margin: 25px 0 0; padding: 0; list-style: none; }
.security-list li { display: grid; grid-template-columns: 28px 1fr; gap: 11px; padding: 13px 0; border-top: 1px solid #2c2c31; }
.security-list li > span { color: #606067; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.security-list div { display: flex; flex-direction: column; gap: 5px; }
.security-list strong { color: #babac0; font-size: 9px; font-weight: 550; }
.security-list small { color: #707077; font-size: 7px; line-height: 1.45; }
.auth-form-side { display: flex; flex-direction: column; justify-content: center; padding: 43px; background: var(--surface); }
.access-panel { width: 100%; }
.auth-heading > span { color: #75757c; font: 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .11em; text-transform: uppercase; }
.auth-heading h3 { margin: 10px 0 9px; font-size: 23px; letter-spacing: -.035em; font-weight: 580; }
.auth-heading p { margin: 0 0 24px; color: #85858c; font-size: 9px; line-height: 1.55; }
.demo-auth-note { display: flex; flex-direction: column; gap: 4px; margin: -8px 0 19px; padding: 10px 11px; border: 1px solid rgba(231, 184, 62, .23); border-radius: 3px; background: var(--amber-soft); }
.demo-auth-note strong { color: #dfbd66; font-size: 9px; }
.demo-auth-note span { color: #958763; font-size: 8px; }
.credential-field + .credential-field { margin-top: 18px; }
.credential-field > span { display: flex; justify-content: space-between; }
.credential-field b { padding: 2px 4px; border-radius: 2px; background: var(--purple-soft); color: #a99eff; font-size: 7px; font-weight: 600; }
.credential-field b.optional { background: #242428; color: #898990; }
.secret-input { position: relative; }
.secret-input > svg { flex: 0 0 auto; width: 16px; margin-left: 10px; fill: none; stroke: #797980; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.25; }
.secret-input input { padding-right: 51px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.secret-input button { position: absolute; right: 10px; border: 0; background: transparent; color: #83838a; font-size: 8px; cursor: pointer; }
.connect-button { width: 100%; margin-top: 23px; min-height: 45px; }
.auth-error { margin-top: 13px; padding: 10px; border-left: 3px solid var(--red); background: rgba(240, 107, 112, .07); color: #f18b8f; font-size: 8px; line-height: 1.45; }
.auth-legal { margin: 13px 0 0; color: #67676e; font-size: 7px; line-height: 1.5; text-align: center; }

.account-menu { position: fixed; z-index: 50; top: 56px; right: 14px; width: 260px; padding: 10px; border: 1px solid #36363c; border-radius: 4px; background: #1c1c1f; box-shadow: var(--shadow); }
.account-menu-head { display: grid; grid-template-columns: 8px 1fr; gap: 10px; align-items: start; padding: 10px 8px 13px; border-bottom: 1px solid #303035; }
.account-menu-head div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.account-menu-head strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.account-menu-head small { color: #77777e; font-size: 8px; }
.account-menu button { width: 100%; padding: 10px 8px; border: 0; border-bottom: 1px solid #2b2b30; background: transparent; color: #aaaab0; font-size: 8px; text-align: left; cursor: pointer; }
.account-menu button:hover { color: #fff; background: #242428; }
.account-menu button.danger { color: #e98185; }
.toast { position: fixed; z-index: 80; right: 20px; bottom: 20px; max-width: 360px; padding: 12px 14px; border: 1px solid #34343a; border-left: 3px solid var(--green); border-radius: 3px; background: #1d1d20; color: #ececef; box-shadow: var(--shadow); font-size: 9px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: var(--red); }
[hidden] { display: none !important; }

@media (max-width: 1050px) {
  .app-frame { grid-template-columns: 204px minmax(0, 1fr); }
  .topbar { grid-template-columns: 204px 1fr auto; }
  .workspace { padding-inline: 23px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .secondary-column { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .relay-card { min-height: 100%; }
  .source-form { grid-template-columns: 1fr 130px; }
  .inspect-button { grid-column: 1 / -1; }
  .runtime-chip { display: none; }
}

@media (max-width: 760px) {
  .app-frame { display: block; }
  .topbar { grid-template-columns: 1fr auto; height: 60px; }
  .brand { border-right: 0; }
  .topbar-center, .session-clock { display: none; }
  .account-button { min-width: 38px; }
  .account-button #accountLabel { display: none; }
  .sidebar { position: static; height: auto; padding: 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-intro, .security-note, .sidebar-footer { display: none; }
  .workflow-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .workflow-nav::before { display: none; }
  .workflow-step { display: flex; min-height: 36px; justify-content: center; padding: 0; }
  .workflow-step > span:nth-child(2) { display: none; }
  .workflow-step .step-number { width: 29px; height: 29px; }
  .workspace { padding: 25px 14px 19px; }
  .workspace-heading { align-items: end; }
  .workspace-heading p { display: none; }
  .workspace-heading h2 { font-size: 25px; }
  .route-badge { display: none; }
  .mode-banner { grid-template-columns: 34px 1fr; }
  .source-form { grid-template-columns: 1fr; }
  .source-result { grid-template-columns: 1fr; }
  .secondary-column { display: flex; }
  .manifest-toolbar { flex-direction: column; }
  .search-field { width: 100%; }
  .file-row { grid-template-columns: minmax(0, 1fr) 70px; }
  .file-kind { display: none; }
  .transfer-stats { grid-template-columns: 1fr 1fr; }
  .transfer-stats div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .transfer-stats div:nth-child(4) { border-top: 1px solid var(--line); }
  .completion-panel { grid-template-columns: 38px 1fr; }
  .recovery-panel { grid-template-columns: 36px 1fr; }
  .recovery-copy { grid-column: 1 / -1; }
  .copy-button { grid-column: 1 / -1; }
  .workspace-footer { flex-direction: column; gap: 8px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 220px; padding: 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-story .security-list { display: none; }
  .auth-form-side { padding: 28px 23px; }
}

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