:root {
  color-scheme: light;
  --ink: #1f1d1a;
  --muted: #5e5a53;
  --surface: #f9f4ef;
  --accent: #8f4f2c;
  --accent-dark: #6f3d22;
  --line: #e2d7cc;
  --focus: #2f6f6a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff6ef 0%, #f2e6da 50%, #efe3d8 100%);
  min-height: 100vh;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.4rem;
  margin-top: 28px;
}

p {
  line-height: 1.6;
  color: var(--muted);
}

ul {
  padding-left: 20px;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 18px 45px rgba(31, 29, 26, 0.08);
  display: flex;
  flex-direction: column;
}

.state-label {
  margin: 0 0 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hero {
  display: grid;
  gap: 16px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--accent-dark);
}

.cta:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.quiz {
  display: grid;
  gap: 18px;
}

.progress {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.option-btn {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  text-align: left;
  transition: border 0.2s ease, transform 0.2s ease;
}

.option-btn:hover,
.option-btn:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.status {
  margin-top: 16px;
  font-style: italic;
  color: var(--muted);
}

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

.section-title {
  margin-top: 32px;
  font-weight: bold;
}

.inline-note {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--muted);
}

.verdict-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  background: #fffaf5;
  box-shadow: 0 18px 40px rgba(31, 29, 26, 0.12);
  margin-bottom: 24px;
}

.verdict-block h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

.verdict-block .diagnosis-subheadline {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
}


.explanation-block {
  padding: 6px 0 8px;
  border-top: 1px solid var(--line);
  margin-bottom: 24px;
}

.explanation-label {
  margin: 18px 0 4px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  text-transform: none;
}

.explanation-block p {
  margin: 0 0 16px;
}

.explanation-list {
  margin: 0 0 4px;
  color: var(--muted);
}

.action-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  background: #f7f1ea;
  text-align: center;
  margin-top: auto;
}

.support-block p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.support-block p:last-child {
  margin-bottom: 0;
}

body[data-guard="routine"] .routine-disclaimer p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Routine UI audit:
- Opening authority lines shared weight with section headers.
- Routine steps read as isolated blocks rather than a sequence.
- CTA blended with body content and felt optional.
*/
body[data-guard="routine"] main {
  padding-top: 48px;
}

body[data-guard="routine"] .card {
  padding: 32px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(31, 29, 26, 0.08);
}

body[data-guard="routine"] h1 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}

body[data-guard="routine"] h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 36px;
  color: var(--ink);
}

body[data-guard="routine"] p,
body[data-guard="routine"] ul {
  line-height: 1.7;
}

body[data-guard="routine"] .authority-block {
  margin: 28px 0 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  background: #fffaf5;
  box-shadow: 0 18px 40px rgba(31, 29, 26, 0.12);
}

body[data-guard="routine"] .authority-block h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

body[data-guard="routine"] .authority-block p {
  margin: 0 0 14px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink);
}

body[data-guard="routine"] .routine-sequence {
  margin: 30px 0;
  padding: 8px 0 6px 18px;
  border-left: 2px solid var(--line);
}

body[data-guard="routine"] .routine-sequence h2 {
  margin-top: 0;
  color: var(--ink);
}

body[data-guard="routine"] .routine-sequence h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 8px;
  color: var(--ink);
}

body[data-guard="routine"] .routine-sequence p {
  margin: 6px 0;
  color: var(--muted);
}

body[data-guard="routine"] .product-mapping {
  margin-top: 30px;
}

body[data-guard="routine"] .product-mapping h2 {
  font-size: 1rem;
  color: var(--muted);
}

