/* =========================================================================
   DCFN - Patents — site.css
   Palette: LEF purple primary, dark navy text, gray secondary.
   Mirrors the DCFN-Research aesthetic (sister product) so the two feel
   like one family.
   ========================================================================= */

:root {
  --bg: #F4F0FA;
  --bg-warm: #F9F7FC;
  --white: #FFFFFF;
  --purple: #6B46C1;
  --purple-dark: #553C9A;
  --purple-light: #9F7AEA;
  --purple-pale: #F5F0FC;
  --navy: #2C3E50;
  --text: #2C3E50;
  --text-mid: #4A5568;
  --text-muted: #7F8C8D;
  --border: #E2E8F0;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --radius: 12px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Cinzel', Georgia, serif;
  --font-mono: 'Consolas', 'Menlo', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }

/* NAV */
nav.site-nav {
  background: rgba(244, 240, 250, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--purple-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.nav-brand-row { display: flex; align-items: center; gap: 0.5em; }
.nav-by {
  font-size: 0.82em;
  color: var(--purple);
  text-decoration: underline;
  font-weight: 500;
  opacity: 0.9;
}
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a {
  font-size: 0.88rem;
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
}
.nav-links a:hover { color: var(--purple); }
.nav-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--purple);
}

/* HERO */
.hero {
  text-align: center;
  padding: 5rem 2rem 3.5rem;
  background: linear-gradient(180deg, var(--purple-pale) 0%, var(--bg) 100%);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.hero .sub {
  font-size: 1.05rem;
  color: var(--purple-dark);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-mid);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-cta {
  display: inline-block;
  background: var(--purple);
  color: white;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.hero-cta:hover { background: var(--purple-dark); color: white; }
.hero-secondary {
  display: inline-block;
  color: var(--purple);
  padding: 0.85rem 2rem;
  border: 1.5px solid var(--purple);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 0.75rem;
}
.hero-secondary:hover { background: var(--purple-pale); color: var(--purple); }

/* SECTIONS */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.section-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}
.section h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.section > p.section-lede {
  font-size: 1rem;
  color: var(--text-mid);
  max-width: 700px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* DATA SOURCES */
.sources-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.source-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.3rem;
  text-align: center;
  box-shadow: var(--shadow);
  flex: 0 1 calc(25% - 0.75rem);
  min-width: 200px;
}
.source-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--navy);
}
.source-card p {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.45;
}
.source-card .badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1E40AF;
  background: #DBEAFE;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* TIER LAYERS */
.layers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 460px));
  gap: 1.5rem;
  justify-content: center;
}
.layer {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--purple);
  display: flex;
  flex-direction: column;
}
.layer.layer-paid { border-top: 3px solid #f0c040; }
.layer-header { margin-bottom: 0.7rem; }
.layer-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.layer.layer-paid .layer-num { color: #b45309; }
.layer-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  display: inline;
  color: var(--navy);
}
.layer-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--purple-pale);
  color: var(--purple);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.layer-badge-paid {
  background: #fef3c7;
  color: #b45309;
}
.layer > p {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.55;
}
.layer ul {
  margin-top: 0.5rem;
  padding-left: 1.1rem;
}
.layer li {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 0.35rem;
}
.layer-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid #eee;
}
.layer-includes span {
  font-size: 0.72rem;
  background: rgba(107, 70, 193, 0.06);
  color: #4A5568;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.tier-foot {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid #eee;
  line-height: 1.5;
}

/* TIMELINE (How it works) */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.tl-step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  position: relative;
}
.tl-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--purple);
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}
.tl-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.tl-step p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.55;
}

/* INTAKE */
.intake-wrap {
  background: var(--bg-warm);
  padding: 3.5rem 0;
}
.intake-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}
.intake-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--purple); }
.tab-btn.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}
.tab-panel.hidden { display: none; }

