:root {
  --bg-1: #071522;
  --bg-2: #0f2a3f;
  --bg-3: #173956;
  --card: rgba(8, 27, 43, 0.86);
  --line: rgba(109, 188, 255, 0.18);
  --text: #eaf6ff;
  --muted: #9fc0d8;
  --good: #3fd08a;
  --warn: #ffb85a;
  --bad: #ff6d6d;
  --accent: #5bc1ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1100px 700px at 10% -15%, #1f4a6d, transparent),
    radial-gradient(800px 600px at 100% 0%, #113657, transparent),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 58%, var(--bg-3));
  min-height: 100vh;
}

.wrap {
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 16px 36px;
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.title h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

.title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.meta {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(9, 31, 47, 0.6);
  min-width: 250px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.meta a {
  color: #9ed9ff;
  text-decoration: none;
}

.l2-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.l2-nav-link {
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(109, 188, 255, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(10, 34, 51, 0.56);
}

.l2-nav-link:hover {
  border-color: rgba(123, 214, 255, 0.34);
  background: rgba(13, 39, 60, 0.76);
}

.section-band {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 4px 0;
  scroll-margin-top: 18px;
}

.section-band-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ed9ff;
}

.section-band-copy {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 29, 45, 0.9), rgba(7, 24, 38, 0.88));
  padding: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.portal-health {
  margin-bottom: 12px;
}

.hero-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(91, 193, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.hero-card-status,
.hero-card-openclaw,
.hero-card-review {
  background: linear-gradient(180deg, rgba(8, 29, 45, 0.9), rgba(7, 24, 38, 0.88));
  border-color: var(--line);
}

.hero-kicker {
  color: #9ed9ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-value {
  margin-top: 8px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-value-loading {
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #d3e8f6;
  font-weight: 700;
}

.hero-copy {
  margin-top: 8px;
  color: #dff4ff;
  font-size: 14px;
  line-height: 1.45;
  min-height: 40px;
}

.hero-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.health-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.health-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(10, 35, 54, 0.55);
}

.label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.value {
  font-size: 15px;
  font-weight: 700;
}

.grid-l1 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-l2 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.grid-l2-hybrid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
}

.card-span-3 {
  grid-column: span 3;
}

.card-span-4 {
  grid-column: span 4;
}

.card-span-8 {
  grid-column: span 8;
}

.card-span-12 {
  grid-column: 1 / -1;
}

.card-size-s {
  min-height: 220px;
}

.card-size-m {
  min-height: 300px;
}

.card-size-l {
  min-height: 380px;
}

.card-tone-core {
  background: linear-gradient(180deg, rgba(10, 37, 59, 0.94), rgba(7, 26, 43, 0.92));
  border-color: rgba(91, 193, 255, 0.28);
}

.card-tone-focus {
  background: linear-gradient(180deg, rgba(13, 39, 60, 0.96), rgba(10, 31, 48, 0.94));
  border-color: rgba(123, 214, 255, 0.32);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.card-tone-openclaw {
  background: linear-gradient(180deg, rgba(11, 36, 56, 0.93), rgba(8, 28, 43, 0.9));
  border-color: rgba(109, 188, 255, 0.24);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.card-tone-openclaw h2 {
  color: #eef9ff;
}

.card-tone-support {
  background: linear-gradient(180deg, rgba(11, 33, 51, 0.92), rgba(8, 26, 40, 0.9));
}

.card-tone-alert {
  background: linear-gradient(180deg, rgba(43, 18, 22, 0.92), rgba(26, 12, 18, 0.88));
  border-color: rgba(255, 109, 109, 0.22);
}

.kv {
  display: grid;
  gap: 7px;
}


.kv-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
}

.kv-line span {
  flex: 0 0 124px;
  min-width: 124px;
}

.kv-line.emphasis-bad {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 109, 109, 0.10);
  border: 1px solid rgba(255, 109, 109, 0.18);
}

.kv-line strong {
  color: var(--text);
  font-weight: 600;
  flex: 1 1 auto;
  text-align: right;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.card-span-full {
  grid-column: 1 / -1;
}

.list {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.list li {
  margin: 4px 0;
}

.pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.pill.good {
  background: rgba(63, 208, 138, 0.17);
  color: #8df1bf;
}

.pill.warn {
  background: rgba(255, 184, 90, 0.16);
  color: #ffd197;
}

.pill.bad {
  background: rgba(255, 109, 109, 0.16);
  color: #ffb4b4;
}

.row-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-link {
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 10px;
  background: rgba(12, 37, 57, 0.6);
}

.btn-link.primary {
  background: linear-gradient(135deg, #258be3, #56cbff);
  border-color: transparent;
  color: #052138;
  font-weight: 700;
}

.btn-link.is-disabled {
  color: var(--muted);
  border-style: dashed;
  background: rgba(10, 35, 54, 0.35);
  pointer-events: none;
}

.foot-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.trend-wrap {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.trend-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 37, 57, 0.45);
  padding: 8px;
}

.trend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.trend-head strong {
  color: var(--text);
}

.sparkline {
  height: 52px;
}

.sparkline-svg {
  display: block;
  width: 100%;
  height: 52px;
}

.sparkline-empty {
  height: 52px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.draft-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.draft-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(14, 41, 63, 0.92), rgba(9, 29, 46, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.draft-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}

.draft-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #d8ecfb;
  font-size: 12px;
  margin-bottom: 8px;
}

.draft-meta span {
  color: #d8ecfb;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 600;
}

.draft-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.draft-links a {
  color: #dff4ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(223, 244, 255, 0.35);
  padding-bottom: 1px;
}

.draft-empty {
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}


.empty-state-good {
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(127, 212, 166, 0.45);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 58, 48, 0.9), rgba(12, 44, 36, 0.92));
}

.empty-state-good-title {
  color: #d8ffec;
  font-size: 14px;
  font-weight: 800;
}

.empty-state-good-copy {
  margin-top: 6px;
  color: #bde9d2;
  font-size: 13px;
  line-height: 1.5;
}

.section-block {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(10, 35, 54, 0.48);
}

.section-block-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-block-list {
  margin-top: 6px;
}

.card-openclaw-evolution .kv {
  gap: 12px;
}

.openclaw-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.openclaw-hero {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.openclaw-mini-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.openclaw-mini {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(10, 35, 54, 0.55);
}

.openclaw-mini-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.openclaw-mini-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.openclaw-mini-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.openclaw-page .agent-detail-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-chip {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 37, 57, 0.5);
  color: var(--text);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip.is-active {
  background: linear-gradient(135deg, #258be3, #56cbff);
  border-color: transparent;
  color: #052138;
}

.fold-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 35, 54, 0.42);
  padding: 10px;
}

.fold-block summary {
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

.fold-block summary::-webkit-details-marker {
  display: none;
}

.fold-body {
  margin-top: 12px;
}

.agent-detail {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(14, 41, 63, 0.92), rgba(9, 29, 46, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  height: 100%;
}

.agent-detail-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.agent-detail-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.agent-detail-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.agent-detail-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.agent-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.agent-detail-copy {
  margin-top: 8px;
  color: #d8ecfb;
  font-size: 13px;
  line-height: 1.55;
}

.agent-detail-grid {
  margin-top: 10px;
  display: grid;
  gap: 8px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  align-items: flex-start;
}

.agent-detail-row span {
  flex: 0 0 86px;
  min-width: 86px;
}

.agent-detail-row strong {
  color: var(--text);
  font-weight: 600;
  flex: 1 1 auto;
  text-align: left;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.agent-issue-list {
  margin-top: 8px;
}

.stack-note {
  margin-bottom: 0;
}

@media (max-width: 1280px) {
  .hero-grid,
  .grid-l1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .header {
    flex-direction: column;
  }
  .meta {
    width: 100%;
  }
  .l2-nav {
    gap: 6px;
  }
  .section-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .section-band-copy {
    text-align: left;
  }
  .grid-l2,
  .grid-l2-hybrid {
    grid-template-columns: 1fr;
  }
  .openclaw-layout,
  .openclaw-hero,
  .openclaw-mini-grid {
    grid-template-columns: 1fr;
  }
  .card-span-full,
  .card-span-3,
  .card-span-4,
  .card-span-8,
  .card-span-12 {
    grid-column: auto;
  }
  .card-size-s,
  .card-size-m,
  .card-size-l {
    min-height: 0;
  }
  .agent-detail-list,
  .agent-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .health-row,
  .hero-grid,
  .grid-l1,
  .grid-l2 {
    grid-template-columns: 1fr;
  }
  .hero-value {
    font-size: 24px;
  }
  .hero-value-loading {
    font-size: 15px;
  }
  .title h1 {
    font-size: 24px;
  }
  .kv-line,
  .agent-detail-head,
  .agent-detail-row {
    flex-direction: column;
  }
  .kv-line span,
  .agent-detail-row span {
    min-width: 0;
    flex-basis: auto;
  }
  .kv-line strong,
  .agent-detail-grid {
    text-align: left;
    grid-template-columns: 1fr;
  }
  .openclaw-hero,
  .openclaw-mini-grid {
    grid-template-columns: 1fr;
  }
  .agent-detail-badges {
    justify-content: flex-start;
  }
  .agent-detail-row strong {
    text-align: left;
  }
}


.l2-summary-grid,
.openclaw-top-grid {
  margin-bottom: 14px;
}

.hero-card-automation,
.hero-card-control,
.hero-card-ready,
.hero-card-flow {
  background: linear-gradient(180deg, rgba(8, 29, 45, 0.9), rgba(7, 24, 38, 0.88));
  border-color: var(--line);
}

.l2-summary-grid .hero-value,
.openclaw-top-grid .hero-value {
  font-size: 26px;
}

.l2-summary-grid .hero-copy,
.openclaw-top-grid .hero-copy {
  min-height: 44px;
}

.l2-summary-grid .hero-meta,
.openclaw-top-grid .hero-meta {
  min-height: 34px;
}

.l2-summary-grid .hero-value-loading,
.openclaw-top-grid .hero-value-loading {
  font-size: 15px;
}
