/* ==========================================================================
   northsmith client portal : shared stylesheet
   Editorial studio portal. Light and dark via prefers-color-scheme.
   ========================================================================== */

:root {
  --primary: #0E8C57;
  --primary-hover: #0B7347;
  --ink: #14171A;
  --muted: #5C6470;
  --hairline: rgba(20, 23, 26, .10);
  --hairline-strong: rgba(20, 23, 26, .16);
  --ground: #F3F5F3;
  --surface: #FFFFFF;
  --surface-2: #FAFBFA;
  --ochre: #E0A426;
  --amber: #E0952A;
  --red: #D8452E;
  --green: #0E8C57;

  --tint-primary: rgba(14, 140, 87, .10);
  --tint-amber: rgba(224, 149, 42, .14);
  --tint-red: rgba(216, 69, 46, .12);
  --tint-ochre: rgba(224, 164, 38, .14);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(20, 23, 26, .04), 0 8px 28px rgba(20, 23, 26, .06);
  --shadow-sm: 0 1px 2px rgba(20, 23, 26, .05);

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --sidebar-w: 264px;
  --gutter: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #22B77A;
    --primary-hover: #34C98B;
    --ink: #ECEFEC;
    --muted: #9AA3A9;
    --hairline: rgba(236, 239, 236, .12);
    --hairline-strong: rgba(236, 239, 236, .20);
    --ground: #101413;
    --surface: #171C1A;
    --surface-2: #1C2220;
    --ochre: #E9B84E;
    --amber: #E9AC55;
    --red: #EB6A55;
    --green: #22B77A;

    --tint-primary: rgba(34, 183, 122, .16);
    --tint-amber: rgba(233, 172, 85, .16);
    --tint-red: rgba(235, 106, 85, .16);
    --tint-ochre: rgba(233, 184, 78, .16);

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); box-shadow: var(--shadow);
  transition: top .16s ease;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* ==========================================================================
   App shell
   ========================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 26px 24px 22px;
}
.wordmark {
  font-family: var(--serif); font-weight: 700; font-size: 22px;
  letter-spacing: -.02em; color: var(--ink);
}
.wordmark .dot { color: var(--primary); }

.sidebar__nav { padding: 8px 14px; overflow-y: auto; flex: 1; }
.nav-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  padding: 14px 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; font-size: 15px;
  transition: background .14s ease, color .14s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item svg { width: 19px; height: 19px; flex: 0 0 19px; }
.nav-item[aria-current="page"] {
  background: var(--tint-primary); color: var(--primary);
  font-weight: 600;
}
.nav-item[aria-current="page"] svg { color: var(--primary); }

.sidebar__foot {
  border-top: 1px solid var(--hairline);
  padding: 16px 18px;
}
.client-card {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  background: var(--tint-primary); color: var(--primary);
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 500; font-size: 13px;
  letter-spacing: .02em;
}
.avatar--sm { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; border-radius: 8px; }
.client-card__name { font-weight: 600; font-size: 14px; }
.client-card__role { color: var(--muted); font-size: 12.5px; }
.signout {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 500;
  transition: border-color .14s ease, color .14s ease;
}
.signout:hover { color: var(--ink); border-color: var(--hairline-strong); }
.signout svg { width: 17px; height: 17px; }

/* ---------- app body ---------- */
.app-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-size: 14px; font-weight: 600; color: var(--ink); }
.topbar__sub { color: var(--muted); font-size: 13px; }
.topbar__spacer { flex: 1; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--surface);
  color: var(--ink); place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.topbar__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: var(--muted); padding: 6px 12px;
  border: 1px solid var(--hairline); border-radius: var(--radius-pill);
}
.topbar__badge .live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
}

.main {
  flex: 1;
  padding: var(--gutter);
  max-width: 1180px;
  width: 100%;
}

/* ---------- page head ---------- */
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }
.page-head .lede { color: var(--muted); font-size: 16px; max-width: 60ch; }
.hello-name { color: var(--primary); }

