/* Studio Vest · Company OS — demo stylesheet.
   Its own product identity, deliberately distinct from danielstaflin.com:
   warm paper on a faint drafting grid, ink, hairlines, one spruce accent.
   Schibsted Grotesk for UI, Fragment Mono for dates/labels/annotation. */

:root {
  /* Airtable-clean surfaces in the studio's warm palette */
  --paper: #F5F3EC;
  --card: #FFFFFF;
  --rail-bg: #FAF8F2;
  --ink: #1D1B16;
  --ink-70: rgba(29, 27, 22, .72);
  --ink-55: rgba(29, 27, 22, .55);
  --ink-42: rgba(29, 27, 22, .42);
  --line: rgba(29, 27, 22, .11);
  --line-soft: rgba(29, 27, 22, .065);
  --spruce: #2F5540;
  --spruce-deep: #274736;
  --spruce-soft: rgba(47, 85, 64, .10);
  --spruce-line: rgba(47, 85, 64, .35);

  /* soft tag palette, one hue per project plus neutrals */
  --tag-green-bg: #DFE9E0; --tag-green-fg: #2C4F3B;
  --tag-blue-bg: #DEE7EE; --tag-blue-fg: #33526B;
  --tag-amber-bg: #F2E5C4; --tag-amber-fg: #75561A;
  --tag-clay-bg: #F4DFD2; --tag-clay-fg: #8A462B;
  --tag-plum-bg: #E9DFEC; --tag-plum-fg: #5F3D6B;
  --tag-gray-bg: #EDEBE3; --tag-gray-fg: #5E5B51;

  /* full-strength project hues for bars and dots */
  --hue-green: #3E6B50;
  --hue-blue: #48708F;
  --hue-amber: #B08428;
  --hue-clay: #A65B33;
  --hue-plum: #7C5389;

  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Fragment Mono', 'Courier New', monospace;

  /* barely-there elevation; enough to lift cards off the paper */
  --shadow: 0 1px 2px rgba(27, 25, 19, .04), 0 6px 20px rgba(27, 25, 19, .05);

  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--spruce);
  outline-offset: 2px;
  border-radius: 4px;
}

ul { list-style: none; }

.mono-chip {
  font-family: var(--mono);
  font-size: .82em;
  letter-spacing: .02em;
}

/* ————————————————— rail ————————————————— */

.rail {
  width: 216px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: var(--rail-bg);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--spruce);
  color: var(--paper);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-55);
}

/* the Ask entry point in the rail; the top bar owns search on desktop,
   so this only shows on narrow screens */
.ask-btn {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-55);
  text-align: left;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}

.ask-btn:hover { border-color: var(--ink-42); color: var(--ink); }

.ask-glass { width: 12px; height: 12px; flex-shrink: 0; }

.ask-short { display: none; }

.ask-kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  color: var(--ink-42);
  white-space: nowrap;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  overflow-y: auto;
  scrollbar-width: none;
}

.rail-nav::-webkit-scrollbar { display: none; }

.nav-group {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-42);
  padding: 16px 10px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-70);
  text-align: left;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

.nav-item:hover { background: var(--line-soft); color: var(--ink); }

.nav-item.is-active {
  background: var(--spruce-soft);
  color: var(--spruce-deep);
  font-weight: 600;
}

.nav-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--ink-42);
}

.nav-ico path, .nav-ico rect, .nav-ico circle, .nav-ico line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.is-active .nav-ico { color: var(--spruce-deep); }

.nav-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-55);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  transition: transform .3s var(--ease);
}

.nav-count.is-bumped { transform: scale(1.25); border-color: var(--spruce-line); color: var(--spruce-deep); }

.rail-foot {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid var(--line);
}

.foot-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-42);
}

.foot-path {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 11px;
}

.foot-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--spruce);
}

.foot-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-55);
}

/* ————————————————— main + views ————————————————— */

.main {
  flex: 1;
  min-width: 0;
  padding: 0 clamp(18px, 4vw, 46px) 46px;
}

