/* Bayit Board — Holiday Launch Planner
 *
 * Visual language follows the "soft" prototype: a warm canvas with a drifting
 * ambient mesh, double-bezel surfaces (a translucent frame around a solid
 * core), pill controls, and small uppercase mono labels against tightly
 * tracked display type.
 *
 * Colours are the Bayit brand marks sampled from the logo — navy wordmark,
 * tan house, grey tagline. The prototype's proportions are deliberately not
 * copied wholesale: it is a landing page, this is a dense planning tool, so
 * section rhythm and type sizes are tightened throughout.
 */

:root {
  color-scheme: light dark;

  /* ---- brand, from the logo ---- */
  --navy: #1d3660;
  --navy-deep: #14264a;
  --navy-lift: #2f5183;
  --tan: #c89b6e;
  --tan-lift: #dcb68f;
  --grey: #8e9196;

  /* ---- surfaces ---- */
  --canvas: #f3f1ec;
  --canvas-2: #e9e6df;
  --surface: #fcfbf8;
  --surface-2: #f4f1ea;
  --frame: rgba(255, 255, 255, 0.55);
  --innerlight: rgba(255, 255, 255, 0.9);
  --hairline: rgba(29, 54, 96, 0.1);
  --hairline-strong: rgba(29, 54, 96, 0.18);
  --shadow-soft: 0 24px 48px -30px rgba(20, 28, 45, 0.34);
  --shadow-lift: 0 30px 64px -28px rgba(20, 28, 45, 0.4);

  /* ---- text ---- */
  --ink: #16233c;
  --ink-soft: #5a6478;
  --ink-faint: #939aa8;

  /* ---- semantic ---- */
  --brand: var(--navy);
  --brand-soft: #e3e8f1;
  --accent: #a1713f;
  --accent-soft: #f4e7d6;
  --positive: #3f6f52;
  --positive-soft: #dfeae1;
  --caution: #97671a;
  --caution-soft: #f7e9cf;
  --critical: #a53f36;
  --critical-soft: #f7ddd9;

  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  --shell-radius: 22px;
  --core-radius: 14px;
  --pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #7ea3d8;
    --navy-deep: #0e1626;
    --navy-lift: #9dbbe8;
    --tan: #d8b083;
    --tan-lift: #e6c8a5;
    --grey: #8b93a3;

    --canvas: #111723;
    --canvas-2: #0c111b;
    --surface: #1a2131;
    --surface-2: #212939;
    --frame: rgba(255, 255, 255, 0.05);
    --innerlight: rgba(255, 255, 255, 0.08);
    --hairline: rgba(255, 255, 255, 0.1);
    --hairline-strong: rgba(255, 255, 255, 0.18);
    --shadow-soft: 0 24px 48px -30px rgba(0, 0, 0, 0.8);
    --shadow-lift: 0 30px 64px -28px rgba(0, 0, 0, 0.9);

    --ink: #e7eaf1;
    --ink-soft: #a8b1c2;
    --ink-faint: #79839a;

    --brand: var(--navy);
    --brand-soft: #22314b;
    --accent: #d8b083;
    --accent-soft: #33281a;
    --positive: #7fbb95;
    --positive-soft: #1d3126;
    --caution: #d8ab5a;
    --caution-soft: #332a16;
    --critical: #e08a83;
    --critical-soft: #38211f;
  }
}

* {
  box-sizing: border-box;
}

/* Author display rules outrank the UA sheet, so hidden needs to shout. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.028em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- ambient mesh ---------------- */

.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh::before,
.mesh::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  will-change: transform;
}

.mesh::before {
  width: 680px;
  height: 680px;
  background: radial-gradient(circle at 30% 30%, var(--navy-lift), transparent 62%);
  top: -220px;
  left: -180px;
  animation: drift-a 30s var(--ease) infinite alternate;
}

.mesh::after {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle at 60% 60%, var(--tan), transparent 62%);
  top: 80px;
  right: -160px;
  animation: drift-b 38s var(--ease) infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(80px, 60px, 0); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-60px, 40px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .mesh::before,
  .mesh::after {
    animation: none;
  }
}