body[data-guard="routine"] .product-mapping ul {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

body[data-guard="routine"] .routine-cta {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

body[data-guard="routine"] .routine-cta h2 {
  margin-top: 0;
  color: var(--muted);
}

body[data-guard="routine"] .routine-cta p {
  margin: 10px 0 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

body[data-guard="routine"] .routine-cta [data-cta="shop-routine"],
body[data-guard="routine"] .routine-cta p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  font-size: 0.95rem;
}

body[data-guard="routine"] .routine-cta [data-cta="shop-routine"]:hover,
body[data-guard="routine"] .routine-cta [data-cta="shop-routine"]:focus-visible,
body[data-guard="routine"] .routine-cta p:hover,
body[data-guard="routine"] .routine-cta p:focus-visible {
  background: var(--accent-dark);
}

.product-list-shell {
  margin-bottom: 28px;
}

.product-list {
  display: grid;
  gap: 24px;
}

.product-card h2 {
  margin-top: 12px;
}

.product-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.product-card .role-label {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 8px 0 6px;
  color: var(--ink);
}

.product-card .product-name {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 6px;
}

.product-card .support-text {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.product-card .support-assigned {
  margin-bottom: 2px;
}

.product-card .support-detail {
  margin-top: 0;
}

.product-card .support-text.muted {
  color: var(--muted);
}

.product-compact h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.product-compact ul {
  font-size: 0.85rem;
  margin-top: 6px;
}

.product-link-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.product-link-secondary:hover,
.product-link-secondary:focus-visible {
  background: #1f1d1a;
  color: #fff;
}

@media (min-width: 900px) {
  .product-card {
    display: grid;
    grid-template-columns: 310px 1fr;
    column-gap: 24px;
    align-items: start;
  }

  .product-card .product-image {
    grid-row: 2 / span 6;
  }

  .product-card .product-link {
    justify-self: start;
  }

  .product-card .product-compact {
    columns: 2;
    column-gap: 24px;
  }

  .product-card .product-compact h3 {
    break-inside: avoid;
  }

  .product-card .product-compact ul {
    break-inside: avoid;
  }
}
.product-image {
  width: 310px;
  height: 310px;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
}

.product-link {
  margin-top: 12px;
  align-self: flex-start;
}

body[data-guard="routine"] .routine-action {
  text-align: left;
}

body[data-guard="routine"] .routine-action .routine-cta {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

body[data-guard="routine"] .routine-disclaimer h2 {
  margin-top: 18px;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }

  main {
    padding: 36px 16px 48px;
  }

  body[data-guard="routine"] h1 {
    font-size: 1.3rem;
  }

  body[data-guard="routine"] .authority-block p {
    font-size: 1.3rem;
  }

  body[data-guard="routine"] .authority-shell .authority-block p {
    font-size: 1.4rem;
  }
}

/* =========================================
   ROUTINE UI FINAL AUTHORITY LOCK
   Micro refinements only
   ========================================= */

/* 1. Make opening authority statement read as a prescription */
body[data-guard="routine"] .authority-block p:first-of-type {
  font-weight: 600;
  max-width: 50ch;
}

/* 2. Further demote explanatory reassurance sections */
body[data-guard="routine"] .routine-explanation {
  opacity: 0.85;
}

/* 3. Push product role mapping into appendix territory */
body[data-guard="routine"] .product-mapping {
  opacity: 0.85;
}

/* =========================================
   ROUTINE UI STATUS: LOCKED
   -----------------------------------------
   The routine page UI is authority-complete.
   Do not:
   - Add collapsible sections
   - Reintroduce editorial styling
   - Adjust hierarchy for aesthetics
   - Optimise for engagement or conversion

   Any future changes require explicit
   instruction to reopen routine UI.
   ========================================= */

/* =========================================
   ROUTINE UI — HIDE INTERNAL SYSTEM LABELS
   These headings are structural, not user-facing
   ========================================= */

/* Hide “Opening authority statement” label */
body[data-guard="routine"] .authority-block > h2 {
  display: none;
}

/* Hide “Product role mapping (non-branded)” label */
body[data-guard="routine"] .product-mapping > h2 {
  display: none;
}

/* Hide “End-of-page action” label */
body[data-guard="routine"] .routine-cta > h2 {
  display: none;
}

/* =========================================
   ROUTINE UI — HIDE META FRAMING LABELS
   ========================================= */

/* Hide meta label “Prescription” */
body[data-guard="routine"] .routine-header > .meta-label,
body[data-guard="routine"] .routine-header > h2 {
  display: none;
}

/* Neutralise “Routine: …” title framing */
body[data-guard="routine"] .routine-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 2rem;
  color: var(--ink);
}

/* Remove editorial emphasis like “Routine:” prefix visually */
body[data-guard="routine"] .routine-title::before {
  content: "";
}

/* =========================================
   ROUTINE UI — REMOVE PRESCRIPTION META LABEL
   ========================================= */

/*
  Hide any standalone "Prescription" label that appears
  as the first rendered element on routine pages.
  This is a CMS/template artifact, not user-facing content.
*/

body[data-guard="routine"] > h1:first-child,
body[data-guard="routine"] > h2:first-child,
body[data-guard="routine"] > h3:first-child,
body[data-guard="routine"] > p:first-child {
  display: none;
}

/* =========================================
   ROUTINE UI — REMOVE PRESCRIPTION META LABEL (STRUCTURE-SAFE)
   ========================================= */
body[data-guard="routine"] .card > p.muted:first-of-type {
  display: none;
}

/* =========================================
   ROUTINE UI — NEUTRALISE ROUTINE TITLE (STRUCTURE-SAFE)
   ========================================= */
body[data-guard="routine"] .card > h1 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 2.5rem;
  color: var(--ink);
}

body[data-guard="routine"] .authority-shell {
  margin: 20px 0 48px;
  padding: 26px 28px;
  border-radius: 18px;
  background: #fffaf5;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(31, 29, 26, 0.12);
}

body[data-guard="routine"] .authority-shell .authority-block {
  margin: 0;
}

body[data-guard="routine"] .authority-shell .authority-block p {
  font-size: 1.85rem;
  font-weight: 600;
  margin: 0 0 16px;
}

body[data-guard="routine"] .authority-shell .authority-block p + p {
  font-weight: 500;
}

body[data-guard="routine"] .routine-rationale {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}

body[data-guard="routine"] .routine-rationale h2 {
  margin-top: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

body[data-guard="routine"] .routine-rationale p {
  color: var(--ink);
  max-width: 65ch;
}
/* =========================================
   ROUTINE AUTHORITY OVERRIDES
   Converts content feel into protocol feel
   ========================================= */

/* 1. De-article all routine section headings */
body[data-guard="routine"] h2 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-top: 2.5rem;
}

/* 2. Contain and quiet procedural blocks */
body[data-guard="routine"] .routine-sequence {
  margin: 0 0 32px;
  padding: 18px 20px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: #f7f2ed;
}

body[data-guard="routine"] .routine-sequence h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 0;
}