/* ————————————————— top bar ————————————————— */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.crumbs {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  min-width: 0;
}

.crumb-root { color: var(--ink-42); white-space: nowrap; }

.crumb-sep { color: var(--ink-42); }

.crumb-here { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-55);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}

.top-search:hover { border-color: var(--ink-42); color: var(--ink); }

.top-search .ask-glass { width: 12px; height: 12px; }

.top-bell {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink-55);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}

.top-bell:hover { border-color: var(--ink-42); color: var(--ink); }

.top-bell svg { width: 14px; height: 14px; }

.top-bell svg path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--spruce);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  flex-shrink: 0;
}

.avatar--soft { background: var(--spruce-soft); color: var(--spruce-deep); }

.avatar--top { width: 32px; height: 32px; cursor: default; }

.view-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.view-head h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.view-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-55);
  max-width: 52ch;
}

.view-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.meta-week {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-55);
  white-space: nowrap;
}

.pill-demo {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-55);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* view entrance: a short rise, children staggered via --i */
@media (prefers-reduced-motion: no-preference) {
  .view.is-in .stagger > * {
    animation: rise .55s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 45ms);
  }

  @keyframes rise {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: none; }
  }
}

/* ————————————————— home ————————————————— */

.home-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 48px;
  align-items: start;
  padding: 10px 0 26px;
  border-bottom: 1px solid var(--line);
}

.home-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.home-greet {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin-top: 10px;
}

.home-sub {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-55);
  max-width: 52ch;
}

/* the Ask bar, promoted to a hero element */
.ask-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(460px, 100%);
  margin-top: 22px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-55);
  text-align: left;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.ask-hero:hover { border-color: var(--spruce); color: var(--ink); transform: translateY(-1px); }

.ask-hero .ask-glass { width: 14px; height: 14px; flex-shrink: 0; }

.ask-hero .ask-kbd { margin-left: auto; }

.home-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.home-week {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.home-week-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--spruce-deep);
}

.home-week-num {
  font-family: var(--mono);
  font-size: clamp(64px, 8vw, 92px);
  line-height: .9;
  color: rgba(27, 25, 19, .18);
}

.sun-card { width: 180px; }

.sun-card svg { display: block; width: 100%; height: auto; overflow: visible; }

.sun-arc {
  stroke: var(--ink-42);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.sun-horizon { stroke: var(--line); stroke-width: 1; }

.sun-dot {
  fill: var(--spruce);
  stroke: var(--paper);
  stroke-width: 2;
}

.sun-card.is-night .sun-dot { opacity: .3; }

.sun-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--ink-42);
}

.sun-mid { color: var(--ink-55); }

@media (prefers-reduced-motion: no-preference) {
  .sun-dot { transition: cx 1.2s var(--ease), cy 1.2s var(--ease); }

  .view.is-in .home-step {
    animation: rise .6s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.home-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px 18px 14px;
  min-width: 0;
}

.home-card .block-label { border-top: none; padding-top: 0; margin-top: 0; }

.home-card .quiet-list { flex: 1; }

/* card rows: a fixed when-column, the text takes the rest, chips drop
   below the text instead of squeezing it */
.home-card .quiet-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 2px 10px;
  font-size: 12.5px;
  line-height: 1.45;
  padding: 7px 0;
}

.home-card .quiet-list .q-when { min-width: 0; }

.home-card .quiet-list .src-chip,
.home-card .quiet-list .drw-hot {
  grid-column: 2;
  justify-self: start;
}

.home-card .quiet-list .drw-hot { margin-top: 4px; }

.home-more {
  align-self: flex-start;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  align-self: stretch;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--spruce-deep);
}

.home-more span { display: inline-block; transition: transform .3s var(--ease); }

.home-more:hover span { transform: translateX(4px); }

.home-ports { flex: 1; display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }

.port-row { padding: 7px 0; }

.port-name {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}

.port-row .phase-track { max-width: none; height: 3px; margin-top: 6px; }

/* ————————————————— this week ————————————————— */

.week-board { display: flex; flex-direction: column; }

