/* ==========================================================================
   SOL-2027 · Swiss Editorial / Kodak 1928 Design System
   Zero frameworks. Zero bloat. Sub-200ms render.
   ========================================================================== */

:root {
  --bg-cream: #F4F0E8;
  --bg-surface: #FAF7F1;
  --bg-warm: #EAE3D5;
  --bg-sol: #FAEDE7;
  --bg-sol-strong: #F6DDD3;
  --ink: #141414;
  --ink-soft: #3D3A35;
  --ink-muted: #615B52;
  --ink-subtle: #8A8377;
  --vermilion: #D94420;
  --vermilion-dark: #B63314;
  --midnight: #0E1A2B;
  --gold: #D9B464;
  --rule: #D5CDBE;
  --rule-light: #E4DDD0;
  --rule-strong: #141414;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --shadow-card: 0 1px 2px rgba(20, 20, 20, 0.04), 0 12px 32px rgba(20, 20, 20, 0.06);
  --shadow-pop: 0 20px 50px rgba(20, 20, 20, 0.24);
  --container-max: 1300px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg-cream);
  padding: 10px 16px;
  z-index: 9999;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.accent-text {
  color: var(--vermilion);
}

.nowrap {
  white-space: nowrap;
}

.mono-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mono-label.muted {
  color: var(--ink-subtle);
  font-weight: 400;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ==========================================================================
   MASTHEAD
   ========================================================================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 240, 232, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-badge {
  background: var(--vermilion);
  color: var(--bg-cream);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.05em;
}

.brand-title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-subtle);
  letter-spacing: 0.08em;
  padding-left: 10px;
  border-left: 1px solid var(--rule);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  font-weight: 600;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--vermilion);
}

.nav-links .nav-cta {
  background: var(--ink);
  color: var(--bg-cream);
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.15s ease;
}

.nav-links .nav-cta:hover {
  background: var(--vermilion);
  color: var(--bg-cream);
}

/* ==========================================================================
   HERO CONVERTER SECTION
   ========================================================================== */
.hero-section {
  padding: 20px 0 64px;
  border-bottom: 1px solid var(--rule);
}

.spec-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 0 0 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
  letter-spacing: 0.07em;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  gap: 36px;
  align-items: start;
}

.kicker-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--vermilion);
  background: var(--bg-sol);
  border: 1px solid rgba(217, 68, 32, 0.28);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4.2vw, 3.45rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.hero-lead {
  margin: 0 0 24px;
  font-size: 16.5px;
  line-height: 1.58;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* Picker Card */
.picker-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

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

.leap-trigger {
  background: none;
  border: none;
  padding: 2px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--vermilion);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.leap-trigger:hover {
  color: var(--vermilion-dark);
}

.picker-inputs {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-xs);
  padding: 12px 36px 12px 14px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.field select:hover {
  background-color: #FFFFFF;
}

.field select:focus {
  border-color: var(--vermilion);
  outline: none;
  box-shadow: 0 0 0 2px rgba(217, 68, 32, 0.2);
}

.presets-block {
  border-top: 1px solid var(--rule-light);
  padding-top: 14px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.chip {
  background: var(--bg-cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: #FFFFFF;
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-cream);
}

/* Proof Strip */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.proof-stat {
  border-top: 2px solid var(--ink);
  padding-top: 8px;
}

.proof-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.proof-lbl {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* ==========================================================================
   REVEAL SPECIMEN CARD
   ========================================================================== */
.reveal-card {
  background: var(--bg-surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 22px 24px 24px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.18s ease;
}

.reveal-card.is-pulse {
  animation: cardPop 0.24s ease;
}

@keyframes cardPop {
  0% { transform: translateY(2px); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

.reveal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}

.reveal-hero {
  padding: 18px 0 16px;
}

.reveal-month-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.month-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--bg-cream);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.month-pill.is-sol {
  background: var(--vermilion);
}

.month-span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
  letter-spacing: 0.06em;
}

.reveal-date {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px;
}

.reveal-date.is-sol {
  color: var(--vermilion);
}

.reveal-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Metrics 3-Col Bar */
.reveal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  margin: 14px 0;
}

.metric-cell {
  padding: 11px 10px 11px 0;
}

.metric-cell + .metric-cell {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}

.metric-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--ink-subtle);
  margin-bottom: 3px;
}