.intake-card label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}
.intake-card input[type="text"],
.intake-card textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font);
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  color: var(--text);
}
.intake-card input[type="text"]:focus,
.intake-card textarea:focus { border-color: var(--purple); }
.intake-card textarea { resize: vertical; line-height: 1.55; }
.intake-card .hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}
.intake-optional {
  margin-top: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.intake-optional summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-mid);
  font-weight: 500;
}
.intake-optional[open] summary { margin-bottom: 0.5rem; }

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--purple);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}
.btn-primary:hover { background: var(--purple-dark); }
.intake-foot {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* FOOTER */
footer.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2.75rem 2rem;
  font-size: 0.84rem;
  margin-top: 2rem;
}
footer.site-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
footer.site-footer a:hover { color: var(--purple-light); }
footer .f-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  color: white;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
footer .f-dba { color: rgba(255,255,255,0.6); font-style: normal; }
footer .f-url { color: var(--purple-light); font-style: italic; opacity: 0.85; }
footer .f-disclaimer {
  margin-top: 1.2rem;
  font-size: 0.78rem;
  opacity: 0.55;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}
footer .f-legal {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  opacity: 0.5;
}
footer .f-legal a { margin: 0 0.4rem; }

/* SAMPLER-SCOPE CALLOUT — rose-red, contrasts with purple page palette */
.sampler-scope {
  max-width: 900px;
  margin: 1rem auto 0;
  padding: 1.1rem 1.3rem 1.2rem;
  background: #FCE8E8;
  border-left: 3px solid #BE1E2D;
  border-radius: 6px;
}
.sampler-scope-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8B1520;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.sampler-scope p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}
.sampler-scope p + p { margin-top: 0.55rem; }
.sampler-scope strong { color: var(--navy); font-weight: 600; }
.sampler-scope a { color: #8B1520; font-weight: 600; }

/* LAYER 2 — WHAT YOU GET (deliverable-type preview) */
.l2-whatyouget {
  max-width: 1100px;
  padding-top: 2rem;
  padding-bottom: 1rem;
}
.l2-whatyouget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}
.whatyouget-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--purple);
  display: flex;
  flex-direction: column;
}
.whatyouget-card-addon { border-top: 3px solid #f0c040; }
.whatyouget-card-licensed {
  border-top: 3px solid var(--text-muted);
  background: #FBFAFD;
}
.whatyouget-price-licensed {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple-dark);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.whatyouget-what-this-is {
  font-size: 0.9rem;
  color: var(--purple-dark);
  line-height: 1.55;
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--border);
}
.whatyouget-what-this-is em { font-style: italic; }
.whatyouget-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
}
.whatyouget-head h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
}
.whatyouget-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  background: var(--purple-pale);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.whatyouget-card-addon .whatyouget-price {
  color: #b45309;
  background: #fef3c7;
}
.whatyouget-blurb {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}
.whatyouget-sections {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.whatyouget-sections li {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.5;
  padding: 0.35rem 0;
  padding-left: 1rem;
  position: relative;
}
.whatyouget-sections li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
}
.whatyouget-sections li strong {
  color: var(--navy);
  font-weight: 600;
}
.whatyouget-contents {
  font-size: 0.86rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.whatyouget-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.6rem;
}
.whatyouget-sample {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  display: inline-block;
}
.whatyouget-sample:hover { color: var(--purple-dark); }
.whatyouget-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* Per-row detail (expand inline for context) */
.l2-row-detail {
  margin-top: 0.3rem;
  margin-left: 2.2rem;
  padding: 0.5rem 0;
}
.l2-row-detail summary {
  font-size: 0.82rem;
  color: var(--purple);
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0;
  outline: none;
  list-style: none;
}
.l2-row-detail summary::-webkit-details-marker { display: none; }
.l2-row-detail summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--text-muted);
  transition: transform 0.15s;
}
.l2-row-detail[open] summary::before { transform: rotate(90deg); }
.l2-detail-body {
  padding: 0.6rem 0.9rem 0.5rem;
  background: var(--bg-warm);
  border-left: 2px solid var(--purple);
  border-radius: 0 4px 4px 0;
  margin-top: 0.4rem;
}
.l2-detail-rationale {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.l2-detail-draft-preview {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.65;
  font-family: 'Georgia', serif;
  white-space: pre-wrap;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0;
}
.l2-detail-draft-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}
.l2-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 1.2rem;
  margin-bottom: 0.7rem;
}
.l2-detail-stats div { display: flex; gap: 0.4rem; align-items: baseline; }
.l2-detail-stats dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.l2-detail-stats dd {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}
.l2-detail-crosslink {
  font-size: 0.82rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  margin-top: 0.4rem;
}
.l2-detail-crosslink a { color: var(--purple); font-weight: 600; }

