:root {
  --ink: #17181a;
  --muted: #697078;
  --line: #dfe2e5;
  --line-strong: #c7ccd1;
  --paper: #ffffff;
  --canvas: #f3f5f7;
  --sidebar: #1b1d1f;
  --sidebar-muted: #9da3aa;
  --coral: #ff385c;
  --coral-dark: #d92c4a;
  --mint: #16866f;
  --mint-soft: #e4f5ef;
  --blue: #2867c7;
  --blue-soft: #e8f0fd;
  --amber: #9a6412;
  --amber-soft: #fff3d7;
  --red-soft: #fff0f2;
  --radius: 6px;
  --shadow: 0 10px 28px rgba(22, 25, 28, 0.08);
  font-family: Inter, "SF Pro Text", "PingFang SC", "Noto Sans KR", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 0; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(40, 103, 199, 0.28);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 8px 12px;
  color: var(--ink);
}
.skip-link:focus { transform: translateY(0); }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 22, 24, .92);
}
.auth-gate.is-hidden { display: none; }
.auth-gate-panel {
  width: min(430px, 100%);
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 28px;
  border: 1px solid #464b50;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.34);
}
.auth-gate-panel p, .auth-gate-panel h1, .auth-gate-panel > span { margin: 0; }
.auth-gate-panel p { color: var(--muted); font-size: 10px; font-weight: 800; }
.auth-gate-panel h1 { font-size: 22px; }
.auth-gate-panel > span { color: var(--muted); font-size: 11px; line-height: 1.65; }
.auth-gate-panel small { color: var(--muted); font-size: 9px; }
.auth-form { width: 100%; display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.auth-form input { width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 12px; background: #fff; color: var(--ink); font: inherit; }
.auth-form input:focus { outline: 2px solid rgba(255, 55, 94, .18); border-color: var(--accent); }
.auth-form .btn { justify-self: stretch; }
.auth-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: var(--mint-soft); color: var(--mint); }
.auth-mark svg { width: 21px; height: 21px; }
body.is-locked { overflow: hidden; }

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 232px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: var(--sidebar);
  color: #fff;
  border-right: 1px solid #2e3134;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 8px 18px;
  border-bottom: 1px solid #323538;
}

.brand-block > div:last-child { min-width: 0; }
.brand-block strong { display: block; font-size: 16px; line-height: 1.2; }
.brand-block span { display: block; margin-top: 3px; color: var(--sidebar-muted); font-size: 12px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 5px;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
}

