/* BuildSure — design tokens
   Blueprint ink for structure, hi-vis survey yellow for action, concrete for quiet surfaces. */
:root {
  --ink: #16263d;
  --ink-2: #22385a;
  --hivis: #f2b705;
  --hivis-dark: #d9a300;
  --concrete: #e8e9e6;
  --paper: #ffffff;
  --steel: #5a6672;
  --line: #d3d6d9;
  --text: #1c2430;
  --ok: #2f7d4f;
  --warn: #9a6200;
  --bad: #b3261e;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.25rem, 4.5vw, 3.5rem);

  --wrap: 72rem;
  --radius-sm: 3px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6; color: var(--text); background: var(--paper); }
img { max-width: 100%; }
a { color: var(--ink-2); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 85%; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; }
code { font-size: .9em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: 40rem; }
.lede { font-size: var(--step-1); color: var(--steel); max-width: 38rem; }
.muted { color: var(--steel); }
.muted-light { color: #b7c1cf; }
.text-bad { color: var(--bad); font-weight: 600; }
.prewrap { white-space: pre-wrap; }
.h2 { font-size: var(--step-3); font-weight: 800; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--hivis); color: var(--ink); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 2px solid transparent; font: 600 .95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; }
.btn--primary { background: var(--hivis); color: var(--ink); }
.btn--primary:hover { background: var(--hivis-dark); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn--block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 800 1.35rem/1 var(--font-display); font-stretch: 80%; color: var(--ink); text-decoration: none; }
.brand--light { color: var(--paper); }
.brand__mark { width: 1.1rem; height: 1.1rem; background: var(--hivis); clip-path: polygon(0 100%, 50% 0, 100% 100%, 70% 100%, 50% 55%, 30% 100%); }