.week-day {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.week-day:last-child { border-bottom: none; }

.week-day.is-today {
  background: var(--card);
  border-bottom-color: var(--line);
  border-radius: 10px;
  padding-inline: 14px;
  box-shadow: inset 2px 0 0 var(--spruce);
}

.day-cell { padding-top: 2px; }

.day-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.is-today .day-name { color: var(--spruce-deep); }

.day-date {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-42);
  margin-top: 2px;
}

.day-items { display: flex; flex-direction: column; gap: 7px; }

.day-empty {
  font-size: 12.5px;
  color: var(--ink-42);
  padding: 2px 0;
}

.week-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.wi-time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-55);
  min-width: 40px;
}

.wi-title { font-size: 13.5px; font-weight: 500; }

.week-item--milestone .wi-title::before {
  content: '◆';
  font-size: 8px;
  color: var(--spruce);
  margin-right: 7px;
  vertical-align: 1px;
}

/* Airtable-style soft tags: filled, sentence case, one hue per meaning */
.src-chip {
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: .01em;
  color: var(--tag-gray-fg);
  background: var(--tag-gray-bg);
  border-radius: 999px;
  padding: 2.5px 9px;
  white-space: nowrap;
}

.src-chip--new,
.tag--green { color: var(--tag-green-fg); background: var(--tag-green-bg); }

.tag--blue { color: var(--tag-blue-fg); background: var(--tag-blue-bg); }
.tag--amber { color: var(--tag-amber-fg); background: var(--tag-amber-bg); }
.tag--clay { color: var(--tag-clay-fg); background: var(--tag-clay-bg); }
.tag--plum { color: var(--tag-plum-fg); background: var(--tag-plum-bg); }
.tag--gray { color: var(--tag-gray-fg); background: var(--tag-gray-bg); }

/* ————————————————— projects ————————————————— */

.proj-list { display: flex; flex-direction: column; }

.proj-row {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(170px, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 10px;
  text-align: left;
  transition: background-color .25s var(--ease);
}

.proj-row:hover { background: var(--card); }

.proj-idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-42);
}

.proj-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

.proj-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--pc, var(--spruce));
  flex-shrink: 0;
}

.proj-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-55);
  margin-top: 1px;
}

.proj-phase { min-width: 0; }

.phase-track {
  display: flex;
  gap: 3px;
  height: 4px;
  max-width: 150px;
  --pc: var(--spruce);
}

.phase-track i {
  flex: 1;
  border-radius: 2px;
  background: var(--line);
}

.phase-track i.is-done { background: color-mix(in srgb, var(--pc) 38%, transparent); }

.phase-track i.is-now {
  background: linear-gradient(to right, var(--pc) calc(var(--pct) * 100%), var(--line) 0);
}

.phase-name {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin-top: 7px;
}

.proj-next {
  font-size: 12.5px;
  color: var(--ink-70);
}

.proj-next .mono-chip { color: var(--ink-42); margin-right: 6px; }

.proj-open {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--spruce-deep);
  white-space: nowrap;
}

.proj-open span { display: inline-block; transition: transform .3s var(--ease); }

.proj-row:hover .proj-open span { transform: translateX(4px); }

.proj-row--hold { opacity: .55; }

.hold-pill {
  font-size: 10.5px;
  font-weight: 550;
  border-radius: 999px;
  padding: 2.5px 9px;
  color: var(--tag-gray-fg);
  background: var(--tag-gray-bg);
  white-space: nowrap;
}

/* ————————————————— one project ————————————————— */

.back-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-55);
  margin-bottom: 14px;
  transition: color .25s var(--ease);
}

.back-link:hover { color: var(--ink); }

.view-head--project { border-bottom: none; padding-bottom: 6px; margin-bottom: 14px; }

.proj-meta { margin-top: 5px; font-size: 13px; color: var(--ink-55); }