.l2-hero-link {
  font-size: 0.92rem;
  margin-top: 0.6rem;
  color: var(--text-mid);
}
.l2-hero-link a { color: var(--purple); font-weight: 600; }

@media (max-width: 900px) {
  .l2-whatyouget-grid { grid-template-columns: 1fr; }
}

/* LAYER 2 SELECTION PAGE */
.l2-hero { padding: 4rem 2rem 2.5rem; }
.l2-hero h1 { font-size: 2.2rem; }
.l2-hero p { font-size: 1.05rem; max-width: 720px; }
.l2-hero-math {
  font-size: 0.95rem;
  color: var(--text-mid);
  font-style: italic;
  margin-top: 0.4rem;
}
.l2-select {
  max-width: 860px;
  padding-top: 2.5rem;
  padding-bottom: 9rem; /* leave room for sticky footer */
}
.l2-group {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.l2-group-head h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.l2-group-sub {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 1.1rem;
}
.l2-group-sub code {
  background: var(--purple-pale);
  color: var(--purple-dark);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}
.l2-rows { list-style: none; padding: 0; margin: 0; }
.l2-row {
  border-top: 1px solid var(--border);
  padding: 0.85rem 0;
}
.l2-row:first-child { border-top: none; padding-top: 0; }
.l2-check {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.l2-check:hover { background: var(--purple-pale); }
.l2-check input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
  cursor: pointer;
  flex-shrink: 0;
}
.l2-row-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.l2-row-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.45;
}
.l2-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  align-items: center;
}
.l2-row-kind { color: var(--purple); font-weight: 600; }
.l2-row-app {
  font-family: var(--font-mono);
  color: var(--text-mid);
  font-size: 0.8rem;
}

/* Classification badges on proposed-patent rows */
.l2-classification {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}
.l2-classification-novel { background: #dcfce7; color: #166534; }
.l2-classification-prior-art-adjacent { background: #fef3c7; color: #b45309; }
.l2-classification-prior-art-convergent { background: #fee2e2; color: #991b1b; }

/* Expand sub-row nested under BuildMe */
.l2-check-sub {
  margin-left: 2.2rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
  margin-top: 0.2rem;
}
.l2-check-sub.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.l2-check-sub.is-disabled:hover { background: transparent; }
.l2-row-expand-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple);
}

.l2-empty {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.8rem 0;
}

/* STICKY FOOTER (running total + checkout) */
.l2-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  z-index: 40;
}
.l2-footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.l2-total {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.l2-total-line {
  font-size: 0.88rem;
  color: var(--text-mid);
  font-family: var(--font-mono);
}
.l2-total-line em { font-style: normal; color: var(--text-muted); font-family: var(--font); }
.l2-total-sum {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.l2-total-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.l2-total-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
}
.l2-checkout-btn {
  width: auto;
  margin-top: 0;
  padding: 0.9rem 1.75rem;
  font-size: 0.95rem;
  white-space: nowrap;
}
.l2-checkout-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}
.l2-pricing-note {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.4;
}
.l2-pricing-note a {
  color: var(--text-muted);
  text-decoration: underline;
  font-weight: 500;
}
.l2-pricing-note a:hover { color: var(--navy); }

@media (max-width: 680px) {
  .l2-footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
  }
  .l2-checkout-btn { width: 100%; }
  .l2-select { padding-bottom: 13rem; }
}

/* LAYER 2 RESULT PAGE */
.l2-result {
  max-width: 860px;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Progress header */
.l2-result-progress {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.l2-result-progress-label {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.6rem;
  font-weight: 500;
}
.l2-result-progress-label span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-dark);
}
.l2-result-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.l2-result-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-light) 100%);
  transition: width 0.4s ease;
  border-radius: 3px;
}

