/* The Linden Project — client dashboard
   Warm editorial residential aesthetic.
   ------------------------------------------------------------------ */

@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

:root {
  /* Warm paper palette --------------------------------- */
  --bg:           oklch(0.965 0.010 80);
  --bg-deep:      oklch(0.945 0.012 78);
  --surface:      oklch(0.992 0.005 80);
  --surface-2:    oklch(0.978 0.007 78);
  --border:       oklch(0.890 0.014 75);
  --border-soft:  oklch(0.925 0.012 75);
  --ink:          oklch(0.20 0.012 60);

  /* Brand-neutral aliases used by older modules (schedule.css etc.) */
  --paper: var(--surface);
  --warn:  var(--warning);
  --ok:    var(--success);
  --ink-2:        oklch(0.34 0.012 60);
  --ink-3:        oklch(0.50 0.010 60);
  --ink-4:        oklch(0.66 0.008 60);

  /* Accents -------------------------------------------- */
  --accent:       oklch(0.56 0.13 48);    /* terracotta / clay */
  --accent-deep:  oklch(0.44 0.13 48);
  --accent-soft:  oklch(0.93 0.04 55);
  --sage:         oklch(0.55 0.06 155);
  --sage-soft:    oklch(0.93 0.03 155);
  --ink-tint:     oklch(0.30 0.012 60);
  --warning:      oklch(0.62 0.13 70);
  --warning-soft: oklch(0.94 0.05 78);
  --danger:       oklch(0.52 0.16 28);
  --danger-soft:  oklch(0.93 0.05 30);
  --success:      oklch(0.50 0.10 150);
  --success-soft: oklch(0.93 0.04 150);

  /* Type ------------------------------------------------*/
  --serif: "Newsreader", "Source Serif Pro", Georgia, serif;
  --sans:  "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:  "Geist Mono", ui-monospace, Menlo, monospace;

  /* Spacing scale -------------------------------------- */
  --pad: 24px;
  --gap: 20px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-card: 0 1px 0 oklch(0.86 0.015 75 / 0.6), 0 8px 24px -16px oklch(0.20 0.012 60 / 0.10);
}

/* Density modes ------------------------------------------ */
:root[data-density="cozy"]    { --pad: 16px; --gap: 14px; }
:root[data-density="comfy"]   { --pad: 24px; --gap: 20px; }
:root[data-density="spacious"]{ --pad: 32px; --gap: 28px; }

/* Dark mode --------------------------------------------- */
:root[data-mode="dark"] {
  --bg:          oklch(0.18 0.010 60);
  --bg-deep:     oklch(0.14 0.010 60);
  --surface:     oklch(0.22 0.010 60);
  --surface-2:   oklch(0.26 0.010 60);
  --border:      oklch(0.32 0.012 60);
  --border-soft: oklch(0.28 0.012 60);
  --ink:         oklch(0.95 0.008 80);
  --ink-2:       oklch(0.84 0.010 78);
  --ink-3:       oklch(0.68 0.012 75);
  --ink-4:       oklch(0.52 0.010 70);
  --accent-soft: oklch(0.30 0.07 50);
  --sage-soft:   oklch(0.30 0.04 155);
  --warning-soft: oklch(0.32 0.08 78);
  --danger-soft: oklch(0.30 0.08 30);
  --success-soft: oklch(0.30 0.05 150);
  --shadow-card: 0 1px 0 oklch(0.10 0.010 60 / 0.6), 0 8px 24px -16px black;
}

/* Palette themes ---------------------------------------- */
:root[data-palette="sage"]    { --accent: oklch(0.50 0.08 158); --accent-deep: oklch(0.40 0.08 158); --accent-soft: oklch(0.93 0.03 158); }
:root[data-palette="indigo"]  { --accent: oklch(0.45 0.13 260); --accent-deep: oklch(0.36 0.13 260); --accent-soft: oklch(0.93 0.04 260); }
:root[data-palette="ochre"]   { --accent: oklch(0.62 0.13 75);  --accent-deep: oklch(0.50 0.13 75);  --accent-soft: oklch(0.94 0.05 75); }