.phase-now {
  font-size: 11px;
  font-weight: 600;
  color: var(--tag-green-fg);
  background: var(--tag-green-bg);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.gantt {
  display: grid;
  grid-template-columns: .8fr .9fr 1.1fr 1.6fr;
  gap: 4px;
  margin-bottom: 26px;
}

.gantt-seg {
  position: relative;
  padding-top: 12px;
  min-width: 0;
}

.gantt-seg::before {
  content: '';
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  margin-bottom: 9px;
}

.gantt-seg.is-done::before { background: var(--spruce-line); }

.gantt-seg.is-now::before {
  background: linear-gradient(to right, var(--spruce) calc(var(--pct) * 100%), var(--line) 0);
}

.gantt-name {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-dates {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--ink-42);
  margin-top: 2px;
  white-space: nowrap;
}

.gantt-today {
  position: absolute;
  top: 0;
  left: calc(var(--pct) * 100%);
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--spruce-deep);
}

.gantt-today::after {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  width: 1px;
  height: 8px;
  background: var(--spruce);
}

.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
}

.block-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-42);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 18px;
}

.proj-col > .block-label:first-child { margin-top: 0; }

.quiet-list { margin-top: 8px; margin-bottom: 6px; }

.quiet-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}

.quiet-list li span:nth-child(2) { flex: 1; min-width: 0; }

.quiet-list .q-when {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-42);
  min-width: 58px;
}

.quiet-list .q-dim { color: var(--ink-55); }

.proj-foot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-55);
  line-height: 1.5;
}

.proj-foot .foot-dot { position: relative; top: -1px; }

/* phase and gantt bars plot in from the left when a view opens */
@media (prefers-reduced-motion: no-preference) {
  .phase-track i, .gantt-seg::before { transform-origin: left center; }

  .view.is-in .phase-track i,
  .view.is-in .gantt-seg::before {
    animation: growx .9s var(--ease) both;
  }

  .view.is-in .phase-track i:nth-child(2), .view.is-in .gantt-seg:nth-child(2)::before { animation-delay: .08s; }
  .view.is-in .phase-track i:nth-child(3), .view.is-in .gantt-seg:nth-child(3)::before { animation-delay: .16s; }
  .view.is-in .phase-track i:nth-child(4), .view.is-in .gantt-seg:nth-child(4)::before { animation-delay: .24s; }

  @keyframes growx { from { transform: scaleX(0); } }
}

/* ————————————————— the plan sheet ————————————————— */

.plan-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 14px 16px 0;
  margin-bottom: 26px;
}

.plan-svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
}

.plan-svg line, .plan-svg rect, .plan-svg circle, .plan-svg path { fill: none; stroke: currentColor; }

.plan-grid { opacity: .38; }
.plan-grid line { stroke-width: .6; stroke-dasharray: 3 4; }
.plan-grid circle { stroke-width: .8; stroke-dasharray: none; }
.plan-wall { stroke-width: 1.8; }
.plan-inner { stroke-width: 1; }
.plan-open { stroke-width: 1; opacity: .8; }
.plan-note { opacity: .55; }
.plan-note line, .plan-note circle { stroke-width: .8; }

.plan-svg text {
  fill: var(--ink-55);
  stroke: none;
  font-family: var(--mono);
  font-size: 9px;
  text-anchor: middle;
}

.plan-mark { color: var(--spruce); }
.plan-mark rect { stroke-width: 1.2; stroke-dasharray: 5 4 !important; }
.plan-mark line { stroke-width: .8; }
.plan-mark-label { fill: var(--spruce-deep) !important; text-anchor: start !important; }

/* the pen-plot: every stroke draws itself when the view opens; the dashed
   pieces (grid, mock-up zone) keep their dash pattern and fade in instead */
