:root {
  color-scheme: light;
  --bg: #eaf5fb;
  --paper: #fff8e8;
  --paper-bright: #ffffff;
  --peach: #ffe8d6;
  --ink: #143b68;
  --muted: #4e6b83;
  --subtle: #527288;
  --line: #8fb4cd;
  --line-strong: #6291b3;
  --coral: #d4483f;
  --coral-deep: #c1443e;
  --coral-surface: #ef6f69;
  --on-coral: #0d2947;
  --green: #3f6b53;
  --gold: #88620d;
  --shadow: 0 24px 70px rgba(20, 59, 104, 0.14);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 2%, rgba(90, 169, 230, 0.23), transparent 30rem),
    radial-gradient(circle at 5% 30%, rgba(212, 72, 63, 0.09), transparent 24rem),
    var(--bg);
  font-family: "IBM Plex Sans", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--coral-deep);
  outline-offset: 5px;
}

.site-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.project-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(20, 59, 104, 0.14);
  background: rgba(234, 245, 251, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.project-header-inner {
  display: flex;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.back-link,
.brand-lite {
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  gap: 8px;
  align-items: center;
  color: var(--coral-deep);
}

.brand-lite {
  display: inline-flex;
  min-height: 44px;
  gap: 10px;
  align-items: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-lite-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--coral-surface);
  color: var(--on-coral);
  font-size: 0.78rem;
  letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(20, 59, 104, 0.14);
}

.project-main { padding: 72px 0 90px; }

.project-hero {
  max-width: 940px;
  padding: 12px 0 54px;
}

.project-hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  line-height: 0.93;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.project-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(212, 72, 63, 0.34);
  border-radius: 999px;
  background: rgba(212, 72, 63, 0.09);
  color: var(--coral-deep);
  font-size: 0.78rem;
  font-weight: 600;
}

.project-lead {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.project-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.project-button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.project-button:hover { transform: translateY(-2px); }

.project-button.primary {
  background: var(--coral-surface);
  color: var(--on-coral);
  box-shadow: 0 12px 30px rgba(20, 59, 104, 0.16);
}

.project-button.secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.56);
}

.project-button.secondary:hover { border-color: var(--coral-deep); background: var(--paper-bright); }

.preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.55fr);
  gap: 16px;
  align-items: stretch;
}

.preview-card,
.project-context,
.detail-card,
.more-projects {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.preview-card {
  min-height: 550px;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(212, 72, 63, 0.1), rgba(255, 255, 255, 0.72)),
    var(--paper);
  box-shadow: var(--shadow);
}

.preview-card.wide-preview { min-height: 560px; }

.preview-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-caption strong { color: var(--coral-deep); }

.project-context { padding: 26px; }

.project-context h2,
.project-notes-title,
.more-projects h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.project-context p,
.detail-card p,
.more-projects p { margin: 0; color: var(--muted); }

.context-list,
.detail-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.context-list li,
.detail-list li {
  display: grid;
  grid-template-columns: 9px 1fr;
  gap: 10px;
  color: var(--muted);
}