.masthead,
.layout,
.flash {
  position: relative;
  z-index: 1;
}

/* Note on the double-bezel surfaces below: the prototype nests a solid "core"
   inside a translucent frame. The same effect is produced here with stacked
   inset shadows — a frame band, then a hairline ring marking the core edge —
   so no wrapper element is needed. Content needs >=10px padding to clear it. */

/* ---------------- masthead ---------------- */

.masthead {
  position: sticky;
  top: 14px;
  margin: 14px 16px 0;
  padding: 12px 14px 12px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: saturate(170%) blur(22px);
  -webkit-backdrop-filter: saturate(170%) blur(22px);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    0 0 0 1px var(--hairline),
    0 14px 38px -22px rgba(20, 28, 45, 0.3);
  z-index: 60;
}

@media (max-width: 720px) {
  .masthead {
    border-radius: var(--shell-radius);
  }
}

.masthead-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  flex: none;
}

/* height-capped with auto width, so any logo aspect ratio sits correctly */
.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 190px;
}

@media (prefers-color-scheme: dark) {
  /* A full-colour logo on a dark masthead needs a plate to stay legible. */
  .brand-logo {
    background: #fff;
    padding: 5px 8px;
    border-radius: var(--core-radius);
  }
}

.masthead h1 {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.masthead-title p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: -0.005em;
}

@media (max-width: 900px) {
  .masthead-title p {
    display: none;
  }
}

.masthead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------------- pill controls ---------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--pill);
  background: var(--frame);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  color: var(--ink);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
  transition: background 300ms var(--ease), transform 300ms var(--ease), box-shadow 300ms var(--ease);
}

.button:hover {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline-strong), 0 6px 16px -10px rgba(20, 28, 45, 0.4);
}

.button:active {
  transform: scale(0.98);
}

.button.is-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 20px -12px rgba(29, 54, 96, 0.8);
}

@media (prefers-color-scheme: dark) {
  .button.is-primary {
    color: var(--navy-deep);
  }
}

.button.is-primary:hover {
  filter: brightness(1.08);
}

.button.is-quiet {
  color: var(--ink-soft);
  background: none;
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.button.is-block {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
}

.flash {
  margin: 12px 16px 0;
  padding: 11px 18px;
  border-radius: var(--pill);
  font-size: 13px;
  background: var(--positive-soft);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink);
}

.flash.is-warn {
  background: var(--caution-soft);
}

.flash.is-error {
  background: var(--critical-soft);
}

/* ---------------- layout ---------------- */

.layout {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.controls {
  border-radius: var(--shell-radius);
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    inset 0 0 0 8px var(--frame),
    inset 0 0 0 9px var(--hairline),
    0 0 0 1px var(--hairline),
    var(--shadow-soft);
  padding: 22px;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

@media (max-width: 980px) {
  .controls {
    position: static;
    max-height: none;
  }
}

.control-group {
  margin-bottom: 24px;
}

.control-group:last-child {
  margin-bottom: 0;
}

/* mono micro-label, matching the prototype's eyebrows */
.control-group h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.control-group h2::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: var(--pill);
  background: var(--tan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tan) 22%, transparent);
  flex: none;
}

.field {
  display: block;
  margin-bottom: 13px;
}

.field > span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.field small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.4;
}

.field.is-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field.is-inline > span {
  margin: 0;
  font-weight: 450;
  font-size: 13px;
}

input[type='text'],
input[type='number'],
input[type='date'],
select {
  width: 100%;
  padding: 8px 11px;
  border: 0;
  border-radius: var(--core-radius);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  transition: box-shadow 240ms var(--ease);
}

input[type='text']:hover,
input[type='number']:hover,
select:hover {
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.control-note {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.45;
}

.workspace {
  min-width: 0;
}

/* ---------------- summary ---------------- */

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  position: relative;
  padding: 15px 16px 14px;
  border-radius: var(--shell-radius);
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    inset 0 0 0 6px var(--frame),
    inset 0 0 0 7px var(--hairline),
    0 0 0 1px var(--hairline),
    var(--shadow-soft);
  overflow: hidden;
  transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    inset 0 0 0 6px var(--frame),
    inset 0 0 0 7px var(--hairline),
    0 0 0 1px var(--hairline),
    var(--shadow-lift);
}

