/* commercial.css — compressed.guide v2 storefront layer
 * Built on top of base.css / style.css / pillar.css design tokens.
 * Voice: dry, evidential. No marketing flourish.
 */

/* ---- Paint visual system (Gemini-locked monochrome, 22 May 2026) ----
 * Strict greyscale. No tints. No saturated hues of any kind.
 * Five tones map to drying paint stratification.
 */
:root {
  --paint-base-white:  #FDFDFD;  /* raw flat canvas baseline */
  --paint-fluid-gray:  #EBEBEB;  /* upper stratum, log card borders */
  --paint-gel-shadow:  #CDCDCD;  /* deep valleys, compressed dividers */
  --paint-sol-density: #4A4A4A;  /* monospaced code, secondary copy */
  --paint-core-black:  #111111;  /* structural font anchor, frame lines */
}

/* ---- Pattern routing tile grid ---- */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0 28px 0;
}
@media (max-width: 640px) {
  .pattern-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
.pattern-tile {
  background: var(--paint-base-white);
  border: 2px solid var(--paint-fluid-gray);
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  opacity: 0.4;
  display: flex;
  flex-direction: column;
}
.pattern-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.pattern-tile .pattern-tile-label {
  display: block;
  padding: 10px 12px 12px 12px;
  font-family: 'JetBrains Mono', 'Source Code Pro', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.35;
  color: var(--paint-sol-density);
  background: var(--paint-base-white);
  border-top: 1px solid var(--paint-fluid-gray);
}
.pattern-tile .pattern-tile-label strong {
  display: block;
  color: var(--paint-core-black);
  font-weight: 600;
  margin-bottom: 2px;
}
.pattern-tile[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--paint-core-black);
  background: var(--paint-fluid-gray);
}
.pattern-tile[aria-pressed="true"] .pattern-tile-label {
  background: var(--paint-fluid-gray);
  border-top-color: var(--paint-gel-shadow);
}
.pattern-tile:focus-visible {
  outline: 2px solid var(--paint-core-black);
  outline-offset: 2px;
}
.pattern-readout {
  display: none;
  border-left: 3px solid var(--paint-core-black);
  padding: 4px 0 4px 16px;
  margin: 0 0 8px 0;
}
.pattern-readout.is-active { display: block; }
.pattern-readout p { margin: 0 0 8px 0; }
.pattern-routing-instruction {
  font-size: 14px;
  color: var(--paint-sol-density);
  margin: 0 0 12px 0;
  font-style: italic;
}

/* ---- Layout helpers ---- */
.container.narrow { max-width: 720px; }
.block { padding: 56px 0; border-bottom: 1px solid var(--color-divider, #e6dfd2); }
.block-h2 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--color-text, #1a1a1a);
}
.block-lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-text-muted, #4a4a4a);
  margin: 0 0 24px 0;
}
.block p { font-size: 17px; line-height: 1.65; }

