:root {
  color-scheme: light;
  --brand-navy: #071a42;
  --brand-navy-2: #0d2a63;
  --brand-navy-3: #12377b;
  --brand-pink: #ec407a;
  --brand-pink-strong: #d81f63;
  --brand-pink-soft: #fff0f6;
  --brand-gold: #d8b461;
  --brand-gold-soft: #fff3cf;
  --brand-cream: #fff8ef;
  --brand-champagne: #f7ecd9;
  --brand-panel: #fffdf9;
  --brand-ink: #142033;
  --brand-muted: #667085;
  --brand-line: #eadfcf;
  --ok: #087443;
  --warn: #b76a00;
  --danger: #b42318;
  --info: #1d4ed8;
  --shadow: 0 18px 42px rgba(7, 26, 66, .13);
  --shadow-soft: 0 10px 26px rgba(7, 26, 66, .08);
  --radius: 20px;
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, .98) 0%, rgba(247, 236, 217, .96) 100%),
    var(--brand-cream);
  color: var(--brand-ink);
  font-size: 15px;
  line-height: 1.5;
}

button, input, select, textarea {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    linear-gradient(90deg, rgba(7, 26, 66, .99) 0%, rgba(13, 42, 99, .98) 58%, rgba(8, 25, 62, .99) 100%);
  color: #fff;
  padding: 14px 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 3px solid var(--brand-gold);
  box-shadow: 0 14px 34px rgba(7, 26, 66, .28);
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.logo-pill {
  min-width: 124px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, #fff 0%, var(--brand-cream) 58%, #ffe9f3 100%);
  border: 1px solid rgba(216, 180, 97, .75);
  box-shadow: inset 0 0 0 1px rgba(7, 26, 66, .06), 0 12px 24px rgba(0, 0, 0, .18);
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 132px;
  height: 46px;
  object-fit: contain;
}

.brand-title {
  display: grid;
  gap: 3px;
}

.brand-title h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 850;
}

.brand-title p {
  margin: 0;
  color: #ffe2ed;
  font-size: 13px;
  font-weight: 650;
}

.status-pill {
  border: 1px solid rgba(216, 180, 97, .72);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(236, 64, 122, .24), rgba(216, 180, 97, .16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  font-weight: 850;
}

.nav {
  position: sticky;
  top: 89px;
  z-index: 19;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
  background: rgba(7, 26, 66, .94);
  border-bottom: 1px solid rgba(216, 180, 97, .38);
  box-shadow: 0 12px 24px rgba(7, 26, 66, .16);
}

.nav button {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  color: rgba(255, 255, 255, .9);
  box-shadow: inset 0 -2px 0 rgba(216, 180, 97, .08);
  font-weight: 750;
}

.nav button.active {
  border-color: rgba(216, 180, 97, .75);
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-pink-strong));
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--brand-gold), 0 10px 20px rgba(236, 64, 122, .24);
}

.content {
  padding: 22px;
}

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

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.hero-panel {
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 26, 66, .98) 0%, rgba(18, 55, 123, .95) 52%, rgba(93, 20, 58, .96) 100%);
  border: 1px solid rgba(216, 180, 97, .42);
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(216, 180, 97, .18);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(216, 180, 97, .52);
  color: #ffecb3;
  font-size: 12px;
  font-weight: 850;
}

.hero-panel h2 {
  margin: 12px 0 8px;
  max-width: 820px;
  font-size: 32px;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-panel p {
  margin: 0;
  max-width: 860px;
  color: rgba(255, 255, 255, .84);
}

.hero-actions, .hero-metrics {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  font-weight: 800;
}

.hero-cta {
  border: 1px solid rgba(255, 255, 255, .2);
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-pink-strong));
  color: #fff;
  border-radius: 999px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 14px 24px rgba(236, 64, 122, .24);
}

.hero-cta.secondary {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(216, 180, 97, .5);
  box-shadow: none;
}