.metric-val {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

/* Personal Fact Box */
.fact-box {
  background: var(--bg-cream);
  border-left: 4px solid var(--vermilion);
  padding: 11px 14px;
  margin-bottom: 16px;
}

.fact-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--vermilion);
  margin-bottom: 3px;
}

.fact-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--ink-soft);
}

/* Mini 28-Day Month Grid inside Specimen Card */
.mini-month-wrap {
  background: var(--bg-cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  padding: 10px 12px 12px;
  margin-bottom: 18px;
}

.mini-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mini-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.mini-wd {
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-subtle);
  padding-bottom: 2px;
}

.mini-cell {
  text-align: center;
  font-size: 11px;
  padding: 4px 2px;
  border-radius: 2px;
  color: var(--ink-soft);
  background: var(--bg-surface);
  border: 1px solid transparent;
}

.mini-cell.is-wknd {
  background: var(--bg-warm);
}

.mini-cell.is-target {
  background: var(--vermilion);
  color: var(--bg-cream);
  font-weight: 700;
  border-color: var(--ink);
}

.mini-cell.is-greg1 {
  border-color: var(--ink);
  font-weight: 700;
}

.mini-yearday-pill {
  grid-column: 1 / -1;
  margin-top: 4px;
  background: var(--vermilion);
  color: var(--bg-cream);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

/* Buttons */
.reveal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-download-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.story-download-row .btn-primary {
  flex: 1 1 auto;
}

.story-theme-switch {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
}

.theme-pill {
  background: var(--bg-cream);
  border: none;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.14s ease;
}

.theme-pill + .theme-pill {
  border-left: 1px solid var(--rule);
}

.theme-pill.is-active {
  background: var(--ink);
  color: var(--bg-cream);
}

.theme-pill[data-story-theme="celestial"].is-active {
  background: var(--midnight);
  color: var(--gold);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  opacity: 0.9;
}

.btn-primary {
  background: var(--vermilion);
  color: var(--bg-cream);
  border-color: var(--vermilion);
}

.btn-primary:hover {
  background: var(--vermilion-dark);
  border-color: var(--vermilion-dark);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--bg-cream);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--rule);
  padding: 9px 12px;
  font-size: 12.5px;
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-surface);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 8px 10px;
  font-size: 12px;
}

/* ==========================================================================
   SECTION 2: INTERACTIVE 2027 13x28 EXPLORER
   ========================================================================== */
.explorer-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.section-head-compact {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-title {
  margin: 6px 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 64ch;
}

.explorer-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.mode-switch {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--bg-surface);
}

.mode-btn {
  background: transparent;
  border: none;
  padding: 9px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: background 0.14s ease, color 0.14s ease;
}

.mode-btn + .mode-btn {
  border-left: 1.5px solid var(--ink);
}

.mode-btn strong {
  font-size: 12.5px;
  font-weight: 700;
}

.mode-btn span {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.78;
}

.mode-btn.is-active {
  background: var(--ink);
  color: var(--bg-cream);
}

.staircase-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  padding: 6px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.staircase-toggle.is-active {
  border-color: var(--ink);
  color: var(--ink);
  background: #FFFFFF;
}

.stair-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--rule);
  border: 1px solid var(--ink);
}

.staircase-toggle.is-active .stair-swatch {
  background: var(--ink);
}

/* Sticky Day Inspector */
.inspector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  background: var(--ink);
  color: var(--bg-cream);
  padding: 11px 16px;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  font-variant-numeric: tabular-nums;
}

.inspector-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.insp-ifc {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #FF8C6E;
}

.insp-sep {
  opacity: 0.4;
}

.insp-greg {
  font-weight: 600;
  font-size: 14px;
}

.insp-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--vermilion);
  color: var(--bg-cream);
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.06em;
}
.insp-pill:empty {
  display: none;
}

