/* Shipyard shared design system — bridge-work.ai direction. */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  background:
    radial-gradient(circle at 18% -10%, color-mix(in srgb, var(--teal-br) 18%, transparent), transparent 34rem),
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--purple-mid) 28%, transparent), transparent 30rem),
    linear-gradient(145deg, var(--bg), var(--surface) 48%, var(--panel));
  color: var(--cream);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, var(--black), transparent 82%);
}

main {
  width: min(1280px, calc(100% - (var(--edge) * 2)));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.mono,
.eyebrow,
.metric-label,
.badge,
button,
th,
label {
  font-family: var(--font-mono);
}

.command {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  min-height: 370px;
  margin-bottom: 16px;
}

.hero,
.panel,
.project-card,
.lane,
.table-shell,
.modal {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 26px 90px var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  border-radius: 10px;
  padding: clamp(26px, 4.8vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  bottom: -210px;
  background: radial-gradient(circle, color-mix(in srgb, var(--amber) 20%, transparent), transparent 68%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-txt);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--teal);
  box-shadow: 18px 4px 0 -3.5px var(--teal);
}

h1 {
  margin: 18px 0;
  font-size: clamp(3.5rem, 10vw, 8.7rem);
  line-height: 0.84;
  letter-spacing: -0.04em;
  font-weight: 300;
}

h2,
h3,
p {
  margin-top: 0;
}

.subtitle {
  color: var(--cream);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.38;
}

.principle {
  max-width: 780px;
  margin: 44px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.summary {
  border-radius: 10px;
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-value {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  font-weight: 500;
}

.metric-label {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin: 34px 0 14px;
}

.section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
  font-weight: 300;
}

.section-head p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.45;
}

.launch-plan {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 16px;
}

.panel {
  border-radius: 10px;
  padding: 22px;
}

.primary-project {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--teal) 20%, transparent), transparent 46%),
    var(--surface);
}

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.project-title {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover { color: var(--teal-txt); }

.score {
  width: 82px;
  min-width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--teal-br) 52%, transparent);
  color: var(--teal-txt);
  background: color-mix(in srgb, var(--teal) 9%, transparent);
  font-size: 1.9rem;
  font-weight: 850;
}

.meta,
.muted {
  color: var(--muted);
}

.finish-line {
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--amber) 34%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber) 8%, transparent);
  color: var(--ink);
  line-height: 1.48;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  min-height: 112px;
  background: var(--panel);
}

.action-card strong {
  display: block;
  margin-bottom: 8px;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--ink);
}

.check-box {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid var(--teal-br);
  border-radius: 3px;
  background: color-mix(in srgb, var(--teal-br) 8%, transparent);
}

.distractions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge,
.pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.badge.teal { color: var(--teal-txt); border-color: color-mix(in srgb, var(--teal-br) 45%, transparent); }
.badge.amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 48%, transparent); }
.badge.rose { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 45%, transparent); }
.badge.purple { color: var(--purple-mid); border-color: color-mix(in srgb, var(--violet) 48%, transparent); }
.badge.faint { color: var(--faint); border-color: var(--border); }

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lane {
  border-radius: 10px;
  padding: 15px;
  min-height: 420px;
}

.lane header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.lane h3 {
  margin: 0;
  font-size: 1.1rem;
}

.cards {
  display: grid;
  gap: 10px;
}

.project-card {
  border-radius: 8px;
  padding: 13px;
  background: var(--panel);
  box-shadow: none;
}

