/* Am-Finn Project Tracker - design tokens */
:root {
  --bg: #F5F3EF;
  --bg-2: #EDEAE4;
  --card: #FFFFFF;
  --ink: #111418;
  --ink-2: #3D434C;
  --muted: #6B717B;
  --line: #E4E0D9;
  --line-2: #D6D1C8;
  --brand: #B4602A;          /* cedar */
  --brand-2: #E39A4B;        /* ember */
  --brand-soft: #F7EADF;
  --frost: #3F7FA6;
  --ok: #1E7F55;   --ok-soft: #E3F2EA;
  --warn: #B26A00; --warn-soft: #FBEFD9;
  --bad: #B42318;  --bad-soft: #FBE7E5;
  --info: #3B5BA9; --info-soft: #E6ECF8;
  --hero: #12151A;
  --hero-ink: #F3F1EC;
  --shadow: 0 1px 2px rgba(17,20,24,.04), 0 8px 24px rgba(17,20,24,.06);
  --shadow-lg: 0 2px 4px rgba(17,20,24,.05), 0 24px 48px rgba(17,20,24,.10);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0E11; --bg-2: #121519; --card: #161A1F; --ink: #F1EFEA; --ink-2: #C9CCD2; --muted: #8D939C;
    --line: #23282F; --line-2: #2E343C; --brand: #E08A4C; --brand-2: #F2B271; --brand-soft: #2A1E15;
    --frost: #7DB3D6; --ok: #4CC38A; --ok-soft: #12271D; --warn: #E9A23B; --warn-soft: #2B2113;
    --bad: #F2705F; --bad-soft: #2E1715; --info: #8AA6EA; --info-soft: #172036; --hero: #07080A;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0E11; --bg-2: #121519; --card: #161A1F; --ink: #F1EFEA; --ink-2: #C9CCD2; --muted: #8D939C;
  --line: #23282F; --line-2: #2E343C; --brand: #E08A4C; --brand-2: #F2B271; --brand-soft: #2A1E15;
  --frost: #7DB3D6; --ok: #4CC38A; --ok-soft: #12271D; --warn: #E9A23B; --warn-soft: #2B2113;
  --bad: #F2705F; --bad-soft: #2E1715; --info: #8AA6EA; --info-soft: #172036; --hero: #07080A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 16px; }
/* Am-Finn logo: the PNGs are used as masks so the logo takes the current text color
   (ink on light, white on dark) from one white source file. */
.logo-mark, .logo-word, .logo-full { display: inline-block; background-color: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.logo-mark { -webkit-mask-image: url("assets/amfinn-mark.svg"); mask-image: url("assets/amfinn-mark.svg"); aspect-ratio: 95 / 89; }
.logo-word { -webkit-mask-image: url("assets/amfinn-wordmark.svg"); mask-image: url("assets/amfinn-wordmark.svg"); aspect-ratio: 140 / 19; }
.logo-full { -webkit-mask-image: url("assets/amfinn-logo.svg"); mask-image: url("assets/amfinn-logo.svg"); aspect-ratio: 140 / 120; }
.wordmark { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.wordmark .logo-mark { height: 30px; }
.wordmark .logo-word { height: 12px; }
.auth-logo { display: inline-block; color: #fff; }
.auth-logo .logo-full { height: 96px; }
.program { font-size: 12px; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 14px; letter-spacing: .02em; }
.program b { color: var(--ink-2); font-weight: 600; }
.topbar-spacer { flex: 1; }
.nav-tabs { display: flex; gap: 4px; }
.nav-tab { border: 0; background: transparent; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; }
.nav-tab[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.nav-tab .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.user-menu { position: relative; }
.menu { position: absolute; right: 0; top: 44px; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; display: none; }
.menu.open { display: block; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who small { display: block; color: var(--muted); }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; }
.menu button:hover { background: var(--bg-2); }

/* ---------- layout ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 32px 24px 96px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.sub { color: var(--muted); margin-top: 6px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.link-btn { border: 0; background: none; color: var(--brand); font-weight: 600; padding: 0; font-size: 14px; }

/* ---------- greeting + KPIs ---------- */
.greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.sync { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); background: var(--card); border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: live 2.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.kpi { padding: 18px 20px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; }
.kpi .value small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.kpi .hint { font-size: 13px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.alert .value { color: var(--bad); }

/* ---------- attention list ---------- */
.attention { padding: 6px; }
.att-row { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; }
.att-row + .att-row { border-top: 1px solid var(--line); border-radius: 0; }
.att-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); }
.att-icon svg { width: 20px; height: 20px; }
.att-row.late .att-icon { background: var(--bad-soft); color: var(--bad); }
.att-row.soon .att-icon { background: var(--warn-soft); color: var(--warn); }
.att-title { font-weight: 600; }
.att-meta { font-size: 13px; color: var(--muted); }
.btn { border: 1px solid var(--line-2); background: var(--card); padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-family: var(--display); font-size: 18px; margin-bottom: 4px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.on_track, .pill.complete, .pill.installing { color: var(--ok); background: var(--ok-soft); }
.pill.action_needed { color: var(--warn); background: var(--warn-soft); }
.pill.at_risk { color: var(--bad); background: var(--bad-soft); }
.pill.reconfirming, .pill.scheduling { color: var(--info); background: var(--info-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
.chip.late { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.chip.soon { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.chip.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.chip.info { background: var(--info-soft); color: var(--info); font-weight: 600; }

/* ---------- grand-opening countdown ---------- */
.kpis.five { grid-template-columns: repeat(5, 1fr); }
.open-band { margin-top: 26px; display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.open-band svg { width: 22px; height: 22px; flex: none; }
.open-band b { display: block; color: #fff; font-weight: 600; }
.open-band span { color: rgba(243,241,236,.72); font-size: 14px; }
.open-band.ok svg { color: #6FE0A6; }
.open-band.tight { border-color: rgba(245,194,107,.45); } .open-band.tight svg { color: #F5C26B; }
.open-band.late { border-color: rgba(255,154,139,.5); background: rgba(255,120,100,.08); } .open-band.late svg { color: #FF9A8B; }
.open-band.unknown svg { color: #A9C1FF; }
.pcard-open { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--ok); font-weight: 500; }
.pcard-open svg { width: 14px; height: 14px; }
.pcard-open.tight { color: var(--warn); }
.pcard-open.late { color: var(--bad); font-weight: 600; }
.pcard-open.unknown { color: var(--muted); }

/* ---------- freight ---------- */
.freight-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.freight-head .sub { margin-bottom: 8px; }
.ships { list-style: none; margin: 8px 0 0; padding: 0; }
.ships li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.ships li:first-child { border-top: 0; }
.ship-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.ship-ic svg { width: 20px; height: 20px; }
.ship-carrier { font-weight: 600; }
.ship-what { font-size: 13px; color: var(--muted); }
.ship-no { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.icon-btn { border: 0; background: none; padding: 3px; border-radius: 6px; color: var(--muted); display: inline-grid; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn svg { width: 14px; height: 14px; }
.ships .btn { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.ships .btn svg { width: 14px; height: 14px; }

.hold-list { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.hold-list li + li { margin-top: 2px; }

/* ---------- payments ---------- */
.pay-group + .pay-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.pay-head { display: flex; gap: 10px; align-items: center; }
.pay-head b { display: block; font-size: 14.5px; }
.pay-head span { font-size: 13px; color: var(--muted); }
.pay-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pay-dot.mat { background: var(--info); }
.pay-dot.lab { background: var(--brand); }
.pays ul { list-style: none; margin: 8px 0 0; padding: 0 0 0 20px; }
.pay-line { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 8px 0; flex-wrap: wrap; }
.pay-line > div:first-child { flex: 1 0 150px; }
.pay-label { font-size: 14px; font-weight: 500; }
.pay-line .item-why { margin-top: 0; font-size: 12.5px; }
.pay-line .chip svg { width: 12px; height: 12px; }

/* ---------- care hub + service ---------- */
.warranty { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--ok-soft); }
.warranty svg { width: 24px; height: 24px; color: var(--ok); flex: none; }
.warranty b { display: block; }
.warranty span, .care-doc span { font-size: 13.5px; color: var(--muted); }
.care-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.care-doc { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.care-doc svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.care-doc b { display: block; font-size: 14px; }
.svc-form { padding: 16px; border-radius: 14px; background: var(--bg-2); margin-bottom: 14px; }
.svc-form label, .svc-open legend { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.svc-open { border: 0; padding: 0; margin: 0 0 12px; }
.svc-open label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; margin-right: 18px; }
.tickets { list-style: none; margin: 0; padding: 0; }
.ticket { padding: 14px 0; border-top: 1px solid var(--line); }
.tickets > .ticket:first-child, .tickets.inner .ticket { border-top: 0; }
.ticket-wrap { padding: 14px 0; border-top: 1px solid var(--line); }
.ticket-wrap:first-child { border-top: 0; padding-top: 0; }
.ticket-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.loop.three { grid-template-columns: repeat(3, 1fr); }
.svc-admin { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.svc-admin .input { flex: 1; min-width: 180px; padding: 9px 12px; }

/* ---------- submittal back-and-forth ---------- */
.item.sub .sub-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item.ours .check { border-color: var(--info); border-style: dashed; }
.loop { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.loop li { position: relative; padding-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.3; }
.loop li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: var(--line); }
.loop li.done { color: var(--ink-2); }
.loop li.done::before { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.loop li.now { color: var(--ink); font-weight: 600; }
.loop li.now::before { background: var(--brand-2); animation: glow 2s ease-in-out infinite; }
.loop li.back { color: var(--warn); }
.loop li.back::before { background: var(--warn); }
.sub-comment { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font-size: 13.5px; color: var(--ink-2); border-left: 3px solid var(--brand); }
.wf-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.wf-form { margin-top: 14px; }
.wf-form textarea { resize: vertical; min-height: 76px; }
.wf-form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.sub-hist { margin-top: 12px; font-size: 13.5px; }
.sub-hist summary { cursor: pointer; color: var(--muted); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.sub-hist summary::-webkit-details-marker { display: none; }
.sub-hist summary::before { content: "▸"; transition: transform .2s; }
.sub-hist[open] summary::before { transform: rotate(90deg); }
.sub-hist ul { list-style: none; margin: 10px 0 0; padding: 0; border-left: 2px solid var(--line); }
.sub-hist li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 6px 0 6px 12px; }
.sub-hist .who { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--bg-2); color: var(--ink-2); }
.sub-hist .who.amfinn { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.sub-hist .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- project cards ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { border: 1px solid var(--line-2); background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.pcard { padding: 22px; text-align: left; border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; display: flex; flex-direction: column; gap: 18px; width: 100%; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.pcard-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pcard-title { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.pcard-loc { font-size: 13px; color: var(--muted); }
.mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mini span { height: 6px; border-radius: 3px; background: var(--line); }
.mini span.done { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.mini span.now { background: var(--brand-2); animation: glow 2s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .45; } }
.pcard-stage { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pcard-stage b { color: var(--ink); font-weight: 600; }
.pcard-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; margin-top: auto; }
.pcard-date .value { white-space: nowrap; }
.pcard-date .label { font-size: 12px; color: var(--muted); }
.pcard-date .value { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.pcard-date .value.tbd { font-size: 16px; color: var(--info); }
.eq { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- project detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-weight: 500; padding: 0; margin-bottom: 20px; }
.back:hover { color: var(--ink); }
.hero {
  position: relative; overflow: hidden; border-radius: 24px; background: var(--hero); color: var(--hero-ink);
  padding: 36px 40px 40px; box-shadow: var(--shadow-lg); isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 160%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-2) 38%, transparent), transparent 70%);
  filter: blur(10px); opacity: .55;
}
.hero.cold::before { background: radial-gradient(closest-side, rgba(125,179,214,.35), transparent 70%); }
.hero-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.hero .eyebrow { color: rgba(243,241,236,.6); }
.hero h1 { color: #fff; margin-top: 8px; }
.hero .loc { color: rgba(243,241,236,.7); margin-top: 6px; }
.hero .pill { background: rgba(255,255,255,.1); }
.hero .pill.on_track, .hero .pill.complete, .hero .pill.installing { color: #6FE0A6; }
.hero .pill.action_needed { color: #F5C26B; }
.hero .pill.at_risk { color: #FF9A8B; }
.hero .pill.reconfirming, .hero .pill.scheduling { color: #A9C1FF; }
.headline { margin-top: 34px; display: flex; gap: 40px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.headline .now { font-family: var(--display); font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: #fff; max-width: 560px; }
.headline .now-sub { color: rgba(243,241,236,.72); margin-top: 8px; max-width: 520px; }
.install { text-align: right; }
.install .label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(243,241,236,.6); }
.install .date { font-family: var(--display); font-size: clamp(40px, 6vw, 64px); font-weight: 600; letter-spacing: -.035em; line-height: 1; color: #fff; margin-top: 6px; }
.install .date.tbd { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; }
.install .window { color: rgba(243,241,236,.7); margin-top: 8px; font-size: 14px; }
.conf { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: rgba(243,241,236,.75); }
.conf-bars { display: inline-flex; gap: 3px; align-items: flex-end; }
.conf-bars i { width: 5px; border-radius: 2px; background: rgba(255,255,255,.18); }
.conf-bars i:nth-child(1) { height: 8px; } .conf-bars i:nth-child(2) { height: 12px; } .conf-bars i:nth-child(3) { height: 16px; }
.conf-bars i.on { background: var(--brand-2); }

/* the big tracker */
.tracker { margin-top: 40px; position: relative; }
.track-rail { position: absolute; left: calc(100% / 14); right: calc(100% / 14); top: 21px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); }
.track-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: var(--pct, 0%); transition: width 1.4s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 18px color-mix(in srgb, var(--brand-2) 70%, transparent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.step { text-align: center; padding: 0 4px; }
.node { width: 46px; height: 46px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #1E232A; border: 2px solid rgba(255,255,255,.14); color: rgba(255,255,255,.45); position: relative; transition: all .5s ease; }
.node svg { width: 20px; height: 20px; }
.step.done .node { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.step.now .node { background: #fff; border-color: #fff; color: var(--hero); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand-2) 35%, transparent), 0 0 32px color-mix(in srgb, var(--brand-2) 60%, transparent); }
.step.now .node::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--brand-2); animation: ring 2.2s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.55); opacity: 0; } }
.step-name { margin-top: 12px; font-size: 13.5px; font-weight: 600; color: rgba(243,241,236,.55); }
.step.done .step-name, .step.now .step-name { color: #fff; }
.step-date { font-size: 12px; color: rgba(243,241,236,.5); margin-top: 2px; min-height: 18px; }

.detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-top: 24px; align-items: start; }
.panel { padding: 26px; }
.panel h2 { margin-bottom: 4px; }
.panel .sub { margin-top: 2px; margin-bottom: 18px; font-size: 14px; }
.impact { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; margin-bottom: 18px; }
.impact.bad { background: var(--bad-soft); color: var(--bad); }
.impact.info { background: var(--info-soft); color: var(--info); }
.impact.good { background: var(--ok-soft); color: var(--ok); }
.impact svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.impact p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.impact strong { font-weight: 700; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.item:first-child { border-top: 0; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; margin-top: 1px; }
.check svg { width: 14px; height: 14px; }
.item.done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.item.late .check { border-color: var(--bad); color: var(--bad); }
.item.soon .check { border-color: var(--warn); }
.item-title { font-weight: 600; }
.item.done .item-title { color: var(--muted); font-weight: 500; }
.item-why { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.item-side { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 16px 1fr auto; gap: 14px; padding: 10px 0; align-items: center; font-size: 14px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); margin-left: 3px; }
.timeline li.done .tl-dot { background: var(--brand); }
.timeline li.now .tl-dot { background: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline li .when { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline li.future { color: var(--muted); }
.team { display: flex; gap: 14px; align-items: center; }
.team .mark { width: 48px; height: 48px; border-radius: 14px; background: #12151A; color: #fff; display: grid; place-items: center; flex: none; border: 1px solid var(--line-2); }
.team .mark .logo-mark { height: 30px; }
.stack > * + * { margin-top: 20px; }
.eq-list { display: flex; gap: 10px; flex-wrap: wrap; }
.eq-tile { flex: 1; min-width: 130px; padding: 16px; border-radius: 14px; background: var(--bg-2); display: flex; gap: 12px; align-items: center; }
.eq-tile svg { width: 26px; height: 26px; color: var(--brand); }
.eq-tile.frost svg { color: var(--frost); }
.eq-tile .n { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1; }
.eq-tile .t { font-size: 13px; color: var(--muted); }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 16px; }

/* ---------- portfolio table (corporate/admin) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--bg-2); }
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); min-width: 120px; }
.bar i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--c); }

/* ---------- review queue (admin) ---------- */
.q-item { padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.q-item + .q-item { border-top: 1px solid var(--line); }
.q-src { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-change { margin-top: 6px; font-weight: 600; }
.q-change del { color: var(--muted); font-weight: 500; }
.q-quote { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); border-left: 3px solid var(--line-2); padding-left: 10px; }
.q-actions { display: flex; gap: 8px; }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--hero); color: var(--hero-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; width: 900px; height: 900px; right: -380px; bottom: -420px; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-2) 45%, transparent), transparent 70%); opacity: .55; }
.auth-art h1 { color: #fff; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.04; max-width: 560px; letter-spacing: -.035em; }
.auth-art p { color: rgba(243,241,236,.7); max-width: 460px; font-size: 16px; }
.demo-track { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 520px; margin-top: 28px; }
.demo-track i { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); position: relative; overflow: hidden; }
.demo-track i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transform: translateX(-101%); animation: fillin 7s ease-in-out infinite; animation-delay: calc(var(--i) * .5s); }
@keyframes fillin { 0% { transform: translateX(-101%); } 12%, 85% { transform: translateX(0); } 100% { transform: translateX(101%); } }
.auth-form { display: grid; place-items: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 28px; }
.field { margin-top: 24px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.input { width: 100%; font: inherit; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.btn.block { width: 100%; padding: 13px; margin-top: 14px; font-size: 15px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sent { text-align: center; }
.sent .icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.sent .icon svg { width: 28px; height: 28px; }
.persona-list { display: grid; gap: 8px; margin-top: 12px; }
.persona { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; }
.persona:hover { border-color: var(--brand); }
.persona small { color: var(--muted); display: block; }
.proto-note { margin-top: 28px; font-size: 12.5px; color: var(--muted); padding: 12px 14px; border-radius: 12px; background: var(--bg-2); }

/* ---------- prototype switcher + toast ---------- */
.proto-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; display: flex; gap: 8px; align-items: center; background: var(--ink); color: var(--bg); padding: 6px 6px 6px 14px; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 13px; max-width: calc(100vw - 32px); }
.proto-bar select { font: inherit; border: 0; border-radius: 999px; padding: 6px 10px; background: color-mix(in srgb, var(--bg) 14%, var(--ink)); color: var(--bg); max-width: 220px; }
.proto-bar .tag { opacity: .7; white-space: nowrap; }
#toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 12px 16px; border-radius: 12px; font-size: 14px; transition: all .3s ease; z-index: 40; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.fade-in { animation: fade .5s ease both; }
/* "clip" (unlike "hidden") can't be scrolled by focus or scrollIntoView, so the glow layer
   behind these dark panels can never shift their content. */
.hero, .auth-art { overflow: clip; }
/* In-place redraws after an action: no entry animation, no tracker re-fill. */
.no-anim .fade-in { animation: none; }
.no-anim .track-fill { transition: none; }
.filters { align-items: center; }
.input.search { width: 200px; padding: 7px 12px; border-radius: 999px; font-size: 13px; }
tr[data-go]:focus-visible, tr[data-group]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .kpis.five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .kpis, .kpis.five { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 360px; padding: 32px 24px; }
  .program { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 20px 16px 110px; }
  .topbar-in { padding: 12px 16px; gap: 10px; }
  .nav-tabs { display: none; }
  .grid { grid-template-columns: 1fr; }
  .kpi .value { font-size: 24px; }
  .hero { padding: 26px 20px 28px; border-radius: 20px; }
  .install { text-align: left; }
  .headline { gap: 22px; }
  .att-row { grid-template-columns: 36px 1fr; }
  .att-row .chip, .att-row .btn { grid-column: 2; justify-self: start; }
  .item { grid-template-columns: 28px 1fr; }
  .item-side { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; }
  /* vertical tracker on phones */
  .tracker { margin-top: 28px; }
  .track-rail { left: 21px; right: auto; top: 23px; bottom: 23px; width: 4px; height: auto; }
  .track-fill { width: 100%; bottom: auto; height: var(--pct, 0%); transition: height 1.4s cubic-bezier(.2,.8,.2,1); background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .step { display: grid; grid-template-columns: 46px 1fr; gap: 14px; text-align: left; align-items: center; padding: 0; }
  .node { margin: 0; }
  .step-name { margin-top: 0; font-size: 15px; }
  .q-item { grid-template-columns: 1fr; }
  .care-docs, .svc-grid { grid-template-columns: 1fr; }
  .ships li { grid-template-columns: 40px 1fr; }
  .ships li .btn { grid-column: 2; justify-self: start; }
  .panel { padding: 20px; }
  .proto-bar .tag { display: none; }
}
.warranty.pending svg { color: var(--warn); }
/* ---------- terms & privacy ---------- */
.legal { max-width: 820px; }
.legal-body { margin-top: 28px; padding: 8px 32px; }
.legal-sec { padding: 22px 0; }
.legal-sec + .legal-sec { border-top: 1px solid var(--line); }
.legal-sec h2 { font-size: 18px; margin: 0 0 8px; }
.legal-sec p, .legal-sec li { color: var(--ink-2); line-height: 1.65; font-size: 15px; }
.legal-sec p + p { margin-top: 10px; }
.legal-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal a, .legal-link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.auth-art .legal-link { color: inherit; opacity: .85; }
@media (max-width: 640px) { .legal-body { padding: 4px 18px; } }
/* ---------- franchise group cards ---------- */
.gcard { padding: 22px; text-align: left; display: flex; flex-direction: column; gap: 18px; width: 100%; }
.gcard[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-lg); }
.gcard[aria-pressed="true"]::before { transform: scaleX(1); }
.gbar { display: flex; gap: 3px; height: 10px; animation: wipe 1s cubic-bezier(.2,.7,.2,1) .3s both; }
.gbar i { display: block; height: 100%; border-radius: 5px; min-width: 6px; }
.gleg { margin-top: 10px; gap: 6px 14px; }
.gleg span::before { border-radius: 50%; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0 round 5px); } to { clip-path: inset(0 0 0 0 round 5px); } }

.gcard .pcard-bottom { flex-wrap: nowrap; }
.gcard .pcard-date { min-width: 0; flex: 1 1 auto; }
.gcard .pcard-date .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .eq { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 0 1 auto; }
/* ---------- material payments tab ---------- */
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.nav-tab .count.quiet { background: var(--bg-2); color: var(--ink-2); }
.prows { overflow: hidden; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 16px; align-items: center; width: 100%; padding: 16px 20px; border: 0; background: transparent; text-align: left; color: inherit; transition: background .2s ease, padding-left .25s ease; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow:hover { background: var(--bg-2); padding-left: 24px; }
.prow b { display: block; font-weight: 600; }
.prow small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-main b { font-family: var(--display); font-size: 16px; letter-spacing: -.01em; }
.prow-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.prow-ic.late { background: var(--bad-soft); color: var(--bad); }
.prow-ic svg { width: 18px; height: 18px; }
.prow-go { color: var(--muted); font-size: 22px; line-height: 1; transition: transform .25s ease, color .2s; }
.prow:hover .prow-go { transform: translateX(4px); color: var(--brand); }
.prow:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* ---------- motion ---------- */
.fade-in { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.grid > :nth-child(1), .kpis > :nth-child(1), .prows > :nth-child(1) { animation-delay: 45ms; }
.grid > :nth-child(2), .kpis > :nth-child(2), .prows > :nth-child(2) { animation-delay: 90ms; }
.grid > :nth-child(3), .kpis > :nth-child(3), .prows > :nth-child(3) { animation-delay: 135ms; }
.grid > :nth-child(4), .kpis > :nth-child(4), .prows > :nth-child(4) { animation-delay: 180ms; }
.grid > :nth-child(5), .kpis > :nth-child(5), .prows > :nth-child(5) { animation-delay: 225ms; }
.grid > :nth-child(6), .kpis > :nth-child(6), .prows > :nth-child(6) { animation-delay: 270ms; }
.grid > :nth-child(7), .kpis > :nth-child(7), .prows > :nth-child(7) { animation-delay: 315ms; }
.grid > :nth-child(8), .kpis > :nth-child(8), .prows > :nth-child(8) { animation-delay: 360ms; }
.grid > :nth-child(9), .kpis > :nth-child(9), .prows > :nth-child(9) { animation-delay: 405ms; }
.grid > :nth-child(10), .kpis > :nth-child(10), .prows > :nth-child(10) { animation-delay: 450ms; }
.grid > :nth-child(11), .kpis > :nth-child(11), .prows > :nth-child(11) { animation-delay: 495ms; }
.grid > :nth-child(12), .kpis > :nth-child(12), .prows > :nth-child(12) { animation-delay: 540ms; }
.grid > :nth-child(n+13) { animation-delay: 560ms; }
/* A cedar-to-ember line draws across the top of a card on hover. */
.pcard, .gcard, .kpi { position: relative; overflow: hidden; }
.pcard::before, .gcard::before, .kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.pcard:hover::before, .gcard:hover::before, .kpi[data-go]:hover::before { transform: scaleX(1); }
.pcard, .gcard, .kpi { transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, border-color .25s; }
.pcard:hover, .gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi[data-go] { cursor: pointer; }
.pcard:active, .gcard:active, .btn:active, .filter:active, .nav-tab:active { transform: scale(.98); }
.btn, .filter, .nav-tab, .chip, .pill { transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease, border-color .2s ease; }
.nav-tab:hover { color: var(--ink); }
/* Progress segments fill one after another when a card appears. */
.mini span.done { transform-origin: left; animation: seg .5s cubic-bezier(.2,.7,.2,1) both; }
.mini span.now { transform-origin: left; animation: seg .5s cubic-bezier(.2,.7,.2,1) both, glow 2s ease-in-out infinite; }
.mini span:nth-child(1) { animation-delay: 320ms, 1s; }
.mini span:nth-child(2) { animation-delay: 390ms, 1s; }
.mini span:nth-child(3) { animation-delay: 460ms, 1s; }
.mini span:nth-child(4) { animation-delay: 530ms, 1s; }
.mini span:nth-child(5) { animation-delay: 600ms, 1s; }
.mini span:nth-child(6) { animation-delay: 670ms, 1s; }
.mini span:nth-child(7) { animation-delay: 740ms, 1s; }
@keyframes seg { from { transform: scaleX(0); opacity: .3; } to { transform: scaleX(1); opacity: 1; } }
.no-anim .fade-in, .no-anim .gbar, .no-anim .mini span.done { animation: none; }
.no-anim .mini span.now { animation: glow 2s ease-in-out infinite; }
@media (max-width: 760px) {
  .kpis.three { grid-template-columns: 1fr; }
  .prow { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 6px; }
  .prow-inv, .prow .chip { grid-column: 2; justify-self: start; }
  .prow-go { grid-row: 1; grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
