/* C3 Leadership admin (admin.c3leadership.org). A dark brand sidebar for the sections and a light
   work area. Brand: Outfit, dark #1C1917, orange #F7941E, light ground #FAF5EC, ink #2B2521.
   The work area is always light; only the sidebar is dark. */

:root {
  --ground: #faf5ec;
  --card: #ffffff;
  --sand: #ede4d4;
  --ink: #2b2521;
  --body: #5e564e;
  --muted: #7d7369;
  --line: rgba(43, 37, 33, 0.12);
  --line-2: rgba(43, 37, 33, 0.22);
  --accent: #a3561b;
  --orange: #f7941e;
  --amber: #ffd79b;
  --side: #1c1917;
  --side-muted: #a8a097;
  --tint: rgba(247, 148, 30, 0.12);
  --good: #2f7d4f;
  --good-bg: rgba(47, 125, 79, 0.12);
  --warn: #8a5f00;
  --warn-bg: rgba(214, 160, 30, 0.18);
  --bad: #b23b2a;
  --bad-bg: rgba(178, 59, 42, 0.12);
  --info: #3b5f8a;
  --info-bg: rgba(59, 95, 138, 0.12);
  --shadow: 0 1px 2px rgba(43, 37, 33, 0.05), 0 18px 40px -24px rgba(43, 37, 33, 0.35);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--ground); color: var(--body); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--orange); color: #1c1917; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.noscript { padding: 40px; }

/* ------------------------------------------------------------ boot and sign in */