.context-list li::before,
.detail-list li::before {
  width: 6px;
  height: 6px;
  margin-top: 0.62em;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.project-notes { margin-top: 34px; }

.project-notes-title { margin-bottom: 16px; }

.project-notes .detail-grid { margin-top: 0; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.detail-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.detail-card { min-height: 215px; padding: 24px; }

.detail-card h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.process-steps {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.process-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid rgba(20, 59, 104, 0.14);
}

.process-step b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(212, 72, 63, 0.5);
  border-radius: 8px;
  color: var(--coral-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.process-step span { color: var(--muted); font-size: 0.9rem; }

.project-note {
  margin: 16px 0 0;
  color: var(--subtle);
  font-size: 0.8rem;
}

.project-note + .project-note { margin-top: 4px; }

.more-projects {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(215, 237, 249, 0.78), rgba(255, 248, 232, 0.9));
}

.more-projects h2 { margin-bottom: 0; }

.more-projects a {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  gap: 8px;
  align-items: center;
  color: var(--coral-deep);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.project-footer {
  padding: 0 0 28px;
  color: var(--subtle);
  font-size: 0.82rem;
}

.project-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.project-footer-inner a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

/* Illustrative interface shell shared by the dashboard previews */
.mockup-scroll { max-width: 100%; }

.mockup {
  overflow: hidden;
  min-height: 450px;
  border: 1px solid rgba(20, 59, 104, 0.16);
  border-radius: 16px;
  background: var(--paper-bright);
  box-shadow: 0 18px 42px rgba(20, 59, 104, 0.12);
}

.mockup-top {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(20, 59, 104, 0.12);
  background: #f7fbfe;
}

.mockup-brand { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }

.mockup-stamp {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-body { display: grid; grid-template-columns: 112px 1fr; min-height: 402px; }

.dashboard-nav {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 18px 12px;
  background: var(--ink);
  color: #d7edf9;
  font-size: 0.75rem;
  font-weight: 600;
}

.dashboard-nav span { padding: 8px; border-radius: 8px; }
.dashboard-nav span:first-child { background: var(--coral-surface); color: var(--on-coral); }

.dashboard-main { padding: 20px; background: #f8fcfe; }

.mockup-title { margin: 0 0 5px; font-size: 1.35rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; }
.mockup-copy { margin: 0; color: var(--muted); font-size: 0.82rem; }

.panel-title { margin: 0 0 12px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }

.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }

.metric {
  padding: 12px;
  border: 1px solid rgba(20, 59, 104, 0.12);
  border-radius: 10px;
  background: var(--paper);
}

.metric strong { display: block; font-size: 1.2rem; font-weight: 700; line-height: 1; }
.metric span { display: block; margin-top: 6px; color: var(--subtle); font-size: 0.75rem; }

.chart-panel { display: grid; grid-template-columns: minmax(0, 1fr) 145px; gap: 12px; margin-top: 12px; }

.chart,
.status-panel { padding: 14px; border: 1px solid rgba(20, 59, 104, 0.12); border-radius: 12px; background: var(--paper-bright); }

.bars { display: flex; height: 135px; align-items: end; gap: 8px; padding: 8px 0 0; border-bottom: 1px solid var(--line); }
.bar { flex: 1; min-height: 18px; border-radius: 6px 6px 0 0; background: var(--coral); }
.bar:nth-child(2) { height: 42%; background: #e59a90; }
.bar:nth-child(3) { height: 66%; background: var(--gold); }
.bar:nth-child(4) { height: 52%; background: #7aa8ca; }
.bar:nth-child(5) { height: 78%; background: var(--green); }
.bar:nth-child(6) { height: 92%; background: var(--ink); }

.status-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.status-list li { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.75rem; }
.status { width: 8px; height: 8px; margin-top: 0.38em; border-radius: 50%; background: var(--green); }
.status.pending { background: var(--gold); }
.status.attention { background: var(--coral); }

/* =============================================================
   Order flow board  (order-inventory-dashboard.html only)
   A pipeline, not a metrics grid. This page's story is order
   movement and handoffs, so the body reads left to right through
   the stages instead of stacking tiles and a chart.
   ============================================================= */
.flow-board {
  min-height: 402px;
  padding: 20px;
  background: #f8fcfe;
}

.flow-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.flow-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.flow-stage {
  position: relative;
  padding: 14px 12px;
  border: 1px solid rgba(20, 59, 104, 0.12);
  border-radius: 12px;
  background: var(--paper-bright);
}

.flow-stage + .flow-stage::before {
  content: "→";
  position: absolute;
  top: 50%;
  left: -22px;
  width: 18px;
  color: var(--coral);
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
}

.flow-stage b {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.flow-stage span {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-stage small {
  display: block;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 0.75rem;
}

.flow-stage.is-holding {
  border-color: rgba(212, 72, 63, 0.45);
  background: rgba(212, 72, 63, 0.06);
}

.flow-stage.is-done b { color: var(--green); }

.flow-attention {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(212, 72, 63, 0.3);
  border-radius: 12px;
  background: rgba(212, 72, 63, 0.06);
}

.flow-attention-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.flow-attention-head span {
  color: var(--coral-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.flow-attention-head b { font-size: 1rem; font-weight: 700; }

.flow-attention ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.flow-attention li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(20, 59, 104, 0.12);
  color: var(--muted);
  font-size: 0.78rem;
}

.flow-attention li b { color: var(--ink); font-weight: 700; }

/* Representative coaching log preview */
.coaching-shell { min-height: 450px; padding: 22px; background: #f8fcfe; }
.coaching-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.coaching-head .mockup-title { font-size: 1.45rem; line-height: 1; letter-spacing: -0.045em; }
.coaching-head > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #e5f2ea; color: var(--green); font-size: 0.75rem; font-weight: 700; }
.coaching-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 12px; margin-top: 20px; }
.coach-panel { padding: 14px; border: 1px solid rgba(20, 59, 104, 0.12); border-radius: 12px; background: var(--paper-bright); }
.coach-person { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(20, 59, 104, 0.1); color: var(--muted); font-size: 0.78rem; }
.coach-person strong { color: var(--ink); font-weight: 700; }
.coach-focus { padding: 12px; border-radius: 10px; background: var(--peach); }
.coach-focus span { display: block; color: var(--coral-deep); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.coach-focus strong { display: block; margin-top: 5px; font-size: 1.1rem; font-weight: 700; line-height: 1.05; }
.coach-lines { display: grid; gap: 8px; margin-top: 12px; }
.coach-lines p { height: 9px; margin: 0; border-radius: 99px; background: #d7edf9; }
.coach-lines p:nth-child(2) { width: 82%; }
.coach-lines p:nth-child(3) { width: 64%; }
.coach-commitment { display: flex; gap: 8px; align-items: center; margin-top: 16px; color: var(--green); font-size: 0.78rem; font-weight: 600; }
.coach-commitment b { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: #e5f2ea; }
.coach-commitment svg { display: block; width: 16px; height: 16px; }

/* Representative event preview */
.event-preview { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 14px; min-height: 450px; padding: 14px; background: #f8fcfe; }
.invite-card { display: grid; min-height: 420px; place-items: center; padding: 30px 22px; border: 1px solid #c9a877; border-radius: 12px; background: linear-gradient(160deg, #fffdf4, #ffe8d6); text-align: center; }
.invite-card small { color: var(--coral-deep); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.invite-card p.invite-title { max-width: 220px; margin: 22px 0 10px; font-size: 2.1rem; font-weight: 700; line-height: 0.98; letter-spacing: -0.045em; }
.invite-card p:not(.invite-title) { max-width: 190px; margin: 0; color: var(--muted); font-size: 0.78rem; }
.invite-heart { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--coral-surface); color: var(--on-coral); }
.invite-heart svg { display: block; width: 24px; height: 24px; }
.guest-board { padding: 16px; border: 1px solid rgba(20, 59, 104, 0.12); border-radius: 12px; background: var(--paper-bright); }
.guest-board-title { margin: 0 0 14px; font-size: 1.1rem; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.guest-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid rgba(20, 59, 104, 0.1); color: var(--muted); font-size: 0.78rem; }
.guest-row strong { color: var(--ink); font-weight: 700; }
.guest-row em { color: var(--green); font-style: normal; font-weight: 700; }
.guest-row em.pending { color: var(--gold); }

.event-reference {
  overflow: hidden;
  margin: 24px 0 0;
  padding: 14px 14px 0;
  border: 1px solid rgba(20, 59, 104, 0.12);
  border-radius: 12px;
  background: var(--paper-bright);
}

.event-reference img {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
}

.event-reference figcaption {
  padding: 12px 2px 14px;
  color: var(--subtle);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* Representative newsletter preview */
.newsletter-preview { min-height: 450px; padding: 18px; background: #f8fcfe; }
.newsletter-window { max-width: 720px; margin: 0 auto; border: 1px solid rgba(20, 59, 104, 0.12); background: var(--paper-bright); box-shadow: 0 18px 38px rgba(20, 59, 104, 0.1); }
.newsletter-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; background: var(--ink); color: var(--paper); }
.newsletter-header strong { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.03em; }
.newsletter-header span { color: #b9ddf3; font-size: 0.78rem; }
.newsletter-body { padding: 22px; }
.newsletter-body .n-eyebrow { color: var(--coral-deep); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.n-headline { max-width: 500px; margin: 10px 0; font-size: 2.25rem; font-weight: 700; line-height: 0.98; letter-spacing: -0.045em; }
.newsletter-body > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 0.82rem; }
.newsletter-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.newsletter-tile { min-height: 110px; padding: 12px; border-top: 3px solid var(--coral); background: #fff7ed; }
.newsletter-tile:nth-child(2) { border-color: var(--green); background: #eef8f0; }
.newsletter-tile:nth-child(3) { border-color: var(--gold); background: #fff9df; }
.n-tile-title { margin: 0 0 5px; font-size: 0.82rem; font-weight: 700; }
.newsletter-tile p { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.newsletter-footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 0.75rem; }

@media (max-width: 900px) {
  .preview-layout { grid-template-columns: 1fr; }
  .project-context { min-height: auto; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .site-shell,
  .project-header-inner { width: min(calc(100% - 28px), var(--max-width)); }
  .project-header-inner { min-height: 64px; }
  .project-header { min-height: 64px; }
  .brand-lite { font-size: 0.75rem; }
  .brand-lite-mark { width: 29px; height: 29px; font-size: 0.78rem; }
  .project-main { padding: 54px 0 70px; }
  .project-hero { padding-bottom: 38px; }
  .project-hero h1 { font-size: clamp(3.1rem, 15vw, 5rem); }
  .preview-card { min-height: 0; padding: 14px; }
  .preview-caption { display: block; line-height: 1.5; }
  .preview-caption strong { display: block; margin-top: 4px; }
  .detail-grid,
  .detail-grid.two-up { grid-template-columns: 1fr; }
  .more-projects { display: block; }
  .more-projects a { margin-top: 16px; }
  /* The mockups hold real 12px+ text now, so they scroll inside their
     own box instead of crushing. The page itself never scrolls sideways. */
  .mockup-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mockup-scroll .mockup.is-wide { min-width: 520px; }
  .dashboard-body { grid-template-columns: 88px 1fr; }
  .dashboard-main { padding: 14px; }
  .metric-row { grid-template-columns: 1fr; }
  .chart-panel,
  .coaching-grid,
  .event-preview { grid-template-columns: 1fr; }
  .mockup { min-height: 0; }
  .dashboard-body { min-height: 520px; }
  .flow-board { min-height: 0; }
  .event-preview { min-height: 0; }
  .invite-card { min-height: 340px; }
  .newsletter-columns { grid-template-columns: 1fr; }
  .project-footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
