/* The hub's shared layout, on top of theme.css. Only theme tokens are used,
   so light and dark both follow the theme. */

html { scrollbar-gutter: stable; }
.topbar-nav { position: relative; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%); }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a { white-space: nowrap; }
.team-stack .avatar + .avatar { margin-left: -0.125rem; box-shadow: 0 0 0 2px var(--surface); }

/* Who added a section, and with which AI tool */
.credit { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-2); }
.credit strong { color: var(--text); font-weight: 600; }
.tool {
  display: inline-flex; align-items: center; height: 1.25rem; padding: 0 0.4375rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text-2);
  font-size: 0.6875rem; font-weight: 500; line-height: 1; white-space: nowrap;
}
.page-header .credit { margin-top: var(--space-3); }

.foot { margin-top: var(--space-12); font-size: var(--text-xs); color: var(--text-3); text-align: center; }
.foot a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }

/* Overview */
.section-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); color: inherit; }
.section-card:hover { text-decoration: none; }
.section-card .card-title { font-size: var(--text-base); }
.section-card p { margin: 0; font-size: var(--text-sm); color: var(--text-2); flex: 1; }
.section-card .credit { font-size: var(--text-xs); }
.swatches { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.swatch { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-2); }
.swatch i { width: 1.75rem; height: 1.75rem; border-radius: var(--radius-md); border: 1px solid var(--border); }
.brand-rules { margin: 0; padding-left: 1.1rem; font-size: var(--text-sm); color: var(--text-2); }
.brand-rules li + li { margin-top: var(--space-1); }
.timeline { list-style: none; margin: 0; padding: var(--space-2) 0; }
.timeline li { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-5); font-size: var(--text-sm); color: var(--text-2); }
.timeline li + li { border-top: 1px solid var(--border); }
.timeline .grow { min-width: 0; }
.timeline strong { color: var(--text); font-weight: 600; }
.timeline .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-1); font-size: var(--text-xs); color: var(--text-3); }
.timeline code { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-3); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 6.5rem; padding: var(--space-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--space-1); }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-out { background: var(--surface-2); }
.cal-day.is-out .cal-num { color: var(--text-3); }
.cal-num { font-size: var(--text-xs); font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-day.is-launch .cal-num { color: var(--accent); font-weight: 700; }
.ev { display: block; padding: 0.1875rem 0.375rem; border-radius: var(--radius-sm); font-size: 0.6875rem; line-height: 1.3; border-left: 3px solid; }
.ev-email { background: var(--info-bg); color: var(--info-text); border-color: var(--info-dot); }
.ev-social { background: var(--success-bg); color: var(--success-text); border-color: var(--success-dot); }
.ev-pr { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-dot); }
.ev-store { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.legend { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-xs); color: var(--text-2); }
.legend .ev { display: inline-block; }
.agenda { display: none; }

/* Checklist */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); font-size: var(--text-sm); }
.check-list li + li { border-top: 1px solid var(--border); }
.check-list .grow { min-width: 0; }
.check-list .is-done .item-text { color: var(--text-3); text-decoration: line-through; }
.tick { flex: none; width: 1.125rem; height: 1.125rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); display: grid; place-items: center; }
.is-done .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.tick svg { width: 0.75rem; height: 0.75rem; }
.item-due { font-size: var(--text-xs); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.progress { height: 0.5rem; border-radius: var(--radius-full); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); }

/* Link builder */
.result-link { font-family: var(--font-mono); font-size: var(--text-sm); overflow-wrap: anywhere; padding: var(--space-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.form-grid .span-2 { grid-column: span 2; }
.mono { font-family: var(--font-mono); font-size: var(--text-xs); }
.check-list .mono { overflow-wrap: anywhere; }

@media (max-width: 64rem) {
  .grid.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 48rem) {
  /* Top bar: brand and team on one row, the sections in a scrolling row under it. */
  .topbar { position: static; flex-wrap: wrap; height: auto; row-gap: 0; padding: var(--space-2) var(--space-4) 0; }
  .brand { min-height: 2.75rem; }
  .topbar-nav { display: flex; order: 3; width: calc(100% + 2 * var(--space-4)); margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-3) var(--space-2); gap: var(--space-1); }
  .topbar-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--space-3); font-size: var(--text-base); }

  /* Page rhythm */
  .page { padding: var(--space-5) var(--space-4) var(--space-10); }
  .page-subtitle { font-size: var(--text-base); line-height: 1.5; }
  .page-header { margin-bottom: var(--space-5); }
  .card-header { padding: var(--space-3) var(--space-4); min-height: 3rem; }
  .card-body { padding: var(--space-4); }
  .check-list li, .timeline li { padding: var(--space-3) var(--space-4); }
  .section-card { padding: var(--space-4); }
  .foot { margin-top: var(--space-8); padding: 0 var(--space-2); line-height: 1.6; }

  /* Grids */
  .grid.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .grid.grid-2, .grid.grid-3 { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .stat { padding: var(--space-3) var(--space-4); }
  .stat-value { font-size: 1.25rem; }
  .stat-delta { margin-top: 2px; line-height: 1.4; }
  /* Four small counts sit in one row */
  .stats-row.grid.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
  .stats-row .stat { padding: var(--space-2) var(--space-2); text-align: center; }
  .stats-row .stat-label { font-size: 0.6875rem; white-space: nowrap; }
  .stats-row .stat-value { font-size: 1.125rem; }

  /* Forms: bigger fields and buttons, and 16px text so phones do not zoom in */
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .input, .select { height: 2.75rem; font-size: 1rem; }
  .form-grid .btn, .card-body > .btn { width: 100%; height: 2.75rem; font-size: var(--text-base); }

  /* Content tracker: each row becomes a small card */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody { display: block; width: 100%; }
  .table-stack tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); row-gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { padding: 0; border: 0; background: none !important; }
  .table-stack td:first-child { grid-column: 1 / -1; }
  .table-stack .cell-title { min-width: 0; }
  .table-stack td:last-child { font-size: var(--text-xs); color: var(--text-3); }

  .cal-wrap { display: none; }
  .agenda { display: block; }
  .agenda .check-list li { align-items: flex-start; }
  .agenda .item-due { padding-top: 0.25rem; }
  .agenda .ev { font-size: var(--text-xs); padding: 0.3125rem 0.5rem; }
  .hide-sm { display: none; }
}