.project-card h4 {
  margin: 8px 0 8px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.next {
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.9rem;
}

.plan-preview {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.planning-note {
  margin-top: 12px;
  color: var(--dim);
  font-size: 0.88rem;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 18px 0 14px;
  align-items: center;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 5px;
}

button {
  min-height: 54px;
  padding: 0 18px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--teal);
  border-color: var(--teal);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

button:hover,
button.active {
  border-color: var(--teal-br);
  background: var(--teal-br);
  color: var(--ink);
}

.plan-button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  border-color: var(--border);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.table-shell {
  border-radius: 10px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  background: var(--panel);
  position: sticky;
  top: 0;
}

td a {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.empty {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  width: min(620px, 100%);
  border-radius: 10px;
  padding: 20px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* --- Brand navigation (shared) --- */

#brand-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease), background var(--dur-med) var(--ease);
}

#brand-nav.scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}

.brand-nav-inner {
  width: min(1280px, calc(100% - (var(--edge) * 2)));
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  min-width: 0;
}

.signal-mark {
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
}

.brand-sep,
.brand-parent {
  color: var(--ink-t);
}

.brand-parent {
  font-size: 0.82rem;
}

.brand-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-s);
}

.brand-links a:hover,
.brand-links a.active {
  color: var(--teal-txt);
}

.theme-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.theme-toggle button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-s);
  font-size: 13px;
}

.theme-toggle button.active {
  background: var(--teal);
  color: var(--ink);
}

/* --- Plan board layout --- */

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

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kanban .lane {
  min-height: 340px;
  /* Cap lane height so a long column (e.g. ~80 cards) scrolls internally
     instead of stretching the page and dragging the sticky panel away. */
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.kanban .lane.dragover {
  border-color: var(--teal-br);
  background: color-mix(in srgb, var(--teal-br) 7%, transparent);
}

.kanban .lane .cards {
  min-height: 60px;
}

.plan-card {
  cursor: grab;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.plan-card:active { cursor: grabbing; }

.plan-card.selected {
  border-color: var(--teal-br);
  background: color-mix(in srgb, var(--teal-br) 8%, transparent);
}

.plan-card.dragging { opacity: 0.45; }

.plan-card h4 {
  margin: 6px 0 6px;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.plan-card .next {
  font-size: 0.84rem;
  margin: 0;
}

/* --- Side panel --- */

.side-panel {
  position: sticky;
  top: 80px; /* clear the 64px sticky nav + 16px breathing room */
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  border-radius: 10px;
  padding: 20px;
}

/* Brand-matched thin scrollbars for the internally-scrolling board regions. */
.lane,
.side-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

.lane::-webkit-scrollbar,
.side-panel::-webkit-scrollbar {
  width: 6px;
}

.lane::-webkit-scrollbar-track,
.side-panel::-webkit-scrollbar-track {
  background: transparent;
}

.lane::-webkit-scrollbar-thumb,
.side-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.lane::-webkit-scrollbar-thumb:hover,
.side-panel::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.side-panel .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.side-panel h3 {
  font-size: 1.4rem;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.side-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-family: "Fragment Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.side-field textarea,
.side-field select {
  font-family: Switzer, ui-sans-serif, system-ui, sans-serif;
  text-transform: none;
  color: var(--ink);
  font-size: 0.92rem;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.copy-actions {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.copy-actions button { width: 100%; }

.llm-import {
  display: grid;
  gap: 12px;
  margin-bottom: 36px;
}

.llm-import textarea {
  min-height: 180px;
  font-family: "Fragment Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88rem;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-messages {
  display: grid;
  gap: 8px;
}

.import-error,
.import-warning,
.import-ok {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.import-error {
  color: var(--rose);
  border-color: color-mix(in srgb, var(--rose) 45%, transparent);
}

.import-warning {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 48%, transparent);
}

.import-ok {
  color: var(--teal-br);
  border-color: color-mix(in srgb, var(--teal-br) 45%, transparent);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.preview-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.preview-grid h3 {
  margin-top: 0;
  font-size: 1rem;
}

.preview-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.preview-list dt {
  color: var(--dim);
  font-family: "Fragment Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.preview-list dd {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--teal-br);
  background: var(--surface);
  color: var(--teal-br);
  font-family: "Fragment Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.deploy-footer {
  width: min(1280px, calc(100% - (var(--edge) * 2)));
  margin: 0 auto 28px;
  color: var(--ink-t);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- Roadmap buckets --- */

.buckets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.bucket {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface);
  min-height: 130px;
}

.bucket header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.bucket h3 {
  margin: 0;
  font-size: 1rem;
}

.bucket ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.bucket li {
  font-size: 0.86rem;
  color: var(--ink);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.bucket li:hover { color: var(--teal-br); }

/* --- Cockpit hero questions --- */

.cockpit-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 44px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Portfolio Pulse fits 7 metrics — let it wrap to a denser grid. */
#pulseCards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

#pulseCards .metric {
  min-height: 84px;
}

/* --- Launch funnel --- */

.funnel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.funnel-stage {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.funnel-stage:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--teal-br) 5%, transparent);
}

.funnel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.funnel-arrow {
  color: var(--dim);
  font-size: 1.1rem;
}

.funnel-count {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  margin: 14px 0 12px;
}

.funnel-bar {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}

.funnel-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-br));
}

.funnel-pct {
  margin: 8px 0 0;
  font-size: 0.74rem;
}

/* --- Attention needed --- */

.attention {
  padding: 18px 22px;
}

.attention-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.attention-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.attention-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.attention-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attention-meta {
  font-size: 0.82rem;
  align-self: center;
}

/* --- Live assets --- */

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

.live-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface);
}