.panel, .card {
  background: linear-gradient(180deg, #fffdf9 0%, #fff9f2 100%);
  border: 1px solid rgba(216, 180, 97, .34);
  border-radius: var(--radius);
  padding: 17px;
  box-shadow: var(--shadow-soft);
}

.panel.context-panel {
  border-color: rgba(216, 180, 97, .62);
  background: linear-gradient(180deg, #fff 0%, #fff6e6 100%);
  box-shadow: 0 18px 38px rgba(216, 180, 97, .14);
}

.panel h2, .panel h3, .card h3 {
  margin: 0 0 10px;
  letter-spacing: 0;
  line-height: 1.25;
}

.panel h2 { font-size: 22px; color: var(--brand-navy); }
.panel h3, .card h3 { font-size: 17px; color: var(--brand-navy); }

.subtle {
  color: var(--brand-muted);
  font-size: 13px;
}

.master-flow {
  margin-bottom: 18px;
  border-left: 5px solid var(--brand-gold);
  background: linear-gradient(90deg, #fffaf1 0%, #fff 100%);
}

.brand-note {
  margin-top: 8px;
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--brand-pink-soft);
  color: #a6154a;
  font-size: 12px;
  font-weight: 850;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f4f8;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
}

.badge.ok { background: #ecfdf3; color: var(--ok); }
.badge.warn { background: #fff7e0; color: var(--warn); }
.badge.danger { background: #fef3f2; color: var(--danger); }
.badge.info { background: #eff6ff; color: var(--info); }
.badge.gold { background: var(--brand-gold-soft); color: #835a12; }
.badge.pink { background: var(--brand-pink-soft); color: #b41552; }

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(234, 223, 207, .82);
}

.kv span { color: var(--brand-muted); }
.kv strong { font-weight: 850; color: var(--brand-ink); }

.list, .thread, .audit-list, .guide-list {
  display: grid;
  gap: 10px;
}

.item-row {
  border: 1px solid rgba(216, 180, 97, .32);
  background: #fffdf9;
  border-radius: 18px;
  padding: 13px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(7, 26, 66, .06);
}

.item-row:hover {
  border-color: rgba(236, 64, 122, .42);
  transform: translateY(-1px);
}

.item-row.active {
  border-color: rgba(236, 64, 122, .7);
  background: linear-gradient(180deg, #fff, var(--brand-pink-soft));
  box-shadow: 0 12px 24px rgba(236, 64, 122, .13);
}

.item-row strong { display: block; margin-bottom: 5px; color: var(--brand-navy); }

.row-meta, .toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.row-meta { margin-top: 9px; }
.toolbar { margin-bottom: 12px; }

.toolbar input, .toolbar select, textarea {
  border: 1px solid rgba(216, 180, 97, .42);
  border-radius: 14px;
  padding: 10px 11px;
  background: #fff;
  color: var(--brand-ink);
  box-shadow: inset 0 1px 0 rgba(7, 26, 66, .02);
}

.toolbar input { min-width: 230px; }

textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.btn {
  border: 1px solid var(--brand-pink);
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-pink-strong));
  color: #fff;
  border-radius: 14px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 10px 18px rgba(236, 64, 122, .18);
}

.btn.secondary {
  background: #fff;
  color: #b41552;
  box-shadow: none;
}

.thread-note {
  border-left: 4px solid var(--brand-navy-2);
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 14px;
}

.internal {
  border-left-color: var(--brand-gold);
  background: #fff8e6;
}

.pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #071224;
  color: #e4e7ec;
  padding: 13px;
  border-radius: 16px;
  font-size: 12px;
  max-height: 460px;
  overflow: auto;
}

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

.check-row, .guide-card {
  border: 1px solid rgba(216, 180, 97, .34);
  border-radius: 18px;
  padding: 13px 14px;
  background: #fffdf9;
  box-shadow: 0 7px 18px rgba(7, 26, 66, .05);
}

.check-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.guide-card h3 {
  color: var(--brand-navy);
}

.guide-card ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.guide-card li, .blockers li {
  margin: 6px 0;
}

@media (max-width: 1100px) {
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .nav { top: 86px; }
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  .topbar {
    position: static;
    display: grid;
    padding: 16px;
  }
  .nav {
    position: sticky;
    top: 0;
    padding: 10px 12px;
  }
  .brand-lockup {
    align-items: flex-start;
  }
  .logo-pill {
    min-width: 92px;
    height: 46px;
    border-radius: 14px;
    padding: 5px 8px;
  }
  .brand-logo {
    max-width: 100px;
    height: 34px;
  }
  .brand-title h1 { font-size: 20px; }
  .status-pill {
    justify-self: start;
    white-space: normal;
  }
  .content { padding: 13px; }
  .hero-panel {
    border-radius: 22px;
    padding: 20px;
  }
  .hero-panel h2 { font-size: 24px; }
  .readiness-grid, .guide-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .toolbar input { min-width: 100%; }
}
