:root {
  --at-ink: #eef3f6;
  --at-grid: #1e2a33;
  --at-soft: #161d24;

  --at-on-ink: #06090c;

  --at-line-boost: 1.5;

  --at-node-glow: 0.19;

  --at-glow-rgb: 124, 146, 170;

  --at-glow-lighten: 0;
  --at-mark-glow-o: 0.36;

  --at-flare-white: 0.62;

  --at-hud-rest: color-mix(in srgb, var(--surface) 20%, transparent);
  --at-hud-hover: color-mix(in srgb, var(--surface) 80%, transparent);
  --at-hud-blur-rest: blur(4px);
  --at-hud-blur-hover: blur(7px);
}

:root[data-theme="light"] {
  --at-ink: #111111;
  --at-grid: #ececec;
  --at-soft: #f2f2f2;
  --at-on-ink: #ffffff;
  --at-line-boost: 1;

  --at-node-glow: 0.07;
  --at-glow-rgb: 108, 126, 148;

  --at-glow-lighten: 0.5;
  --at-mark-glow-o: 0.22;

  --at-flare-white: 0.1;
}

.sect { max-width: 1180px; margin: 0 auto; padding-top: 46px; }

.radars {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 64px; margin-top: 2px;
  max-width: 1040px; margin-left: auto; margin-right: auto;
}
.radar-panel { position: relative; background: none; border: 0; padding: 0; }
.radar-head { display: flex; justify-content: center; }
.radar-title {
  font-size: var(--t-micro); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); text-align: center;
}

@media (max-width: 900px) {
  .radars { grid-template-columns: minmax(0, 1fr); max-width: 420px; gap: 40px 0; }
}

.constellation { max-width: 1180px; margin: 26px auto 0; }

