:root {
  color-scheme: dark;
  --bg: #06100e;
  --bg-deep: #030807;
  --panel: rgba(11, 25, 21, 0.9);
  --panel-strong: #0d1c18;
  --panel-soft: #10231e;
  --line: rgba(182, 255, 222, 0.12);
  --line-strong: rgba(182, 255, 222, 0.24);
  --text: #ecf8f2;
  --muted: #88a69a;
  --muted-strong: #b3c8bf;
  --mint: #78f2ba;
  --mint-bright: #a1ffd5;
  --blue: #6ecbff;
  --amber: #f3c96f;
  --danger: #ff8c7d;
  --terminal: #030806;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --sans: Inter, Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(40, 135, 99, 0.13), transparent 28rem),
    radial-gradient(circle at 86% 32%, rgba(29, 91, 70, 0.1), transparent 30rem),
    var(--bg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--bg-deep);
  background: var(--mint-bright);
  border-radius: 0.5rem;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(127, 220, 181, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 220, 181, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.topbar {
  width: min(100% - 3rem, 1280px);
  min-height: 5.25rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  overflow: visible;
}

.brand-mark path:first-child {
  fill: rgba(120, 242, 186, 0.08);
  stroke: var(--mint);
  stroke-width: 1.3;
}

.brand-mark path:last-child {
  fill: none;
  stroke: var(--mint-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  font: 700 0.88rem/1 var(--mono);
  letter-spacing: 0.13em;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.node-picker {
  min-width: 13rem;
  display: grid;
  gap: 0.28rem;
}

.node-picker-label {
  color: var(--muted);
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.node-select-shell {
  position: relative;
  display: block;
}

.node-select-shell select {
  width: 100%;
  min-height: 2.4rem;
  appearance: none;
  padding: 0.48rem 2.1rem 0.48rem 0.75rem;
  color: var(--text);
  background: rgba(10, 25, 20, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.node-select-shell select:hover:not(:disabled) {
  border-color: rgba(161, 255, 213, 0.5);
}

.node-select-shell select:disabled {
  color: var(--muted-strong);
  cursor: default;
  opacity: 1;
}

.node-select-shell svg {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.node-select-shell path {
  fill: none;
  stroke: var(--mint);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node-code,
.status-chip,
.privacy-label {
  font: 600 0.72rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.node-code {
  color: var(--muted);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.75rem;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.status-dot {
  width: 0.46rem;
  height: 0.46rem;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 0.8rem currentColor;
}

.status-chip.online .status-dot {
  background: var(--mint);
}

.status-chip.offline .status-dot {
  background: var(--danger);
}

.shell {
  width: min(100% - 3rem, 1280px);
  margin: 0 auto;
  padding: 2rem 0 1.25rem;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(16, 35, 30, 0.9), rgba(8, 19, 16, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.14);
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 0.72fr);
  gap: 1rem;
}

.node-stage {
  min-height: 20rem;
  display: grid;
  grid-template-columns: minmax(20rem, 1fr) minmax(19rem, 0.8fr);
  align-items: center;
  padding: 2.25rem 2.5rem;
  isolation: isolate;
}

.node-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(120, 242, 186, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(120, 242, 186, 0.035) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  mask-image: linear-gradient(90deg, transparent 5%, black 55%, black);
}

.node-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  right: -8rem;
  bottom: -19rem;
  background: rgba(120, 242, 186, 0.08);
  border-radius: 50%;
  filter: blur(1rem);
}

.eyebrow,
.section-kicker,
.section-index {
  margin: 0;
  color: var(--mint);
  font: 650 0.73rem/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow span {
  width: 1.75rem;
  height: 1px;
  background: currentColor;
}

.node-copy h1 {
  margin: 1.1rem 0 0.8rem;
  font-size: clamp(2.65rem, 5vw, 5rem);
  font-weight: 580;
  line-height: 0.93;
  letter-spacing: -0.065em;
}

.node-copy h1 span {
  color: var(--mint-bright);
}

.node-description {
  max-width: 32rem;
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.node-identifiers {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
}

.node-identifiers div {
  display: grid;
  gap: 0.28rem;
}

.node-identifiers span,
.metric-foot span {
  color: var(--muted);
  font: 600 0.65rem/1 var(--mono);
  letter-spacing: 0.1em;
}

.node-identifiers strong {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 580;
}

.radar {
  position: relative;
  width: min(100%, 18rem);
  aspect-ratio: 1;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 242, 186, 0.05), rgba(3, 8, 7, 0.42) 68%);
  box-shadow: inset 0 0 3rem rgba(120, 242, 186, 0.04), 0 0 3rem rgba(120, 242, 186, 0.03);
}

.radar-ring,
.radar-axis,
.radar-sweep,
.radar-pulse,
.radar-node,
.radar-label {
  position: absolute;
}

.radar-ring {
  top: 50%;
  left: 50%;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one { width: 72%; height: 72%; }
.ring-two { width: 45%; height: 45%; }
.ring-three { width: 18%; height: 18%; }
.axis-x { left: 0; top: 50%; width: 100%; height: 1px; background: var(--line); }
.axis-y { left: 50%; top: 0; width: 1px; height: 100%; background: var(--line); }

.radar-sweep {
  inset: 50% 0 0 50%;
  transform-origin: left top;
  background: conic-gradient(from 270deg, rgba(120, 242, 186, 0.33), transparent 34%);
  animation: sweep 4.8s linear infinite;
}

.radar-node {
  left: calc(50% - 0.32rem);
  top: calc(50% - 0.32rem);
  width: 0.64rem;
  height: 0.64rem;
  background: var(--mint-bright);
  border: 2px solid var(--panel-strong);
  border-radius: 50%;
  box-shadow: 0 0 1.1rem var(--mint);
}

.radar-pulse {
  left: calc(50% - 0.4rem);
  top: calc(50% - 0.4rem);
  width: 0.8rem;
  height: 0.8rem;
  border: 1px solid var(--mint);
  border-radius: 50%;
  animation: pulse 2.4s ease-out infinite;
}

.radar-label {
  top: calc(50% + 0.8rem);
  left: calc(50% + 0.75rem);
  color: var(--mint-bright);
  font: 600 0.67rem/1 var(--mono);
  letter-spacing: 0.08em;
}

.stage-index {
  position: absolute;
  right: 1.25rem;
  bottom: 1.1rem;
  color: rgba(179, 200, 191, 0.42);
  font: 600 0.63rem/1 var(--mono);
  letter-spacing: 0.08em;
}

.overview-side {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1rem;
}

.metric-card,
.identity-card,
.diagnostic-panel,
.network-panel,
.speed-panel {
  padding: 1.4rem;
}

.card-heading,
.identity-top,
.section-heading,
.progress-heading,
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-heading h2 {
  margin: 0.22rem 0 0;
  color: var(--muted-strong);
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.06em;
}

.icon-button {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  color: var(--mint);
  border-color: var(--line-strong);
  transform: rotate(12deg);
}

.icon-button svg,
.client-ip svg,
.run-button svg,
.download-options svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.latency-readout {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 1.2rem;
}

.latency-value {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.latency-value strong {
  font: 560 clamp(2.6rem, 4vw, 4rem)/0.9 var(--sans);
  letter-spacing: -0.06em;
}

.latency-value span {
  color: var(--muted);
  font: 500 0.78rem/1 var(--mono);
}

.latency-grade {
  padding: 0.35rem 0.5rem;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.35rem;
  font-size: 0.7rem;
}

.latency-grade.good { color: var(--mint); }
.latency-grade.medium { color: var(--amber); }
.latency-grade.slow { color: var(--danger); }

.latency-chart {
  width: 100%;
  height: 3.5rem;
  margin-top: 0.55rem;
  overflow: visible;
}

.latency-chart polyline {
  fill: none;
  stroke: var(--mint);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 0.3rem rgba(120, 242, 186, 0.45));
  transition: all 300ms ease;
}

.latency-chart .chart-base {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.metric-foot {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.35rem;
}

.metric-foot strong {
  color: var(--muted-strong);
  font-weight: 600;
}

.identity-card {
  min-height: 7.6rem;
}

.privacy-label {
  color: var(--muted);
  font-size: 0.6rem;
}

.client-ip {
  width: 100%;
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.client-ip span {
  color: var(--muted);
  font-size: 0.72rem;
}

.client-ip strong {
  overflow: hidden;
  font: 550 0.88rem/1.3 var(--mono);
  text-overflow: ellipsis;
}

.client-ip svg {
  color: var(--mint);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 0.75fr);
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.diagnostic-panel {
  padding: 1.6rem;
}

.section-heading {
  align-items: end;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0.4rem 0 0;
  font-size: 1.45rem;
  font-weight: 580;
  letter-spacing: -0.035em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.section-index {
  color: var(--muted);
  font-size: 0.65rem;
}

#diagnostic-form {
  padding: 1.3rem 0 1.25rem;
}

.input-label,
fieldset legend {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 550;
}

.target-field {
  position: relative;
  display: flex;
  align-items: center;
}

.target-field input {
  width: 100%;
  min-height: 3.65rem;
  padding: 0 5rem 0 2.6rem;
  color: var(--text);
  caret-color: var(--mint);
  background: rgba(2, 8, 6, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: 0.8rem;
  outline: none;
  font: 500 0.93rem/1 var(--mono);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.target-field input::placeholder {
  color: #5f786e;
}

.target-field input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(120, 242, 186, 0.09);
}

.prompt-mark {
  position: absolute;
  z-index: 1;
  left: 1rem;
  color: var(--mint);
  font: 500 1.5rem/1 var(--mono);
}

.field-action {
  position: absolute;
  right: 0.55rem;
  padding: 0.55rem 0.75rem;
  color: var(--muted-strong);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 0.48rem;
  cursor: pointer;
  font-size: 0.7rem;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
  margin-top: 1.15rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(3, 9, 7, 0.62);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}

.segmented button {
  min-height: 2.3rem;
  padding: 0 0.85rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0.48rem;
  cursor: pointer;
  font: 550 0.72rem/1 var(--mono);
  transition: color 150ms ease, background 150ms ease;
}

.segmented button[aria-pressed="true"] {
  color: var(--bg-deep);
  background: var(--mint-bright);
  box-shadow: 0 0.4rem 1.2rem rgba(120, 242, 186, 0.12);
}

.segmented button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.run-button {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0 1rem 0 1.15rem;
  color: #03100b;
  background: var(--mint);
  border: 0;
  border-radius: 0.7rem;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.run-button:hover:not(:disabled) {
  background: var(--mint-bright);
  box-shadow: 0 0.65rem 1.5rem rgba(120, 242, 186, 0.13);
  transform: translateY(-1px);
}

.run-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.run-loader {
  display: none;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(3, 16, 11, 0.3);
  border-top-color: #03100b;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.run-button.loading .run-loader { display: block; }
.run-button.loading svg { display: none; }

.form-note {
  min-height: 1.1rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.form-note.error {
  color: var(--danger);
}

.diagnostic-guidance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  margin-top: 0.85rem;
  padding: 0.8rem 0.9rem;
  color: var(--muted-strong);
  background: rgba(110, 203, 255, 0.045);
  border: 1px solid rgba(110, 203, 255, 0.14);
  border-radius: 0.7rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.diagnostic-guidance svg {
  width: 1.05rem;
  margin-top: 0.12rem;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.diagnostic-guidance p {
  margin: 0;
}

.diagnostic-guidance strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--blue);
  font: 650 0.7rem/1.3 var(--mono);
  letter-spacing: 0.04em;
}

.terminal {
  overflow: hidden;
  background: var(--terminal);
  border: 1px solid rgba(185, 255, 223, 0.1);
  border-radius: 0.9rem;
}

.terminal-bar {
  min-height: 2.65rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(185, 255, 223, 0.08);
}

.terminal-lights {
  display: flex;
  gap: 0.34rem;
}

.terminal-lights span {
  width: 0.43rem;
  height: 0.43rem;
  background: #31473e;
  border-radius: 50%;
}

.terminal-lights span:first-child { background: #70514c; }
.terminal-lights span:nth-child(2) { background: #6c6244; }
.terminal-lights span:last-child { background: #3e6754; }

.terminal-command {
  overflow: hidden;
  color: #71887f;
  font: 500 0.66rem/1 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-actions {
  display: flex;
  gap: 0.35rem;
}

.terminal-actions button {
  padding: 0.35rem 0.48rem;
  color: #71887f;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.66rem;
}

.terminal-actions button:hover { color: var(--mint); }

.terminal pre {
  min-height: 13rem;
  max-height: 28rem;
  margin: 0;
  padding: 1.15rem;
  overflow: auto;
  color: #bed7cc;
  font: 0.76rem/1.7 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
}

.side-column {
  display: grid;
  gap: 1rem;
}

.section-heading.compact {
  padding-bottom: 1rem;
}

.section-heading.compact h2 {
  font-size: 1.05rem;
}

.node-monogram {
  color: var(--mint);
  font: 600 0.65rem/1 var(--mono);
  letter-spacing: 0.08em;
}

.network-list {
  margin: 0;
}

.network-list > div {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  border-bottom: 1px solid var(--line);
}

.network-list > div:last-child {
  border-bottom: 0;
}

.network-list dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.network-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted-strong);
  font: 500 0.75rem/1.4 var(--mono);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-value {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--muted-strong);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-value:not(:disabled):hover {
  color: var(--mint);
}

.speed-description {
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.download-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.download-options > button {
  position: relative;
  display: grid;
  gap: 0.22rem;
  padding: 0.85rem;
  text-align: left;
  background: rgba(3, 9, 7, 0.52);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.download-options > button:hover:not(:disabled) {
  background: rgba(120, 242, 186, 0.045);
  border-color: var(--line-strong);
}

.download-options > button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.download-options span {
  font: 500 0.7rem/1 var(--mono);
}

.download-options strong {
  color: var(--mint-bright);
  font-size: 1.35rem;
}

.download-options small {
  color: var(--muted);
  font-size: 0.65rem;
}

.download-options svg {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  color: var(--muted);
}

.download-progress {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.progress-heading {
  color: var(--muted-strong);
  font-size: 0.72rem;
}

.progress-heading strong {
  color: var(--mint);
  font: 600 0.82rem/1 var(--mono);
}

.progress-track {
  height: 0.28rem;
  margin: 0.75rem 0 0.55rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--mint));
  border-radius: inherit;
  transition: width 120ms linear;
}

.progress-meta {
  color: var(--muted);
  font: 500 0.65rem/1 var(--mono);
}

.stop-button {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  cursor: pointer;
  font-size: 0.68rem;
}

.measurement-note {
  display: flex;
  gap: 0.8rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.measurement-note span {
  flex: 0 0 auto;
  color: var(--mint);
  font: 600 0.65rem/1.7 var(--mono);
  letter-spacing: 0.06em;
}

footer {
  width: min(100% - 3rem, 1280px);
  min-height: 5rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #587067;
  border-top: 1px solid var(--line);
  font: 500 0.65rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 1.25rem;
  bottom: 1.25rem;
  max-width: min(24rem, calc(100% - 2.5rem));
  padding: 0.75rem 0.95rem;
  color: var(--bg-deep);
  background: var(--mint-bright);
  border-radius: 0.6rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
  font-size: 0.76rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
pre:focus-visible {
  outline: 2px solid var(--mint-bright);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(12); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1040px) {
  .overview {
    grid-template-columns: 1fr;
  }

  .overview-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

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

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

@media (max-width: 760px) {
  .topbar,
  .shell,
  footer {
    width: min(100% - 1.5rem, 1280px);
  }

  .topbar {
    min-height: 4.5rem;
  }

  .node-code {
    display: none;
  }

  .node-picker {
    min-width: 10.5rem;
  }

  .node-picker-label {
    display: none;
  }

  .shell {
    padding-top: 0.75rem;
  }

  .node-stage {
    min-height: 28rem;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 1.5rem;
  }

  .node-copy h1 {
    margin-top: 0.85rem;
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .radar {
    position: absolute;
    width: 15rem;
    right: -2.2rem;
    bottom: -2.5rem;
    opacity: 0.8;
  }

  .node-identifiers {
    max-width: 14rem;
    display: grid;
    gap: 0.8rem;
    margin-top: 1.5rem;
  }

  .overview-side,
  .side-column {
    grid-template-columns: 1fr;
  }

  .control-row {
    grid-template-columns: 1fr 1fr;
  }

  .tool-picker {
    width: 100%;
  }

  .tool-picker button {
    flex: 1;
  }

  .run-button {
    align-self: end;
  }

  .section-heading {
    align-items: start;
  }

  .section-heading > p {
    max-width: 11rem;
    text-align: right;
  }

  footer span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand-name {
    display: none;
  }

  .topbar-meta {
    gap: 0.45rem;
  }

  .node-picker {
    width: 9.5rem;
    min-width: 0;
  }

  .node-select-shell select {
    padding-left: 0.6rem;
    font-size: 0.78rem;
  }

  .status-chip {
    padding: 0.55rem 0.65rem;
    font-size: 0.64rem;
  }

  #node-status-label {
    display: none;
  }

  .metric-card,
  .identity-card,
  .diagnostic-panel,
  .network-panel,
  .speed-panel {
    padding: 1.15rem;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .control-row fieldset,
  .run-button {
    width: 100%;
  }

  .terminal-bar {
    grid-template-columns: auto 1fr;
  }

  .terminal-command {
    display: none;
  }

  .terminal-actions {
    justify-self: end;
  }

  .terminal pre {
    min-height: 15rem;
    font-size: 0.71rem;
  }

  .measurement-note {
    display: grid;
    gap: 0.35rem;
  }
}

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