/* Site header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: 1rem; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a { text-decoration: none; color: var(--text); font-weight: 500; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a.btn { color: var(--ink); text-decoration: none; }
.site-nav__actions { display: flex; align-items: center; gap: 1rem; margin-left: .75rem; }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: .35rem .7rem; font: 600 .9rem var(--font-body); color: var(--ink); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; inset: 4rem 0 auto 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.5rem; border-bottom: 1px solid var(--line); gap: .9rem; }
  .site-nav.is-open { display: flex; }
  .site-nav__actions { margin: .5rem 0 0; flex-direction: column; align-items: stretch; }
}

.flash { margin: 1rem 0; padding: .75rem 1rem; border-left: 4px solid var(--hivis); background: #fff8e0; }

/* Hero */
.hero { padding: 4rem 0 4.5rem; }
.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3.5rem; align-items: center; }
.hero__copy h1 { max-width: 14ch; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 2rem; margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.hero__facts div { display: flex; flex-direction: column-reverse; }
.hero__facts dt { color: var(--steel); font-size: .9rem; }
.hero__facts dd { margin: 0; font: 800 1.75rem/1.1 var(--font-display); font-stretch: 85%; color: var(--ink); }

/* Signature: blueprint drawing sheet */
.sheet {
  margin: 0; color: #e6edf7; border-radius: var(--radius);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
  padding: 1.25rem; border: 1px solid #0e1a2b;
  box-shadow: 0 30px 60px -30px rgba(22,38,61,.55);
}
.sheet__title { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; margin-bottom: .5rem; border-bottom: 2px solid rgba(255,255,255,.35); font: 700 1.05rem var(--font-display); font-stretch: 85%; color: #fff; }
.sheet__project { font-weight: 500; color: #b7c1cf; }
.sheet__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sheet__table th { text-align: left; font-weight: 600; color: #b7c1cf; padding: .5rem .4rem; border-bottom: 1px solid rgba(255,255,255,.2); }
.sheet__table td { padding: .6rem .4rem; border-bottom: 1px dashed rgba(255,255,255,.15); vertical-align: middle; }
.sheet__table td:first-child { font-weight: 700; color: #fff; white-space: nowrap; }
.sheet .pill { background: rgba(255,255,255,.1); color: #fff; }
.sheet .pill--ok::before { background: #6fd39a; }
.sheet .pill--warn::before { background: var(--hivis); }
.sheet .pill--bad::before { background: #ff8a80; }
.sheet__copilot { margin-top: 1rem; padding: 1rem; background: var(--hivis); color: var(--ink); border-radius: var(--radius-sm); }
.sheet__copilot strong { font-family: var(--font-display); font-stretch: 85%; }
.sheet__copilot p { margin: .25rem 0 .6rem; font-size: .95rem; }
.sheet__cta { display: inline-block; font-weight: 700; border-bottom: 2px solid var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .sheet__copilot { animation: callout .6s ease-out .8s both; }
  @keyframes callout { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* Sections */
.section { padding: 4.5rem 0; }
.section-tight { padding: 1rem 1.25rem 4rem; }
.section--concrete { background: var(--concrete); }
.section--ink { background: var(--ink); color: #e6edf7; }
.section--ink .h2 { color: #fff; }
.band { padding: 4rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; }
.page-head { padding: 4rem 1.25rem 2rem; }

.roles { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.roles li { padding: 1.25rem 1.25rem 1.25rem 0; border-bottom: 1px solid var(--line); }
.roles li:nth-child(3n+2), .roles li:nth-child(3n) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.roles p { color: var(--steel); margin: 0; }

.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 2.5rem; }
.modules--wide { grid-template-columns: repeat(3, 1fr); }
.modules article { border-top: 3px solid var(--ink); padding-top: 1rem; }
.modules p { color: var(--steel); margin: 0; }

.timeline { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; counter-reset: none; }
.timeline li { position: relative; padding-top: 3rem; }
.timeline li::before { content: ""; position: absolute; top: 1.1rem; left: 2.4rem; right: -1.5rem; height: 2px; background: var(--ink); }
.timeline li:last-child::before { display: none; }
.timeline__n { position: absolute; top: 0; left: 0; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; background: var(--ink); color: var(--hivis); font: 800 1rem var(--font-display); border-radius: 50%; }
.timeline p { color: var(--steel); font-size: .95rem; margin: 0; }

.features { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.feature { padding: 1.5rem; background: var(--concrete); border-radius: var(--radius); }
.feature:first-child { background: var(--ink); color: #e6edf7; }
.feature:first-child h3 { color: #fff; }
.prompts { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.prompts li { padding: .6rem .8rem; background: rgba(255,255,255,.08); border-left: 3px solid var(--hivis); font-size: .95rem; }

.faq { max-width: 46rem; margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid rgba(255,255,255,.2); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: #fff; }
.faq p { margin: .75rem 0 0; color: #c9d2de; }

.cta__inner { border-left: 6px solid var(--hivis); padding-left: 2rem; }

.solutions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.solutions article { border-top: 3px solid var(--ink); padding-top: 1rem; }
.solutions h2 { font-size: var(--step-2); }
.solutions ul { padding-left: 1.1rem; color: var(--steel); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.plan--featured { border: 2px solid var(--ink); }
.plan h2 { font-size: var(--step-2); }
.plan__price { font: 800 1.75rem var(--font-display); font-stretch: 85%; color: var(--ink); }
.plan__price span { display: block; font: 400 .9rem var(--font-body); color: var(--steel); }
.plan ul { padding-left: 1.1rem; color: var(--steel); flex: 1; }

/* Footer */
.site-footer { background: var(--ink); color: #e6edf7; padding: 3.5rem 0 1.5rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.site-footer a:not(.brand) { display: block; color: #c9d2de; text-decoration: none; padding: .2rem 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-h { font-size: 1rem; color: #fff; margin-bottom: .5rem; }
.site-footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .9rem; color: #9fb0c4; }

/* Forms */
.form { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.25rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid #aeb5bd; border-radius: var(--radius-sm); font: inherit; background: var(--paper); color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.field-error, .form-errors { color: var(--bad); font-size: .9rem; }
.form-errors ul { margin: 0; padding-left: 1rem; }
.hint { color: var(--steel); }
.check { display: flex; gap: .5rem; align-items: center; }
.auth { max-width: 26rem; padding-top: 4rem; padding-bottom: 5rem; }
.auth h1 { font-size: var(--step-3); }

/* Tables & pills */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-weight: 600; color: var(--steel); padding: .6rem .75rem; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table--compact td { padding: .5rem .5rem; }
.row-actions { white-space: nowrap; }
.row-actions a + a { margin-left: .75rem; }

.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #eef0f2; color: var(--text); white-space: nowrap; }
.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--steel); }
.pill--ok::before { background: var(--ok); }
.pill--warn::before { background: var(--hivis-dark); }
.pill--bad::before { background: var(--bad); }

/* Workspace shell */
.app { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; background: #f4f5f4; }
.app-side { background: var(--ink); color: #e6edf7; padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 2rem; position: sticky; top: 0; height: 100vh; }
.app-nav { display: grid; gap: .25rem; }
.app-nav a { color: #c9d2de; text-decoration: none; padding: .5rem .6rem; border-radius: var(--radius-sm); font-weight: 500; }
.app-nav a:hover { background: var(--ink-2); color: #fff; }
.app-side__user { margin-top: auto; display: grid; gap: .35rem; font-size: .9rem; }
.app-side__email { color: #9fb0c4; overflow-wrap: anywhere; }
.avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--hivis); color: var(--ink); display: grid; place-items: center; font-weight: 700; }
.app-main { padding: 2rem 2.25rem 4rem; max-width: 80rem; width: 100%; }
.app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.app-head h1 { font-size: var(--step-3); margin: 0; }
.crumb { margin: 0 0 .25rem; font-size: .9rem; color: var(--steel); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .2rem; }
.kpi__label { font-size: .85rem; color: var(--steel); }
.kpi__value { font: 800 1.75rem/1.1 var(--font-display); font-stretch: 85%; color: var(--ink); }
.kpi__value small { font-size: .55em; font-weight: 600; color: var(--steel); }
.kpi__value--sm { font-size: 1.25rem; }
.kpi__note { font-size: .85rem; color: var(--steel); }
.kpi__note--bad { color: var(--bad); font-weight: 600; }

.app-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.25rem; align-items: start; }
.stack { display: grid; gap: 1.25rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.panel__title { font-size: 1.1rem; }
.panel__title--spaced { margin-top: 1.75rem; }
.empty { color: var(--steel); padding: 1rem; background: #f4f5f4; border-radius: var(--radius-sm); }

.list { list-style: none; padding: 0; margin: 0 0 1rem; }
.list li { display: grid; gap: .1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list--compact li { padding: .5rem 0; font-size: .92rem; }

.project-list { list-style: none; margin: 0; padding: 0; }
.project-list li { display: grid; grid-template-columns: 1.3fr 1fr .9fr 1fr auto auto; align-items: center; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.project-list__name { font-weight: 700; text-decoration: none; color: var(--ink); }
.project-list__pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { display: block; height: .45rem; background: #e3e6e9; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink); }

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .5rem .8rem; text-decoration: none; color: var(--steel); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current=page] { color: var(--ink); border-bottom-color: var(--hivis); font-weight: 600; }

.approvals { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.approval { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.approval--late { border-left-color: var(--bad); }
.approval__title { font-size: 1.05rem; margin: 0 0 .2rem; }
.approval__body p { margin: 0; font-size: .92rem; }
.approval__decide { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.approval__decide input { width: 14rem; }

.revisions { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--ink); }
.revisions li { display: grid; gap: .15rem; padding: .75rem 0 .75rem 1.25rem; position: relative; }
.revisions li::before { content: ""; position: absolute; left: -.45rem; top: 1.1rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--hivis); border: 2px solid var(--ink); }

.inline-form { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.inline-form input { flex: 1 1 10rem; }
.inline-form select { width: auto; }

.copilot { border-top: 4px solid var(--hivis); }
.copilot__form { display: grid; gap: .6rem; }
.copilot__answer:not(:empty) { margin-top: 1rem; padding: .9rem 1rem; background: #f4f5f4; border-left: 3px solid var(--ink); white-space: pre-wrap; font-size: .95rem; }
.copilot__answer.is-loading { color: var(--steel); }

/* Responsive */
@media (max-width: 960px) {
  .hero__grid, .split, .app-grid { grid-template-columns: 1fr; }
  .features, .plans, .modules--wide { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline li::before { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .app-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1rem; }
  .app-nav { display: flex; flex-wrap: wrap; }
  .app-side__user { margin: 0 0 0 auto; }
  .project-list li { grid-template-columns: 1fr auto; }
  .project-list li .muted, .project-list__phase, .project-list .bar { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .roles, .modules, .features, .plans, .modules--wide, .solutions, .form-grid, .kpis { grid-template-columns: 1fr; }
  .roles li, .roles li:nth-child(3n+2), .roles li:nth-child(3n) { padding-left: 0; border-left: 0; }
  .app-main { padding: 1.25rem 1rem 3rem; }
  .approval { flex-direction: column; align-items: stretch; }
  .approval__decide input { width: 100%; }
  .hero { padding-top: 2.5rem; }
}

/* ---------- Workspace top bar ---------- */
.app-body { display: flex; flex-direction: column; min-width: 0; }
.app-side__signout { margin-top: auto; font-size: .9rem; color: #c9d2de; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.25rem; padding: .7rem 2.25rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar__crumbs { display: flex; align-items: center; gap: .5rem; font-size: .92rem; white-space: nowrap; min-width: 0; }
.topbar__crumbs a { color: var(--steel); text-decoration: none; }
.topbar__crumbs a:hover { color: var(--ink); text-decoration: underline; }
.topbar__crumbs [aria-current] { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.topbar__crumbs span[aria-hidden] { color: var(--line); }
.topbar__search { position: relative; flex: 1; max-width: 30rem; margin-left: auto; display: flex; align-items: center; }
.topbar__search svg { position: absolute; left: .7rem; color: var(--steel); pointer-events: none; }
.topbar__search input[type=search] { padding-left: 2.1rem; padding-right: 2rem; background: #f4f5f4; border-color: transparent; }
.topbar__search input[type=search]:focus { background: var(--paper); border-color: var(--ink); }
.topbar__kbd { position: absolute; right: .6rem; font: 600 .75rem var(--font-body); color: var(--steel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 .35rem; background: var(--paper); }
.topbar__right { display: flex; align-items: center; gap: 1rem; }
.bell { position: relative; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; color: var(--ink); }
.bell:hover { background: #f4f5f4; }
.bell__count { position: absolute; top: .1rem; right: .05rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--paper); }
.userchip { display: flex; align-items: center; gap: .6rem; }
.userchip__text { display: grid; line-height: 1.25; }
.userchip__name { font-weight: 600; font-size: .92rem; color: var(--ink); }
.userchip__org { font-size: .8rem; color: var(--steel); }

/* ---------- Architect dashboard ---------- */
.kpi--link { text-decoration: none; color: inherit; }
.kpi--link:hover { border-color: var(--ink); }
.small { font-size: .85rem; }
.arch-projects { list-style: none; margin: 0; padding: 0; }
.arch-projects li { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.arch-projects__main { display: grid; gap: .3rem; }
.arch-projects__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; }
.arch-projects__facts div { display: flex; flex-direction: column-reverse; }
.arch-projects__facts dt { font-size: .75rem; color: var(--steel); }
.arch-projects__facts dd { margin: 0; font: 700 1.1rem var(--font-display); font-stretch: 85%; color: var(--ink); font-variant-numeric: tabular-nums; }
.arch-projects__side { display: grid; gap: .25rem; justify-items: start; }

.copilot-insights { border-top: 4px solid var(--hivis); }
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.insight { padding: .75rem .9rem; border-radius: var(--radius-sm); background: #f4f5f4; border-left: 3px solid var(--steel); font-size: .92rem; }
.insight p { margin: 0 0 .35rem; }
.insight a { font-weight: 600; }
.insight--bad { border-left-color: var(--bad); background: #fbeeed; }
.insight--warn { border-left-color: var(--hivis-dark); background: #fff8e0; }
.insight--ok { border-left-color: var(--ok); background: #edf6f0; }
.insight--ok p { margin: 0; }

.search-results { display: grid; gap: 1.25rem; max-width: 52rem; }

.notifications { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); max-width: 48rem; }
.notifications li + li { border-top: 1px solid var(--line); }
.notifications a { display: grid; gap: .15rem; padding: .85rem 1.1rem .85rem 1.6rem; text-decoration: none; color: var(--text); position: relative; }
.notifications a:hover { background: #f4f5f4; }
.notifications .is-unread a::before { content: ""; position: absolute; left: .65rem; top: 1.25rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--hivis-dark); }
.notifications .is-unread .notifications__msg { font-weight: 600; }

.milestone--done strong { text-decoration: line-through; color: var(--steel); }
.mono-ish { font-family: var(--font-body); line-height: 1.55; }

@media (max-width: 960px) {
  .topbar { flex-wrap: wrap; padding: .7rem 1rem; }
  .topbar__search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .topbar__right { margin-left: auto; }
  .arch-projects li { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .userchip__text { display: none; }
  .topbar__kbd { display: none; }
}

/* ---------- Procurement and supplier workspace ---------- */
.app-nav__group { margin: 1rem 0 .15rem; padding: 0 .6rem; font-size: .78rem; color: #8193a8; }
.badge-verified { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: var(--radius-sm); background: #edf6f0; color: var(--ok); font-weight: 700; font-size: .85rem; }
.badge-verified::before { content: ""; width: .6rem; height: .35rem; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-1px); }
.badge-verified--sm { font-size: .72rem; padding: .05rem .4rem; }
.text-warn { color: var(--warn); font-weight: 600; }
.row-muted td { color: var(--steel); }
.inline { display: inline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem 1rem; margin-top: .35rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: .35rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.25rem; }
.filters select, .filters input:not([type=checkbox]) { width: auto; min-width: 12rem; }
.kpis--3 { grid-template-columns: repeat(3, 1fr); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 0 0 .75rem; }
.facts div { display: flex; flex-direction: column-reverse; }
.facts dt { font-size: .8rem; color: var(--steel); }
.facts dd { margin: 0; font: 700 1.2rem var(--font-display); font-stretch: 85%; color: var(--ink); }
.panel--alert { border-left: 4px solid var(--hivis-dark); margin-bottom: 1.25rem; }

.opps { list-style: none; margin: 0; padding: 0; }
.opps > li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.opps > li > div:first-child { display: grid; gap: .15rem; min-width: 0; }
.opps__side { display: grid; gap: .4rem; justify-items: end; flex-shrink: 0; }
.opps--page > li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: .75rem; }
.lines { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .92rem; }

.quote-totals { display: grid; gap: .35rem; justify-content: end; margin: 0; text-align: right; }
.quote-totals div { display: flex; gap: 1.5rem; justify-content: flex-end; }
.quote-totals dt { color: var(--steel); }
.quote-totals dd { margin: 0; min-width: 8rem; font-variant-numeric: tabular-nums; }
.quote-totals__total dt, .quote-totals__total dd { font: 800 1.25rem var(--font-display); font-stretch: 85%; color: var(--ink); }

/* Comparative statement */
.cs-table th, .cs-table td { white-space: nowrap; }
.cs-table tfoot th { text-align: left; font-weight: 600; color: var(--steel); border-bottom: 1px solid var(--line); padding: .6rem .75rem; }
.cs-table tfoot td { border-bottom: 1px solid var(--line); }
.cs-supplier { vertical-align: bottom; }
.cs-supplier a { display: block; color: var(--ink); }
.cs-l1 { display: inline-block; margin-top: .2rem; padding: .05rem .4rem; background: var(--hivis); color: var(--ink); border-radius: var(--radius-sm); font-size: .72rem; font-weight: 700; }
.cs-best { background: #edf6f0; font-weight: 600; }
.cs-out { opacity: .55; }
.cs-awarded { box-shadow: inset 0 -3px 0 var(--ok); }
.cs-total td, .cs-total th { font-weight: 700; color: var(--ink) !important; border-top: 2px solid var(--ink); }

.supplier-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.supplier-cards li { display: grid; gap: .3rem; align-content: start; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--radius); padding: 1rem 1.1rem; }
.supplier-cards__head { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }

@media (max-width: 960px) {
  .kpis--3, .facts { grid-template-columns: 1fr 1fr; }
  .opps > li { flex-direction: column; align-items: stretch; }
  .opps__side { justify-items: start; }
}

/* ---------- Project tabs ---------- */
.ptabs { display: flex; gap: .15rem; overflow-x: auto; margin: -.5rem 0 1.25rem; padding-bottom: 1px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.ptabs a { flex-shrink: 0; padding: .55rem .8rem; text-decoration: none; color: var(--steel); font-size: .92rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ptabs a:hover { color: var(--ink); }
.ptabs a[aria-current=page] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ---------- Site reports ---------- */
.dpr-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.dpr-list li { display: grid; grid-template-columns: 8rem 7rem 1fr auto auto; gap: 1rem; align-items: center; padding: .8rem 1.1rem; }
.dpr-list li + li { border-top: 1px solid var(--line); }
.dpr-list__workers { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.dpr-list__text { font-size: .92rem; color: var(--text); }
.labour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem .75rem; }
.labour-grid__row { display: grid; grid-template-columns: 1fr 5rem; gap: .4rem; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; }
.photo-grid li { display: grid; gap: .25rem; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--concrete); display: block; }

/* ---------- Gantt ---------- */
.gantt-panel { overflow-x: auto; }
.gantt { min-width: 52rem; }
.gantt__row { display: grid; grid-template-columns: 19rem 1fr; border-bottom: 1px solid var(--line); }
.gantt__head { border-bottom: 2px solid var(--ink); }
.gantt__label { display: grid; gap: .1rem; padding: .6rem .75rem .6rem 0; }
.gantt__head .gantt__label { font-weight: 600; color: var(--steel); }
.gantt__track { position: relative; min-height: 3rem; background-image: linear-gradient(90deg, rgba(22,38,61,.05) 1px, transparent 1px); background-size: 8.333% 100%; }
.gantt__month { position: absolute; top: .6rem; font-size: .78rem; color: var(--steel); padding-left: .3rem; border-left: 1px solid var(--line); white-space: nowrap; }
.gantt__today { position: absolute; top: 0; bottom: -200rem; width: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.gantt { position: relative; overflow: hidden; }
.gantt__bar { position: absolute; top: 50%; transform: translateY(-50%); height: 1.1rem; border-radius: 3px; background: #c9d1db; overflow: hidden; }
.gantt__fill { display: block; height: 100%; background: var(--ink); }
.gantt__bar.is-behind { background: #f3c9c5; } .gantt__bar.is-behind .gantt__fill { background: var(--bad); }
.gantt__bar.is-done .gantt__fill { background: var(--ok); }
.gantt__progress { display: flex; align-items: center; gap: .5rem; margin-top: .2rem; }
.gantt__progress input[type=range] { width: 7rem; padding: 0; accent-color: var(--ink); }
.gantt__progress output { font-size: .82rem; min-width: 2.5rem; font-variant-numeric: tabular-nums; }
.gantt__legend { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.gantt__key { display: inline-block; width: 1.2rem; height: .6rem; border-radius: 2px; background: var(--ink); }
.gantt__key.is-behind { background: var(--bad); } .gantt__key.is-done { background: var(--ok); }
.danger-zone { margin-top: 1rem; }

/* ---------- Cost ---------- */
.costbars { display: grid; gap: .6rem; }
.costbars__row { display: grid; grid-template-columns: 11rem 1fr 7rem; gap: .75rem; align-items: center; font-size: .92rem; }
.costbars__bar { height: .9rem; border-radius: 2px; min-width: 2px; }
.costbars__bar--b { background: #c9d1db; } .costbars__bar--q { background: var(--ink-2); } .costbars__bar--c { background: var(--hivis-dark); } .costbars__bar--p { background: var(--ok); }
.import summary { cursor: pointer; font-weight: 600; }
.input-num { width: 7rem !important; text-align: right; }

/* ---------- Quality and snags ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg__opt { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .6rem; font-size: .85rem; cursor: pointer; }
.seg__opt + .seg__opt { border-left: 1px solid var(--line); }
.seg__opt input { accent-color: var(--ink); }
.seg__opt--fail:has(input:checked) { background: #fbeeed; color: var(--bad); font-weight: 600; }
.seg__opt--pass:has(input:checked) { background: #edf6f0; color: var(--ok); font-weight: 600; }
.snags { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.snags li { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.snags img { width: 6rem; height: 4.5rem; object-fit: cover; border-radius: var(--radius-sm); }
.snags li > div:nth-child(2) p, .snags li > div:first-child p { margin: .2rem 0; }
.snags__actions { display: grid; gap: .4rem; justify-items: end; }

/* ---------- Dashboards ---------- */
.weather__now { font: 800 1.6rem var(--font-display); font-stretch: 85%; color: var(--ink); margin: 0 0 .5rem; }
.weather__days { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.weather__days li { display: grid; grid-template-columns: 3rem 5rem 5rem 1fr; gap: .5rem; align-items: center; font-size: .9rem; }
.home-hero { display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--hivis); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.home-hero__progress { display: grid; gap: .3rem; }
.home-hero__pct { font: 800 2.75rem/1 var(--font-display); font-stretch: 80%; color: var(--ink); }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.market-h { margin: 2rem 0 1rem; }

/* ---------- Passport print ---------- */
.passport--public { padding-top: 2.5rem; padding-bottom: 3rem; }
@media print {
  .app-side, .topbar, .site-header, .site-footer, .ptabs, .no-print, .flash { display: none !important; }
  .app { display: block; background: #fff; }
  .app-main { padding: 0; max-width: none; }
  .panel, .kpi { break-inside: avoid; border-color: #bbb; }
  body { font-size: 11pt; }
}

@media (max-width: 960px) {
  .dpr-list li { grid-template-columns: 1fr auto; }
  .dpr-list__text { grid-column: 1 / -1; }
  .home-hero { grid-template-columns: 1fr; gap: 1rem; }
  .costbars__row { grid-template-columns: 7rem 1fr 5.5rem; }
  .snags li { grid-template-columns: 1fr; }
  .snags__actions { justify-items: start; }
}