/* Base -------------------------------------------------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); color: var(--ink); }

/* Type primitives --------------------------------------- */
.display { font-family: var(--serif); font-weight: 500; letter-spacing: -0.012em; }
.serif   { font-family: var(--serif); }
.mono    { font-family: var(--mono); font-feature-settings: "tnum"; }
.tnum    { font-variant-numeric: tabular-nums; }
.upper   { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; font-weight: 500; color: var(--ink-3); }

/* App shell --------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 100vh;
}

/* Sidebar ----------------------------------------------- */
.sidebar {
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 2px 4px;
}
.brand-logo {
  width: 100%;
  max-width: 90px;
  height: auto;
  display: block;
}
:root[data-mode="dark"] .brand-logo {
  filter: invert(1) brightness(1.05);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-name { font-family: var(--serif); font-size: 14px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub  { font-size: 10px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }

.proj-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.proj-switcher:hover { background: var(--surface-2); }
.proj-switcher .label-block { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.proj-switcher .label-block .upper { font-size: 10px; }
.proj-switcher .name { font-family: var(--serif); font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-section + .nav-section { margin-top: 18px; }
.nav-section-label { font-size: 10px; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.1em; padding: 0 12px; margin-bottom: 6px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-item .icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 500;
  font-family: var(--mono);
  font-feature-settings: "tnum";
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius);
}
.contact-row:hover { background: var(--surface); }
.avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 11px;
  flex-shrink: 0;
}
.avatar.sage { background: var(--sage-soft); color: var(--sage); }
.avatar.ink  { background: var(--ink); color: var(--bg); }
.avatar.ochre { background: var(--warning-soft); color: var(--warning); }
.contact-row .name { font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.contact-row .role { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }

/* Topbar ------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: oklch(from var(--bg) l c h / 0.85);
  backdrop-filter: blur(8px);
}
.topbar .breadcrumb {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .breadcrumb .sep { color: var(--ink-4); }
.topbar .breadcrumb .current { color: var(--ink); }
.topbar .breadcrumb .crumb-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.12s;
}
.topbar .breadcrumb .crumb-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.topbar .breadcrumb .crumb-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar .search {
  flex: 1;
  max-width: 360px;
  margin-left: 12px;
  position: relative;
}
.topbar .search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius);
  outline: none;
  font-size: 13px;
}
.topbar .search input:focus { border-color: var(--accent); }
.topbar .search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-3); }
.topbar .actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  color: var(--ink-2);
  position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }

/* Main column ------------------------------------------- */
.main { display: flex; flex-direction: column; }
.canvas { padding: 28px 32px 80px; max-width: 1280px; width: 100%; }

/* Hero --------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--gap);
}
.hero-image {
  min-height: 280px;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}
.hero-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--border-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.chip.active   { color: var(--accent-deep); background: var(--accent-soft); border-color: transparent; }
.chip.pending  { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.chip.approved { color: var(--success); background: var(--success-soft); border-color: transparent; }
.chip.complete { color: var(--success); background: var(--success-soft); border-color: transparent; }
.chip.declined { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.chip.upcoming { color: var(--ink-3); background: var(--surface-2); }
.chip.notsent  { color: var(--ink-3); background: var(--surface-2); }

.hero h1 { font-family: var(--serif); font-weight: 500; font-size: 38px; line-height: 1.05; letter-spacing: -0.015em; margin: 0; }
.hero .addr { font-size: 13px; color: var(--ink-3); }

.progress-row { display: flex; align-items: center; gap: 14px; }
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-bar .fill {
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-num { font-family: var(--mono); font-size: 13px; color: var(--ink); }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--border-soft); padding-top: 16px; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; padding-right: 12px; }
.hero-stat + .hero-stat { border-left: 1px solid var(--border-soft); padding-left: 16px; }
.hero-stat .label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-stat .val { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.hero-stat .val.mono { font-family: var(--mono); font-size: 15px; }

/* Cards --------------------------------------------------*/
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.col-span-2 { grid-column: span 2; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--pad);
  display: flex;
  flex-direction: column;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-title { font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.card-sub   { font-size: 12px; color: var(--ink-3); }
.card-link  {
  font-size: 12px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}
.card-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Section heading ---------------------------------------*/
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 32px 0 16px;
}
.section-head h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0; letter-spacing: -0.012em; }
.section-head .sub { color: var(--ink-3); font-size: 13px; }

/* Big number block ---------------------------------------*/
.bignum { display: flex; flex-direction: column; gap: 6px; }
.bignum .label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.bignum .val   { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -0.01em; }
.bignum .val .currency { font-size: 16px; color: var(--ink-3); margin-right: 2px; vertical-align: 4px; }
.bignum .delta { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }

/* Stacked bar -------------------------------------------*/
.stack {
  height: 10px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}
.stack > * { height: 100%; }
.stack .spent      { background: var(--ink); }
.stack .committed  { background: var(--ink-3); }
.stack .remaining  { background: transparent; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.legend-item .sw { width: 8px; height: 8px; border-radius: 2px; }

/* Selection card ----------------------------------------*/
.selection-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s;
}
.selection-tile:hover {
  border-color: var(--ink-4);
  transform: translateY(-1px);
}
.tile-image {
  height: 140px;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}
.tile-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tile-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-name { font-family: var(--serif); font-size: 16px; line-height: 1.2; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.tile-foot .mono { color: var(--ink-2); }

/* Activity feed -----------------------------------------*/
.activity { display: flex; flex-direction: column; }
.activity-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: start;
}
.activity-item:last-child { border-bottom: 0; }
.activity-dot {
  width: 24px; height: 24px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11px;
}
.activity-dot.selection { background: var(--accent-soft); color: var(--accent-deep); }
.activity-dot.photo     { background: var(--sage-soft); color: var(--sage); }
.activity-dot.invoice   { background: var(--warning-soft); color: var(--warning); }
.activity-dot.message   { background: var(--bg-deep); color: var(--ink-2); }
.activity-dot.milestone { background: var(--ink); color: var(--bg); }
.activity-dot.changeorder { background: var(--accent-soft); color: var(--accent-deep); }
.activity-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity-text { font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.activity-text .actor { font-weight: 500; }
.activity-meta { font-size: 11.5px; color: var(--ink-3); }
.activity-time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; font-family: var(--mono); }

/* Filter bar --------------------------------------------*/
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filter-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-pill:hover { color: var(--ink); }
.filter-pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-pill .count { font-family: var(--mono); margin-left: 4px; opacity: 0.7; font-size: 11px; }

/* Table-like list (budget, docs) ------------------------*/
.row-list { display: flex; flex-direction: column; border-top: 1px solid var(--border-soft); }
.row {
  display: grid;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
  font-size: 13.5px;
}
.row:hover { background: var(--surface-2); }
.row-budget { grid-template-columns: 32px 1.6fr 100px 100px 1fr 32px; }
.row-doc    { grid-template-columns: 28px 1.6fr 100px 80px 130px 32px; }
.row-head   { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.row-head:hover { background: transparent; }
.row .code { font-family: var(--mono); color: var(--ink-3); font-size: 12px; }
.row .name { color: var(--ink); }
.row .meta-line { font-size: 11.5px; color: var(--ink-3); }
.row .num  { font-family: var(--mono); text-align: right; }
.row .bar-cell { display: flex; align-items: center; gap: 10px; }
.row .bar-cell .bar { flex: 1; height: 4px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; }
.row .bar-cell .bar .fill { height: 100%; background: var(--ink); border-radius: 999px; }
.row .bar-cell .bar .fill.over { background: var(--danger); }
.row .chev { color: var(--ink-4); }

/* Buttons ------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-danger-ghost { color: var(--danger); border-color: var(--border); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Image placeholder pattern -----------------------------*/
.imgph {
  position: relative;
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.88 0.012 75) 0 12px,
      oklch(0.91 0.012 75) 12px 24px
    );
  color: var(--ink-3);
  display: grid;
  place-items: center;
  overflow: hidden;
}
:root[data-mode="dark"] .imgph {
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.24 0.012 60) 0 12px,
      oklch(0.27 0.012 60) 12px 24px
    );
}
.imgph .imgph-cap {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  background: oklch(from var(--surface) l c h / 0.9);
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-soft);
}
.imgph.has-swatch { background: var(--swatch); }
.imgph.has-swatch.dim::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 40%, oklch(0 0 0 / 0.20)); }