.stage {
  position: relative;
  height: clamp(260px, 39vh, 410px);
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.at-canvas,
.stage::before {
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-composite: intersect;
}
.at-canvas {
  display: block; width: 100%; height: 100%; touch-action: none; cursor: grab;
  position: relative;   
  z-index: 1;
}

@media (max-width: 900px) {
  .stage { height: clamp(220px, 36vh, 340px); }
  .rail { max-height: none; }
}

.at-hud-surface {
  background: var(--at-hud-rest);
  backdrop-filter: var(--at-hud-blur-rest);
  border: 1px solid transparent; box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, backdrop-filter 0.15s ease;
}
.at-hud-surface:hover, .at-hud-surface:focus-within {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: var(--at-hud-blur-hover);
  border-color: var(--border);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

.at-hud-topleft {
  position: absolute; z-index: 4; left: 18px; top: 14px; max-width: calc(100% - 336px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.at-hud-pill {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px;
  padding: 8px 14px; border-radius: 999px; max-width: 100%;
  background: var(--at-hud-rest);
  backdrop-filter: var(--at-hud-blur-rest);
  transition: background-color 0.15s ease, backdrop-filter 0.15s ease;
}

.at-pill-key:hover, .at-pill-key:focus-within,
.at-pill-checks:hover, .at-pill-checks:focus-within {
  background: var(--at-hud-rest); backdrop-filter: var(--at-hud-blur-rest);
  border-color: transparent; box-shadow: none;
}

.at-layer-btn {
  display: flex; align-items: center; height: 30px; width: 30px; padding: 0;
  border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: width 0.15s ease, color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.at-layer-icon { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; }
.at-layer-icon svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.at-layer-label {
  min-width: 0; overflow: hidden; white-space: nowrap;
  padding-right: 13px; font-size: var(--t-micro); font-weight: 600;
}
.at-layer-btn:hover, .at-layer-btn:focus-visible {
  width: var(--at-tab-w, 100px);   
  color: var(--text); border-color: var(--text);
}

.at-layer-btn[aria-pressed="true"] {
  color: var(--at-on-ink); border-color: var(--at-ink); background: var(--at-ink);
}

.at-region-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.at-region-opt {
  display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
  transition: width 0.15s ease, height 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.at-region-opt svg {
  width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  transition: width 0.15s ease, height 0.15s ease;
}
.at-region-opt:hover:not([aria-checked="true"]) { color: var(--text); }
.at-region-opt[aria-checked="true"] {
  width: 30px; height: 30px; background: var(--at-ink); color: var(--at-on-ink);
}
.at-region-opt[aria-checked="true"] svg { width: 15px; height: 15px; }

.at-region-label { font-size: var(--t-micro); font-weight: 600; color: var(--text); white-space: nowrap; flex-shrink: 0; }

.tune-layers { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 12px 0 2px; }
.tune-layers .at-layer-btn, .tune-layers .at-layer-btn:hover, .tune-layers .at-layer-btn:focus-visible { width: auto; }
.tune-layers .at-layer-label { padding-right: 12px; }

.tune-sect {
  margin-top: 12px; font-size: var(--t-micro); font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
}

.at-hud-topright {
  position: absolute; z-index: 4; right: 18px; top: 14px; bottom: 14px;
  max-width: calc(100% - 336px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;

  pointer-events: none;
}
.at-hud-topright > * { pointer-events: auto; }

.at-panel-controls { min-height: 0; overflow-y: auto; overflow-x: hidden; }

.at-hud-topcenter {
  position: absolute; z-index: 4; top: 14px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 36px);
  flex-wrap: nowrap;
  padding: 6px 10px;
}

.at-hud-topcenter:empty { display: none; }

.at-hud-topcenter .tune-layers { margin: 0; flex-wrap: nowrap; }

.at-cycle { display: none; }
@media (max-width: 640px) {
  .at-cycle {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px 0 9px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text); cursor: pointer;
    font-family: var(--font); font-size: var(--t-micro); font-weight: 600; white-space: nowrap;
  }
  .at-cycle svg {
    width: 15px; height: 15px; flex: 0 0 auto;
    fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
  }

  .tune-layers { display: none; }
}

@media (max-width: 640px) {
  .at-hud-topleft, .at-hud-topright { max-width: calc(100% - 36px); }

  .at-hud-topright { left: 18px; right: 18px; top: 14px; }

  .at-hud-topleft, .at-hud-topright { left: 18px; right: 18px; align-items: center; }
  .at-hud-pill { justify-content: center; }
}
#at-controls-default { padding: 5px; border-radius: 10px; }

.at-icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto;
  background: transparent; color: var(--muted); cursor: pointer;
  border: 1px solid transparent; border-radius: 6px;
  transition: color 0.15s ease;
}
.at-icon-btn:hover, .at-icon-btn[aria-expanded="true"] { color: var(--text); }
.at-icon-btn svg { width: 17px; height: 17px; }
.at-icon-btn svg, .at-seg-icon svg {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

.at-seg-icon button { padding: 7px 10px; background: transparent; transition: background-color 0.15s ease; }
.at-seg-icon svg { width: 17px; height: 17px; display: block; }

.rail { overflow: visible; min-height: 0; padding: 14px; border-radius: 10px; width: var(--at-panel-w, 300px); max-width: calc(100vw - 60px); }
.tune { width: var(--at-panel-w, 300px); max-width: calc(100vw - 60px); }

.at-seg-icon { margin-left: 4px; }

.at-search-wrap {
  position: absolute; z-index: 4; left: 50%; bottom: 14px; transform: translateX(-50%);
  border-radius: 999px; width: min(340px, calc(100% - 36px));
  border: 1px solid transparent;
  background: var(--at-hud-rest);
  backdrop-filter: var(--at-hud-blur-rest);
  transition: background-color 0.15s ease, backdrop-filter 0.15s ease, border-color 0.15s ease;
}
.at-search-wrap:hover, .at-search-wrap:focus-within {
  background: var(--at-hud-hover);
  backdrop-filter: var(--at-hud-blur-hover);
  border-color: var(--border);
}
.at-search-pill {
  display: block; width: 100%; box-sizing: border-box;
  font-family: var(--font); font-size: var(--t-meta); color: var(--text); text-align: center;
  background: transparent; border: 0; border-radius: 999px;
  padding: 10px 16px;
}
.at-search-pill:focus { outline: none; }
.at-search-pill::placeholder { color: var(--muted); opacity: 0.85; }

@media (max-width: 640px) {
  .at-search-wrap { bottom: 48px; width: calc(100% - 36px); }
}

.at-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.at-back-btn {
  font-family: var(--font); font-size: 17px; line-height: 1; cursor: pointer;
  background: none; border: 0; color: var(--muted); padding: 0 2px; flex: 0 0 auto;
}
.at-back-btn:hover { color: var(--text); }

.dock-group { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dock-group--wide { flex: 1 1 180px; max-width: 340px; }
.dock-group--key { flex: 1 1 auto; min-width: 0; }
.dock-group--right { margin-left: auto; gap: 8px; }
.dock-label {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted);
  white-space: nowrap;
}
.dock-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-micro); cursor: pointer; white-space: nowrap; }
.dock-toggle input { accent-color: var(--at-ink); width: 13px; height: 13px; cursor: pointer; }
.dock-range { flex: 1 1 auto; min-width: 90px; }
.dock-btn {
  font-family: var(--font); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.09em;
  padding: 7px 13px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--muted);
}
.dock-btn:hover, .dock-btn[aria-expanded="true"] { background: var(--at-ink); border-color: var(--at-ink); color: var(--at-on-ink); }
.dock-key { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }

.dock-key-item { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-micro); color: var(--text); white-space: nowrap; }

.tune {
  overflow: auto; min-height: 0; flex: 0 1 auto;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(7px);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.10);
}