/* ---- Hero ---- */
.hero {
  padding: 72px 0 56px 0;
  background: var(--color-bg, #f6f3ec);
  border-bottom: 1px solid var(--color-divider, #e6dfd2);
}
.hero-h1 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 600;
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 18px 0;
  color: var(--color-text, #1a1a1a);
}
.hero-sub {
  font-size: 19px;
  line-height: 1.45;
  font-style: italic;
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  color: var(--color-text-muted, #4a4a4a);
  margin: 0 0 22px 0;
}
.hero-lede { font-size: 17px; line-height: 1.65; margin: 0 0 22px 0; }
.hero-meta {
  font-size: 14px;
  color: var(--color-text-muted, #4a4a4a);
  margin: 0;
}
.hero-meta a { color: var(--color-primary, #1f5e57); text-decoration: none; }
.hero-meta a:hover, .hero-meta a:focus { text-decoration: underline; }

/* ---- Nav buy chip ---- */
.nav-buy {
  background: var(--color-primary, #1f5e57);
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
}
.nav-buy:hover, .nav-buy:focus { background: #174740; }

/* ---- Photo grid ---- */
.grid-section { background: #fff; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 24px 0 16px 0;
}
.photo-cell { margin: 0; }
.photo-slot {
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #efe9da 0%, #e0d8c2 100%);
  border: 1px dashed #b9ad8d;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.slot-label {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 13px;
  color: #6d6450;
  font-style: italic;
}
.photo-cell figcaption {
  font-size: 13px;
  line-height: 1.45;
  margin-top: 10px;
  color: var(--color-text-muted, #4a4a4a);
}
.photo-footnote {
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-muted, #4a4a4a);
  margin-top: 14px;
}
@media (max-width: 720px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Evidence log table ---- */
.table-wrap { overflow-x: auto; margin: 8px 0 12px 0; }
.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--color-divider, #e6dfd2);
}
.evidence-table th,
.evidence-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-divider, #e6dfd2);
  white-space: nowrap;
}
.evidence-table thead th {
  background: var(--color-bg, #f6f3ec);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text, #1a1a1a);
  border-bottom: 2px solid var(--color-divider, #d4cab0);
}
.evidence-table tbody tr:last-child td { border-bottom: 0; }
.evidence-table td.awaiting {
  background: #fdf6e3;
  font-style: italic;
  color: #6d6450;
  white-space: normal;
  font-size: 13px;
}
.log-footnote {
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-muted, #4a4a4a);
  margin-top: 8px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); border: 0;
}

/* ---- Core Stratum: the three self-directed tests ---- */
.tests-block { background: #fff; border-top: 3px solid var(--color-primary, #1f5e57); }
.tests-block .block-h2 { color: var(--color-text, #1a1a1a); }
.test {
  background: var(--color-bg, #f6f3ec);
  border-left: 3px solid var(--color-primary, #1f5e57);
  padding: 22px 24px;
  margin: 0 0 18px 0;
  border-radius: 0 4px 4px 0;
}
.test-h3 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 6px 0;
  color: var(--color-text, #1a1a1a);
}
.test-lead {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: var(--color-primary, #1f5e57);
  margin: 0 0 14px 0;
}
.test-range {
  margin: 6px 0 14px 22px;
  padding: 0;
  font-size: 15.5px;
  line-height: 1.55;
}
.test-range li { margin-bottom: 6px; }
.test-measures {
  background: #fff;
  border-left: 2px solid #b9ad8d;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.55;
  margin: 8px 0 0 0;
  color: var(--color-text-muted, #4a4a4a);
}
.test-readout {
  background: #fdf6e3;
  border: 1px solid #d4cab0;
  padding: 18px 22px;
  margin: 22px 0 18px 0;
  border-radius: 4px;
}
.test-readout .test-h3 { font-size: 19px; margin-bottom: 12px; }
.test-readout p { font-size: 15.5px; line-height: 1.6; margin: 0 0 10px 0; }
.test-readout p:last-child { margin-bottom: 0; }
.test-footnote {
  font-size: 14px;
  font-style: italic;
  color: var(--color-text-muted, #4a4a4a);
  margin: 14px 0 0 0;
  line-height: 1.55;
}
.test-footnote em a { font-style: normal; font-weight: 600; color: var(--color-primary, #1f5e57); }

/* ---- Mechanisms ---- */
.mech { margin: 0 0 32px 0; padding-bottom: 28px; border-bottom: 1px solid var(--color-divider, #e6dfd2); }
.mech:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.mech-h3 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 8px 0;
  color: var(--color-text, #1a1a1a);
}
.mech-lead {
  font-style: italic;
  color: var(--color-primary, #1f5e57);
  font-size: 16px;
  margin: 0 0 12px 0;
}

/* ---- Products block ---- */
.products-block { background: var(--color-bg, #f6f3ec); }
.product {
  background: #fff;
  border: 1px solid var(--color-divider, #e6dfd2);
  border-radius: 4px;
  padding: 22px 24px;
  margin: 0 0 16px 0;
}
.product-h3 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 10px 0;
}
.local-check {
  font-size: 14px;
  margin: 10px 0 0 0;
}
.local-check a { color: var(--color-primary, #1f5e57); text-decoration: none; font-weight: 600; }
.local-check a:hover, .local-check a:focus { text-decoration: underline; }
.two-brand-policy {
  margin-top: 18px;
  font-size: 15px;
  font-style: italic;
  color: var(--color-text-muted, #4a4a4a);
  border-left: 3px solid var(--color-primary, #1f5e57);
  padding-left: 14px;
}

/* ---- Refusals ---- */
.refusals { background: #fff; }
.refusal-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}
.refusal-list li {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-size: 19px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider, #e6dfd2);
}
.refusal-list li:last-child { border-bottom: 0; }

/* ---- PDF contents ---- */
.pdf-contents { background: var(--color-bg, #f6f3ec); }
.contents-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}
.contents-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px solid var(--color-divider, #e6dfd2);
  font-size: 16px;
  line-height: 1.5;
}
.contents-list li:before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-primary, #1f5e57);
  font-weight: 600;
}
.contents-list li:last-child { border-bottom: 0; }

/* ---- Buy block ---- */
.buy-block {
  background: var(--color-text, #1a1a1a);
  color: #f6f3ec;
  text-align: center;
}
.buy-block .block-h2 { color: #fff; }
.buy-price {
  margin: 8px 0 28px 0;
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
}
.buy-price .amount {
  font-size: 56px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}
.buy-price .once {
  display: block;
  font-size: 15px;
  font-style: italic;
  color: #b8b0a0;
  margin-top: 6px;
}
.buy-cta-wrap { margin: 0 0 24px 0; }
.buy-button {
  display: inline-block;
  background: var(--color-primary, #1f5e57);
  color: #fff;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  padding: 16px 32px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
  border: 0;
}
.buy-button:hover, .buy-button:focus { background: #2a7a71; outline: 2px solid #fff; outline-offset: 2px; }
.buy-button[data-stripe-placeholder="true"]:after {
  content: " \00b7 checkout link wired on activation";
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  opacity: 0.75;
}
.buy-button-pending {
  background: var(--paint-sol-density, #4a4a4a) !important;
  cursor: not-allowed;
  pointer-events: none;
}
.buy-button-pending:after { display: none; }
.buy-note {
  font-size: 14px;
  line-height: 1.6;
  color: #d5cdb9;
  max-width: 560px;
  margin: 0 auto 14px auto;
  text-align: left;
}
.buy-legal {
  font-size: 12px;
  color: #968d77;
  margin: 0 auto;
  max-width: 560px;
  text-align: left;
}
.buy-legal code {
  background: #2a2a2a;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 12px;
}

/* ---- Sign-off ---- */
.sign-off { background: #fff; border-bottom: 0; padding: 40px 0; }
.signoff-line {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--color-text-muted, #4a4a4a);
  margin: 0;
  text-align: center;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-bg, #f6f3ec);
  border-top: 1px solid var(--color-divider, #e6dfd2);
  padding: 32px 0;
}
.footer-network {
  font-size: 14px;
  color: var(--color-text-muted, #4a4a4a);
  margin: 0 0 10px 0;
}
.footer-network a { color: var(--color-primary, #1f5e57); text-decoration: none; }
.footer-network a:hover, .footer-network a:focus { text-decoration: underline; }
.footer-meta {
  font-size: 13px;
  color: var(--color-text-muted, #4a4a4a);
  margin: 0;
}

/* ---- Mobile tweaks ---- */
@media (max-width: 640px) {
  .hero { padding: 48px 0 40px 0; }
  .hero-h1 { font-size: 30px; }
  .hero-sub { font-size: 17px; }
  .block { padding: 40px 0; }
  .block-h2 { font-size: 24px; }
  .buy-price .amount { font-size: 44px; }
  .buy-button { font-size: 16px; padding: 14px 24px; }
  .refusal-list li { font-size: 17px; }
  .nav-links { display: none; }
}

/* ---- Print ---- */
@media print {
  .crisis-strip, .nav-buy, .site-header, .site-footer, .photo-slot { display: none !important; }
  .buy-block { background: #fff !important; color: #000 !important; }
  .buy-block .block-h2, .buy-price .amount { color: #000 !important; }
  body { color: #000; background: #fff; }
}

/* v3 patch: Gemini calibration note + Stripe placeholder notice */
.test-calibration {
  font-size: 0.9rem;
  opacity: 0.78;
  border-left: 2px solid #999;
  padding-left: 0.85rem;
  margin-top: 0.4rem;
}
.buy-placeholder-notice {
  display: inline-block;
  margin: 0.65rem 0 0.9rem;
  padding: 0.55rem 0.85rem;
  background: #f6f4ee;
  border-left: 3px solid #444;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