/* Detail view (selection detail) ------------------------*/
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
}
.detail-main { display: flex; flex-direction: column; gap: var(--gap); }
.detail-side { display: flex; flex-direction: column; gap: var(--gap); }

.choice {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: all 0.15s;
  align-items: center;
}
.choice.picked { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.choice.recommended { border-color: var(--accent); }
.choice-swatch {
  height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}
.choice-name { font-family: var(--serif); font-size: 17px; line-height: 1.2; }
.choice-vendor { font-size: 12px; color: var(--ink-3); }
.choice-meta { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); margin-top: 6px; flex-wrap: wrap; }
.choice-price { font-family: var(--mono); font-size: 16px; text-align: right; }
.choice-price .over { color: var(--danger); font-size: 11px; display: block; }
.choice-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 130px; }

/* Schedule strip ----------------------------------------*/
.timeline {
  position: relative;
  padding: 30px 0 20px;
}
.timeline-rail {
  position: absolute;
  top: 50px;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.timeline-track { display: flex; gap: 0; }
.milestone-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 20px;
  position: relative;
}
.milestone-node .dot {
  width: 12px; height: 12px;
  border-radius: 999px;
  border: 2px solid var(--surface);
  background: var(--border);
  position: relative;
  z-index: 2;
  margin: 14px 0 14px;
}
.milestone-node .dot.complete { background: var(--ink); }
.milestone-node .dot.active   { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.milestone-node .label { font-size: 12.5px; color: var(--ink); font-weight: 500; }
.milestone-node .dates { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

/* Modal --------------------------------------------------*/
.modal-bd {
  position: fixed;
  inset: 0;
  background: oklch(0.15 0.010 60 / 0.5);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 40px;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.18s ease;
}
.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(1000px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px -30px oklch(0 0 0 / 0.4);
  animation: rise 0.22s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border-soft);
  gap: 16px;
}
.modal-body { padding: 24px 28px; }
.modal-close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  color: var(--ink-3);
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }

/* Toast --------------------------------------------------*/
.toast-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  gap: 8px;
  flex-direction: column;
  align-items: center;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: 0 10px 30px -10px oklch(0 0 0 / 0.4);
  animation: rise 0.2s ease;
  display: flex; align-items: center; gap: 10px;
}

/* Photo lightbox -----------------------------------------*/
.lightbox { padding: 0; }
.lightbox .img-frame {
  height: 70vh;
  background: var(--bg-deep);
}
.lightbox .cap-row { padding: 16px 24px; display: flex; justify-content: space-between; }

/* Photo strip -------------------------------------------*/
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-tile {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.photo-tile:hover .imgph { transform: scale(1.02); }
.photo-tile .imgph { transition: transform 0.3s; }

/* Misc --------------------------------------------------*/
.dot-sep { color: var(--ink-4); margin: 0 6px; }
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink-3);
}

/* Responsive -------------------------------------------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}

/* Editmode/Tweaks panel left intact (its own CSS) */