.live-group header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.live-group h3 {
  margin: 0;
  font-size: 1.02rem;
}

/* --- Modal grid (two columns) --- */

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-2 .span-2 {
  grid-column: 1 / -1;
}

/* --- Side panel: dimension grid + tasks --- */

.side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.side-grid .side-field {
  margin-bottom: 8px;
}

.task-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.task-form-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.task-form-row select,
.task-form-row input {
  width: auto;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.task-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
}

.task-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.task-top strong {
  font-family: Switzer, ui-sans-serif, system-ui, sans-serif;
  text-transform: none;
  overflow-wrap: anywhere;
}

.task-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 6px;
  align-items: center;
}

.task-controls select,
.task-controls input {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.82rem;
}

.task-controls button {
  min-height: 32px;
  padding: 4px 9px;
}

.task-done {
  opacity: 0.55;
}

.task-done strong {
  text-decoration: line-through;
}

.task-description {
  margin: 7px 0 9px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.milestone-item {
  border-color: color-mix(in srgb, var(--teal-br) 38%, transparent);
  background: color-mix(in srgb, var(--teal-br) 6%, transparent);
}

/* --- Calendar buckets (5 date columns) --- */

.calendar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.calendar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.calendar-task {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--panel);
}

.calendar-meta {
  font-size: 0.78rem;
  margin: 0 0 8px;
}

.calendar-meta a {
  cursor: pointer;
  color: var(--muted);
}

.calendar-meta a:hover {
  color: var(--teal-br);
}

@media (max-width: 1080px) {
  .funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  /* Stacked layout: drop the sticky pin and height cap so the panel sits
     naturally below the board (mobile ergonomics differ). */
  .side-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  /* Let columns grow naturally once they stack. */
  .kanban .lane {
    max-height: none;
    overflow-y: visible;
  }

  .kanban {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .command,
  .launch-plan,
  .board {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  main {
    width: min(100% - 28px, 1280px);
    padding-top: 18px;
  }

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

  .section-head,
  .toolbar {
    display: block;
  }

  .filters {
    margin-bottom: 10px;
  }

  .hero,
  .panel,
  .lane {
    padding: 16px;
  }

  .project-top {
    display: block;
  }

  .score {
    margin-top: 14px;
  }

  .kanban,
  .buckets,
  .funnel,
  .calendar,
  .live-assets,
  .form-grid-2,
  .side-grid {
    grid-template-columns: 1fr;
  }

  #pulseCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-controls {
    grid-template-columns: 1fr 1fr;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  td {
    padding: 7px 0;
    border: 0;
  }

  td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--dim);
    font-family: "Fragment Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
  }
}