.tune-thresh {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  margin-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.tune-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tune-head-actions { display: flex; align-items: center; gap: 8px; }
.tune-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2px 26px; margin-top: 8px;
}

.statstrip {
  display: flex; flex-wrap: wrap; gap: 6px 30px; align-items: baseline;
  padding: 2px 4px 14px;
  border-bottom: 1px solid var(--border);
}
.stat { display: inline-flex; align-items: baseline; gap: 7px; }
.stat-value { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.stat-value small { font-size: var(--t-meta); font-weight: 600; color: var(--muted); }
.stat-label { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted); }

.sect--stats { padding-top: 26px; }
.stats-bar { display: flex; justify-content: flex-end; padding: 0 4px 4px; }
.stats-bar .dock-toggle { font-size: var(--t-micro); color: var(--muted); }

.radars {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 64px; margin-top: 2px;
  max-width: 1040px; margin-left: auto; margin-right: auto;
}
.radar-panel { position: relative; background: none; border: 0; padding: 0; }
.radar-head { display: flex; justify-content: center; }
.radar-title {
  font-size: var(--t-micro); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); text-align: center;
}

.at-axis-ring { fill: none; stroke: rgba(17,17,17,0.28); stroke-width: 1; }
.at-row-logo {
  width: 20px; height: 20px; flex: 0 0 auto;
  border-radius: 30%; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(17,17,17,0.2);
}

.at-tip .at-pv-grid {
  display: grid; grid-template-columns: repeat(3, 45px); gap: 6px;
  margin: 7px 0 0; padding: 0; list-style: none;
}
.at-pv-item { display: block; }
.at-pv-art {
  display: block; width: 45px; height: 60px; overflow: hidden;
  border-radius: 3px; background: rgba(255,255,255,0.10);
}
.at-pv-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.radar-panel .at-tip {
  max-width: 200px; padding: 7px 9px; border-radius: 5px;
  font-size: calc(var(--t-meta) * 0.8);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);

  background: rgba(20, 24, 26, 0.7);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.radar-panel .at-tip b { font-size: inherit; margin-bottom: 2px; }