.inspector-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #D9D2C5;
}

.btn-mini {
  background: var(--bg-cream);
  color: var(--ink);
  border: none;
  border-radius: 2px;
  padding: 6px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.btn-mini:hover {
  background: var(--vermilion);
  color: var(--bg-cream);
}

/* Matrix Legend */
.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  background: var(--bg-surface);
  border-left: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.leg-pill {
  display: inline-block;
  font-style: normal;
  background: var(--ink);
  color: var(--bg-cream);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  margin-right: 4px;
}

.leg-glyph {
  font-style: normal;
  font-weight: 700;
  margin-right: 3px;
  font-size: 12px;
}
.leg-nm { color: var(--ink); }
.leg-fm { color: var(--vermilion); }
.leg-sol { color: var(--vermilion); }

.leg-wknd {
  display: inline-block;
  width: 12px;
  height: 10px;
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  vertical-align: middle;
  margin-right: 4px;
}

.legend-scroll-hint {
  display: none;
  color: var(--vermilion);
  font-weight: 700;
}

/* Matrix Grid Shell */
.matrix-shell {
  border: 1.5px solid var(--ink);
  border-top: 1px solid var(--rule);
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-matrix {
  display: grid;
  grid-template-columns: 126px repeat(28, minmax(38px, 1fr));
  min-width: 1190px;
  font-variant-numeric: tabular-nums;
}

/* Week Banner Row & Weekday Header Row */
.mx-corner {
  position: sticky;
  left: 0;
  z-index: 6;
  background: var(--ink);
  color: var(--bg-cream);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  border-right: 1.5px solid var(--ink);
}

.mx-week-band {
  grid-column: span 7;
  background: var(--ink);
  color: var(--bg-cream);
  text-align: center;
  padding: 6px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-left: 1px solid rgba(244, 240, 232, 0.25);
}

.mx-corner-sub {
  position: sticky;
  left: 0;
  z-index: 6;
  background: var(--bg-cream);
  color: var(--ink-subtle);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

.mx-wd-hdr {
  background: var(--bg-cream);
  text-align: center;
  padding: 5px 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-muted);
  border-bottom: 1.5px solid var(--ink);
  border-left: 1px solid var(--rule-light);
}

.mx-wd-hdr.is-wknd {
  background: var(--bg-warm);
  color: var(--vermilion);
}

.mx-wd-hdr.is-week-start {
  border-left: 1px solid var(--rule);
}

/* Month Label Column (Sticky Left) */
.mx-month-lbl {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-surface);
  padding: 6px 10px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.mx-m-num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-subtle);
  font-weight: 700;
}

.mx-m-name {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.mx-m-span {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--ink-subtle);
  margin-top: 2px;
}

.mx-month-lbl.is-sol {
  background: var(--vermilion);
  color: var(--bg-cream);
}

.mx-month-lbl.is-sol .mx-m-num,
.mx-month-lbl.is-sol .mx-m-name,
.mx-month-lbl.is-sol .mx-m-span {
  color: var(--bg-cream);
}

/* Day Cell */
.mx-cell {
  position: relative;
  appearance: none;
  border: none;
  border-left: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-surface);
  padding: 4px 3px 5px;
  min-height: 45px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.1s ease, box-shadow 0.1s ease;
}

.mx-cell.is-week-start {
  border-left: 1px solid var(--rule);
}

.mx-cell.is-wknd {
  background: var(--bg-warm);
}

.mx-cell.is-sol-row {
  background: var(--bg-sol);
}

.mx-cell.is-sol-row.is-wknd {
  background: var(--bg-sol-strong);
}

.mx-cell:hover {
  z-index: 3;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.mx-cell.is-selected {
  z-index: 4;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 2.5px var(--vermilion);
}

.mx-cell-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
}

.mx-day-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.mx-cell.is-sol-row .mx-day-num {
  color: var(--vermilion-dark);
}

.mx-astro {
  font-size: 10px;
  line-height: 1;
}
.mx-astro.is-nm { color: var(--ink); }
.mx-astro.is-fm { color: var(--vermilion); }
.mx-astro.is-solstice { color: var(--vermilion); font-weight: 700; }