/* the kind marker rides the top edge rather than a left border */
.summary-card::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 22%;
  right: 22%;
  height: 3px;
  border-radius: var(--pill);
  background: var(--ink-faint);
}

.summary-card.is-start::after { background: var(--brand); }
.summary-card.is-launch::after { background: var(--positive); }
.summary-card.is-delivery::after { background: var(--caution); }
.summary-card.is-holiday::after { background: var(--tan); }

.summary-label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

.summary-date {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.028em;
  margin: 4px 0 3px;
}

.summary-hint {
  display: block;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: baseline;
  padding: 0 6px 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}

.stat {
  display: flex;
  gap: 7px;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.stat strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}

.stat span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  max-width: 9ch;
  line-height: 1.3;
}

.stat.is-danger strong,
.stat.is-danger span {
  color: var(--critical);
}

.holiday-note {
  flex-basis: 100%;
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-style: italic;
}

.warnings {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.warning {
  padding: 10px 16px;
  border-radius: var(--core-radius);
  font-size: 12.5px;
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.warning.is-danger {
  background: var(--critical-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--critical) 40%, transparent);
}

.warning.is-warn {
  background: var(--caution-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--caution) 34%, transparent);
}

.warning.is-info {
  background: var(--surface-2);
  color: var(--ink-soft);
}

/* ---------------- tabs ---------------- */

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: var(--pill);
  background: var(--frame);
  box-shadow: inset 0 1px 0 var(--innerlight), 0 0 0 1px var(--hairline);
}

.tab {
  padding: 8px 15px;
  border: 0;
  border-radius: var(--pill);
  background: none;
  color: var(--ink-soft);
  font: 500 12.5px/1 var(--sans);
  cursor: pointer;
  transition: background 260ms var(--ease), color 260ms var(--ease);
}

.tab:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.tab.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--hairline), 0 6px 14px -10px rgba(20, 28, 45, 0.5);
}

.panel[hidden] {
  display: none;
}

.panel-intro {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 72ch;
  line-height: 1.55;
}

.section-heading {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin: 28px 0 12px;
}

/* ---------------- gantt ---------------- */

#panel-gantt {
  overflow-x: auto;
  padding-bottom: 4px;
}

.gantt {
  display: block;
  border-radius: var(--shell-radius);
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    0 0 0 1px var(--hairline),
    var(--shadow-soft);
  min-width: 720px;
}

.gantt-band {
  fill: var(--surface-2);
  opacity: 0.7;
}

.gantt-closed {
  fill: var(--ink-faint);
  opacity: 0.1;
}

.gantt-holiday {
  fill: var(--tan);
  opacity: 0.18;
}

.gantt-holiday-label {
  fill: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: -0.01em;
}

.gantt-month {
  fill: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gantt-monthline {
  stroke: var(--hairline);
  stroke-width: 1;
}

.gantt-weekline {
  stroke: var(--hairline);
  stroke-width: 1;
  opacity: 0.45;
}

.gantt-gutter {
  stroke: var(--hairline);
  stroke-width: 1;
}

.gantt-row {
  fill: var(--surface-2);
  opacity: 0.55;
}

@media (prefers-color-scheme: dark) {
  /* Row striping paints over the holiday band; at full strength on a dark
     card it breaks that band into a checkerboard. */
  .gantt-row {
    opacity: 0.28;
  }
}

.gantt-rowlabel {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--sans);
  letter-spacing: -0.012em;
}

.gantt-rowlabel.is-fulfillment {
  font-style: italic;
  fill: var(--ink-soft);
}

.gantt-bar {
  opacity: 0.94;
}

.gantt-bar.is-fulfillment {
  opacity: 0.68;
}

.gantt-lag {
  opacity: 0.32;
}