.radar-panel .at-tip b > i { margin-left: 6px; }
.radar-panel .at-pv-empty { margin-top: 4px; font-size: calc(var(--t-micro) * 0.8); }

.at-tip b > i { font-style: normal; font-weight: 600; color: #9aa3a8; margin-left: 7px; }

.at-tip b > i em {
  display: inline; margin: 0 0 0 3px;
  font-style: normal; color: #7fb26a;
}
.at-pv-empty { margin-top: 5px; font-size: var(--t-micro); color: #b9c0c4; }

.at-switch { display: flex; justify-content: center; gap: 6px; margin: 18px auto 0; }
.at-switch a {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.1em;
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); text-decoration: none; background: var(--surface);
}
.at-switch a:hover { border-color: var(--muted); color: var(--text); }
.at-switch a[aria-current="page"] { background: var(--at-ink); border-color: var(--at-ink); color: var(--at-on-ink); }

.dock-group--right { margin-left: auto; }
.at-tool { display: flex; align-items: center; gap: 9px; }
.at-tool > label, .at-legend-title, .at-card-title {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
  white-space: nowrap;
}

.at-spacer { flex: 1 1 auto; }

.at-seg {
  display: inline-flex; align-items: stretch; border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
  backdrop-filter: var(--at-hud-blur-rest);
}
.at-seg button {
  font-family: var(--font); font-size: var(--t-micro); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 13px; border: 0; border-radius: 0;
  background: var(--at-hud-rest); color: var(--muted); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.at-seg button:hover { background: var(--at-hud-hover); color: var(--text); }
.at-seg button[aria-pressed="true"] { background: var(--at-ink); color: var(--at-on-ink); }

.at-check { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-meta); color: var(--text); cursor: pointer; }
.at-check input { accent-color: var(--at-ink); width: 14px; height: 14px; cursor: pointer; }

.at-range { -webkit-appearance: none; appearance: none; background: transparent; height: 18px; cursor: pointer; }
.at-range::-webkit-slider-runnable-track { height: 3px; background: var(--at-grid); border-radius: 2px; }
.at-range::-moz-range-track { height: 3px; background: var(--at-grid); border-radius: 2px; }
.at-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 13px; height: 13px; margin-top: -5px;
  border-radius: 50%; background: var(--at-ink); border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--at-ink);
}
.at-range::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; background: var(--at-ink);
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--at-ink);
}
.at-range:focus-visible { outline: 2px solid var(--at-ink); outline-offset: 3px; }
.at-num { font-variant-numeric: tabular-nums; font-size: var(--t-meta); color: var(--text); min-width: 30px; }

.at-graph-wrap { margin: 2px 0 0; }

.at-canvas.dragging { cursor: grabbing; }

.at-stage-hint {
  font-size: var(--t-micro); color: var(--muted);
  letter-spacing: 0.04em; pointer-events: none;
}
.at-zoom { position: absolute; z-index: 4; right: 18px; bottom: 14px; display: flex; align-items: center; gap: 5px; }

.at-zoom > button {
  width: 27px; height: 27px; font-size: 14px; line-height: 1; font-family: var(--font);
  background: var(--at-hud-rest); backdrop-filter: var(--at-hud-blur-rest);
  color: var(--muted);
  border: 1px solid transparent; border-radius: 5px; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, backdrop-filter 0.15s ease;
}
.at-zoom > button:hover {
  background: var(--surface); backdrop-filter: var(--at-hud-blur-hover);
  color: var(--text); border-color: var(--border);
}

.at-zoom > button svg { display: block; width: 15px; height: 15px; margin: 0 auto; }
.at-zoom > button svg circle, .at-zoom > button svg path {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round;
}
.at-zoom > button svg .at-zoom-dot { fill: currentColor; stroke: none; }

@media (max-width: 640px) {
  .at-zoom { right: 50%; transform: translateX(50%); }
}

