:root {
  --brand-red: #E40000; --ink: #1c2130; --muted: #5a6372; --hint: #8a91a0;
  --line: #e5e8ee; --bg: #f5f7fa; --card: #ffffff;
  --accent: #E40000; --accent-dark: #b00000; --accent-tint: #fdeaea;
  --accent2: #6a2c91; --accent2-tint: #f1eaf7;
  --radius: 14px;
  /* type scale (1.2 ratio) */
  --fs-sm: 0.8125rem; --fs-base: 0.9375rem; --fs-md: 1.125rem;
  --fs-lg: 1.375rem; --fs-xl: 1.75rem; --fs-2xl: 2.375rem;
  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
  --space-5: 40px; --space-6: 64px;
  --shadow-1: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-2: 0 4px 16px rgb(16 24 40 / .08);
  --shadow-3: 0 12px 32px rgb(16 24 40 / .14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--space-4); }

/* focus states — one consistent ring on every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- top bar ---- */
header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: var(--space-4); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-base); }
.logo {
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: .02em;
}
.brand small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.navlinks { display: flex; align-items: center; gap: 22px; font-size: var(--fs-sm); color: var(--muted); }
.navlinks a { cursor: pointer; padding: var(--space-1) 0; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease; }
.navlinks a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.conf {
  border: 1.5px solid var(--brand-red); color: var(--brand-red); font-weight: 700; font-size: 10px;
  padding: 2px var(--space-2); border-radius: 4px; letter-spacing: .06em;
}

/* ---- home hero ---- */
.hero { text-align: center; padding: 46px 20px 30px; }
.hero h1 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; margin: 0 0 var(--space-2); }
.hero p.sub { font-size: var(--fs-base); color: var(--muted); max-width: 600px; margin: 0 auto var(--space-4); }

.btn { border: none; cursor: pointer; border-radius: 12px; font-size: var(--fs-base); font-weight: 600; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; padding: 0 22px; height: 50px; transition: background .15s ease; }
.btn-primary:hover { background: var(--accent-dark); }

.chips { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.chips-lead { font-size: 12px; color: var(--hint); align-self: center; }
.chip {
  font-size: var(--fs-sm); padding: 6px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; font-family: inherit; transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-1); }

/* ---- section labels ---- */
.label { font-size: 12px; font-weight: 700; color: var(--hint); letter-spacing: .08em; margin: 0 0 14px; }

/* ---- tab grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; padding-bottom: var(--space-2); }
.tab {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-3); cursor: pointer; display: flex; flex-direction: column; gap: var(--space-2);
  font-family: inherit; color: inherit; box-shadow: var(--shadow-1);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tab:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tab .ic {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.tab h3 { margin: 0; font-size: var(--fs-base); font-weight: 600; }
.tab p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.tab .go { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 2px; }

/* ---- assistant strip ---- */
.strip {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) 18px;
  display: flex; align-items: center; gap: 14px; margin: var(--space-4) 0 var(--space-5); box-shadow: var(--shadow-1);
}
.strip .ic {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent2-tint); color: var(--accent2);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.strip-body { flex: 1; }
.strip h3 { margin: 0; font-size: var(--fs-base); font-weight: 600; }
.strip p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.btn-ghost {
  background: var(--card); border: 1px solid var(--line); color: var(--ink); padding: 0 var(--space-3); height: 38px;
  border-radius: 9px; white-space: nowrap; cursor: pointer; font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  transition: border-color .15s ease, color .15s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- inner panel view ---- */
.panel { padding: 30px 0 50px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--accent); cursor: pointer; margin-bottom: var(--space-3); font-weight: 600; }
.panel h2 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; margin: 0 0 var(--space-1); display: flex; align-items: center; gap: 10px; }
.panel .lede { color: var(--muted); font-size: var(--fs-base); margin: 0 0 22px; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.icard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) 18px;
  box-shadow: var(--shadow-1); transition: transform .15s ease, box-shadow .15s ease;
}
.icard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.icard h4 { margin: 0 0 var(--space-2); font-size: var(--fs-base); font-weight: 600; }
.icard ul { margin: 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--muted); }
.icard li { margin: var(--space-1) 0; }
.owner { margin-top: var(--space-3); font-size: 12px; color: var(--accent); font-weight: 600; }
.meta {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent2);
  background: var(--accent2-tint); padding: 3px 9px; border-radius: 20px; margin-left: var(--space-2); vertical-align: middle;
}

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); background: var(--card); }
.foot { display: flex; align-items: center; justify-content: space-between; height: 54px; font-size: 12px; color: var(--hint); gap: var(--space-3); }
.foot .lg { font-weight: 700; color: var(--brand-red); }