.boot { display: grid; place-items: center; align-content: center; gap: 22px; min-height: 100vh; background: var(--side); }
.boot img { height: 36px; width: auto; }
.boot__bar { width: 140px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; position: relative; }
.boot__bar::after { content: ""; position: absolute; inset: 0 60% 0 0; border-radius: inherit; background: var(--orange); animation: boot 1.1s var(--ease) infinite; }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.signin { display: grid; place-items: center; min-height: 100vh; padding: 32px max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); background: radial-gradient(90% 70% at 20% 0%, rgba(247, 148, 30, 0.16), transparent 60%), var(--side); color: #fff; }
.signin__card { width: min(420px, 100%); }
.signin__card img { height: 34px; width: auto; margin-bottom: 34px; }
.signin__eyebrow { margin-bottom: 10px; color: var(--orange); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.signin h1 { color: #fff; font-size: 2rem; line-height: 1.1; letter-spacing: -0.03em; }
.signin__lede { margin: 12px 0 26px; color: #cfc8c0; }
.signin label { display: block; margin-bottom: 8px; color: #fff; font-weight: 600; font-size: 14px; }
.signin input { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 16px; }
.signin input:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 4px rgba(247, 148, 30, 0.2); }
.signin .btn { width: 100%; margin-top: 14px; min-height: 52px; justify-content: center; font-size: 15.5px; }
.signin__error { min-height: 22px; margin-top: 8px; color: #ffb4a6; font-size: 14px; }
.signin__note { margin-top: 18px; color: #a8a097; font-size: 14px; }
.signin__dev { margin-top: 14px; }

/* ------------------------------------------------------------ shell */

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 22px 14px 18px; background: var(--side); color: #fff; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; color: #fff; text-decoration: none; }
.brand svg { flex: none; }
.brand b { display: block; font-size: 17px; font-weight: 600; letter-spacing: 0.01em; }
.brand small { display: block; color: var(--side-muted); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.nav { display: grid; gap: 2px; }
.nav__group { margin: 12px 0 2px; padding: 0 12px; color: var(--side-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
.nav a, .visit a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--side-muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.nav a:hover, .visit a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav a[aria-current="page"] { color: #fff; background: rgba(247, 148, 30, 0.16); }
.nav a[aria-current="page"] svg { color: var(--orange); }
.nav .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--orange); color: #1c1917; font-size: 12px; font-weight: 700; text-align: center; }
.visit { margin-top: auto; display: grid; gap: 2px; }
.visit a { font-size: 14px; }
.visit .ext { margin-left: auto; opacity: 0.6; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 14px; }
.me__text { min-width: 0; flex: 1; }
.me__text span { display: block; color: var(--side-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me button { padding: 6px; border: 0; border-radius: 9px; background: none; color: var(--side-muted); cursor: pointer; }
.me button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sand); color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.side .avatar { background: rgba(247, 148, 30, 0.2); color: var(--amber); }

.main { min-width: 0; padding: 28px max(28px, env(safe-area-inset-right, 0px)) 64px max(28px, env(safe-area-inset-left, 0px)); }
.main > .view { max-width: 1240px; margin: 0 auto; }

/* ------------------------------------------------------------ page parts */

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.head__text { min-width: 0; flex: 1 1 420px; }
.head__eyebrow { margin-bottom: 8px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.head h1 .pill-count { font-size: 14px; letter-spacing: 0; }
.head__lede { max-width: 640px; margin-top: 10px; color: var(--body); font-size: 15.5px; line-height: 1.6; }
.head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-count { padding: 2px 10px; border-radius: 999px; background: var(--sand); color: var(--ink); font-size: 13px; font-weight: 600; }

/* The greeting on the Overview: a warm card with the date, the greeting and three numbers. */
.hero { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; margin-bottom: 22px; padding: 30px 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px;
  background: radial-gradient(520px 260px at 100% 0%, rgba(247, 148, 30, 0.2), transparent 70%), radial-gradient(420px 220px at 0% 100%, rgba(255, 215, 155, 0.35), transparent 70%), var(--card); box-shadow: var(--shadow); }
.hero__text { position: relative; min-width: 0; flex: 1 1 380px; }
.hero__date { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; }
.hero__name { background: linear-gradient(100deg, var(--orange), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lede { margin-top: 12px; color: var(--body); font-size: 16.5px; }
.hero__stats { position: relative; display: flex; gap: 10px; margin: 0; }
.hero__stats div { min-width: 104px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(6px); }
.hero__stats dt { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.hero__stats dd { margin: 4px 0 0; color: var(--ink); font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }

.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-weight: 500; text-decoration: none; }
.back:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease); }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn--primary { border-color: transparent; background: var(--orange); color: #1c1917; }
.btn--primary:hover { background: #ffa53a; border-color: transparent; }
.btn--danger { color: var(--bad); }
.btn--danger:hover { border-color: var(--bad); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.link { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--muted); }
.search input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: none; color: var(--ink); font-size: 14.5px; outline: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--body); font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"], .chip[aria-current="true"] { border-color: var(--accent); color: var(--accent); background: var(--tint); }
.chip .n { color: var(--muted); font-size: 12.5px; }
.chip[disabled] { opacity: 0.45; cursor: not-allowed; }
select.chip { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }

.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; box-shadow: 0 1px 2px rgba(43, 37, 33, 0.04), 0 12px 28px -22px rgba(43, 37, 33, 0.28); }
.stack { display: grid; gap: 18px; }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel__head h2 { font-size: 17px; font-weight: 600; }
.panel__body { padding: 18px 20px; }
.source { padding: 11px 20px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 14px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { position: relative; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 1px 2px rgba(43, 37, 33, 0.04), 0 12px 28px -22px rgba(43, 37, 33, 0.28); }
.stat::before { content: ""; position: absolute; left: 20px; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); }
.stat small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.stat b { display: block; margin-top: 6px; color: var(--ink); font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13.5px; }
.stat--bad b { color: var(--bad); }
.stat--good b { color: var(--good); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 16px; background: #fbf8f2; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th.num, td.num { text-align: right; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--tint); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who b { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; }
.who > div > span { display: block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.who > div { min-width: 0; }

.tag { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 3px 10px; border-radius: 999px; background: var(--sand); color: var(--ink); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.tag button { display: grid; place-items: center; width: 16px; height: 16px; margin-right: -4px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.tag button:hover { color: var(--bad); background: var(--bad-bg); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-potential, .s-off { color: var(--muted); background: var(--sand); }
.s-lead, .s-info { color: var(--info); background: var(--info-bg); }
.s-considering, .s-warn { color: var(--warn); background: var(--warn-bg); }
.s-buyer, .s-good { color: var(--good); background: var(--good-bg); }
.s-bad { color: var(--bad); background: var(--bad-bg); }

.feed { margin: 0; padding: 4px 20px 12px; list-style: none; }
.feed li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tint); color: var(--accent); }
.feed .ico.s-bad { background: var(--bad-bg); color: var(--bad); }
.feed .ico.s-warn { background: var(--warn-bg); color: var(--warn); }
.feed .ico.s-info { background: var(--info-bg); color: var(--info); }
.feed b { color: var(--ink); font-weight: 600; }
.feed time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.feed .row { cursor: pointer; border-radius: 10px; }
.feed .row:hover b { color: var(--accent); }

.meter { display: block; height: 8px; margin: 6px 0 4px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.meter i { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--accent)); }

.funnel { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 8px; padding: 18px 20px 20px; }
.funnel__step { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--ground); color: var(--body); text-decoration: none; transition: border-color 0.2s, transform 0.25s var(--ease); }
.funnel__step:hover { border-color: var(--accent); transform: translateY(-2px); }
.funnel__n { color: var(--ink); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.funnel__step small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.funnel__arrow { display: grid; place-items: center; color: var(--muted); }

.bars { display: grid; gap: 10px; padding: 16px 20px 20px; }
.bar { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 14px; }
.bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { display: block; height: 10px; background: var(--sand); border-radius: 999px; }
.bar i { display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--accent)); }
.bar b { color: var(--ink); text-align: right; }
.spark { display: block; width: 100%; height: 130px; }
.spark-wrap { padding: 12px 20px 8px; }
.spark-axis { display: flex; justify-content: space-between; padding: 0 20px 14px; color: var(--muted); font-size: 12px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab { padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--body); font-weight: 600; font-size: 14px; text-decoration: none; }
.tab[aria-current="page"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }

.empty { padding: 34px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }
.empty .btn { margin-top: 14px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: var(--tint); color: var(--ink); }
.notice svg { flex: none; margin-top: 2px; color: var(--accent); }
.steps { margin: 10px 0 0; padding-left: 20px; }
.steps li { margin: 6px 0; }
code { padding: 1px 6px; border-radius: 6px; background: var(--sand); color: var(--ink); font-size: 0.92em; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }

.loading { padding: 40px 20px; color: var(--muted); text-align: center; }
.skeleton { height: 120px; border-radius: 18px; background: linear-gradient(90deg, var(--card), var(--sand), var(--card)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------ contact drawer and dialogs */

.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(20, 16, 14, 0.42); animation: fade 0.2s ease both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(600px, 100%); overflow-y: auto; background: var(--ground); box-shadow: -24px 0 60px rgba(0, 0, 0, 0.28); padding: calc(22px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(34px + env(safe-area-inset-bottom, 0px)) 24px; animation: slide 0.32s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0.4; } }
.drawer__top { display: flex; align-items: flex-start; gap: 14px; }
.drawer__top .avatar { width: 54px; height: 54px; font-size: 18px; }
.drawer__top h2 { font-size: 22px; overflow-wrap: anywhere; }
.drawer__top p { color: var(--muted); overflow-wrap: anywhere; }
.drawer__close { margin-left: auto; }
.drawer__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 18px 0 4px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.facts div { padding: 11px 14px; background: var(--card); min-width: 0; }
.facts dt { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.facts dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.section-label { margin: 22px 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.input, .textarea, .select { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); font-size: 14.5px; }
.inline-form .input, .inline-form .select { flex: 1 1 200px; width: auto; }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.kit-progress { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.kit-progress + .kit-progress { margin-top: 10px; }
.kit-progress__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.kit-progress__head b { color: var(--ink); }
.kit-files { margin: 10px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 13.5px; }
.kit-files li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 9px; background: var(--ground); }
.kit-files li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-files .yes { color: var(--good); font-weight: 600; white-space: nowrap; }
.kit-files .no { color: var(--muted); white-space: nowrap; }
details.files summary { margin-top: 10px; color: var(--accent); font-weight: 600; font-size: 13.5px; cursor: pointer; }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 16px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.timeline .dot { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--accent); }
.timeline .dot.s-bad { color: var(--bad); }
.timeline .dot.s-good { color: var(--good); }
.timeline b { color: var(--ink); font-weight: 600; }
.timeline p { color: var(--body); font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.timeline small { display: block; color: var(--muted); font-size: 12.5px; }
.timeline .note { padding: 10px 12px; margin-top: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }

.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; }
.modal__box { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px; border-radius: 20px; background: var(--ground); box-shadow: var(--shadow); animation: pop 0.25s var(--ease) both; }
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.modal__box h2 { font-size: 20px; margin-bottom: 6px; }
.modal__box > p { color: var(--muted); margin-bottom: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--ink); font-weight: 600; font-size: 14px; }
.field small { color: var(--muted); font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; color: var(--body); font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--orange); }
.modal__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.form-error { min-height: 20px; color: var(--bad); font-size: 13.5px; margin-bottom: 6px; }

.toasts { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; transform: translateX(-50%); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: #1c1917; color: #fff; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); animation: pop 0.25s var(--ease) both; }
.toast svg { color: var(--orange); flex: none; }
.toast.is-leaving { opacity: 0; transition: opacity 0.4s; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.switch b { display: block; color: var(--ink); font-weight: 600; }
.switch span { color: var(--muted); font-size: 13.5px; }

/* ------------------------------------------------------------ MCP page */

.mcp-art { overflow: hidden; border-radius: 22px; box-shadow: var(--shadow); }
.mcp-art > svg { display: block; width: 100%; height: auto; }
.copy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mcp-url { flex: 1 1 280px; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--sand); color: var(--ink); font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.connect-steps { padding: 18px 20px 8px; }
.connect-steps h3 { font-size: 16px; }
.tool-list { margin: 0; padding: 6px 20px 14px; list-style: none; }
.tool-list li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.tool-list li:first-child { border-top: 0; }
.tool-list b { color: var(--ink); font-weight: 600; }
.tool-list span { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: 1fr 1fr; }
  .funnel__arrow { display: none; }
}

@media (max-width: 820px) {
  .hero { padding: 22px 20px; }
  .hero__stats { width: 100%; }
  .hero__stats div { flex: 1; min-width: 0; padding: 12px 14px; }
  .hero__stats dd { font-size: 23px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px)); overflow: visible; }
  .brand small { display: none; }
  .brand b { font-size: 15.5px; }
  .nav { order: 3; flex: 0 0 calc(100% + 28px); min-width: 0; grid-auto-flow: column; justify-content: start; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
  .app { overflow-x: clip; }
  .nav a { padding: 8px 12px; white-space: nowrap; font-size: 14px; }
  .nav__group { display: none; }
  .visit { display: none; }
  .me { margin-left: auto; padding: 0; border: 0; }
  .me__text { display: none; }
  .main { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
  .hide-sm { display: none; }
  .bar { grid-template-columns: minmax(90px, 1fr) minmax(0, 1.2fr) 48px; }
  .field-row { grid-template-columns: 1fr; }
  td, th { padding: 11px 12px; }
}

@media (max-width: 520px) {
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .funnel { grid-template-columns: 1fr 1fr; padding: 14px; }
  .facts { grid-template-columns: 1fr; }
  .stat b { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
