@font-face { font-family: "Pretendard"; font-weight:45 920; font-style:normal; font-display:swap; src:url("/static/fonts/PretendardVariable.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-indigo: #eef2ff;
  --ink: #17243b;
  --muted: #667085;
  --subtle: #738096;
  --line: #e5e9f1;
  --line-strong: #d0d5dd;
  --indigo: #5847ba;
  --indigo-dark: #443394;
  --teal: #0f766e;
  --teal-soft: #ccfbf1;
  --green: #027a48;
  --green-soft: #ecfdf3;
  --amber: #b54708;
  --amber-soft: #fffaeb;
  --red: #b42318;
  --red-soft: #fef3f2;
  --slate-soft: #f2f4f7;
  --shadow: 0 2px 3px rgba(23, 36, 59, .02), 0 8px 24px rgba(23, 36, 59, .035);
  --radius: 14px;
  --sidebar: 224px;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid rgba(67, 56, 202, .28);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}
.skip-link:focus { transform: none; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}
.boot-mark, .brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, var(--indigo), #5b50db 58%, var(--teal));
  box-shadow: 0 7px 16px rgba(67, 56, 202, .22);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: linear-gradient(165deg, #19243c, #141c30 72%);
  color: #e4e7ec;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 22px;
}
.brand-copy { min-width: 0; }
.brand-title { display: block; color: white; font-weight: 760; letter-spacing: -.02em; }
.brand-sub { display: block; margin-top: 1px; color: #98a2b3; font-size: 11px; }

.nav-label {
  margin: 10px 10px 7px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.side-nav { display: grid; gap: 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #aeb4c2;
  font-size: 14px;
  font-weight: 620;
  text-decoration: none;
}
.nav-link:hover { color: white; background: rgba(255,255,255,.055); }
.nav-link.active { color: white; background: rgba(99,102,241,.22); }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.sidebar-spacer { flex: 1; }
.sidebar-user {
  padding: 12px 10px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.user-name { display: block; color: white; font-size: 13px; font-weight: 680; }
.user-role { display: block; margin-top: 2px; color: #98a2b3; font-size: 11px; }
.sidebar .text-button { margin-top: 8px; color: #c7d7fe; }

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 30px 30px 48px;
}
.content { width: min(1220px, 100%); margin: 0 auto; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-header h1 { margin: 0; font-size: 27px; line-height: 1.25; letter-spacing: -.035em; }
.page-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--indigo);
  color: white;
  font-size: 13px;
  font-weight: 690;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
}
.button:hover { background: var(--indigo-dark); }
.button.secondary { background: white; color: #344054; border-color: var(--line-strong); box-shadow: none; }
.button.secondary:hover { background: var(--surface-soft); }
.button.ghost { background: transparent; color: var(--indigo); box-shadow: none; }
.button.danger { background: white; color: var(--red); border-color: #fecdca; box-shadow: none; }
.button:disabled { opacity: .48; }
.button.small { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--indigo); font-size: 12px; font-weight: 650; }
.spin { animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  margin: 0 0 14px;
  border: 1px solid #fedf89;
  border-radius: 10px;
  background: var(--amber-soft);
  color: #7a2e0e;
  font-size: 13px;
}
.notice.error { border-color: #fecdca; background: var(--red-soft); color: var(--red); }
.notice.success { border-color: #abefc6; background: var(--green-soft); color: var(--green); }
.notice.info { border-color: #c7d7fe; background: var(--surface-indigo); color: var(--indigo-dark); }
.card-notice { margin: 0 15px 12px; }
.auto-refresh-status { margin: -10px 0 14px; color: var(--subtle); font-size: 11px; }
.auto-refresh-status.error { color: var(--red); }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}
.summary-card {
  min-height: 94px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.summary-label { color: var(--muted); font-size: 12px; }
.summary-value { display: block; margin-top: 4px; font-size: 22px; line-height: 1.2; font-weight: 760; letter-spacing: -.03em; }
.summary-note { display: block; margin-top: 3px; color: var(--subtle); font-size: 11px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.toolbar-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.selection-count { color: var(--muted); font-size: 12px; }
.check-label { display: inline-flex; align-items: center; gap: 7px; color: #344054; font-size: 13px; font-weight: 620; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--indigo); }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.service-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.service-card.selected { border-color: #a5b4fc; box-shadow: 0 0 0 2px rgba(99,102,241,.10), var(--shadow); }
.service-card-top { display: flex; align-items: flex-start; gap: 10px; padding: 18px 17px 15px; background: linear-gradient(120deg, #fff, #fafbfe); }
.service-select { flex: 0 0 auto; margin-top: 4px; }
.service-heading { min-width: 0; flex: 1; }
.service-heading h2, .service-heading h3 { margin: 0; overflow-wrap: anywhere; font-size: 16px; line-height: 1.35; letter-spacing: -.02em; }
.service-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.badge-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--slate-soft);
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.connected, .badge.operating, .badge.done { background: var(--green-soft); color: var(--green); }
.badge.error, .badge.failed { background: var(--red-soft); color: var(--red); }
.badge.stale, .badge.verification, .badge.busy { background: var(--amber-soft); color: var(--amber); }
.badge.development, .badge.deployed { background: var(--surface-indigo); color: var(--indigo); }
.badge.planned, .badge.disconnected, .badge.disabled { background: var(--slate-soft); color: #667085; }
.badge.no-dot::before { display: none; }

.metric-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.metric {
  min-width: 0;
  padding: 11px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric:nth-child(even) { border-right: 0; }
.metric-label { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-value { display: block; margin-top: 3px; color: #344054; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.metric-meta { display: block; margin-top: 2px; color: var(--subtle); font-size: 11px; }
.service-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px 13px; }
.source { min-width: 0; color: var(--subtle); font-size: 11px; overflow-wrap: anywhere; }
.detail-link { color: var(--indigo); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.detail-link:hover { text-decoration: underline; }

.empty-state {
  grid-column: 1 / -1;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255,255,255,.55);
  text-align: center;
  color: var(--muted);
}
.empty-state strong { display: block; margin-bottom: 4px; color: #344054; }

.panel {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 15px 16px; }
.panel-body.flush { padding: 0; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 14px; align-items: start; }
.two-column > * { min-width: 0; }
.stack { display: grid; gap: 14px; }

.detail-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-block { min-height: 116px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.detail-block h3 { margin: 0 0 9px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.detail-primary { display: block; font-size: 15px; font-weight: 730; overflow-wrap: anywhere; }
.detail-secondary { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.unsupported-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.timeline { display: grid; }
.timeline-item { position: relative; padding: 13px 16px 13px 39px; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 18px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); }
.timeline-title { margin: 0; font-size: 13px; font-weight: 700; }
.timeline-body { margin: 4px 0 0; color: #475467; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.meta-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 6px; color: var(--subtle); font-size: 11px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 11px; text-align: left; white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.table-title { display: block; color: #344054; font-weight: 680; }
.table-sub { display: block; margin-top: 2px; color: var(--subtle); font-size: 11px; overflow-wrap: anywhere; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 12px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }
.field label { color: #344054; font-size: 12px; font-weight: 650; }
.field-help { margin: 0; color: var(--subtle); font-size: 11px; }
.input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
textarea.input { min-height: 86px; resize: vertical; }
.input:focus { border-color: #818cf8; outline: 3px solid rgba(99,102,241,.12); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.form-message { min-height: 19px; margin: 8px 0 0; font-size: 12px; }
.form-message.error { color: var(--red); }
.form-message.success { color: var(--green); }

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  background: var(--surface);
}
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 42px clamp(28px, 5vw, 64px); }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 38px; }
.auth-brand strong { font-size: 16px; letter-spacing: -.02em; }
.auth-main h1 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.auth-main > p { margin: 7px 0 24px; color: var(--muted); font-size: 13px; }
.auth-main form { width: 100%; max-width: 390px; }
.auth-aside {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  padding: clamp(48px, 8vw, 110px);
  background: #17182e;
  color: white;
}
.auth-aside::before, .auth-aside::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); }
.auth-aside::before { width: 380px; height: 380px; top: -190px; right: -80px; background: rgba(79,70,229,.48); }
.auth-aside::after { width: 330px; height: 330px; bottom: -180px; left: 5%; background: rgba(13,148,136,.34); }
.auth-aside-copy { position: relative; z-index: 1; max-width: 520px; }
.auth-kicker { color: #a5b4fc; font-size: 12px; font-weight: 720; letter-spacing: .08em; }
.auth-aside h2 { margin: 14px 0 10px; font-size: clamp(28px, 4vw, 46px); line-height: 1.15; letter-spacing: -.045em; }
.auth-aside p { margin: 0; color: #b4bac8; font-size: 14px; }
.auth-switch { margin-top: 24px; color: var(--muted); font-size: 12px; }
.auth-switch a { color: var(--indigo); font-weight: 700; text-decoration: none; }

.subnav { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.subnav a:hover { color: var(--indigo); border-color: #c7d7fe; }
.server-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.server-item { min-width: 0; padding: 11px; border-radius: 9px; background: var(--surface-soft); }
.server-item span { display: block; }
.server-item .label { color: var(--muted); font-size: 11px; }
.server-item .value { margin-top: 3px; color: #344054; font-size: 12px; font-weight: 680; overflow-wrap: anywhere; }

.registry-list { display: grid; }
.registry-item { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.registry-item:last-child { border-bottom: 0; }
.registry-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.registry-id { color: var(--subtle); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.registry-form { display: grid; grid-template-columns: minmax(130px,.8fr) minmax(220px,1.7fr) minmax(140px,.7fr) auto auto; gap: 8px; align-items: end; }
.registry-form .field label { font-size: 11px; }
.registry-form .input { min-height: 36px; padding: 6px 8px; font-size: 12px; }
.registry-message { grid-column: 1 / -1; }
.switch-field { align-self: center; padding-top: 19px; }
.switch-field label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.switch-field .field-help { max-width: 230px; margin-top: 4px; white-space: normal; }

.conversation-link { color: var(--indigo); font-weight: 680; text-decoration: none; }
.conversation-link:hover { text-decoration: underline; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.audit-list { margin: 0; padding: 0; list-style: none; }
.audit-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.audit-list li:last-child { border-bottom: 0; }

.skeleton { overflow: hidden; position: relative; border-radius: 6px; background: #edf0f5; color: transparent; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: shimmer 1.25s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

.mobile-nav { display: none; }
.noscript { padding: 12px; background: var(--red-soft); color: var(--red); text-align: center; }

@media (max-width: 1050px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .registry-form { grid-template-columns: 1fr 1fr; }
  .registry-form .wide { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 18px 14px 88px; }
  .page-header { gap: 12px; }
  .page-header h1 { font-size: 21px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid, .two-column { grid-template-columns: 1fr; }
  .toolbar { align-items: flex-start; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 66px;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(14px);
  }
  .mobile-nav .nav-link { flex-direction: column; justify-content: center; gap: 1px; min-height: 52px; padding: 4px; color: var(--muted); font-size: 10px; }
  .mobile-nav .nav-link.active { color: var(--indigo); background: var(--surface-indigo); }
  .mobile-nav .nav-icon { font-size: 17px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-main { min-height: 100vh; padding: 32px 24px; }
  .auth-aside { display: none; }
}

@media (max-width: 520px) {
  .page-header { flex-direction: column; }
  .header-actions { width: 100%; }
  .header-actions .button { flex: 1; }
  .toolbar { flex-direction: column; }
  .toolbar-group:last-child { width: 100%; }
  .toolbar-group:last-child .button { flex: 1; }
  .service-grid { gap: 10px; }
  .detail-status-grid, .form-grid, .server-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .registry-form { grid-template-columns: 1fr; }
  .registry-form .wide { grid-column: auto; }
  .summary-card { min-height: 80px; padding: 12px; }
  .summary-value { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Development notebook: evidence and dates remain distinct from live operation. */
.progress-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; align-items: start; }
.progress-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
.progress-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.progress-card h3 { margin: 0; font-size: 16px; }
.progress-card h4 { margin: 14px 0 5px; font-size: 12px; }
.progress-card p { font-size: 12px; white-space: pre-wrap; }
.progress-summary { color: var(--muted); }
.progress-next { padding: 10px 12px; background: var(--surface-soft); border-radius: 8px; font-size: 12px; }
.progress-next p { margin: 4px 0 0; }
.progress-list ul, .progress-evidence { padding-left: 18px; margin: 5px 0 12px; font-size: 12px; }
.progress-list li, .progress-evidence li { margin: 5px 0; white-space: pre-wrap; }
.progress-meta { display: grid; gap: 3px; margin: 13px 0; font-size: 11px; color: var(--muted); }
.progress-stale { color: #9a6700; }
.progress-detail, .progress-editor { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.progress-card summary { cursor: pointer; font-size: 12px; font-weight: 650; }
.progress-stages { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; font-size: 12px; }
.progress-stages dt { font-weight: 700; }
.progress-stages dd { margin: 0; white-space: pre-wrap; }
.progress-timeline { list-style: none; padding: 0 0 0 12px; border-left: 2px solid var(--line); font-size: 12px; }
.progress-timeline li { margin: 12px 0 18px; }
.progress-timeline p { margin: 5px 0; }
.progress-editor .form-grid { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
.progress-editor .span-2 { grid-column: auto; }
.progress-editor .input { min-width: 0; font-size: 12px; }
.progress-collector { margin: 8px 0; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 1200px) { .progress-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .progress-card { padding: 12px; } }
.metric-comment { margin: 9px 0 0; padding-top: 8px; border-top: 1px solid #e1e5ef; font-size: 12px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; color: #49556b; }

/* Compact refresh controls keep scope available to assistive technology. */
.refresh-icon { display: block; width: 19px; height: 19px; flex: 0 0 auto; }
.button.icon-button { width: 40px; height: 40px; min-width: 40px; padding: 9px; flex: 0 0 auto; border-radius: 11px; }
.button.icon-button:hover { border-color: #b8aedc; color: var(--indigo); background: #f3f0fb; }
.refresh-button.is-refreshing .refresh-icon { animation: spin .9s linear infinite; }
.refresh-button.is-refreshing { opacity: .65; }
.button { transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.summary-card:first-child .summary-value { color: var(--indigo); }
.summary-card:nth-child(2) .summary-value { color: var(--teal); }
.summary-label { font-weight: 600; }
.panel-head { background: linear-gradient(110deg, #fff, #fafbfe); border-radius: var(--radius) var(--radius) 0 0; }
.metric-meta { overflow-wrap: anywhere; }
.metric-comment { color: #526077; border-top-color: var(--line); }
@media (max-width: 760px) {
  .main { padding-top: 22px; }
  .service-card-top { padding: 16px 15px 13px; }
}
@media (max-width: 520px) {
  .page-header:has(.header-actions > .icon-button:only-child) { flex-direction: row; }
  .page-header > div:first-child { min-width: 0; }
  .page-header:has(.header-actions > .icon-button:only-child) .header-actions { width: auto; flex: 0 0 auto; }
  .header-actions .button.icon-button { flex: 0 0 40px; }
  .page-header h1 { font-size: 23px; }
  .page-header p { font-size: 12px; overflow-wrap: anywhere; }
  .summary-grid { gap: 8px; }
  .toolbar { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* Developer sections and dialogs keep the overview short without removing records. */
[hidden] { display: none !important; }
.subnav { flex-wrap: wrap; overflow: visible; gap: 7px; margin-bottom: 18px; }
.subnav a[aria-current="page"] { color: var(--indigo-dark); border-color: #d7cff1; background: #eeeaf8; }
.progress-card > .progress-summary, .progress-card > .progress-next p, .progress-card > .progress-list li {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.progress-card > .progress-summary { min-height: 36px; }
.progress-card > .progress-list { font-size: 12px; }
.progress-card > .progress-list ul { padding-left: 16px; }
.progress-card > .progress-list h4 { margin-top: 12px; }
.progress-date { margin-top: 12px; }
.progress-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.progress-actions .button:last-child { margin-left: auto; }
.progress-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dialog-open { overflow: hidden; }
.progress-dialog { width: min(760px, calc(100vw - 32px)); max-width: 100%; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: 0 24px 80px #0f172a40; }
.progress-dialog::backdrop { background: #111a2d80; backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 17px 20px; background: white; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.dialog-head .button { flex-shrink: 0; }
.dialog-body { padding: 0 20px 20px; font-size: 13px; overflow-wrap: anywhere; }
.dialog-body p, .dialog-body li { white-space: pre-wrap; }
.dialog-body .progress-detail, .dialog-body .progress-editor { border-top: 0; margin-top: 0; }
.dialog-body h4 { margin: 18px 0 8px; }
@media (max-width: 1100px) { .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .progress-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .subnav { gap: 5px; }
  .subnav a { padding: 6px 9px; }
  .progress-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .dialog-head { padding: 13px; }
  .dialog-head h2 { font-size: 15px; }
  .dialog-body { padding: 0 13px 16px; }
}
.panel-head > .header-actions:empty { display: none; }

/* Development updates: one row per stable service, history on demand. */
.development-board { padding: 12px 16px; }
.development-board-head, .development-board-row { display:grid; grid-template-columns:minmax(135px,.85fr) minmax(0,1.3fr) minmax(0,1.3fr) minmax(0,1.2fr) minmax(145px,.8fr); gap:16px; }
.development-board-head { color:var(--muted, #65758a); font-size:11px; padding:0 0 10px; }
.development-board-row { padding:16px 0; border-top:1px solid #e4e9f1; align-items:start; font-size:12px; }
.development-board-row > * { min-width:0; overflow-wrap:anywhere; }
.development-board-identity h3 { margin:0 0 7px; font-size:14px; color:#182c49; }
.development-board-identity .badge { white-space:normal; }
.development-board-text { margin:0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; line-height:1.6; }
.development-board-label { display:none; }
.development-board-actions { display:grid; gap:5px; justify-items:start; }
.development-board-detail p { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:760px) {
 .development-board-head { display:none; }
 .development-board-row { grid-template-columns:1fr 1fr; gap:10px 14px; }
 .development-board-identity, .development-board-actions { grid-column:1/-1; }
 .development-board-cell:nth-child(2) { grid-column:1/-1; }
 .development-board-label { display:block; font-size:10px; color:#64748b; margin-bottom:3px; }
 .development-board-actions { display:flex; flex-wrap:wrap; align-items:center; }
 .development-board-text { -webkit-line-clamp:2; }
}
.development-dossier { max-width:850px; margin:auto; }
.dossier-section { padding:14px 0; border-bottom:1px solid #e4e9f1; }
.dossier-section h3 { font-size:14px; color:#243a5d; margin:0 0 10px; }
.dossier-section p, .dossier-steps { font-size:13px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.dossier-steps { padding-left:24px; }
.dossier-steps li { padding:5px 0 5px 4px; }
.dossier-history { margin-top:18px; }
.dossier-history summary { cursor:pointer; color:#5149b8; font-weight:600; }
.menu-grant-row { border:1px solid #dfe5ef; border-radius:10px; padding:12px; margin:12px 0; display:flex; flex-wrap:wrap; gap:14px; }
.menu-grant-row legend { font-weight:700; padding:0 6px; }
.service-card-foot { flex-wrap:wrap; gap:10px; }
.milestone-progress { margin:10px 0; font-size:12px; }
.milestone-progress strong { color:#5747bc; font-size:18px; }
.milestone-progress progress { width:100%; height:6px; display:block; margin:6px 0; accent-color:#6456d7; border:0; border-radius:4px; overflow:hidden; }
.milestone-progress progress::-webkit-progress-bar { background:#e9edf5; }
.milestone-progress progress::-webkit-progress-value { background:#6456d7; }
.milestone-progress small { display:block; font-size:10px; }

/* Focused project workspace and operational console. */
:root { --bg:#f5f6fa; --ink:#17263c; --line:#e3e7ef; --shadow:0 3px 18px #172b4d04; }
.page-header h1 { font-size:25px; letter-spacing:-.045em; }
.subnav { border-bottom:1px solid var(--line); padding-bottom:12px; margin-bottom:22px; gap:7px; }
.subnav a { border:0; background:transparent; color:#738097; font-weight:600; }
.subnav a[aria-current] { background:#eceafa; color:#5848b9; }
.project-switcher { display:flex; gap:10px; margin-bottom:16px; overflow-x:auto; padding:2px; }
.project-tab { display:flex; align-items:center; gap:10px; flex:1 0 160px; min-width:0; padding:13px 16px; border:1px solid var(--line); border-radius:12px; background:#fff; color:#6b778d; text-align:left; }
.project-tab[aria-selected=true] { border-color:#8d80df; background:#f7f5ff; color:#352a79; box-shadow:0 0 0 2px #6555be0c; }
.project-avatar { display:grid; place-items:center; width:29px; height:29px; flex-shrink:0; border-radius:8px; background:#edf0f6; color:#59677e; font-size:12px; font-weight:750; }
.project-tab[aria-selected=true] .project-avatar { background:#6554c2; color:white; }
.project-tab strong { font-size:13px; }
.project-tab-progress { margin-left:auto; font-size:12px; font-variant-numeric:tabular-nums; }
.project-workspace { padding:26px; border:1px solid var(--line); border-radius:16px; background:white; box-shadow:0 5px 24px #16243c04; }
.workspace-head { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.eyebrow { display:block; font-size:10px; font-weight:700; letter-spacing:.13em; color:#8a95a7; }
.workspace-head h2 { margin:7px 0 5px; font-size:28px; letter-spacing:-.045em; }
.workspace-stage { font-size:12px; color:#66748b; margin:0; }
.workspace-head .milestone-progress { width:215px; flex-shrink:0; text-align:right; }
.workspace-head .milestone-progress strong { font-size:34px; letter-spacing:-.05em; }
.workspace-head .milestone-progress small { font-size:9px; }
.stage-track { list-style:none; display:flex; gap:0; padding:24px 0; margin:20px 0 0; border-top:1px solid #edf0f5; border-bottom:1px solid #edf0f5; }
.stage-stop { flex:1; min-width:0; position:relative; padding-right:16px; display:flex; flex-direction:column; align-items:flex-start; gap:7px; }
.stage-stop:not(:last-child)::after { content:""; position:absolute; height:2px; background:#e7ebf3; top:13px; left:34px; right:8px; }
.stage-stop.done::after { background:#c8dfdc; }
.stage-dot { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:#f0f2f7; border:1px solid #e5e9f0; color:#8792a3; font-size:11px; font-weight:700; }
.stage-stop.done .stage-dot { background:#edf6f4; color:#278477; border-color:#cde6df; }
.stage-stop.doing .stage-dot { background:#6250bd; color:white; border-color:#6250bd; box-shadow:0 0 0 4px #f1eefb; }
.stage-name { font-size:11px; color:#657287; line-height:1.5; overflow-wrap:anywhere; }
.stage-stop.doing .stage-name { color:#433087; font-weight:700; }
.stage-stop small { font-size:10px; color:#8b96a6; }
.workspace-columns { display:grid; grid-template-columns:1.2fr 1fr; gap:28px; padding:23px 0; }
.workspace-columns h3 { font-size:15px; margin:7px 0 12px; }
.work-action { font-size:14px; line-height:1.75; color:#304159; margin:0; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.work-issues { padding-left:24px; border-left:1px solid #edf0f5; }
.work-issues.has-issues h3 { color:#98601b; }
.issue-queue { margin:0; padding:0; list-style:none; }
.issue-queue li { font-size:12px; color:#5c697d; line-height:1.65; margin-bottom:7px; padding-left:12px; position:relative; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.issue-queue li::before { content:""; position:absolute; top:7px; left:0; width:4px; height:4px; border-radius:50%; background:#c7914a; }
.workspace-actions { display:flex; flex-wrap:wrap; gap:8px; padding-top:6px; }
.workspace-actions > :last-child { margin-left:auto; }
.workspace-record { margin-top:22px; padding-top:13px; border-top:1px solid #edf0f5; font-size:12px; color:#65748c; }
.workspace-record summary,.console-system-info summary { cursor:pointer; font-size:11px; color:#8b96a7; }
.console-system-info { padding:13px 4px; }
.workspace-record p { line-height:1.65; }
.workspace-record .record-remaining { padding-left:18px; line-height:1.7; }
.summary-card { min-height:0; padding:14px 17px; box-shadow:none; border-radius:10px; }
.summary-value { font-size:25px; }
.summary-note { font-size:10px; }
.toolbar { background:transparent; border:0; padding:3px 0 10px; min-height:38px; }
.service-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:14px; }
.service-card:has(.metric-list) { grid-column:1/-1; }
.service-card-top { background:#fff; padding:19px 22px 14px; }
.service-heading { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.service-heading h2 { font-size:18px; letter-spacing:-.035em; }
.service-heading .badge-row { margin:0; }
.service-select { margin-top:4px; }
.metric-list { grid-template-columns:1.35fr 1fr 1fr 1fr; border-top:0; padding:4px 7px 10px; }
.metric { border-bottom:0; border-right:1px solid #edf0f5; padding:10px 16px; }
.metric:nth-child(even) { border-right:1px solid #edf0f5; }
.metric:last-child { border-right:0; }
.metric-value { font-size:15px; line-height:1.5; }
.metric:first-child .run-count { font-size:26px; color:#5241ac; font-variant-numeric:tabular-nums; }
.metric-comment { font-size:11px; line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:0; }
.metric-meta { font-size:10px; }
.service-card-foot { padding:13px 22px; border-top:1px solid #edf0f5; }
.service-card-foot .source { margin-right:auto; font-size:10px; }
.service-empty { margin:5px 22px; font-size:14px; color:#7d899c; }
.service-purpose { margin:4px 22px 18px; font-size:11px; color:#97a0af; }
.connection-pending { background:#fafbfd; box-shadow:none; }
.connection-pending .service-card-top { background:transparent; }
@media(max-width:960px) {
 .metric-list { grid-template-columns:1fr 1fr; gap:8px 0; }
 .metric:nth-child(2) { border-right:0; }
 .workspace-head .milestone-progress { width:180px; }
}
@media(max-width:600px) {
 .page-header h1 { font-size:22px; }
 .project-switcher { gap:7px; margin-bottom:12px; }
 .project-tab { flex:0 0 auto; padding:10px; gap:7px; }
 .project-tab strong { font-size:12px; }
 .project-avatar { width:24px; height:24px; }
 .project-workspace { padding:18px 15px; border-radius:12px; }
 .workspace-head { align-items:flex-start; gap:12px; }
 .workspace-head h2 { font-size:23px; }
 .workspace-head .milestone-progress { width:95px; margin:0; }
 .workspace-head .milestone-progress strong { font-size:27px; }
 .workspace-head .milestone-progress > span { display:block; font-size:10px; }
 .workspace-head .milestone-progress small { font-size:8px; }
 .workspace-stage { font-size:11px; }
 .stage-track { padding:18px 0; overflow-x:auto; }
 .stage-stop { min-width:89px; flex:1 0 89px; padding-right:12px; }
 .stage-name { font-size:10px; }
 .workspace-columns { grid-template-columns:1fr; gap:18px; padding:19px 0; }
 .work-issues { border-left:0; border-top:1px solid #edf0f5; padding:16px 0 0; }
 .work-action { font-size:13px; -webkit-line-clamp:3; }
 .workspace-columns h3 { font-size:14px; margin-bottom:9px; }
 .service-grid { grid-template-columns:1fr; }
 .service-card-top { padding:16px 15px 10px; }
 .service-heading { gap:8px; }
 .service-heading h2 { font-size:16px; }
 .metric { padding:8px 10px; }
 .metric-value { font-size:13px; }
 .metric:first-child .run-count { font-size:23px; }
 .service-card-foot { padding:11px 15px; }
 .service-card-foot .source { flex-basis:100%; }
}
@media(max-width:600px) {
 .stage-track { overflow:visible; }
 .stage-stop { min-width:0; flex:1 1 0; padding-right:6px; }
 .stage-stop:not(:last-child)::after { left:31px; right:4px; }
 .stage-name { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:9px; }
 .stage-stop small { font-size:9px; }
}
@media(max-width:600px) {
 .summary-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
 .summary-card { padding:10px 7px; border-radius:9px; }
 .summary-label { font-size:9px; line-height:1.4; }
 .summary-value { font-size:21px; }
 .summary-note { display:none; }
}
/* Compact operational result: primary result, two short facts, opt-in evidence. */
.compact-operation { display:grid; grid-template-columns:1fr 1fr; gap:0; padding:0 20px; }
.compact-operation > .metric { padding:13px 0; border:0; }
.compact-operation > .operation-result { grid-column:1/-1; padding:8px 0 17px; border-bottom:1px solid #edf0f5; }
.compact-operation > .operation-result .metric-value { font-size:22px; color:#21344b; }
.compact-operation > .operation-result .metric-meta { margin-top:5px; font-size:11px; }
.compact-operation > .metric:nth-of-type(3) { padding-left:15px; }
.compact-operation .metric-label { font-size:10px; }
.compact-operation .metric-value { font-size:14px; }
.compact-operation .metric-meta { font-size:10px; }
.operation-running { grid-column:1/-1; padding:10px 0; font-size:12px; color:#6552bd; }
.operation-explanation,.operation-record { grid-column:1/-1; padding:10px 0; font-size:12px; }
.operation-explanation { border-top:1px solid #f0e7dc; color:#95631f; }
.operation-explanation summary,.operation-record summary { cursor:pointer; font-size:11px; }
.operation-explanation .metric-comment { display:block; -webkit-line-clamp:unset; color:#647188; font-size:12px; margin:10px 0 0; }
.operation-record { color:#7c899c; border-top:1px solid #edf0f5; }
.operation-record .metric { border:0; padding:10px 0; }
.operation-record .metric-comment { display:block; -webkit-line-clamp:unset; }
.operation-record .source { line-height:1.6; }
.service-card-foot { justify-content:flex-end; }
.service-card-foot .detail-link { margin-right:auto; }
@media(max-width:600px) {
 .compact-operation { padding:0 15px; }
 .compact-operation > .operation-result .metric-value { font-size:21px; }
 .compact-operation > .metric .metric-value { overflow-wrap:normal; }
 .toolbar { flex-direction:row; align-items:center; gap:8px; min-height:38px; }
 .toolbar-group { gap:7px; }
 .toolbar-group:last-child { width:auto; flex-shrink:0; }
 .toolbar-group:last-child .button { flex:none; padding:8px 10px; font-size:11px; min-height:34px; }
 .toolbar .check-label,.toolbar .selection-count { font-size:11px; }
 .toolbar .button svg { width:14px; height:14px; }
}

/* Desktop operational layout: clear surfaces and a compact horizontal result. */
@media(min-width:901px) {
 .main:has(.service-grid) { background:#edf0f5; min-height:100vh; }
 .summary-grid { gap:12px; }
 .summary-card { padding:14px 18px; background:#f8f9fc; border-color:#dce2ec; }
 .summary-card:first-child { background:#22324c; border-color:#22324c; }
 .summary-card:first-child .summary-label,.summary-card:first-child .summary-note { color:#b9c5d8; }
 .summary-card:first-child .summary-value { color:#fff; }
 .summary-card:nth-child(2) { border-top:3px solid #70a99d; }
 .summary-card:nth-child(3) { border-top:3px solid #8d7dc7; }
 .summary-card:nth-child(4) { border-top:3px solid #a1afc4; }
 .service-card { border-color:#d9e0eb; box-shadow:0 4px 12px #23304a06; }
 .service-card:has(.compact-operation) { border-top:3px solid #7864bd; }
 .service-card-top { background:#f8f9fc; padding:16px 20px; }
 .service-heading h2 { font-size:19px; }
 .compact-operation { grid-template-columns:1.2fr 1fr 1fr; padding:16px 20px 0; column-gap:16px; align-items:stretch; }
 .compact-operation > .metric { padding:16px 20px; border:0; border-radius:10px; background:#f6f8fb; margin-bottom:14px; }
 .compact-operation > .operation-result { grid-column:auto; padding:16px 20px; background:#eeebfa; border:0; }
 .compact-operation > .metric:nth-of-type(3) { padding-left:20px; }
 .compact-operation .metric-label { font-size:12px; color:#728096; }
 .compact-operation .metric-value { font-size:19px; font-weight:700; margin:6px 0; }
 .compact-operation > .operation-result .metric-value { font-size:25px; color:#43357d; }
 .compact-operation .metric-meta,.compact-operation > .operation-result .metric-meta { font-size:11px; line-height:1.6; }
 .operation-explanation { padding:10px 12px; margin-bottom:7px; border:0; border-radius:7px; background:#faf4e9; }
 .operation-record { padding:10px 0; border-top:0; }
 .operation-explanation summary,.operation-record summary { font-size:12px; }
 .service-card-foot { padding:11px 20px; background:#f8f9fc; border-color:#e5e9f1; }
 .connection-pending { background:#e8edf4; border-color:#d8e0ec; }
 .connection-pending .service-card-top,.connection-pending .service-card-foot { background:transparent; }
 .connection-pending .service-empty { font-size:14px; color:#69788f; }
 .connection-pending .service-purpose { color:#8793a6; }
}

.progress-feedback { display:grid; gap:14px; }
.feedback-check { display:flex; align-items:flex-start; gap:8px; margin:10px 0; font-size:13px; }
.feedback-check input { width:auto; margin-top:3px; }