.mx-greg {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: -0.02em;
  color: var(--ink-subtle);
  line-height: 1.1;
  white-space: nowrap;
}

/* Staircase of Gregorian 1sts */
.calendar-matrix.staircase-on .mx-cell.is-greg1 {
  background: rgba(20, 20, 20, 0.06);
}

.calendar-matrix.staircase-on .mx-cell.is-sol-row.is-greg1 {
  background: rgba(217, 68, 32, 0.16);
}

.calendar-matrix.staircase-on .mx-cell.is-greg1 .mx-greg {
  background: var(--ink);
  color: var(--bg-cream);
  font-weight: 700;
  padding: 1.5px 3.5px;
  border-radius: 2px;
  font-size: 8px;
}

/* Year Day Banner */
.yearday-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--vermilion);
  color: var(--bg-cream);
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.yearday-bar:hover {
  background: var(--vermilion-dark);
}

.yearday-bar.is-selected {
  box-shadow: inset 0 0 0 3px var(--ink);
}

.yd-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.yd-num {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  padding-right: 16px;
  border-right: 1.5px solid rgba(244, 240, 232, 0.45);
}

.yd-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  opacity: 0.9;
}

.yd-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.yd-greg {
  font-weight: 500;
  font-size: 13.5px;
  opacity: 0.92;
}

.yd-note {
  margin: 0;
  font-size: 13px;
  max-width: 44ch;
  opacity: 0.95;
}

/* ==========================================================================
   SECTION 3: WHY 13x28 WORKS TABS
   ========================================================================== */
.why-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule);
}

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-xs);
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.14s ease;
}

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

.tab-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-cream);
}

.tab-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
}

.tab-panel {
  background: var(--bg-surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: start;
}

.tab-panel h3 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tab-panel p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 15px;
}

.spec-card {
  background: var(--bg-cream);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  padding: 18px 20px;
}

.spec-list {
  margin: 12px 0 0;
}

.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-light);
  font-size: 13.5px;
}

.spec-list > div:last-child {
  border-bottom: none;
}

.spec-list dt {
  color: var(--ink-muted);
  font-weight: 600;
}

.spec-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.benefit-list {
  margin: 12px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* 13 New Moons Table */
.panel-moons-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: start;
}

.mono-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
}

.moons-table-wrap {
  overflow-x: auto;
}

.moons-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.moons-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--ink);
  color: var(--bg-cream);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.moons-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--rule-light);
}

.moons-table tr.is-sol-row {
  background: var(--bg-sol);
  font-weight: 700;
}

.moons-table tr.is-sol-row td:first-child {
  color: var(--vermilion);
}

/* ==========================================================================
   SECTION 4: CONVERSION GALLERY & PRICING
   ========================================================================== */
.gallery-section {
  padding: 64px 0 76px;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 44px;
}

.demo-card {
  margin: 0;
  background: var(--bg-surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.demo-img-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: var(--bg-warm);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: zoom-in;
}

.demo-img-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transition: transform 0.35s ease;
}

.demo-img-btn:hover img {
  transform: scale(1.03);
}

.zoom-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(20, 20, 20, 0.85);
  color: var(--bg-cream);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
}

.demo-caption {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.demo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.demo-price {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--vermilion);
}

.demo-caption h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.demo-caption p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
  flex: 1 1 auto;
}

.demo-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--vermilion);
  align-self: flex-start;
  padding-bottom: 2px;
  transition: color 0.14s ease;
}

.demo-link:hover {
  color: var(--vermilion);
}

