:root {
  color-scheme: light;
  --ink: #332327;
  --muted: #75636a;
  --deep: #75434a;
  --primary: #a6535d;
  --soft: #f8f1f2;
  --accent: #ead7da;
  --paper: #fff;
  --shadow: 0 18px 48px rgba(79, 49, 55, .07);
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #faf7f7;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #f1e4e6 0, transparent 31%), linear-gradient(180deg, #fcfafa 0%, #f7f1f2 100%); }
h1,h2,h3,h4,p { margin: 0; }
button,input { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #d33a49; outline-offset: 4px; }
::selection { background: #f4b8bd; color: #5d0d16; }
.topbar { padding: 24px clamp(16px, 4vw, 50px) 26px; background: #971526; text-align: center; box-shadow: 0 8px 24px rgba(79, 49, 55, .12); }
.brand { width: 100%; margin: auto; display: flex; align-items: center; justify-content: center; gap: 14px; }
.brand > div:last-child { min-width: 0; }
.mark { flex: 0 0 50px; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: #f0a7b0; color: #971526; font: 700 29px Georgia,serif; }
h1 { color: var(--deep); font: 700 clamp(27px, 4vw, 44px)/1.08 Georgia,serif; letter-spacing: -.025em; text-transform: capitalize; overflow-wrap: anywhere; }
.topbar h1 { color: #fff; text-transform: none; }
.topbar .eyebrow { color: #b9d9d5; }
.eyebrow { margin-bottom: 6px; color: var(--primary); font-size: 14px; font-weight: 700; letter-spacing: .06em; }
main { width: min(1220px, 100%); margin: auto; padding: 24px clamp(16px, 4vw, 50px) 60px; }
.panel,.dashboard-insights,.status-card,.intro { padding: clamp(20px, 3vw, 32px); background: var(--paper); border: 1px solid #eee5e7; border-radius: 28px; box-shadow: var(--shadow); }
.panel,.dashboard-insights { margin-top: 20px; }
.area-panel { margin-top: 0; }
.options-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.options-grid { margin-top: 20px; }
.dashboard-link-group { margin-top: 8px; }
.dashboard-link-group h2,.dashboard-link-group h4 { color: var(--deep); font-size: clamp(20px, 2.5vw, 25px); font-weight: 700; line-height: 1.3; }
.secondary-links { margin-top: 32px; padding-top: 26px; border-top: 1px solid #e9dfe1; }
.option-card { min-width: 0; min-height: 72px; padding: 16px 18px; display: flex; align-items: center; justify-content: center; border: 1px solid #e7dadd; border-radius: 16px; background: #f3e9eb; color: var(--ink); text-align: center; text-decoration: none; box-shadow: 0 4px 12px rgba(79, 49, 55, .04); transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.option-card:hover { background: #eadadd; box-shadow: 0 8px 18px rgba(79, 49, 55, .08); transform: translateY(-1px); }
.option-card h3 { color: var(--deep); font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.option-card:focus-visible { outline-color: #8a5961; }
.next-card p,.option-card p,.option-card .icon,.option-card .arrow { display: none; }
.dashboard-insights h3,.panel > h3 { color: var(--deep); font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.dashboard-insights > p:not(.eyebrow),.panel > p { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.theme-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.theme-card { min-width: 0; padding: 24px; border-radius: 22px; background: var(--soft); }
.theme-card h4 { color: var(--deep); font-size: 21px; font-weight: 700; line-height: 1.3; }
.theme-card p { margin-top: 12px; color: #5e3b42; font-size: 16px; line-height: 1.65; }
.theme-card:nth-child(3n+1) { background: #f2e8ea; }
.theme-heading { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.theme-heading:hover { text-decoration: underline; text-underline-offset: 4px; }
.theme-areas { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.theme-area { min-height: 36px; padding: 8px 12px; border: 0; border-radius: 10px; background: #f9cdd2; color: #7d1420; font-size: 14px; font-weight: 700; }
.theme-area:hover { background: #f4b8bd; }
.theme-card:nth-child(3n+1) .theme-area { background: #fff; color: var(--deep); }
.theme-card:nth-child(3n+1) :focus-visible { outline-color: #fff; }
.insight-notice,.notice { margin-top: 20px; padding: 16px 18px; border-radius: 16px; background: #fff0f1; color: var(--muted); font-size: 14px; line-height: 1.6; }
.intro { background: #f4ecee; color: var(--ink); }
.intro h2 { font-size: clamp(24px, 4vw, 34px); }
.intro .eyebrow { color: var(--deep); }
.intro p:last-child { margin-top: 12px; line-height: 1.65; }
.summary-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.status-card strong { display: block; color: var(--primary); font-size: 32px; }
.status-card span { color: var(--muted); font-size: 16px; }
.status { margin-top: 16px; color: var(--muted); font-size: 14px; }
.theme-dialog { width: min(920px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 24px; background: #fff7f7; color: var(--ink); box-shadow: var(--shadow); }
.theme-dialog::backdrop { background: rgba(42, 28, 31, .38); }
.theme-dialog-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: #f4ecee; color: var(--ink); z-index: 1; }
.theme-dialog-head h2 { font-size: clamp(20px, 3vw, 28px); }
.theme-dialog-close { min-height: 44px; padding: 10px 16px; border: 1px solid #e7dadd; border-radius: 12px; background: #fff; color: var(--deep); font-weight: 700; }
.theme-dialog-body { padding: 24px; }
.theme-results-status { margin-bottom: 16px; color: var(--muted); line-height: 1.6; }
.theme-results { display: grid; gap: 16px; }
.theme-result { min-width: 0; padding: 22px; border-radius: 18px; background: #fff; }
.theme-result h3 { color: var(--deep); font-size: 20px; overflow-wrap: anywhere; }
.theme-person-link { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.theme-person-link:hover { color: var(--primary); }
.theme-result-meta { margin: 8px 0 12px; color: var(--muted); font-size: 14px; }
.theme-result-text { font-size: 16px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.theme-result mark { background: #f9cdd2; color: #5d0d16; }
.theme-result details { margin-top: 12px; }
.theme-result summary { width: fit-content; color: var(--primary); font-weight: 700; cursor: pointer; }
.theme-result details[open] > summary { display: none; }
.theme-result details .theme-result-text { margin-top: 12px; }
.theme-result .less-label { display: none; }
.theme-result details[open] .less-label { display: inline-flex; margin-top: 12px; padding: 0; border: 0; background: transparent; color: var(--deep); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.theme-result a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; color: var(--primary); font-weight: 700; }
@media (max-width: 680px) {
  .topbar { padding: 20px 18px 22px; }
  .brand { gap: 12px; }
  .mark { flex-basis: 46px; width: 46px; height: 46px; font-size: 24px; }
  .options-grid,.theme-grid,.summary-grid { grid-template-columns: minmax(0, 1fr); }
  .panel,.dashboard-insights { border-radius: 24px; }
  .theme-card { padding: 20px; }
  .theme-dialog-head,.theme-dialog-body { padding: 18px; }
}
@media (min-width: 681px) and (max-width: 940px) { .options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .option-card { transition: none; } }
body main>.panel{padding:24px;border-radius:8px}
/* Unavailable register cards keep their size and position. */
.next-card[aria-disabled="true"],.option-card[aria-disabled="true"] {
  position: relative;
  opacity: .48;
  filter: grayscale(1);
  pointer-events: none;
  cursor: not-allowed !important;
}
.next-card[aria-disabled="true"] p:last-child,.option-card[aria-disabled="true"] p:last-child {
  display: block;
  position: absolute;
  inset: auto 6px 4px;
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.2;
}

/* DASHBOARD SUMMARY BUTTONS — LOCKED. Keep the established card layout.
   Scans must never change these dimensions or force heading/card heights. */
#dashboardThemeGrid .theme-area {
  box-sizing: border-box;
  flex: 0 0 160px;
  width: 160px;
  max-width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  line-height: 16px;
  white-space: normal;
  overflow-wrap: anywhere;
}
