:root {
  --ink: #15222d;
  --muted: #5c6b76;
  --navy: #173f5f;
  --navy-2: #245b80;
  --gold: #f5b642;
  --gold-soft: #fff4d7;
  --blue-soft: #e9f1f6;
  --paper: #ffffff;
  --ground: #f4f7f8;
  --line: #d7e0e5;
  --success: #246b4c;
  --success-soft: #e7f4ed;
  --warning: #8a5a09;
  --warning-soft: #fff5dc;
  --danger: #9e3030;
  --shadow: 0 18px 55px rgba(21, 34, 45, 0.09);
  --radius: 20px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(36, 91, 128, 0.09), transparent 28rem),
    var(--ground);
  line-height: 1.55;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--paper);
  color: var(--navy);
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(215, 224, 229, .9);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font-family: Georgia, serif; font-size: 1.02rem; color: var(--navy); }
.brand small { margin-top: .2rem; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark {
  width: 38px;
  height: 38px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  box-shadow: 0 6px 16px rgba(23, 63, 95, .2);
}
.brand-mark span { position: absolute; display: block; background: var(--gold); border-radius: 999px; }
.brand-mark span:nth-child(1) { width: 19px; height: 4px; }
.brand-mark span:nth-child(2) { width: 4px; height: 19px; }
.brand-mark span:nth-child(3) { width: 8px; height: 8px; background: white; transform: translate(9px, -9px); }
.save-status { color: var(--muted); font-size: .78rem; text-align: right; }

main { width: min(100%, 960px); margin: 0 auto; padding: 1rem 1rem 7.5rem; }
.view { display: none; animation: fade-in .22s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.18; }
h1 { margin-bottom: .75rem; font: 700 clamp(2rem, 7vw, 3.5rem)/1.03 Georgia, serif; letter-spacing: -.025em; }
h2 { margin-bottom: .55rem; font: 700 1.35rem/1.18 Georgia, serif; }
h3 { margin-bottom: .35rem; font-size: 1rem; }
.eyebrow { margin-bottom: .45rem; color: var(--navy-2); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.intro-panel { padding: 2rem .15rem 1rem; }
.intro-copy { max-width: 43rem; margin-bottom: 0; color: #384957; font-size: 1.08rem; }
.lead-note, .section-intro { color: var(--muted); max-width: 50rem; }

.safeguard {
  margin: 1rem 0;
  padding: 1.2rem;
  border: 1px solid #b9cedd;
  border-left: 5px solid var(--navy-2);
  border-radius: var(--radius);
  background: var(--blue-soft);
}
.safeguard p:last-child { margin-bottom: 0; }
.safeguard.compact { margin-top: 1.5rem; }

.install-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1.15rem;
  align-items: start;
  margin: 1rem 0;
  padding: 1.25rem;
  border: 1px solid #d9e1e6;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, var(--gold-soft));
  box-shadow: var(--shadow);
}
.install-card > img { width: 84px; height: 84px; border-radius: 20px; }
.install-card h2 { margin-bottom: .45rem; }
.install-card p { margin-bottom: .8rem; }
.install-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.primary-link, .install-button, .help-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
}
.primary-link { background: var(--navy); color: #fff; }
.install-button { border: 1px solid #d69b26; background: var(--gold); color: var(--navy); cursor: pointer; }
.help-link { border: 1px solid var(--navy); background: #fff; color: var(--navy); }
.install-status { min-height: 1.25rem; margin-top: .65rem; color: var(--success); font-size: .88rem; font-weight: 700; }
.install-dialog { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgba(10,28,42,.68); }
.install-dialog-inner { width: min(92vw, 520px); padding: 1.4rem; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.install-dialog h2 { margin: 0 0 .65rem; color: var(--navy); }
.install-dialog p { margin: 0 0 1rem; color: var(--ink); line-height: 1.6; }
.install-steps { margin: 0 0 1.2rem; padding-left: 1.4rem; color: var(--ink); }
.install-steps li { margin: .7rem 0; padding-left: .25rem; line-height: 1.5; }
.share-symbol { display: inline-grid; width: 1.7rem; height: 1.7rem; place-items: center; border: 2px solid var(--navy); border-radius: .35rem; color: var(--navy); font-weight: 900; }

.setup-card, .question-card, .observer-card, .results-section, .interpretation-list {
  margin: 1rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .25rem; color: var(--navy); font-weight: 800; }
.field-help { margin-bottom: .8rem; color: var(--muted); font-size: .9rem; }
.choice-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.choice-row label { position: relative; cursor: pointer; }
.choice-row input { position: absolute; opacity: 0; }
.choice-row span {
  display: grid;
  min-height: 52px;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
  font-weight: 700;
}
.choice-row input:checked + span { border-color: var(--navy); background: var(--blue-soft); color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.choice-row input:focus-visible + span { outline: 3px solid rgba(245, 182, 66, .55); outline-offset: 2px; }

.text-field { display: grid; gap: .4rem; margin-top: 1rem; color: var(--navy); font-weight: 700; }
.text-field small { color: var(--muted); font-weight: 500; }
input[type="text"], input[type="email"], textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: .78rem .85rem;
  color: var(--ink);
  background: white;
  line-height: 1.4;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus { outline: 3px solid rgba(245, 182, 66, .5); border-color: var(--navy); }
textarea { resize: vertical; }
.acknowledgement { display: flex; align-items: flex-start; gap: .7rem; margin: 1.1rem 0; cursor: pointer; }
.acknowledgement input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--navy); }
.acknowledgement span { font-size: .92rem; }
.form-error { min-height: 1.3rem; margin-bottom: .4rem; color: var(--danger); font-weight: 700; font-size: .9rem; }
.save-success { padding: .8rem; border-radius: 12px; background: var(--success-soft); color: var(--success); font-weight: 700; }
.share-fields { display: grid; gap: 0 1rem; padding: 0 1rem 1rem; }

button.primary, button.secondary, button.danger, .quiet-button, .text-button, .icon-button {
  min-height: 46px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}
button.primary { border: 1px solid var(--navy); background: var(--navy); color: white; box-shadow: 0 8px 22px rgba(23, 63, 95, .18); }
button.primary:hover { background: #0f324d; }
button.secondary { border: 1.5px solid var(--line); background: white; color: var(--navy); }
button.danger { padding: .7rem 1rem; border: 1px solid var(--danger); background: var(--danger); color: white; }
.wide { width: 100%; padding: .75rem 1rem; }
.quiet-button { padding: .55rem .75rem; border: 1px solid var(--line); background: white; color: var(--navy); }
.text-button { min-height: 40px; padding: .4rem .25rem; border: 0; background: transparent; color: var(--navy-2); text-decoration: underline; text-underline-offset: 3px; }
.icon-button { width: 44px; border: 1px solid var(--line); background: white; font-size: 1.5rem; }
button:focus-visible { outline: 3px solid rgba(245, 182, 66, .65); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.hidden { display: none !important; }

.info-details { margin: 1rem 0; border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; }
.info-details summary { padding: 1rem; cursor: pointer; color: var(--navy); font-weight: 800; }
.scale-guide-list { display: grid; gap: .65rem; padding: 0 1rem 1rem; }
.scale-guide-item { display: grid; grid-template-columns: 2rem 6.5rem 1fr; gap: .55rem; align-items: baseline; font-size: .88rem; }
.scale-guide-item strong:first-child { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--navy); }
.scale-guide-item span { color: var(--muted); }
.privacy-note { color: var(--muted); font-size: .83rem; text-align: center; }

@media (max-width: 560px) {
  .install-card { grid-template-columns: 1fr; text-align: center; }
  .install-card > img { margin: 0 auto; }
  .install-actions { display: grid; }
}

.section-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.35rem 0 .5rem; }
.section-bar h1 { font-size: clamp(1.8rem, 6vw, 2.7rem); }
.progress-block { margin: .75rem 0 1rem; }
.progress-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; color: var(--muted); font-size: .83rem; }
.progress-track { height: 9px; border-radius: 999px; background: #dfe7eb; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--navy), var(--navy-2), var(--gold)); transition: width .25s ease; }

.question-card { min-height: 455px; display: flex; flex-direction: column; justify-content: flex-start; }
.question-number { margin-bottom: .6rem; color: var(--navy-2); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.question-card h2 { min-height: 5.7rem; margin-bottom: 1rem; font: 700 clamp(1.3rem, 5vw, 1.75rem)/1.32 Georgia, serif; }
.score-fieldset legend { margin-bottom: .65rem; font-size: .85rem; color: var(--muted); }
.score-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .42rem; }
.score-choice { position: relative; }
.score-choice input { position: absolute; opacity: 0; pointer-events: none; }
.score-choice label {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
  font-size: 1.1rem;
  font-weight: 850;
  cursor: pointer;
}
.score-choice input:checked + label { border-color: var(--navy); background: var(--navy); color: white; box-shadow: 0 6px 16px rgba(23, 63, 95, .2); }
.score-choice input:focus-visible + label { outline: 3px solid rgba(245, 182, 66, .65); outline-offset: 2px; }
.score-meaning { min-height: 3.3rem; margin-top: .75rem; padding: .7rem .8rem; border-radius: 12px; color: var(--muted); background: var(--ground); font-size: .88rem; }
.score-meaning strong { color: var(--navy); }
.evidence-field { display: grid; gap: .45rem; margin-top: .8rem; color: var(--navy); font-weight: 700; }
.question-nav { position: sticky; bottom: 72px; z-index: 8; display: grid; grid-template-columns: 1fr 1.35fr; gap: .7rem; padding: .65rem 0; background: linear-gradient(transparent, var(--ground) 18%); }
.question-nav button { padding: .75rem 1rem; }

.empty-state { padding: 2rem 1.25rem; border: 1px dashed #aac0ce; border-radius: var(--radius); background: rgba(255,255,255,.65); text-align: center; }
.empty-state h2 { margin-bottom: .5rem; }
.empty-state p { color: var(--muted); }
.top-patterns { display: grid; gap: .8rem; margin: 1.2rem 0; }
.pattern-card { position: relative; overflow: hidden; padding: 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: white; }
.pattern-card.top { border-color: #bdd0dd; box-shadow: var(--shadow); }
.pattern-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--navy-2); }
.pattern-head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.pattern-rank { display: inline-grid; width: 2rem; height: 2rem; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--gold-soft); color: var(--warning); font-weight: 850; }
.pattern-title { flex: 1; }
.pattern-title h2, .pattern-title h3 { margin-bottom: .15rem; }
.pattern-score { text-align: right; color: var(--navy); font-weight: 850; white-space: nowrap; }
.pattern-score strong { display: block; font-size: 1.45rem; line-height: 1; }
.band-pill { display: inline-block; margin-top: .45rem; padding: .25rem .55rem; border-radius: 999px; background: var(--blue-soft); color: var(--navy); font-size: .75rem; font-weight: 800; }
.pattern-card p { margin: .75rem 0 0; color: var(--muted); font-size: .92rem; }
.scripture { font-style: italic; }
.results-section { box-shadow: none; }
.results-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cluster-grid { display: grid; gap: .75rem; }
.cluster-card { padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd; }
.cluster-card.prominent { border-color: #d2b256; background: var(--gold-soft); }
.cluster-card h3 { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.cluster-card h3 span { padding: .18rem .45rem; border-radius: 999px; background: white; color: var(--muted); font: 700 .72rem/1.4 Inter, sans-serif; white-space: nowrap; }
.cluster-card p { margin-bottom: .5rem; color: var(--muted); font-size: .88rem; }
.cluster-scores { color: var(--navy); font-size: .8rem; font-weight: 700; }
.all-patterns { display: grid; gap: .55rem; }
.all-patterns.collapsed .pattern-card:nth-child(n+7) { display: none; }
.pattern-card.na { opacity: .78; }

.tab-list { display: grid; grid-template-columns: 1fr 1fr; padding: .3rem; border: 1px solid var(--line); border-radius: 14px; background: #e7edf0; }
.tab-list button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.tab-list button[aria-selected="true"] { background: white; color: var(--navy); box-shadow: 0 3px 12px rgba(21,34,45,.08); }
.observer-meta { display: grid; gap: 0 1rem; }
.observer-progress { margin: 1rem 0; color: var(--muted); font-size: .85rem; }
.observer-progress .progress-track { margin-top: .4rem; }
.observer-card { min-height: 520px; box-shadow: var(--shadow); }
.observer-item { padding: 1rem 0; border-top: 1px solid var(--line); }
.observer-item:first-child { border-top: 0; padding-top: .35rem; }
.observer-item h3 { color: var(--navy-2); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.observer-item p { min-height: 3rem; margin-bottom: .65rem; }
.observer-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.observer-scale .score-choice label { min-height: 48px; font-size: 1rem; }
.observer-evidence { margin-top: 1.2rem; }

.matrix-key { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.status-pill { display: inline-flex; align-items: center; min-height: 27px; padding: .25rem .55rem; border-radius: 999px; font-size: .73rem; font-weight: 800; }
.status-pill.convergent { color: var(--success); background: var(--success-soft); }
.status-pill.developing { color: var(--warning); background: var(--warning-soft); }
.status-pill.aspirational { color: #7d3d72; background: #f6e9f3; }
.status-pill.hidden-grace { color: #245b80; background: var(--blue-soft); }
.status-pill.continue { color: var(--muted); background: #edf1f3; }
.status-pill.na { color: var(--muted); background: #edf1f3; }
.matrix-list { display: grid; gap: .65rem; }
.matrix-card { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.matrix-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.matrix-card h2 { margin: 0; font-size: 1.05rem; }
.matrix-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-top: .8rem; }
.matrix-score { padding: .6rem; border-radius: 10px; background: var(--ground); text-align: center; }
.matrix-score small { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.matrix-score strong { color: var(--navy); font-size: 1.05rem; }
.matrix-note { margin: .65rem 0 0; color: var(--muted); font-size: .84rem; }

.guide-grid { display: grid; gap: .8rem; }
.guide-grid section { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.guide-grid p { margin-bottom: 0; color: var(--muted); }
.interpretation-list { box-shadow: none; }
.interpretation-list article { padding: .8rem 0; border-top: 1px solid var(--line); }
.interpretation-list article:first-of-type { border-top: 0; }
.interpretation-list strong { color: var(--navy); }
.interpretation-list p { margin: .2rem 0 0; color: var(--muted); }

.bottom-nav {
  position: fixed;
  z-index: 25;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: .4rem max(.25rem, env(safe-area-inset-right)) calc(.35rem + env(safe-area-inset-bottom)) max(.25rem, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  box-shadow: 0 -8px 26px rgba(21,34,45,.08);
}
.bottom-nav button { min-height: 52px; display: grid; place-items: center; gap: 0; padding: .25rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.bottom-nav button span { font-size: 1.15rem; line-height: 1; }
.bottom-nav button small { font-size: .67rem; font-weight: 750; }
.bottom-nav button.active { color: var(--navy); background: var(--blue-soft); }

.app-footer { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 7rem; color: var(--muted); font-size: .78rem; text-align: center; }
.app-footer div { display: flex; justify-content: center; gap: 1.2rem; }

dialog { width: min(calc(100% - 1.5rem), 650px); max-height: 86dvh; padding: 1rem; border: 0; border-radius: 20px; box-shadow: 0 25px 80px rgba(21,34,45,.28); }
dialog::backdrop { background: rgba(9, 24, 35, .64); backdrop-filter: blur(3px); }
.dialog-header { position: sticky; top: -1rem; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: -1rem -1rem .7rem; padding: 1rem; border-bottom: 1px solid var(--line); background: white; }
.dialog-header h2 { margin: 0; }
.overview-summary { margin-bottom: .8rem; color: var(--muted); font-size: .9rem; }
.question-map { display: grid; grid-template-columns: repeat(8, 1fr); gap: .4rem; }
.question-map button { min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: #f5f7f8; cursor: pointer; font-size: .8rem; font-weight: 800; }
.question-map button.answered { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.question-map button.current { outline: 3px solid var(--gold); }
.question-map button.na { opacity: .4; text-decoration: line-through; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1rem; }

@media (min-width: 700px) {
  main { padding-top: 1.5rem; }
  .app-header { padding-inline: max(2rem, calc((100vw - 960px) / 2)); }
  .intro-panel { padding-top: 3rem; }
  .setup-card { padding: 1.6rem; }
  .question-card { min-height: 430px; padding: 1.8rem; }
  .top-patterns { grid-template-columns: repeat(2, 1fr); }
  .top-patterns .pattern-card:first-child { grid-column: 1 / -1; }
  .cluster-grid, .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .observer-meta { grid-template-columns: 1fr 1fr; }
  .share-fields { grid-template-columns: 1fr 1fr; }
  .matrix-list { grid-template-columns: repeat(2, 1fr); }
  .question-map { grid-template-columns: repeat(12, 1fr); }
}

@media (min-width: 1040px) {
  main { padding-bottom: 3rem; }
  .bottom-nav { position: sticky; top: 80px; bottom: auto; width: min(100% - 2rem, 960px); margin: .5rem auto 0; padding: .35rem; border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
  .bottom-nav button { min-height: 46px; grid-auto-flow: column; place-content: center; gap: .45rem; }
  .bottom-nav button small { font-size: .8rem; }
  .question-nav { position: static; background: transparent; }
  .app-footer { padding-bottom: 3rem; }
}

@media (max-width: 390px) {
  .save-status { display: none; }
  .question-card { min-height: 485px; padding: 1rem; }
  .score-grid { gap: .28rem; }
  .score-choice label { min-height: 50px; border-radius: 10px; }
  .scale-guide-item { grid-template-columns: 2rem 1fr; }
  .scale-guide-item span { grid-column: 1 / -1; }
  .question-map { grid-template-columns: repeat(7, 1fr); }
}

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

@media print {
  body { background: white; }
  .app-header, .bottom-nav, .app-footer, .section-bar button, .question-nav, .tab-list, #view-home, #view-assessment, #view-observers, #view-guide, dialog { display: none !important; }
  main { width: 100%; max-width: none; padding: 0; }
  .view { display: none !important; }
  .view.active { display: block !important; }
  .pattern-card, .matrix-card, .results-section, .safeguard { break-inside: avoid; box-shadow: none; }
  .all-patterns.collapsed .pattern-card:nth-child(n+7) { display: block; }
}