/* Pricing Strip */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.tier-card {
  position: relative;
  background: var(--bg-surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.tier-featured {
  border-width: 2px;
  box-shadow: 6px 6px 0 var(--vermilion);
  background: #FFFDF9;
}

.featured-ribbon {
  display: inline-block;
  align-self: flex-start;
  background: var(--vermilion);
  color: var(--bg-cream);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
}

.tier-price {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 6px 0 10px;
}

.tier-price small {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}

.tier-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.tier-desc {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.tier-list {
  margin: 0 0 20px;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1 1 auto;
}

.tier-multi-cta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

/* Field Notes 4:5 Shareable Strip */
.field-notes-block {
  margin-top: 52px;
  padding-top: 38px;
  border-top: 1.5px solid var(--rule);
}

.field-notes-head {
  margin-bottom: 22px;
}

.field-notes-head h3 {
  margin: 6px 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.field-notes-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

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

.field-note-card {
  margin: 0;
  background: var(--bg-surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.field-note-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--rule-light);
  background: #141414;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.field-note-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.field-note-btn:hover img {
  transform: scale(1.03);
}

.field-note-caption {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-note-caption h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

/* ==========================================================================
   COLOPHON FOOTER
   ========================================================================== */
.colophon {
  border-top: 2px solid var(--ink);
  background: var(--bg-surface);
  padding: 28px 0 38px;
}

.colophon-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.colophon-brand {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.colophon-meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.colophon-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

.colophon-links a {
  text-decoration: none;
  color: var(--ink-soft);
}
.colophon-links a:hover {
  color: var(--vermilion);
}

/* ==========================================================================
   MODALS & TOAST
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  position: relative;
  background: var(--bg-surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
  max-height: 92vh;
  overflow-y: auto;
}

.lightbox-dialog {
  max-width: 960px;
  width: 100%;
  padding: 16px;
}

.lightbox-dialog img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: var(--bg-warm);
}

.lightbox-caption {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.checkout-dialog {
  max-width: 500px;
  width: 100%;
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--ink);
  background: var(--bg-cream);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-close:hover {
  background: var(--vermilion);
  color: var(--bg-cream);
  border-color: var(--vermilion);
}

.modal-title {
  margin: 6px 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-body {
  margin: 0 0 16px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.modal-meta-box {
  background: var(--bg-cream);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.modal-meta-box > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-meta-box code,
.modal-footnote code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-warm);
  padding: 1px 5px;
  border-radius: 2px;
}

.modal-footnote {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.modal-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 600;
  background: var(--ink);
  color: var(--bg-cream);
  border: 1.5px solid var(--vermilion);
  padding: 11px 16px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-pop);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (1024px / 768px / 390px)
   ========================================================================== */
@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .panel-grid,
  .panel-moons-layout {
    grid-template-columns: 1fr;
  }

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

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

  .explorer-controls {
    align-items: flex-start;
  }

  .legend-scroll-hint {
    display: inline;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 16px;
  }

  .brand-title {
    white-space: nowrap;
    font-size: 16px;
  }

  .brand-sub {
    display: none;
  }

  .nav-links {
    gap: 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .nav-links a:not(.nav-cta):nth-child(1),
  .nav-links a:not(.nav-cta):nth-child(3) {
    display: none;
  }

  .nav-links .nav-cta {
    padding: 7px 10px;
    font-size: 10.5px;
    white-space: nowrap;
  }

  .spec-strip {
    font-size: 10px;
    margin-bottom: 18px;
  }

  .hero-section,
  .explorer-section,
  .why-section,
  .gallery-section {
    padding-top: 38px;
    padding-bottom: 44px;
  }

  .reveal-card {
    padding: 16px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .reveal-metrics {
    grid-template-columns: 1fr;
  }

  .metric-cell + .metric-cell {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--rule-light);
  }

  .story-download-row {
    flex-direction: column;
  }

  .story-theme-switch {
    width: 100%;
  }

  .theme-pill {
    flex: 1 1 50%;
    padding: 8px;
  }

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

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

  .field-notes-grid {
    grid-template-columns: 1fr;
  }

  .tier-multi-cta {
    grid-template-columns: 1fr;
  }

  .calendar-matrix {
    grid-template-columns: 98px repeat(28, minmax(38px, 1fr));
    min-width: 1162px;
  }

  .mx-month-lbl {
    padding: 5px 7px;
  }

  .mx-m-name {
    font-size: 10.5px;
  }

  .tab-panel {
    padding: 18px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 14px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