.gantt-barlabel {
  fill: #fff;
  font-size: 9.5px;
  font-weight: 600;
  font-family: var(--mono);
  pointer-events: none;
}

.gantt-barlabel.is-outside {
  fill: var(--ink-faint);
}

.gantt-milestone-line {
  stroke: var(--ink-faint);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.gantt-milestone-dot {
  fill: var(--ink-faint);
}

.gantt-milestone-line.is-holiday,
.gantt-milestone-dot.is-holiday {
  stroke: var(--tan);
  fill: var(--tan);
}
.gantt-milestone-line.is-delivery,
.gantt-milestone-dot.is-delivery {
  stroke: var(--caution);
  fill: var(--caution);
}
.gantt-milestone-line.is-launch,
.gantt-milestone-dot.is-launch {
  stroke: var(--positive);
  fill: var(--positive);
}
.gantt-milestone-line.is-start,
.gantt-milestone-dot.is-start {
  stroke: var(--brand);
  fill: var(--brand);
}

.gantt-milestone-label {
  fill: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--sans);
  letter-spacing: -0.01em;
}

.gantt-milestone-label.is-holiday { fill: var(--accent); }
.gantt-milestone-label.is-delivery { fill: var(--caution); }
.gantt-milestone-label.is-launch { fill: var(--positive); }
.gantt-milestone-label.is-start { fill: var(--brand); }

.gantt-today {
  stroke: var(--critical);
  stroke-width: 1.5;
}

.gantt-today-label {
  fill: var(--critical);
  font-size: 9px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.swatch {
  width: 14px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
  background: var(--brand);
}

.swatch.is-fulfil { background: var(--brand); opacity: 0.55; }
.swatch.is-lag { background: var(--brand); opacity: 0.3; height: 5px; }
.swatch.is-closed { background: var(--ink-faint); opacity: 0.25; }
.swatch.is-chag { background: var(--tan); opacity: 0.45; }

/* ---------------- calendar ---------------- */

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

.calendar-key {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  padding: 14px 18px;
  border-radius: var(--shell-radius);
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    0 0 0 1px var(--hairline),
    var(--shadow-soft);
  font-size: 11.5px;
  color: var(--ink-soft);
}

.calendar-key-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.calendar-key-swatch {
  width: 12px;
  height: 8px;
  border-radius: 3px;
  display: inline-block;
}

.calendar-month {
  border-radius: var(--shell-radius);
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    inset 0 0 0 6px var(--frame),
    inset 0 0 0 7px var(--hairline),
    0 0 0 1px var(--hairline),
    var(--shadow-soft);
  padding: 16px;
  break-inside: avoid;
}

.calendar-month-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.026em;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-weekday {
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
  color: var(--ink-faint);
  padding-bottom: 3px;
  letter-spacing: 0.08em;
}

.calendar-weekday.is-shabbat {
  color: var(--accent);
}

.calendar-day {
  min-height: 50px;
  padding: 4px;
  border-radius: 9px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 10px;
  overflow: hidden;
}

.calendar-day.is-blank {
  background: none;
  box-shadow: none;
}

.calendar-day.is-closed {
  background: color-mix(in srgb, var(--canvas-2) 70%, transparent);
  box-shadow: none;
}

.calendar-day.is-holiday {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tan) 55%, transparent);
}

.calendar-day.is-erev {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tan) 70%, transparent);
}

.calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--critical);
}

.calendar-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px;
}

.calendar-day-number {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.02em;
}

.calendar-day-hebrew {
  font-family: var(--mono);
  color: var(--ink-faint);
  font-size: 8.5px;
}

.calendar-milestone {
  margin: 3px 0 0;
  padding: 2px 5px;
  border-radius: var(--pill);
  background: var(--brand);
  color: #fff;
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-color-scheme: dark) {
  .calendar-milestone {
    color: var(--navy-deep);
  }
}

.calendar-milestone.is-holiday { background: var(--tan); }
.calendar-milestone.is-delivery { background: var(--caution); }
.calendar-milestone.is-launch { background: var(--positive); }

