:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0e74f1;
  --accent-dark: #0b5ed1;
  --err: #b91c1c;
  --ok: #047857;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ── brand ── */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand .mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.brand .name { white-space: nowrap; }

/* ── top bar ── */
.topbar {
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tab {
  padding: 8px 14px; border-radius: 8px;
  color: var(--muted); text-decoration: none;
  font-weight: 500; white-space: nowrap;
}
.tab:hover { background: #f1f5f9; color: var(--ink); }
.tab.is-active { background: #e8f2fe; color: var(--accent-dark); font-weight: 600; }

.account { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.account .who { color: var(--muted); }
.account .signout { color: var(--muted); text-decoration: none; }
.account .signout:hover { color: var(--ink); text-decoration: underline; }

/* ── page ── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.page-head .blurb { margin: 0 0 24px; color: var(--muted); }

.empty {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 40px; text-align: center;
}
.empty h2 { margin: 0 0 8px; font-size: 17px; }
.empty p { margin: 0 auto 8px; max-width: 520px; color: var(--muted); }
.empty code {
  background: #f1f5f9; border-radius: 4px;
  padding: 1px 5px; font-size: 13px;
}
.empty .pending {
  margin-top: 18px; display: inline-block;
  background: #fff7ed; color: #9a3412;
  border: 1px solid #fed7aa; border-radius: 999px;
  padding: 5px 14px; font-size: 13px;
}

table { width: 100%; border-collapse: collapse; background: var(--card);
        border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #f8fafc; font-size: 12px; text-transform: uppercase;
     letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.foot {
  padding: 20px 24px; text-align: center;
  color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
}

/* ── login ── */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 32px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.login-brand { margin-bottom: 26px; }
.login-card h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.02em; }
.login-card .sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.login-card label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600;
}
.login-card input {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 15px; font-family: inherit;
}
.login-card input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 116, 241, .12);
}
#code { letter-spacing: 8px; text-align: center; font-size: 22px; font-weight: 600; }
.login-card button {
  width: 100%; margin-top: 14px; padding: 11px;
  background: var(--accent); color: #fff;
  border: 0; border-radius: 9px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer;
}
.login-card button:hover:not(:disabled) { background: var(--accent-dark); }
.login-card button:disabled { opacity: .6; cursor: default; }
.login-card .hint { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }
.login-card .hint a { color: var(--accent); }
.msg { margin: 14px 0 0; font-size: 13.5px; min-height: 1.2em; }
.msg.err { color: var(--err); }
.msg.ok  { color: var(--ok); }

/* ── onboarding ─────────────────────────────────────────────────────────── */
.ob-cards {
  display: grid; gap: 14px; margin-bottom: 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.ob-card {
  display: block; padding: 20px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ob-card:hover {
  border-color: var(--accent); transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 116, 241, .1);
}
.ob-card h2 { margin: 0 0 6px; font-size: 16px; }
.ob-card p  { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); }
.ob-card-cta { font-size: 13px; font-weight: 600; color: var(--accent); }

.ob-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.ob-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }

.ob-progress {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px;
}
.ob-progress-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 6px;
}
.ob-progress-value { font-size: 22px; font-weight: 700; line-height: 1; margin-bottom: 10px; }
.ob-progress-track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ob-progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #57e5b2);
  border-radius: 999px; transition: width .35s ease;
}
.ob-progress-meta { margin-top: 9px; font-size: 12px; color: var(--muted); }

.ob-views {
  display: flex; gap: 4px; padding: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.ob-view {
  flex: 1; padding: 7px 6px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted);
  font: 600 12.5px inherit; font-family: inherit; cursor: pointer;
}
.ob-view:hover { color: var(--ink); }
.ob-view.is-active { background: var(--accent); color: #fff; }

.ob-reset {
  padding: 8px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--muted);
  font: 500 12.5px inherit; font-family: inherit; cursor: pointer;
}
.ob-reset:hover { color: var(--err); border-color: #fecaca; }

.ob-main { display: flex; flex-direction: column; gap: 22px; }
.ob-group-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.ob-group-head h2 { margin: 0; font-size: 16px; }
.ob-group-head p  { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.ob-group-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #5a7ff5);
}
.ob-icon-slack     { background: linear-gradient(135deg, #4a154b, #9333ea); }
.ob-icon-vault     { background: linear-gradient(135deg, #0f1e3d, #3a4a6b); }
.ob-icon-jira      { background: linear-gradient(135deg, #5a3ac7, #9b7ef0); }
.ob-icon-training  { background: linear-gradient(135deg, #b45309, #f59e0b); }
.ob-icon-resources { background: linear-gradient(135deg, #1f8a68, #57e5b2); }

.ob-list { display: flex; flex-direction: column; gap: 6px; }
.ob-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.ob-row:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(14, 116, 241, .07); }
.ob-row.is-hidden { display: none; }
.ob-row.is-done { opacity: .55; }
.ob-row.is-done .ob-name { text-decoration: line-through; }

.ob-box {
  width: 19px; height: 19px; flex-shrink: 0; padding: 0;
  border: 1.5px solid #cbd5e1; border-radius: 5px; background: #fff;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.ob-box:hover { border-color: var(--accent); }
.ob-box::after {
  content: ""; width: 5px; height: 9px; margin-bottom: 2px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform .15s ease;
}
.ob-row.is-done .ob-box { background: var(--ok); border-color: var(--ok); }
.ob-row.is-done .ob-box::after { transform: rotate(45deg) scale(1); }

.ob-info {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-width: 0; text-decoration: none; color: inherit;
}
.ob-name { font-size: 13.5px; font-weight: 600; }
.ob-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.ob-desc code {
  background: #f1f5f9; border-radius: 4px; padding: 1px 5px;
  font-size: 11.5px; word-break: break-all;
}
.ob-action { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--accent); }

@media (max-width: 900px) {
  .ob-layout { grid-template-columns: 1fr; }
  .ob-side { position: static; }
}

/* checklist card — wraps every section in one surface */
.ob-checklist-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px 20px 22px;
}
.ob-checklist-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.ob-checklist-head h2 { margin: 0; font-size: 17px; }
.ob-checklist-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
/* Sections sit inside the card, so they lose their own gap-based spacing. */
.ob-checklist-card .ob-group + .ob-group { margin-top: 22px; }

/* back link + guide banner on the checklist sub-page */
.back-link {
  display: inline-block; margin-bottom: 14px;
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500;
}
.back-link:hover { color: var(--accent); }

.ob-guide {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; margin-bottom: 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.ob-guide:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(14, 116, 241, .08); }
.ob-guide-title { display: block; font-size: 14.5px; font-weight: 600; }
.ob-guide-desc  { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* Landing cards get more presence when they're the only thing on the page. */
.ob-cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