@media (prefers-reduced-motion: no-preference) {
  .plan-svg .pl { stroke-dasharray: 1; stroke-dashoffset: 1; }

  .plan-grid line.pl { stroke-dasharray: 3 4; stroke-dashoffset: 0; opacity: 0; }
  .plan-mark rect.pl { stroke-dashoffset: 0; opacity: 0; }

  .plan-svg .pt { opacity: 0; }

  .view.is-in .plan-svg .pl {
    animation: plot 1s var(--ease) both;
    animation-delay: calc(var(--d, 0) * 1ms);
  }

  .view.is-in .plan-grid line.pl,
  .view.is-in .plan-mark rect.pl {
    animation: plot-fade .8s var(--ease) both;
    animation-delay: calc(var(--d, 0) * 1ms);
  }

  .view.is-in .plan-svg .pt {
    animation: plot-fade .6s var(--ease) both;
    animation-delay: calc(var(--d, 0) * 1ms + 250ms);
  }

  @keyframes plot { to { stroke-dashoffset: 0; } }
  @keyframes plot-fade { to { opacity: 1; } }
}

.plan-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 9px 2px 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.plan-meta { color: var(--ink-42); }

/* ————————————————— drawings ————————————————— */

.drw-belt {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.drw-chip {
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  color: var(--ink-55);
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}

.drw-chip:hover { border-color: var(--ink-42); color: var(--ink); }

.drw-chip.is-active {
  background: var(--spruce-soft);
  border-color: var(--spruce-line);
  color: var(--spruce-deep);
}

.drw-table {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.drw-head, .drw-row {
  display: grid;
  grid-template-columns: 96px 1fr 44px 92px minmax(120px, 170px);
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
}

.drw-head {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-42);
  border-bottom: 1px solid var(--line);
  background: rgba(29, 27, 22, .02);
}

.drw-row { border-bottom: 1px solid var(--line-soft); }

.drw-row:last-child { border-bottom: none; }

.drw-row:hover { background: var(--paper); }

.drw-no {
  font-family: var(--mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.drw-hot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hue-clay);
  flex-shrink: 0;
}

.drw-name { font-size: 13.5px; font-weight: 500; }

.drw-rev {
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 0;
}

.drw-row--hot .drw-rev { border-color: var(--spruce-line); color: var(--spruce-deep); }

.drw-when { font-family: var(--mono); font-size: 10px; color: var(--ink-55); }

.drw-status {
  font-size: 10.5px;
  font-weight: 550;
  color: var(--tag-gray-fg);
  background: var(--tag-gray-bg);
  justify-self: start;
  border-radius: 999px;
  padding: 2.5px 9px;
  white-space: nowrap;
}

.drw-status--hot { color: var(--tag-clay-fg); background: var(--tag-clay-bg); }

/* ————————————————— people ————————————————— */

.people-list { display: flex; flex-direction: column; }

.person-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr minmax(80px, auto);
  gap: 16px;
  align-items: center;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 8px;
}

.person-row:hover { background: var(--card); }

.person-name { font-size: 14px; font-weight: 600; }

.person-role { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-55); margin-top: 1px; }

.person-days { display: flex; gap: 4px; }

.day-block {
  flex: 1;
  min-width: 0;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  background: var(--line-soft);
  color: var(--ink-55);
}

.day-block--HH { background: var(--tag-green-bg); color: var(--tag-green-fg); }
.day-block--FJ { background: var(--tag-blue-bg); color: var(--tag-blue-fg); }
.day-block--RO { background: var(--tag-clay-bg); color: var(--tag-clay-fg); }
.day-block--TE { background: var(--tag-amber-bg); color: var(--tag-amber-fg); }
.day-block--ST { background: transparent; border: 1px solid var(--line); }

.day-block--free {
  background: transparent;
  border: 1px dashed var(--spruce-line);
  color: var(--spruce-deep);
}

@media (prefers-reduced-motion: no-preference) {
  .view.is-in .day-block {
    animation: rise .5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 45ms + var(--j, 0) * 35ms);
  }
}

.person-free {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--spruce-deep);
  text-align: right;
  white-space: nowrap;
}

.person-free--none { color: var(--ink-42); }

.people-legend {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--ink-42);
}

/* ————————————————— ask the office ————————————————— */

.ask-layer { position: fixed; inset: 0; z-index: 40; }

.ask-layer[hidden] { display: none; }