/* ==========================================================================
   Cards, panels, generic
   ========================================================================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; padding: 18px 20px 0;
}
.panel__head h2 { font-size: 18px; }
.panel__body { padding: 20px; }
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin: 36px 0 16px;
}
.section-title h2 { font-size: 20px; }
.link-more {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  color: var(--primary); display: inline-flex; align-items: center; gap: 6px;
}
.link-more svg { width: 14px; height: 14px; }
.link-more:hover { color: var(--primary-hover); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }

/* ---------- progress ---------- */
.progress {
  height: 7px; border-radius: var(--radius-pill);
  background: var(--hairline); overflow: hidden;
}
.progress > span {
  display: block; height: 100%; border-radius: inherit;
  background: var(--primary);
  width: 0;
  transition: width .9s cubic-bezier(.2, .7, .2, 1);
}
.progress--done > span { background: var(--muted); }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .04em; padding: 4px 10px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pill .pdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--green { color: var(--green); background: var(--tint-primary); }
.pill--amber { color: var(--amber); background: var(--tint-amber); }
.pill--red { color: var(--red); background: var(--tint-red); }
.pill--muted { color: var(--muted); background: var(--surface-2); }
.pill--ochre { color: var(--ochre); background: var(--tint-ochre); }

/* ==========================================================================
   Project cards
   ========================================================================== */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.project:hover { border-color: var(--hairline-strong); box-shadow: var(--shadow); }
.project__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project__phase { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.project__name { font-size: 20px; }
.project__note { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.project__meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 14px; border-top: 1px solid var(--hairline);
}
.project__owner { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.project__owner .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; border-radius: 8px; }
.project__due { text-align: right; }
.project__due .k { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.project__due .v { font-family: var(--mono); font-size: 13px; }
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 40px; text-align: right; }

/* ---------- milestone callout ---------- */
.milestone {
  background: var(--ink); color: var(--ground);
  border-radius: var(--radius); padding: 26px 28px;
  display: flex; gap: 22px; align-items: center;
  position: relative; overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .milestone { background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--hairline-strong); color: var(--ink); }
}
.milestone__mark {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px;
  background: var(--primary); color: #fff; display: grid; place-items: center;
}
.milestone__mark svg { width: 26px; height: 26px; }
.milestone__body { flex: 1; }
.milestone .eyebrow { color: var(--ochre); }
.milestone h3 { font-size: 21px; margin: 6px 0 6px; color: inherit; }
.milestone p { opacity: .85; font-size: 14.5px; max-width: 56ch; }
.milestone__due { text-align: right; }
.milestone__due .k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.milestone__due .v { font-family: var(--serif); font-size: 20px; font-weight: 700; }

/* ---------- quick links ---------- */
.quicklinks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quicklink {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border: 1px solid var(--hairline);
  border-radius: var(--radius); background: var(--surface);
  transition: border-color .14s ease, transform .14s ease;
}
.quicklink:hover { border-color: var(--primary); transform: translateY(-2px); }
.quicklink__ic { width: 40px; height: 40px; border-radius: 11px; background: var(--tint-primary); color: var(--primary); display: grid; place-items: center; flex: 0 0 40px; }
.quicklink__ic svg { width: 20px; height: 20px; }
.quicklink .t { font-weight: 600; font-size: 15px; }
.quicklink .s { color: var(--muted); font-size: 12.5px; }

/* ---------- activity feed ---------- */
.feed { display: flex; flex-direction: column; }
.feed li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.feed li:last-child { border-bottom: 0; }
.feed__ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.feed__ic svg { width: 17px; height: 17px; }
.feed__t { font-size: 14.5px; font-weight: 500; }
.feed__m { color: var(--muted); font-size: 13px; }
.feed__time { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; padding-top: 2px; }

/* ==========================================================================
   Projects board (projects page : wide rows, editorial)
   ========================================================================== */