/* ---- intro splash ---- */
.intro { display: block; margin: 0 calc(-1 * var(--space-4)); }
.introhero {
  background: linear-gradient(135deg, #E40000 0%, #a30000 100%); color: #fff; border-radius: 0 0 24px 24px;
  padding: var(--space-6) var(--space-4) 56px; text-align: center;
}
.introhero .kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; opacity: .85; margin: 0 0 14px; }
.introhero h1 { font-size: 38px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 14px; line-height: 1.15; }
.introhero p { font-size: var(--fs-md); max-width: 640px; margin: 0 auto var(--space-4); opacity: .95; line-height: 1.6; }
.introhero .introq { font-size: var(--fs-lg); font-weight: 700; margin: 6px auto 12px; opacity: .98; }
.btn-start {
  display: inline-block; background: #fff; color: var(--brand-red); font-weight: 600; font-size: var(--fs-base);
  padding: 14px 30px; border-radius: 12px; border: none; cursor: pointer; font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.introhero .btn-start:hover { background: #f3f3f3; transform: translateY(-1px); box-shadow: var(--shadow-3); }
.introsec { padding: 44px 0 10px; }
.introsec h2 { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 6px; text-align: center; letter-spacing: -.01em; }
.introsec .lede { color: var(--muted); font-size: var(--fs-base); text-align: center; max-width: 620px; margin: 0 auto var(--space-4); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1); transition: transform .15s ease, box-shadow .15s ease; }
.pillar:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.pillar .ic {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px;
}
.pillar h3 { margin: 0 0 6px; font-size: var(--fs-base); font-weight: 600; }
.pillar p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.introstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 34px 0 10px; }
.stat { background: var(--accent-tint); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat .n { font-size: 26px; font-weight: 700; color: var(--brand-red); letter-spacing: -.01em; }
.stat .l { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--space-1); line-height: 1.4; }
.introcta { text-align: center; padding: 36px 0 50px; }
.introcta .btn-start { background: var(--accent); color: #fff; }
.introcta .btn-start:hover { background: var(--accent-dark); }
.introcta p { color: var(--muted); font-size: var(--fs-sm); margin: 14px 0 0; }

/* ---- quick-start action cards ---- */
.quickstart {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); margin: -24px auto 0;
  position: relative; max-width: 1040px; padding: 0 var(--space-4);
}
.qcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; cursor: pointer;
  text-align: left; box-shadow: var(--shadow-2); color: inherit; font-family: inherit; display: block;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.qcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); border-color: var(--accent); }
.qcard .ic {
  width: 44px; height: 44px; border-radius: 11px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px;
}
.qcard h3 { margin: 0 0 6px; font-size: var(--fs-md); font-weight: 600; }
.qcard p { margin: 0 0 12px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.qcard .go { font-size: var(--fs-sm); color: var(--accent); font-weight: 600; }

/* ---- onboarding checklist ---- */
.journey { padding: 46px 0 6px; }
.journey h2 { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 6px; text-align: center; letter-spacing: -.01em; }
.journey .lede { color: var(--muted); font-size: var(--fs-base); text-align: center; max-width: 660px; margin: 0 auto 22px; }
.checklist { max-width: 760px; margin: 0 auto; }
.checklist .grp {
  font-size: 12px; font-weight: 700; color: var(--hint); letter-spacing: .06em; text-transform: uppercase;
  margin: 20px 0 10px;
}
.checklist .grp:first-child { margin-top: 0; }
.checklist .prog { font-size: var(--fs-sm); color: var(--muted); text-align: center; margin: 0 0 18px; }
.check {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px var(--space-3); margin-bottom: 10px; transition: border-color .15s ease, background .15s ease;
}
/* Deviation 1: .check is a non-clickable DIV; the real button.box is the control. */
.check .box {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 13px; font-weight: 700;
  margin-top: 1px; padding: 0; background: var(--card); cursor: pointer; font-family: inherit; line-height: 1;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.check .box:hover { border-color: var(--accent); transform: scale(1.08); }
.check.done { border-color: var(--accent); background: var(--accent-tint); }
.check.done .box { background: var(--accent); border-color: var(--accent); color: #fff; }
.check.done h4 { text-decoration: line-through; color: var(--muted); }
.check .body { flex: 1; }
.check h4 { margin: 0 0 var(--space-1); font-size: var(--fs-base); font-weight: 600; }
.check p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.check .cta-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: stretch; margin-top: 11px; }
/* Deviation 2: .faq holds plain single-line text (no .lbl span). */
.check .faq {
  border: 1px solid var(--accent2); background: var(--accent2-tint); color: var(--accent2);
  font-style: italic; font-weight: 600; font-size: var(--fs-sm); padding: 7px 12px; border-radius: 12px; cursor: pointer;
  text-align: left; line-height: 1.4; font-family: inherit; transition: background .15s ease, color .15s ease;
}
.check .faq:hover { background: var(--accent2); color: #fff; }
.check .faq::before { content: "\201C"; }
.check .faq::after { content: "\201D"; }
.check .more {
  border: 1px solid var(--line); background: var(--card); color: var(--accent); font-weight: 600;
  font-size: var(--fs-sm); padding: 7px 12px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  font-family: inherit; font-style: normal; transition: border-color .15s ease, background .15s ease;
}
.check .more:hover { border-color: var(--accent); background: var(--accent-tint); }

/* ---- key contacts ---- */
.contacts { max-width: 900px; margin: 0 auto; }
.contactgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.contact {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px var(--space-3);
  display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow-1);
}
.contact .ini {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent-tint); color: var(--accent);
  font-weight: 700; font-size: var(--fs-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact h4 { margin: 0 0 2px; font-size: var(--fs-base); font-weight: 600; }
.contact .role { font-size: 11.5px; color: var(--accent); font-weight: 600; margin: 0 0 5px; }
.contact p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ---- unconfigured-state hint (Task 5 populates + reveals) ---- */
#moby-hint {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-2); padding: var(--space-2) var(--space-3);
  font-size: var(--fs-sm); color: var(--muted); max-width: 280px;
}
#moby-hint[hidden] { display: none; }

@media (max-width: 560px) {
  .navlinks { gap: 14px; }
  .introhero { padding: var(--space-5) var(--space-4) var(--space-5); }
  .introhero h1 { font-size: 30px; }
  .hero h1 { font-size: var(--fs-xl); }
}

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