.ask-scrim {
  position: absolute;
  inset: 0;
  background: rgba(27, 25, 19, .45);
}

.ask-panel {
  position: relative;
  width: min(580px, calc(100% - 32px));
  margin: min(14vh, 130px) auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(27, 25, 19, .06), 0 18px 50px rgba(27, 25, 19, .14);
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .ask-layer:not([hidden]) .ask-panel { animation: ask-in .4s var(--ease) both; }
  .ask-layer:not([hidden]) .ask-scrim { animation: plot-fade .4s var(--ease) both; }

  @keyframes ask-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

.ask-inputrow {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
}

.ask-inputrow .ask-glass { width: 14px; height: 14px; color: var(--ink-42); }

.ask-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}

.ask-input:focus { outline: none; }

.ask-input::placeholder { color: var(--ink-42); }

.ask-esc {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--ink-42);
}

.ask-body {
  border-top: 1px solid var(--line);
  padding: 12px 12px 14px;
}

.ask-hint {
  font-size: 11.5px;
  color: var(--ink-42);
  padding: 2px 6px 8px;
}

.ask-q {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 10px;
  border-radius: 8px;
  transition: background-color .2s var(--ease);
}

.ask-q:hover { background: var(--spruce-soft); }

.ask-q .ask-arrow { margin-left: auto; color: var(--ink-42); transition: transform .25s var(--ease); }

.ask-q:hover .ask-arrow { transform: translateX(4px); color: var(--spruce-deep); }

.ask-progress { display: flex; align-items: center; gap: 12px; padding: 12px 8px 10px; }

.ask-answer { padding: 4px 8px 2px; }

@media (prefers-reduced-motion: no-preference) {
  .ask-answer .review-step {
    animation: rise .5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
}

.ask-sources {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}

.ask-sources-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-42);
}

.ask-again {
  margin-top: 13px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-55);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ask-again:hover { color: var(--ink); }

.ask-honest {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-70);
  padding: 8px 8px 12px;
  max-width: 52ch;
}

/* ————————————————— tasks ————————————————— */

.task-groups { display: flex; flex-direction: column; gap: 4px; }

.task-group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 4px 6px;
}

.task-group-head h2 { font-size: 13.5px; font-weight: 700; }

.task-group-head .g-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-42);
}

.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 8px;
}

.task-row.is-new { background: var(--spruce-soft); }

@media (prefers-reduced-motion: no-preference) {
  .task-row.is-new { animation: settle 3.2s var(--ease) both; }

  @keyframes settle {
    from { background-color: rgba(47, 85, 64, .22); }
    to { background-color: rgba(47, 85, 64, .10); }
  }
}

.ck {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.ck input {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.ck-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink-42);
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}

.ck-box::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform .25s var(--ease);
}

.ck input:checked + .ck-box { background: var(--spruce); border-color: var(--spruce); }

.ck input:checked + .ck-box::after { transform: rotate(-45deg) translateY(-1px) scale(1); }

.ck input:focus-visible + .ck-box { outline: 2px solid var(--spruce); outline-offset: 2px; }

.task-title { font-size: 13.5px; font-weight: 500; }

.task-row.is-done .task-title { text-decoration: line-through; color: var(--ink-42); }

.task-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.task-due {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-55);
  min-width: 34px;
  text-align: right;
}

/* ————————————————— meetings ————————————————— */

.meet-list { display: flex; flex-direction: column; }

.meet-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line-soft);
}

.meet-when {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--ink-55);
  min-width: 92px;
}

.meet-title { font-size: 14px; font-weight: 600; }

.meet-proj { font-size: 12.5px; color: var(--ink-55); }

.meet-status {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 550;
  color: var(--tag-gray-fg);
  background: var(--tag-gray-bg);
  border-radius: 999px;
  padding: 2.5px 9px;
  white-space: nowrap;
}

.meet-status--ready { color: var(--tag-green-fg); background: var(--tag-green-bg); }

/* the recorded-meeting card that hosts the moment */
.meet-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin: 6px 0 16px;
}