.at-cardpop {
  position: absolute; z-index: 6; pointer-events: none;
  opacity: 0; transform: scale(0.96); transform-origin: center left;
  transition: opacity 0.13s ease, transform 0.13s ease;
}
.at-cardpop.on { opacity: 1; transform: scale(1); }
.at-cardpop .card { flex: 0 0 208px; width: 208px; }

.at-tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 250px;
  background: #14181a; color: #fff; border-radius: 6px; padding: 9px 11px;
  font-size: var(--t-meta); line-height: 1.45; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  opacity: 0; transition: opacity 0.12s ease;
}
.at-tip.on { opacity: 1; }
.at-tip b { display: block; font-size: var(--t-meta); margin-bottom: 3px; }
.at-tip b i { font-style: normal; font-weight: 500; color: #9aa3a8; }
.at-tip span { color: #b9c0c4; }
.at-tip em { display: block; margin-top: 5px; font-style: normal; color: #8e979c; }

.at-rail { display: flex; flex-direction: column; gap: 12px; }
.at-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.at-card-title { display: block; margin-bottom: 11px; }
.tune-head > .at-card-title, .at-card-head > .at-card-title { margin-bottom: 0; }
.tune-head .at-reset { margin-top: 0; }
.at-card-head, .tune-head { min-height: 32px; }
.at-card-head > .at-back-btn, .tune-head .at-back-btn { display: grid; place-items: center; width: 28px; height: 28px; line-height: 1; padding: 0; }

.at-empty { font-size: var(--t-meta); line-height: 1.6; color: var(--muted); }

.at-detail-summary { display: flex; align-items: center; gap: 12px; }
.at-donut { flex: 0 0 auto; }
.at-detail-name { font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.at-detail-meta { margin-top: 5px; font-size: var(--t-micro); color: var(--muted); letter-spacing: 0.03em; }
.at-detail-finding { margin-top: 10px; font-size: var(--t-meta); line-height: 1.6; color: var(--text); }
.at-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.at-chip {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted);
}
.at-chip-m { border-color: transparent; color: var(--at-on-ink); }
.at-open {
  display: inline-block; margin-top: 12px; font-size: var(--t-micro); text-transform: uppercase;
  letter-spacing: 0.1em; padding: 8px 14px; border-radius: 6px;
  background: var(--at-ink); color: var(--at-on-ink); text-decoration: none;
}
.at-open:hover { opacity: 0.85; }

.at-conns { list-style: none; margin-top: 14px; border-top: 1px solid var(--border); }
.at-conns:empty { display: none; }
.at-conn { padding: 10px 0; border-bottom: 1px solid var(--border); }
.at-conn:last-child { border-bottom: 0; }
.at-conn-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: none; border: 0; padding: 0; width: 100%; text-align: left; cursor: pointer;
  font-family: var(--font); font-size: var(--t-meta); color: var(--text);
}
.at-conn-head:hover { color: #000; text-decoration: underline; }
.at-conn-val { font-variant-numeric: tabular-nums; font-size: var(--t-micro); color: var(--muted); }
.at-bar { height: 3px; border-radius: 2px; background: var(--at-grid); margin-top: 6px; overflow: hidden; }
.at-bar > i { display: block; height: 100%; border-radius: 2px; background: var(--at-ink); }
.at-reasons { list-style: none; margin-top: 7px; }
.at-reasons li { font-size: var(--t-micro); line-height: 1.5; color: var(--muted); padding-left: 12px; position: relative; }
.at-reasons li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted); opacity: 0.5;
}

.at-term { display: grid; grid-template-columns: 1fr 74px 30px; align-items: center; gap: 8px; padding: 5px 0; }
.at-term-name { font-size: var(--t-meta); color: var(--text); }
.at-term-name small { display: block; font-size: var(--t-micro); color: var(--muted); line-height: 1.35; margin-top: 1px; }
.at-term .at-range { width: 74px; }
.at-reset {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 28px; height: 28px; padding: 0;
  color: var(--muted); background: none;
  border: 1px solid var(--border); border-radius: 50%; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.at-reset svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.at-reset:hover { color: var(--text); border-color: var(--muted); }

.at-legend { display: flex; flex-direction: column; gap: 6px; }
.at-legend-row { display: flex; align-items: center; gap: 8px; font-size: var(--t-meta); color: var(--text); }
.at-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.at-legend-note { margin-top: 10px; font-size: var(--t-micro); line-height: 1.55; color: var(--muted); }
.at-legend-note b { color: var(--text); font-weight: 600; }

.at-stats-wrap { max-width: 1100px; margin: 16px auto 60px; }

.at-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.at-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 15px 16px; }
.at-tile-label { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.at-tile-value { margin-top: 7px; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.at-tile-value small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.at-tile-sub { margin-top: 6px; font-size: var(--t-micro); color: var(--muted); line-height: 1.45; }

.at-radars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.at-panel { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.at-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.at-panel-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.at-panel-sub { margin-top: 4px; font-size: var(--t-micro); color: var(--muted); line-height: 1.5; }
.at-panel-total { font-size: var(--t-micro); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.at-radar { display: block; width: 100%; height: auto; margin: 6px auto 0; overflow: visible; }
.at-ring { fill: none; stroke: var(--at-grid); stroke-width: 1; }
.at-spoke { stroke: var(--at-grid); stroke-width: 1; }
.at-shape-ghost { fill: none; stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.45; }

.at-shape-edge { fill: none; stroke-width: 2.5; stroke-linecap: round; }

.at-sectors { opacity: 0.34; }
.at-vertex { fill: var(--at-ink); stroke: var(--surface); stroke-width: 2; }

.at-shape-pending {
  fill: var(--at-ink); fill-opacity: 0.035;
  stroke: var(--at-ink); stroke-opacity: 0.5; stroke-width: 1.5;
  stroke-dasharray: 4 3; stroke-linejoin: round;
}
.at-vertex-pending { fill: var(--surface); stroke: var(--at-ink); stroke-opacity: 0.55; stroke-width: 1.5; }
.at-axis-plus { font-size: var(--t-micro); font-weight: 600; fill: var(--muted); }
.at-axis-label { font-size: var(--t-micro); fill: var(--text); }
.at-axis-count { font-size: var(--t-micro); font-weight: 700; fill: var(--text); font-variant-numeric: tabular-nums; }

.at-axis-icon > * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.at-ring-label {
  font-size: var(--t-micro); fill: var(--muted); font-variant-numeric: tabular-nums;
  paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round;
}

.at-hit, .at-axis-hit { fill: transparent; cursor: pointer; }
.at-axis-g.dim .at-axis-label,
.at-axis-g.dim .at-axis-count,
.at-axis-g.dim .at-axis-icon { opacity: 0.35; }

.at-breakdown { list-style: none; margin-top: 16px; border-top: 1px solid var(--border); }
.at-row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 26px; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border); }
.at-row:last-child { border-bottom: 0; }
.at-row.zero { opacity: 0.55; }
.at-row-name { display: flex; align-items: center; gap: 7px; font-size: var(--t-meta); }
.at-row-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.at-row-icon > * {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
button.at-row-name {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font-family: var(--font); color: var(--text); text-align: left;
}
button.at-row-name:hover { text-decoration: underline; }
button.at-row-name:focus-visible { outline: 2px solid var(--at-ink); outline-offset: 3px; border-radius: 3px; }
.at-row-works a { color: var(--text); }
.at-row-works a:hover { color: #000; }
.at-row-bar { display: flex; gap: 2px; height: 6px; background: var(--at-soft); border-radius: 3px; }
.at-row-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--at-ink); }

.at-row-bar > i.at-bar-pending {
  background: none;
  border: 1px dashed var(--at-ink);
  opacity: 0.5;
}
.at-row-val { font-size: var(--t-meta); font-variant-numeric: tabular-nums; text-align: right; color: var(--text); }
.at-row-val em { font-style: normal; font-size: var(--t-micro); color: var(--muted); margin-left: 1px; }
.at-row-works { grid-column: 1 / -1; font-size: var(--t-micro); line-height: 1.5; color: var(--muted); padding-left: 17px; }
.at-soon { color: var(--muted); border-bottom: 1px dashed var(--border); }

.at-key-pending {
  display: inline-block; width: 22px; height: 0; vertical-align: middle;
  border-top: 1.5px dashed var(--at-ink); opacity: 0.5; margin-right: 8px;
}

.at-note { margin-top: 14px; font-size: var(--t-micro); line-height: 1.6; color: var(--muted); }

.at-tablewrap { overflow-x: auto; max-width: 1100px; margin: 12px auto 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; }
#at-table-view { margin-bottom: 44px; }
.at-table { width: 100%; border-collapse: collapse; font-size: var(--t-meta); min-width: 560px; }
.at-table caption { text-align: left; padding: 14px 16px 0; font-size: var(--t-micro); color: var(--muted); }
.at-table th, .at-table td { text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.at-table th { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.at-table tr:last-child td { border-bottom: 0; }
.at-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-hidden { display: none; }

.at-back { max-width: 1100px; margin: 0 auto; padding: 0 0 40px; font-size: var(--t-meta); }
.at-back a { color: var(--muted); }
.at-back a:hover { color: var(--text); }

.at-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 900px) {
  .at-graph-wrap { grid-template-columns: minmax(0, 1fr); }
  .at-radars { grid-template-columns: minmax(0, 1fr); }
  .at-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .at-tiles { grid-template-columns: minmax(0, 1fr); }
  .at-toolbar { padding: 12px; }
  .at-row { grid-template-columns: 96px minmax(0, 1fr) 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .at-tip { transition: none; }
}

.at-mark-glow { opacity: var(--at-mark-glow-o, 0.4); transition: opacity 0.18s ease; }
.at-axis-g.dim .at-mark-glow { opacity: calc(var(--at-mark-glow-o, 0.4) * 0.4); }
svg:has(.at-axis-g.dim) .at-axis-g:not(.dim) .at-mark-glow { opacity: 1; }

.at-mark-flare, .at-vertex-flare { pointer-events: none; }
.at-axis-g.dim .at-mark-flare { opacity: 0 !important; }

.at-beam { pointer-events: none; }
.at-beam-soft { stroke-width: 5; stroke-opacity: 0.2; stroke-linecap: round; }
.at-beam-core { stroke-width: 1.4; stroke-opacity: 0.85; stroke-linecap: round; }
.at-comet-track { fill: none; stroke: none; }
.at-comet-tracks, .at-comet { pointer-events: none; }

.at-comet { mix-blend-mode: screen; }

:root[data-theme="light"] .at-comet { mix-blend-mode: normal; }
.at-comet-core { fill: #fff; }

@media (max-width: 640px) {
  body.at-sheet .at-hud-topright { z-index: 45; }
  body.at-sheet .at-panel-controls {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 64px 18px 30px;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  body.at-sheet .at-panel-controls > .at-hud-surface {
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.at-sheet .at-panel-controls > .at-hud-surface:hover,
  body.at-sheet .at-panel-controls > .at-hud-surface:focus-within {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.at-sheet .tune-head,
  body.at-sheet .at-card-head {
    position: sticky;
    top: -2px;
    z-index: 2;
    padding: 6px 0 10px;
    background: linear-gradient(to bottom, var(--bg) 72%, transparent);
  }
  body.at-sheet .at-back-btn { font-size: 26px; padding: 0 4px; }
  body.at-sheet .tune-grid { grid-template-columns: 1fr; }
  body.at-sheet #panel-tune .tune-layers { display: flex; margin: 14px 0 2px; }
}