.primary-nav { display: grid; gap: 3px; margin-top: 14px; }
.nav-group-label { margin: 12px 10px 4px; color: #727981; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.nav-group-label:first-child { margin-top: 0; }

.nav-item {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c4c8cc;
  text-align: left;
  font-size: 13px;
}

.nav-item:hover { background: #272a2d; color: #fff; }
.nav-item.is-active { background: #34373a; color: #fff; }
.nav-item.is-active svg { color: var(--coral); }
.nav-item svg, .btn svg, .icon-btn svg, .standard-grid svg, .permission-list svg, .system-route-list svg, .redline-list svg, .integration-locked svg, .connector-alert svg { width: 17px; height: 17px; }
.nav-count { min-width: 20px; padding: 2px 5px; border-radius: 10px; background: #44484c; color: #fff; font-size: 11px; text-align: center; }

.sidebar-runtime {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 14px 8px 2px;
  border-top: 1px solid #323538;
}
.sidebar-runtime strong, .sidebar-runtime span { display: block; }
.sidebar-runtime strong { font-size: 12px; }
.sidebar-runtime span { margin-top: 2px; color: var(--sidebar-muted); font-size: 10px; }

.status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #a5abb0; }
.status-dot.is-online, .status-dot.is-safe { background: #31c79d; box-shadow: 0 0 0 4px rgba(49, 199, 157, 0.13); }
.status-dot.is-warning { background: #e9a62f; }
.status-dot.is-muted { background: #9da3aa; }

.main { grid-column: 2; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 2.5vw, 34px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 3px 14px rgba(22, 25, 28, .035);
}

.eyebrow, .section-heading p, .form-section-heading p, .dialog-heading p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

h1, h2, h3, p { letter-spacing: 0; }
h1 { margin: 0; font-size: 22px; line-height: 1.2; }
h2 { margin: 0; font-size: 16px; line-height: 1.3; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.market-switcher { position: relative; display: flex; align-items: center; gap: 9px; }
.market-context { display: none; }
.market-trigger {
  min-width: 190px;
  height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 10px 6px 7px;
  background: #fff;
  text-align: left;
  box-shadow: 0 2px 8px rgba(22, 25, 28, .04);
}
.market-trigger:hover, .market-switcher.is-open .market-trigger { border-color: #858c94; background: #fafbfc; }
.market-flag { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; background: #202327; color: #fff; font-size: 9px; font-weight: 850; }
.market-trigger-copy { min-width: 0; }
.market-trigger-copy strong, .market-trigger-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-trigger-copy strong { font-size: 13px; }
.market-trigger-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.market-trigger > svg { width: 15px; height: 15px; color: var(--muted); }
.market-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: 300px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 25, 28, .16);
}
.market-switcher.is-open .market-menu { display: grid; }
.market-option { min-height: 50px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 10px; border: 0; border-radius: 5px; padding: 7px; background: transparent; text-align: left; }
.market-option:hover { background: #f2f4f6; }
.market-option > span:nth-child(2) { min-width: 0; }
.market-option strong, .market-option small { display: block; }
.market-option strong { font-size: 11px; }
.market-option small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.market-option > svg { width: 15px; height: 15px; visibility: hidden; color: var(--mint); }
.market-option.is-selected { background: #eef3fa; }
.market-option.is-selected > svg { visibility: visible; }

select, input, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 10px;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
input[readonly] { background: #f1f3f2; color: var(--muted); }

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2d3033; }
.btn-secondary { background: var(--paper); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { background: #f1f3f2; }
.btn-danger { background: var(--red-soft); border-color: #f2a9b6; color: #a92039; }

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
}
.icon-btn:hover { background: #f0f2f1; }
.icon-btn.is-active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 82px; }
.media-ready-mark { width: 22px; height: 22px; display: grid; place-items: center; color: var(--mint); }
.media-ready-mark svg { width: 15px; height: 15px; }

.workspace-view { display: none; width: 100%; max-width: 1500px; margin: 0 auto; padding: 24px clamp(18px, 2.5vw, 34px) 52px; }
.workspace-view.is-active { display: block; }

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) 18px) minmax(0, 1fr);
  align-items: stretch;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.workflow-strip > svg { align-self: center; width: 16px; height: 16px; color: #a6acb2; }
.workflow-strip button { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 9px; row-gap: 2px; align-content: center; min-height: 68px; padding: 11px 14px; border: 0; background: transparent; text-align: left; }
.workflow-strip button:hover { background: #f6f8f9; }
.workflow-strip button > span { grid-row: span 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; background: #f0f2f4; color: #4f5861; font-size: 10px; font-weight: 850; }
.workflow-strip button:nth-of-type(2) > span { background: var(--blue-soft); color: var(--blue); }
.workflow-strip button:nth-of-type(3) > span { background: var(--red-soft); color: var(--coral-dark); }
.workflow-strip button:nth-of-type(4) > span { background: var(--mint-soft); color: var(--mint); }
.workflow-strip strong, .workflow-strip small { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-strip strong { font-size: 12px; }
.workflow-strip small { color: var(--muted); font-size: 10px; }

.runtime-banner {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
  overflow-x: auto;
}
.runtime-banner > div { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.runtime-banner strong { font-size: 12px; }
.runtime-banner span:not(.status-dot) { color: var(--muted); font-size: 11px; }
.runtime-divider { width: 1px; height: 18px; background: var(--line); }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(22, 25, 28, .035);
}
.metric-strip article { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); }
.metric-strip article { position: relative; }
.metric-strip article::before { content: ""; position: absolute; inset: 0 auto auto 20px; width: 26px; height: 2px; background: var(--coral); }
.metric-strip article:nth-child(2)::before { background: var(--blue); }
.metric-strip article:nth-child(3)::before { background: var(--amber); }
.metric-strip article:nth-child(4)::before { background: var(--mint); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip span, .metric-strip small { display: block; }
.metric-strip span { color: var(--muted); font-size: 11px; }
.metric-strip strong { display: block; margin: 8px 0 4px; font-size: 28px; line-height: 1; }
.metric-strip small { color: #8a9096; font-size: 10px; }

.overview-grid, .monitor-grid, .meta-grid, .system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.7fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}
.meta-grid, .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.work-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 6px 22px rgba(22, 25, 28, .035);
}

.section-heading {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.table-wrap { max-width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); background: #f6f7f6; font-weight: 700; text-align: left; }
th, td { padding: 13px; border-bottom: 1px solid #eceeed; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfa; }
td strong, td small { display: block; }
td strong { color: var(--ink); font-size: 12px; }
td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.wide-table table { min-width: 940px; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 3px 8px;
  background: #f3f4f3;
  color: #555b61;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-green { border-color: #a9daca; background: var(--mint-soft); color: #116b59; }
.badge-amber { border-color: #edcf91; background: var(--amber-soft); color: #80500b; }
.badge-coral { border-color: #ffafbd; background: var(--red-soft); color: #b52540; }

.progress-track { width: 90px; height: 6px; border-radius: 3px; overflow: hidden; background: #e6e8e7; }
.progress-track i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.progress-label { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.activity-list { display: grid; padding: 5px 16px 12px; }
.activity-item { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid #eceeed; }
.activity-item:last-child { border-bottom: 0; }
.activity-item p { margin: 0; font-size: 12px; line-height: 1.45; }
.activity-item strong { display: block; }
.activity-item p > span { display: block; margin-top: 3px; color: #424950; }
.activity-item small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-dot { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--blue); }
.activity-dot.blocked { background: #d6841c; }
.activity-dot.passed { background: var(--mint); }

.full-band { margin-top: 18px; border-block: 1px solid var(--line); background: var(--paper); }
.full-band { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 22px rgba(22, 25, 28, .035); }
.standard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.standard-grid > div { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; padding: 18px; border-right: 1px solid var(--line); }
.standard-grid > div:last-child { border-right: 0; }
.standard-grid svg { grid-row: span 2; color: var(--coral); }
.standard-grid strong, .standard-grid span { display: block; }
.standard-grid strong { font-size: 12px; }
.standard-grid span { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.project-form { max-width: 1060px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 24px rgba(22,25,28,.045); overflow: hidden; }
.wizard-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #f8f9fa; }
.wizard-step { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 13px 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; }
.wizard-step:last-child { border-right: 0; }
.wizard-step span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 9px; }
.wizard-step strong { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.wizard-step.is-active { color: var(--ink); background: #fbfbfa; }
.wizard-step.is-active span { border-color: var(--coral); background: var(--coral); color: #fff; }
.wizard-step.is-complete span { border-color: var(--mint); background: var(--mint-soft); color: var(--mint); }

.wizard-page { display: none; min-height: 410px; padding: 28px 28px 20px; }
.wizard-page.is-active { display: block; }
.form-section-heading { margin-bottom: 24px; }
.form-section-heading h2 { font-size: 20px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid label, .full-field, .policy-panel > label { min-width: 0; }
label > span:first-child, legend { display: block; margin-bottom: 7px; color: #444a50; font-size: 12px; font-weight: 700; }
.full-field { display: block; margin-top: 16px; }

.choice-fieldset, .binary-grid { margin: 20px 0; padding: 0; border: 0; }
.choice-fieldset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice-fieldset legend { grid-column: 1 / -1; }
.check-option { position: relative; min-width: 0; }
.check-option input { position: absolute; opacity: 0; pointer-events: none; }
.check-option > span { min-height: 94px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 13px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); }
.check-option input:checked + span { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--blue-soft); }
.check-option svg { width: 18px; height: 18px; color: var(--blue); }
.check-option strong, .check-option small { display: block; }
.check-option strong { font-size: 11px; }
.check-option small { color: var(--muted); font-size: 9px; }

.quality-lock { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 20px; padding: 14px; border: 1px solid #efb2bc; border-radius: 6px; background: var(--red-soft); }
.quality-lock svg { width: 22px; height: 22px; color: var(--coral-dark); }
.quality-lock strong, .quality-lock span { display: block; }
.quality-lock strong { font-size: 12px; }
.quality-lock span { margin-top: 3px; color: #805561; font-size: 10px; }
.quality-lock input { width: 18px; min-height: 18px; }

.binary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.binary-grid label, .redline-checks label { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.binary-grid input, .redline-checks input, .permission-list input { width: 16px; min-height: 16px; flex: 0 0 16px; accent-color: var(--blue); }
.binary-grid span, .redline-checks span { margin: 0; font-size: 10px; }

.input-prefix, .input-suffix { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.input-suffix { grid-template-columns: minmax(0, 1fr) auto; }
.input-prefix span, .input-suffix span { min-width: 50px; display: grid; place-items: center; margin: 0; border: 1px solid var(--line-strong); background: #f1f3f2; color: var(--muted); font-size: 9px; }
.input-prefix span { border-right: 0; border-radius: 5px 0 0 5px; }
.input-prefix input { border-radius: 0 5px 5px 0; }
.input-suffix span { border-left: 0; border-radius: 0 5px 5px 0; }
.input-suffix input { border-radius: 5px 0 0 5px; }
.redline-checks { display: grid; gap: 8px; margin-top: 20px; }

.wizard-actions { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; border-top: 1px solid var(--line); background: #fafbfc; }
.wizard-actions-right { display: flex; align-items: center; gap: 12px; }
.wizard-actions-right > span { color: var(--muted); font-size: 10px; }
.is-hidden { display: none !important; }

.toolbar, .monitor-header, .market-intro { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.segmented { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); overflow: hidden; }
.segmented button { min-height: 34px; border: 0; border-right: 1px solid var(--line-strong); padding: 7px 11px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; }
.segmented button:last-child { border-right: 0; }
.segmented button.is-selected { background: var(--ink); color: #fff; }

.review-layout { min-width: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: calc(100vh - 160px); border: 1px solid var(--line); background: var(--paper); }
.review-stage-panel { min-width: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(480px, 1fr) auto; }
.review-toolbar, .review-actionbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.review-toolbar { min-width: 0; width: 100%; overflow: hidden; }
.review-actionbar { min-width: 0; width: 100%; }
.review-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.review-tools > span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.review-tools .btn.is-active { border-color: var(--coral); background: var(--red-soft); color: var(--coral-dark); }
.review-actionbar { border-top: 1px solid var(--line); border-bottom: 0; }
.review-actionbar > div:last-child { display: flex; gap: 8px; }
.asset-tabs { min-width: 0; flex: 1 1 auto; display: flex; gap: 4px; overflow-x: auto; }
.asset-tab { min-height: 34px; border: 1px solid transparent; border-radius: 4px; padding: 7px 10px; background: transparent; color: var(--muted); font-size: 10px; white-space: nowrap; }
.asset-tab.is-active { border-color: var(--line-strong); background: #f1f3f2; color: var(--ink); }
.asset-tab span, .asset-tab small { display: block; text-align: left; }
.asset-tab span { color: var(--ink); font-size: 11px; font-weight: 750; }
.asset-tab small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.media-stage { position: relative; min-height: 480px; display: grid; place-items: center; padding: 22px; overflow: hidden; background: #e9ece9; }
.media-canvas { position: relative; display: block; max-width: 100%; max-height: 68vh; line-height: 0; }
.media-canvas.feed_4x5 { width: min(100%, 54.4vh); aspect-ratio: 4 / 5; }
.media-canvas.story_9x16, .media-canvas.reels_9x16 { width: min(100%, 38.25vh); aspect-ratio: 9 / 16; }
.media-stage img, .media-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; box-shadow: var(--shadow); }
.annotation-layer { position: absolute; inset: 0; pointer-events: none; }
.media-stage.is-annotating .media-canvas, .media-stage.is-annotating .annotation-layer { cursor: crosshair; touch-action: none; }
.media-stage.is-annotating .annotation-layer { pointer-events: auto; }
.annotation-mode-tip { position: absolute; left: 50%; bottom: 14px; display: flex; align-items: center; gap: 7px; transform: translateX(-50%); border: 1px solid #f29aaa; border-radius: 5px; padding: 8px 11px; background: rgba(255,255,255,.95); color: #9f233b; box-shadow: 0 5px 18px rgba(22,25,28,.12); font-size: 9px; line-height: 1; white-space: nowrap; }
.annotation-mode-tip svg { width: 15px; height: 15px; }
.media-placeholder { display: grid; place-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.media-placeholder svg { width: 30px; height: 30px; }
.annotation-box, .annotation-draft { position: absolute; min-width: 18px; min-height: 18px; border: 2px solid var(--coral); background: rgba(255,56,92,.12); box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 3px 12px rgba(0,0,0,.16); }
.annotation-box { padding: 0; pointer-events: auto; }
.annotation-box > span { position: absolute; top: -12px; left: -12px; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--coral); color: #fff; font-size: 9px; font-weight: 800; }
.annotation-draft { border-style: dashed; pointer-events: none; }
.annotation-draft.is-pending { border-style: solid; background: rgba(255,56,92,.18); }
.annotation-pin { position: absolute; width: 24px; height: 24px; display: grid; place-items: center; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; background: var(--coral); color: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.25); font-size: 9px; font-weight: 800; pointer-events: auto; }
.annotation-pin > span { display: block; }
.version-readout span, .version-readout strong { display: block; }
.version-readout span { color: var(--muted); font-size: 9px; }
.version-readout strong { margin-top: 3px; font-size: 11px; }

.qa-panel { min-width: 0; border-left: 1px solid var(--line); background: #fbfbfa; }
.review-composer { display: grid; gap: 12px; padding: 14px 16px 16px; border-bottom: 1px solid #f0a9b6; background: var(--red-soft); }
.review-composer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.review-composer-heading p { margin: 0 0 3px; color: var(--coral-dark); font-size: 8px; font-weight: 800; }
.review-composer-heading h3 { margin: 0; font-size: 13px; }
.review-composer label { display: block; }
.review-composer label > span:first-child { margin-bottom: 6px; font-size: 9px; }
.review-composer select, .review-composer textarea { background: #fff; }
.review-composer textarea { min-height: 112px; }
.review-composer-actions { display: flex; justify-content: flex-end; gap: 8px; }
.review-composer-actions .btn { min-height: 34px; font-size: 10px; }
.qa-block { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.qa-block > div { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.qa-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 8px; }
.qa-block strong, .qa-block small { display: block; }
.qa-block strong { font-size: 11px; }
.qa-block small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.qa-block ul { margin: 12px 0 0; padding-left: 17px; color: #535960; font-size: 10px; line-height: 1.7; }
.qa-block li.is-pass::marker { color: var(--mint); }
.qa-block li.is-fail { color: #a33b4e; }
.qa-block li.is-fail::marker { color: var(--coral-dark); }
.gate-summary { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 8px; margin: 12px 16px 2px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 5px; background: #f3f5f4; color: var(--muted); font-size: 9px; line-height: 1.45; }
.gate-summary svg { width: 17px; height: 17px; }
.gate-summary.is-pass { border-color: #a9daca; background: var(--mint-soft); color: #116b59; }
.gate-summary.is-blocked { border-color: #edcf91; background: var(--amber-soft); color: #80500b; }
.comment-list-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; font-size: 11px; }
.comment-list-heading span { min-width: 20px; border-radius: 10px; background: #e5e8e6; padding: 2px 5px; text-align: center; font-size: 9px; }
.comment-list { display: grid; padding: 0 16px 16px; }
.comment-item { padding: 11px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: 0; }
.comment-item > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.comment-item p { margin: 7px 0 0; color: #4d5359; font-size: 10px; line-height: 1.5; }
.comment-item small { color: var(--muted); font-size: 8px; }
.comment-item .comment-position { display: block; margin-top: 6px; color: var(--coral-dark); }
.comment-item.is-highlighted { margin-inline: -8px; padding-inline: 8px; background: var(--red-soft); }
.empty-state { padding: 20px 0; color: var(--muted); font-size: 10px; text-align: center; }

.connector-alert, .integration-locked {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid #edcf91;
  border-radius: 6px;
  background: var(--amber-soft);
}
.connector-alert > div, .integration-locked > span { min-width: 0; flex: 1; }
.connector-alert strong, .connector-alert span, .integration-locked strong, .integration-locked small { display: block; }
.connector-alert strong { font-size: 11px; }
.connector-alert span:not(.badge), .integration-locked small { margin-top: 3px; color: #765420; font-size: 9px; }
.connector-alert .btn { flex: 0 0 auto; }
.account-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.account-facts > div { min-width: 0; padding: 13px 15px; border-right: 1px solid var(--line); }
.account-facts > div:last-child { border-right: 0; }
.account-facts span, .account-facts strong, .account-facts small { display: block; overflow-wrap: anywhere; }
.account-facts span { color: var(--muted); font-size: 9px; }
.account-facts strong { margin-top: 5px; font-size: 11px; }
.account-facts small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.policy-panel { padding-bottom: 16px; }
.policy-panel > label, .policy-panel > .form-grid, .policy-panel > .btn, .policy-panel > .policy-actions { margin: 15px 16px 0; }
.automation-toggle { min-height: 54px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: #f7f9fa; }
.automation-toggle input { width: 17px; min-height: 17px; flex: 0 0 17px; accent-color: var(--mint); }
.automation-toggle > span { margin: 0; }
.automation-toggle strong, .automation-toggle small { display: block; }
.automation-toggle strong { font-size: 10px; }
.automation-toggle small { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 400; line-height: 1.45; }
.policy-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.production-connector { margin-bottom: 16px; }
.action-generate { border-color: #a7c4ee; background: var(--blue-soft); color: var(--blue); }
.action-generate:hover { background: #dce9fb; }
.compact-fields { gap: 10px; }
.permission-list { display: grid; padding: 5px 16px 14px; }
.permission-list > div { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.permission-list > div:last-child { border-bottom: 0; }
.permission-list strong, .permission-list small { display: block; }
.permission-list strong { font-size: 11px; }
.permission-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.permission-list svg { color: var(--blue); }
.campaign-preview { margin-top: 18px; }
.launch-panel { padding-bottom: 16px; }
.launch-panel > label, .launch-panel > .form-grid, .launch-panel > .btn { display: block; margin: 14px 16px 0; }
.launch-panel > .btn { display: inline-flex; }
.launch-panel textarea { min-height: 76px; }
.action-queue-panel { margin-top: 18px; }
.action-list { display: grid; padding: 4px 16px 14px; }
.action-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.action-row:last-child { border-bottom: 0; }
.action-row strong, .action-row small, .action-row span { display: block; }
.action-row strong { font-size: 10px; }
.action-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.action-row > div > span { margin-top: 5px; color: #555b61; font-size: 9px; line-height: 1.45; }

.compact-metrics { margin-top: 0; }
.monitor-grid { grid-template-columns: 1fr 1fr; }
.bar-table { display: grid; gap: 16px; padding: 20px 16px; }
.bar-table > div { display: grid; grid-template-columns: 100px minmax(0, 1fr) 48px 84px; align-items: center; gap: 10px; }
.bar-table span, .bar-table strong { font-size: 10px; }
.bar-table small { color: var(--muted); font-size: 8px; text-align: right; }
.bar-table > div > div { height: 8px; overflow: hidden; border-radius: 4px; background: #e4e7e5; }
.bar-table i { display: block; height: 100%; border-radius: 4px; background: var(--coral); }
.decision-preview { display: grid; padding: 5px 16px 16px; }
.decision-preview > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.decision-preview > div:last-child { border-bottom: 0; }
.decision-preview p { margin: 0; }
.decision-preview strong, .decision-preview small { display: block; }
.decision-preview strong { font-size: 11px; }
.decision-preview small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.integration-locked { margin-top: 18px; border-color: var(--line); background: var(--paper); }
.integration-locked svg { color: var(--muted); }
.integration-locked small { color: var(--muted); }

.market-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.market-row { min-width: 0; min-height: 170px; display: flex; flex-direction: column; padding: 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.market-row header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.market-code { width: 32px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: var(--ink); color: #fff; font-size: 9px; font-weight: 800; }
.market-row h3 { margin: 16px 0 3px; font-size: 15px; }
.market-row > span { color: var(--muted); font-size: 10px; }
.market-row footer { display: grid; gap: 5px; margin-top: auto; color: #6f757b; font-size: 9px; }

.platform-panel { margin-top: 18px; }
.platform-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 15px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.platform-row:nth-child(even) { border-right: 0; }
.platform-row > div { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; }
.platform-row p { min-width: 0; margin: 0; }
.platform-row strong, .platform-row small { display: block; }
.platform-row strong { font-size: 11px; }
.platform-row small { color: var(--muted); font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.platform-row > small { grid-column: 1 / -1; padding-left: 44px; }
.platform-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; background: #eef1f3; color: #4b5660; font-size: 9px; font-weight: 850; }

.evidence-grid { margin-top: 18px; }
.evaluation-list, .knowledge-list { display: grid; padding: 4px 16px 14px; }
.evaluation-row, .knowledge-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.evaluation-row:last-child, .knowledge-row:last-child { border-bottom: 0; }
.evaluation-row strong, .evaluation-row small { display: block; }
.evaluation-row strong { font-size: 11px; }
.evaluation-row small, .knowledge-row small { margin-top: 4px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.evaluation-row p, .knowledge-row p { grid-column: 1 / -1; margin: 0; color: #4f575f; font-size: 9px; line-height: 1.55; }
.evaluation-row footer, .knowledge-row footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 8px; }
.evaluation-row footer strong, .knowledge-row footer strong { color: var(--ink); font-size: 9px; }
.knowledge-row > div { display: flex; align-items: center; gap: 8px; }

.system-route-list { display: grid; padding: 5px 16px 16px; }
.system-route-list > div { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.system-route-list > div:last-child { border-bottom: 0; }
.route-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; }
.route-icon.local { background: var(--blue-soft); color: var(--blue); }
.route-icon.cloud { background: #eef1f3; color: #5e6871; }
.route-icon.storage { background: #f0e9fb; color: #7452a6; }
.route-icon.protected { background: var(--mint-soft); color: var(--mint); }
.system-route-list p { margin: 0; }
.system-route-list strong, .system-route-list small { display: block; }
.system-route-list strong { font-size: 11px; }
.system-route-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.redline-list { display: grid; padding: 8px 16px 18px; }
.redline-list > div { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.redline-list > div:last-child { border-bottom: 0; }
.redline-list svg { color: var(--mint); }
.connection-panel { margin-top: 18px; }
.connection-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.connection-list article { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 11px; padding: 16px; border-right: 1px solid var(--line); }
.connection-list article { border-bottom: 1px solid var(--line); }
.connection-list article:nth-child(even) { border-right: 0; }
.connection-list article:nth-last-child(-n+2) { border-bottom: 0; }
.connection-list article:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.connection-list strong, .connection-list small, .connection-list code { display: block; }
.connection-list strong { font-size: 11px; }
.connection-list small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.connection-list code { margin-top: 8px; color: #40474e; font-size: 8px; overflow-wrap: anywhere; }
.contract-panel { margin-top: 18px; }
.timezone-panel { margin-top: 18px; }
.timezone-panel .account-facts { border: 0; border-radius: 0; }
.contract-flow { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; overflow-x: auto; }
.contract-flow code { flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 4px; background: #f3f5f4; padding: 7px 9px; color: #34393e; font-size: 10px; }
.contract-flow svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--muted); }

.annotation-dialog { width: min(470px, calc(100vw - 32px)); border: 1px solid var(--line-strong); border-radius: 7px; padding: 0; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.annotation-dialog::backdrop { background: rgba(16,18,20,.55); }
.annotation-dialog form { padding: 16px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.annotation-dialog label { display: block; margin-top: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.confirmation-checks { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: #f7f8f7; }
.confirmation-checks > div { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.confirmation-checks svg { width: 15px; height: 15px; }
.confirmation-checks .is-pass { color: var(--mint); }
.confirmation-checks .is-fail { color: var(--coral-dark); }
.annotation-dialog label small { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; }
.annotation-position-summary { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 2px; border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px; background: #f6f8f9; color: var(--muted); font-size: 9px; line-height: 1.45; }
.annotation-position-summary svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--coral-dark); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  max-width: min(360px, calc(100vw - 44px));
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  padding: 11px 14px;
  box-shadow: var(--shadow);
  font-size: 11px;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { transform: translateY(0); opacity: 1; }

.advanced-policy { margin: 0 16px 14px; border: 1px solid var(--line); border-radius: 5px; background: #fafbfc; }
.advanced-policy summary { padding: 11px 13px; color: #3f464d; cursor: pointer; font-size: 11px; font-weight: 750; }
.advanced-policy[open] summary { border-bottom: 1px solid var(--line); }
.advanced-policy .form-grid { padding: 14px; }

.creative-request-form { max-width: 1180px; overflow: visible; border-color: #d5d9dd; border-radius: 8px; box-shadow: 0 18px 48px rgba(22,25,28,.08); }
.brief-header { min-height: 122px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; border-bottom: 0; background: #202327; color: #fff; }
.brief-header p { margin: 0 0 7px; color: #ff7189; font-size: 10px; font-weight: 850; }
.brief-header h2 { color: #fff; font-size: 24px; line-height: 1.25; }
.brief-header div > span { display: block; max-width: 720px; margin-top: 8px; color: #c2c8ce; font-size: 12px; line-height: 1.55; }
.brief-header > .badge { border-color: #5b756d; background: #263c36; color: #9ce0cb; }
.brief-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 24px 30px 28px; border: 0; border-bottom: 1px solid var(--line); background: #fff; }
.brief-type-grid legend { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; margin-bottom: 3px; color: var(--ink); font-size: 14px; font-weight: 800; }
.brief-type-grid legend span { width: 25px; height: 25px; display: inline-grid; place-items: center; border-radius: 5px; background: #202327; color: #fff; font-size: 9px; }
.brief-choice { position: relative; min-width: 0; }
.brief-choice input { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.brief-choice > span { min-height: 92px; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-content: center; column-gap: 12px; padding: 15px 16px; border: 1px solid #cfd4d8; border-radius: 7px; background: #fbfcfd; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease; }
.brief-choice:hover > span { border-color: #9da5ac; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(22,25,28,.05); }
.brief-choice svg { grid-row: span 2; width: 42px; height: 42px; align-self: center; padding: 10px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.brief-choice strong, .brief-choice small { min-width: 0; display: block; }
.brief-choice strong { font-size: 14px; }
.brief-choice small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.brief-choice input:checked + span { border-color: var(--coral); background: #fff7f8; box-shadow: inset 0 0 0 1px var(--coral), 0 8px 20px rgba(217,44,74,.07); }
.brief-choice input:checked + span svg { background: #ffe8ed; color: var(--coral-dark); }
.brief-choice input:focus-visible + span { outline: 3px solid rgba(40,103,199,.28); outline-offset: 2px; }
.brief-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.brief-main { min-width: 0; padding: 24px 30px 30px; background: #f5f7f8; }
.brief-section { padding: 24px; border: 1px solid #dfe3e6; border-radius: 8px; background: #fff; }
.brief-section:last-child { border-bottom: 0; }
.brief-section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brief-section-title > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 850; }
.brief-section-title strong, .brief-section-title small { display: block; }
.brief-section-title strong { font-size: 16px; }
.brief-section-title small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.creative-request-form label > span:first-child { margin-bottom: 8px; color: #343a40; font-size: 12px; }
.creative-request-form select { min-height: 48px; border-color: #c8ced3; border-radius: 6px; padding-inline: 12px; background-color: #fff; font-size: 13px; }
.brief-mode-panel { display: none; }
.brief-mode-panel.is-active { display: block; }
.brief-optional { margin-top: 20px; border: 1px solid #dfe3e6; border-radius: 6px; background: #f8fafb; }
.brief-optional summary { padding: 13px 15px; color: #444b52; cursor: pointer; font-size: 11px; font-weight: 750; }
.brief-optional[open] summary { border-bottom: 1px solid var(--line); }
.brief-optional .form-grid { padding: 14px; }
.brief-aside { min-height: 0; padding: 22px 30px 24px; border-top: 1px solid var(--line); background: #fff; }
.brief-aside p { margin: 0 0 5px; color: var(--mint); font-size: 9px; font-weight: 850; }
.brief-aside h3 { margin: 0; font-size: 15px; }
.system-owned-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; padding: 0; border: 0; list-style: none; }
.system-owned-list li { min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-content: start; gap: 9px; padding: 12px; border: 1px solid #e2e5e7; border-radius: 6px; background: #f8faf9; }
.system-owned-list li:first-child, .system-owned-list li:last-child { padding: 12px; border-right: 1px solid #e2e5e7; }
.system-owned-list svg { width: 28px; height: 28px; padding: 6px; border-radius: 6px; background: var(--mint-soft); color: var(--mint); }
.system-owned-list strong, .system-owned-list small { display: block; }
.system-owned-list strong { font-size: 11px; line-height: 1.35; }
.system-owned-list small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.brief-output-note { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 6px; background: var(--mint-soft); }
.brief-output-note strong, .brief-output-note span { display: block; }
.brief-output-note strong { color: #116b59; font-size: 11px; }
.brief-output-note span { margin-top: 0; color: #35695e; font-size: 10px; line-height: 1.45; }
.brief-actions { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 30px; border-top: 1px solid var(--line); background: #fff; }
.brief-actions > span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.brief-actions > span svg { width: 16px; height: 16px; }
.brief-action-buttons { display: flex; align-items: center; gap: 10px; }
.agent-core-grid { margin-top: 16px; }
.agent-plan-panel { margin: 22px 0 0; border: 1px solid #cfd4d8; border-radius: 8px; background: var(--paper); box-shadow: 0 14px 34px rgba(22,25,28,.07); overflow: hidden; }
.agent-plan-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 0; background: #292d31; color: #fff; }
.agent-plan-header p { margin: 0 0 6px; color: #ff7a91; font-size: 9px; font-weight: 850; }
.agent-plan-header h3 { margin: 0; color: #fff; font-size: 19px; }
.agent-plan-header div > span { display: block; max-width: 720px; margin-top: 7px; color: #c4cbd1; font-size: 11px; line-height: 1.55; }
.agent-plan-header > .badge { border-color: #647078; background: #373d42; color: #e8ecef; }
.agent-strategy-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fff; }
.agent-strategy-strip > div { min-width: 0; padding: 17px 18px; border-right: 1px solid var(--line); }
.agent-strategy-strip > div:last-child { border-right: 0; }
.agent-strategy-strip small, .agent-strategy-strip strong { display: block; }
.agent-strategy-strip small { color: var(--muted); font-size: 9px; font-weight: 800; }
.agent-strategy-strip strong { margin-top: 6px; font-size: 11px; line-height: 1.55; }
.agent-direction-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; background: #eef1f3; }
.agent-direction-card { --route-color: var(--coral); --route-soft: var(--red-soft); min-width: 0; min-height: 410px; display: flex; flex-direction: column; padding: 18px; border: 1px solid #d8dde1; border-top: 3px solid var(--route-color); border-radius: 7px; background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 4px 12px rgba(22,25,28,.035); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.agent-direction-card[data-agent-force="novel"] { --route-color: var(--blue); --route-soft: var(--blue-soft); }
.agent-direction-card[data-agent-force="soul"] { --route-color: var(--mint); --route-soft: var(--mint-soft); }
.agent-direction-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(22,25,28,.08); }
.agent-direction-card:focus-visible { outline: 3px solid rgba(40,103,199,.25); outline-offset: 2px; }
.agent-direction-card.is-selected { border-color: var(--route-color); box-shadow: inset 0 0 0 1px var(--route-color), 0 10px 24px rgba(22,25,28,.09); }
.agent-direction-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agent-route-label { display: inline-flex; align-items: center; gap: 7px; color: var(--route-color); font-size: 10px; font-weight: 850; }
.agent-route-label svg { width: 24px; height: 24px; padding: 5px; border-radius: 6px; background: var(--route-soft); }
.agent-direction-card > header > strong { padding: 5px 7px; border-radius: 4px; background: var(--route-soft); color: var(--route-color); font-size: 8px; }
.agent-direction-card h4 { margin: 15px 0 0; font-size: 16px; line-height: 1.38; }
.agent-direction-card blockquote { margin: 12px 0 0; padding-left: 10px; border-left: 3px solid var(--route-color); color: #292d31; font-size: 13px; font-weight: 750; line-height: 1.6; }
.agent-direction-card > p { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.agent-direction-meta { display: grid; gap: 8px; margin-top: 13px; }
.agent-direction-meta > span { color: #4f575f; font-size: 10px; line-height: 1.5; }
.agent-direction-meta b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 9px; }
.agent-score-row { display: grid; gap: 4px; margin-top: auto; padding-top: 13px; }
.agent-score-row > span { display: grid; grid-template-columns: 27px minmax(0, 1fr) 13px; align-items: center; gap: 5px; }
.agent-score-row b, .agent-score-row em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 700; }
.agent-score-row i { width: calc(var(--score) * 10%); height: 4px; display: block; border-radius: 2px; background: var(--route-color); }
.agent-score-row > span::before { content: ""; grid-column: 2; grid-row: 1; width: 100%; height: 3px; border-radius: 2px; background: #e4e7e9; }
.agent-score-row i { grid-column: 2; grid-row: 1; position: relative; z-index: 1; }
.agent-score-row b { grid-column: 1; grid-row: 1; }
.agent-score-row em { grid-column: 3; grid-row: 1; }
.agent-direction-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.agent-direction-card > footer span { color: var(--muted); font-size: 8px; }
.agent-direction-card > footer strong { color: var(--route-color); font-size: 9px; }

@media (max-width: 1120px) {
  .choice-fieldset { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .standard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .standard-grid > div:nth-child(2) { border-right: 0; }
  .standard-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .market-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .account-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-facts > div:nth-child(2) { border-right: 0; }
  .account-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .app-shell { display: block; padding-top: 112px; }
  .sidebar { width: 100%; height: 112px; min-height: 0; display: block; padding: 10px 12px; border-right: 0; border-bottom: 1px solid #313438; }
  .brand-block { min-height: 38px; padding: 0 4px 8px; border-bottom: 0; }
  .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .brand-block span { display: none; }
  .primary-nav { display: flex; gap: 4px; margin: 0; overflow-x: auto; padding-bottom: 4px; }
  .nav-group-label { display: none; }
  .nav-item { width: auto; min-width: max-content; min-height: 36px; grid-template-columns: 16px auto auto; padding: 7px 9px; }
  .nav-item svg { width: 15px; height: 15px; }
  .sidebar-runtime { display: none; }
  .main { grid-column: auto; }
  .topbar { top: 112px; min-height: 68px; }
  .workflow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-strip > svg { display: none; }
  .workflow-strip button { border-bottom: 1px solid var(--line); }
  .workflow-strip button:nth-of-type(odd) { border-right: 1px solid var(--line); }
  .workflow-strip button:nth-of-type(n+3) { border-bottom: 0; }
  .overview-grid, .meta-grid, .system-grid, .monitor-grid { grid-template-columns: 1fr; }
  .review-layout { grid-template-columns: minmax(0, 1fr); }
  .qa-panel { border-top: 1px solid var(--line); border-left: 0; }
  .market-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .connector-alert { align-items: flex-start; flex-wrap: wrap; }
  .connection-list, .platform-list { grid-template-columns: 1fr; }
  .connection-list article { border-right: 0; border-bottom: 1px solid var(--line); }
  .connection-list article:last-child { border-bottom: 0; }
  .platform-row, .platform-row:nth-child(even) { border-right: 0; }
  .brief-layout { grid-template-columns: 1fr; }
  .brief-aside { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 680px) {
  .app-shell { padding-top: 108px; }
  .sidebar { height: 108px; }
  .topbar { top: 108px; align-items: flex-start; padding: 12px 16px; }
  .topbar-actions { align-items: flex-end; }
  .market-context { display: none; }
  .market-trigger { min-width: 156px; }
  .market-menu { width: min(300px, calc(100vw - 28px)); }
  .topbar .btn span { display: none; }
  .topbar .btn { width: 38px; padding: 8px; }
  .workspace-view { padding: 18px 14px 42px; }
  .runtime-banner { gap: 10px; }
  .runtime-divider { display: none; }
  .metric-strip, .compact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric-strip article { padding: 15px; }
  .metric-strip strong { font-size: 23px; }
  .queue-panel table { min-width: 680px; }
  .wizard-rail { grid-template-columns: repeat(4, 1fr); }
  .wizard-step { justify-content: center; padding: 10px 5px; }
  .wizard-step strong { display: none; }
  .form-grid.two-col, .form-grid.three-col, .binary-grid { grid-template-columns: 1fr; }
  .choice-fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creative-request-form { border-radius: 7px; }
  .brief-header { min-height: 0; align-items: flex-start; padding: 22px 18px; }
  .brief-header h2 { font-size: 21px; }
  .brief-header div > span { font-size: 11px; }
  .brief-header > .badge { display: none; }
  .brief-type-grid { grid-template-columns: 1fr; padding: 18px; }
  .brief-choice > span { min-height: 82px; }
  .brief-main { padding: 16px; }
  .brief-section { padding: 18px; }
  .brief-section-title { align-items: flex-start; margin-bottom: 18px; }
  .brief-section-title strong { font-size: 15px; }
  .brief-actions { align-items: stretch; flex-direction: column; padding: 14px 16px; }
  .brief-actions .btn { width: 100%; }
  .brief-action-buttons { width: 100%; flex-direction: column; }
  .agent-strategy-strip, .agent-direction-list { grid-template-columns: 1fr; }
  .agent-strategy-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .agent-strategy-strip > div:last-child { border-bottom: 0; }
  .agent-direction-card { min-height: 0; }
  .agent-plan-header { min-height: 0; align-items: flex-start; padding: 18px; }
  .agent-plan-header h3 { font-size: 17px; }
  .agent-plan-header > .badge { flex: 0 0 auto; }
  .agent-direction-list { padding: 10px; }
  .agent-direction-card { padding: 17px; }
  .brief-aside { padding: 20px 18px; }
  .system-owned-list { grid-template-columns: 1fr; }
  .system-owned-list li, .system-owned-list li:first-child, .system-owned-list li:last-child { padding: 11px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .system-owned-list li:last-child { border-bottom: 0; }
  .brief-output-note { align-items: flex-start; flex-direction: column; }
  .wizard-page { min-height: 0; padding: 22px 16px; }
  .wizard-actions { align-items: flex-end; }
  .wizard-actions-right > span { display: none; }
  .standard-grid { grid-template-columns: 1fr; }
  .standard-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .standard-grid > div:last-child { border-bottom: 0; }
  .toolbar, .monitor-header, .market-intro { align-items: flex-start; flex-direction: column; }
  .connector-alert { display: grid; grid-template-columns: 24px minmax(0, 1fr); }
  .connector-alert > .badge, .connector-alert > .btn { grid-column: 1 / -1; justify-self: stretch; }
  .connector-alert > .badge { width: max-content; }
  .connector-alert > .btn { width: 100%; }
  .toolbar .segmented, .monitor-header .segmented { width: 100%; overflow-x: auto; }
  .toolbar .segmented button, .monitor-header .segmented button { flex: 1 0 auto; }
  .review-stage-panel { grid-template-rows: auto minmax(390px, 1fr) auto; }
  .media-stage { min-height: 390px; padding: 12px; }
  .review-actionbar { align-items: flex-end; }
  .review-toolbar { align-items: flex-start; }
  .review-tools > span { display: none; }
  .review-actionbar .btn span { display: none; }
  .review-actionbar .btn { width: 38px; padding: 8px; }
  .market-list { grid-template-columns: 1fr; }
  .contract-flow { justify-content: flex-start; }
  .bar-table > div { grid-template-columns: 82px minmax(0, 1fr) 42px; }
  .bar-table small { grid-column: 2 / -1; text-align: left; }
  .account-facts { grid-template-columns: 1fr; }
  .account-facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .account-facts > div:last-child { border-bottom: 0; }
  .action-row { grid-template-columns: minmax(0, 1fr) auto; }
  .action-row .btn { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 430px) {
  h1 { font-size: 19px; }
  .topbar { gap: 10px; }
  .market-trigger { min-width: 106px; width: 106px; grid-template-columns: 30px minmax(0, 1fr) 13px; gap: 6px; padding-inline: 5px; }
  .market-trigger .market-flag { width: 30px; height: 30px; }
  .market-trigger-copy small { display: none; }
  .choice-fieldset { grid-template-columns: 1fr; }
  .check-option > span { min-height: 72px; }
  .runtime-banner { padding: 9px 11px; }
  .metric-strip article { min-height: 100px; }
  .review-actionbar { gap: 8px; }
  .wizard-actions .btn span { display: none; }
  .wizard-actions .btn { width: 38px; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