.meet-card-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.meet-card-head .meet-title { font-size: 15px; }

.rec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 550;
  border-radius: 999px;
  padding: 2.5px 9px;
  color: var(--tag-clay-fg);
  background: var(--tag-clay-bg);
}

.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A34433;
}

@media (prefers-reduced-motion: no-preference) {
  .rec-dot { animation: blink 2.4s ease-in-out infinite; }
  @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
}

.meet-card-body { margin-top: 14px; }

.moment-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--spruce);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 9px;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}

.btn:hover { background: var(--spruce-deep); }

.btn:active { transform: scale(.98); }

.btn[disabled] { opacity: .45; cursor: default; }

.btn--small { font-size: 12px; padding: 7px 13px; border-radius: 8px; }

.btn--quiet {
  background: none;
  color: var(--ink-55);
  border: 1px solid var(--line);
}

.btn--quiet:hover { background: var(--line-soft); color: var(--ink); }

.moment-hint {
  font-size: 12px;
  color: var(--ink-55);
}

/* reading progress */
.moment-progress { display: flex; align-items: center; gap: 12px; }

.prog-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-70);
  white-space: nowrap;
}

.prog-track {
  flex: 1;
  max-width: 320px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.prog-bar {
  height: 100%;
  width: 100%;
  background: var(--spruce);
  transform: scaleX(0);
  transform-origin: left center;
}

.moment-progress.is-running .prog-bar {
  transition: transform 2.3s cubic-bezier(.3, .1, .3, 1);
  transform: scaleX(1);
}

/* drafted review */
.moment-review { display: flex; flex-direction: column; gap: 4px; }

.review-cols {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4px 36px;
}

.note-lines { margin-top: 8px; }

.note-lines li {
  position: relative;
  padding: 5px 0 5px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-70);
}

.note-lines li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--spruce);
  font-size: 11px;
}

.draft-rows { margin-top: 8px; }

.draft-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}

.draft-row:last-child { border-bottom: none; }

.draft-title { font-size: 13px; font-weight: 500; }

.draft-row .task-tags { gap: 8px; }

.who-chip {
  font-size: 10.5px;
  font-weight: 550;
  border-radius: 999px;
  padding: 2.5px 9px;
  color: var(--tag-blue-fg);
  background: var(--tag-blue-bg);
  white-space: nowrap;
}

.draft-row.is-off .draft-title { color: var(--ink-42); text-decoration: line-through; }

@media (prefers-reduced-motion: no-preference) {
  .moment-review.is-in .review-step {
    animation: rise .5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.discard-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-55);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.discard-link:hover { color: var(--ink); }

.review-note { font-size: 11.5px; color: var(--ink-42); }

/* filed state */
.moment-done {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-70);
}

.moment-done strong { color: var(--spruce-deep); font-weight: 600; }

.replay-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-55);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.replay-link:hover { color: var(--ink); }

/* ————————————————— team ————————————————— */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
}

.team-card .avatar { width: 34px; height: 34px; font-size: 11.5px; margin-bottom: 8px; }

.team-name { font-size: 14px; font-weight: 650; }

.team-role { font-size: 12px; color: var(--ink-55); }

.team-focus {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-70);
}

.team-focus b { font-weight: 600; color: var(--spruce-deep); }

.team-mail {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .03em;
  color: var(--ink-42);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ————————————————— goals ————————————————— */

.goal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.goal-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
}

.goal-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.goal-q {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-42);
  white-space: nowrap;
}

.goal-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }

.goal-bar {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: var(--line-soft);
  margin: 14px 0 7px;
  overflow: hidden;
}

.goal-bar i {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--gc, var(--spruce));
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

@media (prefers-reduced-motion: no-preference) {
  .view.is-in .goal-bar i { animation: growx 1s var(--ease) both .2s; }
}

.goal-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  color: var(--ink-55);
}

.goal-krs { margin-top: 12px; }

.goal-krs li {
  position: relative;
  padding: 4px 0 4px 16px;
  font-size: 12.5px;
  color: var(--ink-70);
}