.summary-strip {
  display: flex; flex-wrap: wrap; gap: 28px;
  padding: 20px 24px; margin-bottom: 30px;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.summary-strip .stat .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.summary-strip .stat .v { font-family: var(--serif); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-strip .divider { width: 1px; background: var(--hairline); align-self: stretch; }

.board { display: flex; flex-direction: column; }
.prow {
  display: grid; grid-template-columns: 1.5fr 1fr auto;
  gap: 28px; align-items: center;
  padding: 26px 4px; border-top: 1px solid var(--hairline);
}
.prow:first-child { border-top: 0; }
.prow__lead .phase { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; display: flex; gap: 10px; align-items: center; }
.prow__lead h3 { font-size: 23px; margin-bottom: 8px; }
.prow__lead p { color: var(--muted); font-size: 14.5px; max-width: 54ch; }
.prow__mid { display: flex; flex-direction: column; gap: 12px; }
.prow__mid .progress-row .pct { color: var(--ink); }
.prow__owner { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.prow__owner .role { color: var(--muted); font-size: 12.5px; }
.prow__end { text-align: right; min-width: 120px; }
.prow__end .k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }
.prow__end .v { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.prow__end .pill { margin-top: 12px; }

@media (max-width: 820px) {
  .prow { grid-template-columns: 1fr; gap: 16px; padding: 22px 0; }
  .prow__end { text-align: left; }
  .summary-strip { gap: 20px; }
  .summary-strip .divider { display: none; }
}

/* ==========================================================================
   Stat tiles
   ========================================================================== */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 8px; }
.tile {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.tile .eyebrow { display: block; margin-bottom: 12px; }
.tile__amount { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile__sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tile--due .tile__amount { color: var(--amber); }
.tile--overdue .tile__amount { color: var(--red); }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--hairline); background: var(--surface); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data th, table.data td { padding: 14px 18px; text-align: left; white-space: nowrap; }
table.data thead th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  border-bottom: 1px solid var(--hairline);
}
table.data tbody tr { border-bottom: 1px solid var(--hairline); }
table.data tbody tr:last-child { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.data td.strong { font-weight: 600; }
.cell-id { font-family: var(--mono); font-weight: 500; font-size: 13.5px; }
.amt { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13.5px; border: 1px solid transparent;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { background: transparent; border-color: var(--hairline-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .7; cursor: default; }
.btn.is-done { background: var(--tint-primary); color: var(--primary); border-color: transparent; cursor: default; }

/* ==========================================================================
   Files
   ========================================================================== */
.file-list { display: flex; flex-direction: column; gap: 0; }
.file-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.file-row:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.file-row:last-child { border-bottom: 0; border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.file-list { border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.file-row:hover { background: var(--surface-2); }
.file-glyph {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 11px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  background: var(--tint-primary); color: var(--primary);
  position: relative;
}
.file-glyph svg { width: 20px; height: 20px; position: absolute; top: 8px; opacity: .5; }
.file-glyph .ext { position: relative; z-index: 1; margin-top: 12px; }
.file-main { min-width: 0; flex: 1; }
.file-name { font-weight: 600; font-size: 15px; }
.file-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.file-meta .sep { opacity: .5; }
.file-size { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.file-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ==========================================================================
   Messages
   ========================================================================== */
.thread-shell { max-width: 820px; }
.thread-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--hairline);
  border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}
.thread-head .avatar { width: 42px; height: 42px; flex-basis: 42px; }
.thread-head__name { font-weight: 600; font-size: 15px; }
.thread-head__role { color: var(--muted); font-size: 13px; }
.thread {
  border: 1px solid var(--hairline); background: var(--surface-2);
  padding: 22px 20px; display: flex; flex-direction: column; gap: 16px;
}
.msg { display: flex; gap: 12px; max-width: 82%; }
.msg .avatar { flex: 0 0 30px; }
.bubble {
  padding: 12px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.5;
}
.msg__author { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); margin-bottom: 5px; }
.msg__time { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.msg--studio .bubble { background: var(--surface); border: 1px solid var(--hairline); border-top-left-radius: 4px; }
.msg--client { margin-left: auto; flex-direction: row-reverse; text-align: right; }
.msg--client .bubble { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.msg--client .msg__author, .msg--client .msg__time { color: var(--muted); }
.msg--client .avatar { background: var(--ink); color: var(--ground); }

.composer {
  border: 1px solid var(--hairline); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface); padding: 14px 16px;
  display: flex; gap: 10px; align-items: flex-end;
}
.composer textarea {
  flex: 1; resize: none; border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); padding: 11px 14px;
  font-family: var(--sans); font-size: 14.5px; color: var(--ink);
  background: var(--surface-2); min-height: 46px; max-height: 140px;
  line-height: 1.5;
}
.composer textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.composer textarea::placeholder { color: var(--muted); }

.toast-inline {
  font-size: 13px; color: var(--primary); font-weight: 500;
  padding: 8px 0 0; display: none;
}
.toast-inline.show { display: block; }

/* ==========================================================================
   Login
   ========================================================================== */
.login {
  min-height: 100vh; display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.login__brandpanel {
  background: var(--ink); color: var(--ground);
  padding: 56px 60px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .login__brandpanel { background: var(--surface); border-right: 1px solid var(--hairline); color: var(--ink); }
}
.login__brandpanel .wordmark { color: inherit; font-size: 26px; }
.login__brandpanel .wordmark .dot { color: var(--primary); }
.login__pitch { margin-top: auto; }
.login__pitch .eyebrow { color: var(--ochre); }
.login__pitch h1 { font-size: clamp(30px, 4vw, 46px); color: inherit; margin: 14px 0 16px; max-width: 16ch; }
.login__pitch p { opacity: .82; max-width: 44ch; font-size: 16px; }
.login__points { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }
.login__point { display: flex; gap: 11px; align-items: center; font-size: 14.5px; opacity: .9; }
.login__point svg { width: 18px; height: 18px; color: var(--primary); flex: 0 0 18px; }

.login__formpanel {
  display: grid; place-items: center; padding: 40px 24px;
  background: var(--ground);
}
.login__form { width: 100%; max-width: 380px; }
.login__form h2 { font-size: 26px; margin-bottom: 6px; }
.login__form .sub { color: var(--muted); margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 7px;
}
.field input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong); background: var(--surface);
  font-family: var(--sans); font-size: 15px; color: var(--ink);
}
.field input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.field input::placeholder { color: var(--muted); opacity: .7; }
.login__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; font-size: 13.5px; }
.login__row a { color: var(--primary); font-weight: 500; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.check input { accent-color: var(--primary); width: 15px; height: 15px; }
.btn--block { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }
.login__demo {
  margin-top: 22px; padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--tint-ochre); color: var(--ink);
  font-size: 13px; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start;
}
.login__demo svg { width: 17px; height: 17px; color: var(--ochre); flex: 0 0 17px; margin-top: 2px; }

/* ==========================================================================
   Footer demo note
   ========================================================================== */
.foot {
  margin-top: auto; padding: 22px var(--gutter);
  border-top: 1px solid var(--hairline);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.foot .wordmark { font-size: 15px; }
.foot__note { display: inline-flex; align-items: center; gap: 8px; }
.foot__note svg { width: 14px; height: 14px; opacity: .7; }
.foot__spacer { flex: 1; }

/* ==========================================================================
   Scrim + responsive
   ========================================================================== */
.scrim {
  display: none; position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 12, 11, .5);
}
.scrim.show { display: block; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .quicklinks { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login__brandpanel { display: none; }
}

@media (max-width: 820px) {
  :root { --gutter: 20px; }
  .nav-toggle { display: grid; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 50;
    height: 100vh; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .tiles { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .milestone { flex-direction: column; align-items: flex-start; gap: 16px; }
  .milestone__due { text-align: left; }
  .feed__time { margin-left: 0; }
}

@media (max-width: 380px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .main { padding: 16px; }
  .msg { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .progress > span { transition: none !important; }
}