/* Deliverable card grid */
.l2-result-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.l2-result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: box-shadow 0.2s, border-color 0.2s;
  border-left: 3px solid var(--border);
}
.l2-result-card[data-status="ready"] { border-left-color: var(--purple); }
.l2-result-card[data-status="failed"] { border-left-color: #BE1E2D; }
.l2-result-card[data-status="generating"] { border-left-color: #f0c040; }
.l2-result-card-icon {
  font-size: 1.6rem;
  text-align: center;
  opacity: 0.85;
}
.l2-result-card-body {
  min-width: 0;
}
.l2-result-card-kind {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.l2-result-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 0.4rem;
  word-break: break-word;
}
.l2-result-card-status { display: flex; align-items: center; gap: 0.5rem; }
.l2-result-status-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.l2-result-status-ready {
  background: var(--purple-pale);
  color: var(--purple-dark);
}
.l2-result-status-failed {
  background: #FCE8E8;
  color: #8B1520;
}
.l2-result-status-generating {
  background: #fef3c7;
  color: #b45309;
}
.l2-result-card-error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #8B1520;
  font-style: italic;
  line-height: 1.45;
}
.l2-result-card-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 100px;
}
.l2-result-download {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--purple);
  color: white !important;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}
.l2-result-download:hover { background: var(--purple-dark); color: white !important; }
.l2-result-retry {
  padding: 0.55rem 1.1rem;
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
}
.l2-result-retry:hover { background: var(--purple-pale); }

/* Spinner for generating state */
.l2-result-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: l2-spin 0.9s linear infinite;
}
@keyframes l2-spin {
  to { transform: rotate(360deg); }
}

/* Footnote + escalation */
.l2-result-footnote {
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}
.l2-result-escalation {
  margin-top: 0.75rem;
  padding: 0.9rem 1.2rem;
  background: #FCE8E8;
  border-left: 3px solid #BE1E2D;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
}
.l2-result-escalation a { color: #8B1520; font-weight: 600; }
.l2-result-escalation code {
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Generic btn-secondary (used by retry and future outlined CTAs) */
.btn-secondary {
  padding: 0.7rem 1.4rem;
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--purple-pale); }

@media (max-width: 640px) {
  .l2-result-card {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .l2-result-card-icon { display: none; }
  .l2-result-card-action { justify-content: flex-start; }
}

/* LEGAL PAGES (Terms, Privacy) */
.legal-page {
  max-width: 780px;
}
.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2.2rem;
  margin-bottom: 0.6rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.legal-page h2:first-of-type { margin-top: 0; }
.legal-page p {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 0.9rem;
  line-height: 1.65;
}
.legal-page ul {
  margin: 0.5rem 0 1rem 1.25rem;
  padding: 0;
}
.legal-page li {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.6;
}
.legal-page code {
  background: var(--purple-pale);
  color: var(--purple-dark);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}
.legal-page a { color: var(--purple); text-decoration: underline; }
.legal-page a:hover { color: var(--purple-dark); }
.legal-page .legal-preamble {
  font-size: 1.02rem;
  color: var(--text-mid);
  padding: 1rem 1.2rem;
  background: var(--purple-pale);
  border-left: 3px solid var(--purple);
  border-radius: 6px;
  margin-bottom: 1.5rem;
}
.legal-page .legal-contact {
  background: var(--bg-warm);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 0.5rem;
}
.legal-page .legal-crosslink {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

/* SECTION CENTERED MODIFIER */
.section.section-centered {
  text-align: center;
}
.section.section-centered .section-label {
  margin-left: auto;
  margin-right: auto;
}
.section.section-centered > p.section-lede {
  margin-left: auto;
  margin-right: auto;
}

/* GENERATING PAGE */
.status-card {
  max-width: 640px;
  margin: 4rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
}
.status-card h1 {
  font-family: var(--font-display);
  color: var(--navy);
  margin-bottom: 1rem;
}
.status-card .lede {
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 2rem;
}
.progress-track {
  height: 8px;
  background: rgba(107, 70, 193, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  max-width: 420px;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--purple) 0%,
    #8B5CF6 100%
  );
  border-radius: 999px;
  transition: width 0.6s ease-out;
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: progress-shimmer 1.8s ease-in-out infinite;
}
@keyframes progress-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.status-card .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(107, 70, 193, 0.18);
  border-top-color: var(--purple);
  border-radius: 50%;
  margin: 1rem auto;
  animation: status-spin 0.9s linear infinite;
}
@keyframes status-spin {
  to { transform: rotate(360deg); }
}
.status-text {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero-secondary { margin-left: 0; margin-top: 0.5rem; }
  .layers { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .sources-grid .source-card { flex: 0 1 calc(50% - 0.5rem); }
  .timeline { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