.goal-krs li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-42);
}

.goal-krs li.is-done { color: var(--ink-42); }

.goal-krs li.is-done::before { background: var(--spruce); border-color: var(--spruce); }

/* ————————————————— clients ————————————————— */

.cli-table {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cli-head, .cli-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 112px minmax(130px, 1fr) minmax(150px, 1.1fr);
  gap: 14px;
  align-items: center;
  padding: 11px 18px;
}

.cli-head {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-42);
  border-bottom: 1px solid var(--line);
  background: rgba(27, 25, 19, .02);
}

.cli-row { border-bottom: 1px solid var(--line-soft); transition: background-color .2s var(--ease); }

.cli-row:last-child { border-bottom: none; }

.cli-row:hover { background: var(--paper); }

.cli-name { font-size: 13.5px; font-weight: 600; }

.cli-proj { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-55); margin-top: 1px; }

.cli-stage {
  justify-self: start;
  font-size: 10.5px;
  font-weight: 550;
  border-radius: 999px;
  padding: 2.5px 9px;
  color: var(--tag-gray-fg);
  background: var(--tag-gray-bg);
  white-space: nowrap;
}

.cli-stage--active { color: var(--tag-green-fg); background: var(--tag-green-bg); }

.cli-stage--warm { color: var(--tag-amber-fg); background: var(--tag-amber-bg); }

.cli-stage--dim { color: var(--ink-42); background: var(--line-soft); }

.cli-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  min-width: 0;
}

.cli-contact .avatar { width: 24px; height: 24px; font-size: 8.5px; }

.cli-contact span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cli-next { font-size: 12px; color: var(--ink-70); }

.cli-next .mono-chip { color: var(--ink-42); margin-right: 6px; }

/* ————————————————— toast ————————————————— */

.toast[hidden] { display: none; }

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 10px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
  z-index: 10;
}

.toast .toast-src {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .6;
}

@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in .45s var(--ease) both; }

  @keyframes toast-in {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
  }
}

/* ————————————————— narrow (phone, or a narrow modal) ————————————————— */

@media (max-width: 740px) {
  body { flex-direction: column; }

  .rail {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .rail-brand .brand-sub { display: none; }

  .ask-btn { display: flex; margin-top: 0; padding: 6px 9px; flex-shrink: 0; }

  .nav-group { display: none; }

  .topbar { display: none; }

  .ask-long, .ask-kbd { display: none; }

  .ask-short { display: inline; }

  .drw-head { display: none; }

  .drw-row { grid-template-columns: 1fr auto; row-gap: 4px; }

  .drw-when { display: none; }

  .person-row { grid-template-columns: 1fr auto; }

  .person-days { grid-column: 1 / -1; }

  .goal-list { grid-template-columns: 1fr; }

  .cli-head { display: none; }

  .cli-row { grid-template-columns: 1fr auto; row-gap: 6px; }

  .cli-contact { display: none; }

  .rail-nav {
    flex-direction: row;
    margin-top: 0;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar { display: none; }

  .nav-item { padding: 6px 9px; font-size: 12.5px; white-space: nowrap; }

  .nav-idx { display: none; }

  .rail-foot { display: none; }

  .main { padding: 20px 16px 40px; }

  .home-hero { grid-template-columns: 1fr; }

  .home-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    order: -1;
  }

  .home-week-num { font-size: 44px; }

  .sun-card { width: 140px; }

  .home-grid { grid-template-columns: 1fr; }

  .week-day { grid-template-columns: 64px 1fr; gap: 12px; }

  .proj-row { grid-template-columns: 1fr auto; grid-auto-flow: dense; }

  .proj-idx, .proj-next { display: none; }

  .proj-phase { grid-column: 1 / -1; }

  .review-cols { grid-template-columns: 1fr; }

  .proj-grid { grid-template-columns: 1fr; }

  .gantt { grid-template-columns: repeat(4, 1fr); }

  .gantt-dates { display: none; }

  .toast { white-space: normal; width: calc(100% - 32px); justify-content: center; }
}

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