.calendar-stripes {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.calendar-stripe {
  display: block;
  height: 5px;
  border-radius: var(--pill);
}

.calendar-stripe.is-fulfillment {
  opacity: 0.55;
}

.calendar-stripe-more {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-faint);
  line-height: 1;
}

.calendar-truncated {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------------- tables ---------------- */

#panel-fit,
#panel-phases {
  border-radius: var(--shell-radius);
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 var(--innerlight),
    0 0 0 1px var(--hairline),
    var(--shadow-soft);
  padding: 24px;
}

.fit-table,
.phase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.fit-table th,
.phase-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.fit-table td,
.phase-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}

.fit-table tbody tr {
  transition: background 240ms var(--ease);
}

.fit-table tbody tr:hover {
  background: var(--surface-2);
}

.fit-table tr.is-missed td {
  color: var(--ink-faint);
}

.fit-table tr.is-missed .fit-slack {
  color: var(--critical);
}

.fit-table tr.is-tight .fit-slack {
  color: var(--caution);
  font-weight: 600;
}

.fit-table tr.is-comfortable .fit-slack {
  color: var(--positive);
  font-weight: 600;
}

.fit-table tr.is-selected {
  background: var(--brand-soft);
}

.fit-start {
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.fit-hebrew {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.link-button {
  border: 0;
  background: none;
  color: var(--brand);
  font: 500 12px/1 var(--sans);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--pill);
  transition: background 240ms var(--ease);
}

.link-button:hover:not(:disabled) {
  background: var(--brand-soft);
}

.link-button:disabled {
  color: var(--ink-faint);
  cursor: default;
}

/* ---------------- phase table ---------------- */

.table-scroll {
  overflow-x: auto;
  margin-bottom: 14px;
}

.phase-table {
  min-width: 780px;
}

.phase-table tr.is-disabled {
  opacity: 0.42;
}

.cell-name {
  display: flex;
  gap: 7px;
  align-items: center;
}

.color-input {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  background: none;
  cursor: pointer;
  flex: none;
}

.name-input { min-width: 152px; }
.num-input { width: 70px; }
.owner-input { width: 92px; }
.track-select { width: 136px; }

.cell-order,
.cell-actions {
  white-space: nowrap;
}

.cell-check {
  text-align: center;
}

.icon-button {
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 5px 7px;
  border-radius: var(--pill);
  cursor: pointer;
  transition: background 240ms var(--ease), color 240ms var(--ease);
}

.icon-button:hover:not(:disabled) {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.icon-button:disabled {
  opacity: 0.28;
  cursor: default;
}

.icon-button.is-danger:hover:not(:disabled) {
  color: var(--critical);
}

.phase-dates {
  display: grid;
  gap: 2px;
  font-size: 12.5px;
}

.phase-date-row {
  display: grid;
  grid-template-columns: 12px minmax(120px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 7px 6px;
  border-bottom: 1px solid var(--hairline);
}

.phase-date-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.phase-date-range {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11.5px;
}

.phase-date-days {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
}

/* ---------------- print ---------------- */

@media print {
  :root {
    --canvas: #fff;
    --surface: #fff;
    --surface-2: #f6f6f4;
    --frame: transparent;
    --innerlight: transparent;
    --shadow-soft: none;
    --shadow-lift: none;
  }

  .mesh,
  .masthead-actions,
  .controls,
  .tabs,
  .flash,
  #add-phase,
  .cell-order,
  .cell-actions {
    display: none !important;
  }

  .masthead {
    position: static;
    box-shadow: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    margin: 0 0 12px;
    padding: 0 0 12px;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .panel[hidden] {
    display: block !important;
  }

  .gantt {
    min-width: 0;
    box-shadow: none;
    outline: 1px solid #ddd;
  }

  .calendar-months {
    grid-template-columns: repeat(2, 1fr);
  }

  #panel-fit,
  #panel-phases,
  .calendar-month,
  .calendar-key {
    box-shadow: none;
    outline: 1px solid #ddd;
    padding: 12px;
  }

  body {
    font-size: 11px;
  }
}