/* 3. Promote step actions to controlled instructions */
body[data-guard="routine"] .routine-sequence h3 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 1.1rem 0 0.25rem;
}

/* 4. Visually demote explanations */
body[data-guard="routine"] .routine-sequence p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  margin-left: 0.5rem;
  max-width: 60ch;
}

/* 4. Turn “why / mistakes / expect” into clinical notes */
body[data-guard="routine"] .routine-notes,
body[data-guard="routine"] .common-mistakes,
body[data-guard="routine"] .what-to-expect {
  font-size: 0.85rem;
  background: #f7f5f2;
  border-left: 3px solid var(--line);
  padding: 1rem 1.25rem;
  margin: 2.5rem 0;
  color: var(--muted);
}

/* 5. Quiet the product mapping (appendix feel) */
body[data-guard="routine"] .product-mapping {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 3.5rem;
}

body[data-guard="routine"] .product-mapping h2 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

body[data-guard="routine"] .product-mapping li {
  margin: 0.25rem 0;
}

/* Product execution pages */
.execution-card {
  display: grid;
  gap: 1.25rem;
}

.execution-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.execution-step {
  border: 1px solid rgba(10, 12, 13, 0.12);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #fff;
}

.execution-meta {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.execution-step h3 {
  margin: 0 0 0.7rem;
}

.execution-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid #0f1416;
  color: #0f1416;
  text-decoration: none;
  font-weight: 600;
}

.execution-link:hover {
  background: #0f1416;
  color: #fff;
}

.product-card {
  display: grid;
  gap: 1.25rem;
}

.product-card .role-label {
  margin: -0.4rem 0 0;
  font-weight: 600;
  color: #1f2937;
}

.product-section h2 {
  margin-bottom: 0.4rem;
}

.product-card .cta {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  background: #0f1416;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.product-card .cta:hover {
  opacity: 0.9;
}

.product-card .back-link {
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
}

.product-card .back-link:hover {
  text-decoration: underline;
}

body::after {
  content: "This site uses basic analytics to understand how the diagnostic is used. No personal data is collected.";
  display: block;
  max-width: 760px;
  margin: 16px auto 24px;
  padding: 0 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.decision-guide main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  max-width: none;
  width: 100%;
}

.decision-guide .card {
  width: min(960px, 92vw);
  margin-top: 64px;
}

.decision-guide .action-block {
  margin-top: 32px;
  padding: 0;
  border: none;
  background: transparent;
}

.decision-guide footer {
  margin-top: auto;
  padding: 48px 0 32px;
  text-align: center;
}

.decision-guide #confirmation-cta,
.decision-guide #confirmation-cta span {
  color: #ffffff;
}

.decision-guide #confirmation-cta {
  background-color: #8b4a23;
  border: none;
}

.decision-guide #confirmation-cta span {
  background: transparent;
}

.decision-guide #confirmation-cta:hover,
.decision-guide #confirmation-cta:focus {
  background-color: #9c552a;
  color: #ffffff;
}