/* --- Voyage: first-class product calendar --- */

.voyage-command .summary {
  align-self: stretch;
}

.voyage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
  margin: 22px 0 42px;
}

.month-panel,
.voyage-side,
.all-tasks-panel {
  padding: 18px;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.calendar-toolbar h2 {
  margin: 4px 0 0;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.month-weekday {
  color: var(--dim);
  font-family: Fragment Mono, ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 4px 4px;
}

.month-day {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  display: grid;
  align-content: start;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.month-day:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--teal-br) 6%, transparent);
  transform: translateY(-1px);
}

.month-day.today {
  border-color: color-mix(in srgb, var(--amber) 72%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 16%, transparent);
}

.month-day.selected {
  border-color: color-mix(in srgb, var(--teal-br) 82%, transparent);
  background: color-mix(in srgb, var(--teal-br) 8%, transparent);
}

.month-day.muted-day {
  opacity: 0.45;
}

.day-number {
  font-family: Fragment Mono, ui-monospace, monospace;
  color: var(--muted);
  font-size: 0.78rem;
}

.day-stack {
  display: grid;
  gap: 5px;
}

.day-chip,
.more-chip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 0.72rem;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.day-chip.teal {
  border-color: color-mix(in srgb, var(--teal-br) 45%, transparent);
  color: var(--teal-br);
}

.day-chip.milestone-chip {
  border-color: color-mix(in srgb, var(--teal-br) 55%, transparent);
  color: var(--teal-br);
  background: color-mix(in srgb, var(--teal-br) 8%, transparent);
}

.day-chip.amber {
  border-color: color-mix(in srgb, var(--amber) 50%, transparent);
  color: var(--amber);
}

.day-chip.purple {
  border-color: color-mix(in srgb, var(--purple-mid) 62%, transparent);
  color: var(--accent-violet);
}

.more-chip {
  color: var(--dim);
}

.selected-tasks {
  display: grid;
  gap: 10px;
}

.voyage-task {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel);
}

.soft-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.voyage-task-form {
  display: grid;
  gap: 10px;
}

.voyage-task-form label {
  display: grid;
  gap: 6px;
  color: var(--dim);
  font-family: Fragment Mono, ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-control {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 42px;
}

.roadmap-column {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface);
  min-height: 220px;
}

.roadmap-column header,
.roadmap-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.roadmap-column h3,
.roadmap-card h4 {
  margin: 0;
}

.roadmap-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  margin-top: 10px;
  background: var(--panel);
}

.roadmap-card p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 8px 0 12px;
  line-height: 1.35;
}

.roadmap-actions button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.all-task-list {
  display: grid;
  gap: 10px;
}

.all-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.all-task-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

  .roadmap-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .calendar-toolbar,
  .all-task-row {
    display: block;
  }

  .calendar-actions {
    margin-top: 12px;
  }

  .month-grid {
    gap: 6px;
  }

  .month-weekday {
    font-size: 0.64rem;
  }

  .month-day {
    min-height: 82px;
    padding: 7px;
  }

  .day-chip,
  .more-chip {
    font-size: 0.64rem;
    padding: 3px 5px;
  }
}

@media (max-width: 720px) {
  .roadmap-control,
  .month-grid {
    grid-template-columns: 1fr;
  }

  .month-weekday {
    display: none;
  }

  .month-day.muted-day {
    display: none;
  }
}

/* Final brand color pins after legacy selector groups. */
body,
input,
select,
textarea,
a,
.subtitle,
.finish-line,
.check-item {
  color: var(--ink);
}

button,
button:hover,
button.active {
  color: var(--cream);
}

.plan-button,
.theme-toggle button {
  color: var(--ink-s);
}

.theme-toggle button.active {
  color: var(--cream);
}
