/* Shared semantic colours for the portal and the offline mobile shell. */
:root {
  color-scheme: light;
  --surface:#ffffff; --canvas:#f5f7f4; --ink:#183532; --muted:#586e67;
  --line:#d3dfd8; --soft:#eaf1ec;
  --primary:#126c69; --primary-dark:#0e514e; --on-primary:#ffffff;
  --danger:#a23d3b; --danger-soft:#fff0ef;
  --amber:#80520f; --amber-soft:#fff4e1;
  --success:#246545; --success-soft:#e8f5ef;
  --hero:#123e38;
}
:root[data-palette="ocean"] { --primary:#1768a1; --primary-dark:#10507e; --canvas:#f2f6fa; --soft:#e5eff8; --hero:#15364e; }
:root[data-palette="amethyst"] { --primary:#7550a0; --primary-dark:#59367f; --canvas:#f7f4fa; --soft:#eee7f5; --hero:#362545; }
:root[data-palette="copper"] { --primary:#97512e; --primary-dark:#74391d; --canvas:#faf5ef; --soft:#f3e8db; --hero:#473023; }
:root[data-scheme="dark"] {
  color-scheme: dark;
  --surface:#1c2928; --canvas:#111b1a; --ink:#e6efeb; --muted:#afc2ba;
  --line:#425750; --soft:#2a3e38;
  --primary:#7ed6c1; --primary-dark:#a3e7d7; --on-primary:#102723;
  --danger:#ffaaa4; --danger-soft:#472b2c;
  --amber:#f0c477; --amber-soft:#403725;
  --success:#8bdbaf; --success-soft:#233e32;
}
:root[data-scheme="dark"][data-palette="ocean"] { --surface:#1b2936; --canvas:#111b26; --soft:#263c50; --line:#42576c; --primary:#8acaff; --primary-dark:#b3ddff; --on-primary:#12283a; }
:root[data-scheme="dark"][data-palette="amethyst"] { --surface:#2b2535; --canvas:#1b1722; --soft:#3b304b; --line:#5b4b6e; --primary:#d0aff6; --primary-dark:#e3ccff; --on-primary:#30203e; }
:root[data-scheme="dark"][data-palette="copper"] { --surface:#302820; --canvas:#201a15; --soft:#44372a; --line:#63513f; --primary:#efba8c; --primary-dark:#ffdab9; --on-primary:#382416; }
html,body { background:var(--canvas); color:var(--ink); }
button { color:inherit; }
.primary,.brand-mark { color:var(--on-primary); }
.sidebar { background:linear-gradient(165deg,var(--surface) 35%,var(--soft)); }
.login-story { background:var(--hero); }
.appearance-preview { display:flex; align-items:center; gap:14px; padding:20px; margin-bottom:16px; border:1px solid var(--line); border-radius:14px; background:var(--soft); }
.appearance-preview small { display:block; }
.appearance-preview .brand-mark { flex-shrink:0; }
.appearance-preview .badge { margin-left:auto; }
.audit-section:focus { outline:2px solid var(--primary); outline-offset:4px; }
.signature-pad { background:#fff; }
@media(max-width:400px) { .appearance-preview { padding:14px; gap:10px; } .appearance-preview .badge { display:none; } }
/* Previews use their own colours, independent of the currently selected theme. */
.appearance-settings { max-width:1100px; }
.style-gallery { display:flex; gap:18px; margin:24px 0; align-items:stretch; }
.style-choice { display:flex; flex:1; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:14px; min-width:0; padding:10px; border:1px solid var(--line); border-radius:16px; background:var(--surface); text-align:left; white-space:normal; }
.style-choice:hover { border-color:var(--primary); }
.style-choice[aria-pressed="true"] { border-color:var(--primary); box-shadow:0 0 0 2px var(--primary); }
.style-choice-title { display:flex; align-items:center; justify-content:space-between; gap:8px; font:600 1rem 'Segoe UI',Arial,sans-serif; }
.style-choice-title>span { font:500 .68rem 'Segoe UI',Arial,sans-serif; color:var(--muted); }
.style-description { font:400 .82rem/1.5 'Segoe UI',Arial,sans-serif; color:var(--muted); }
.style-sample { display:flex; position:relative; isolation:isolate; min-height:252px; overflow:hidden; flex-direction:column; align-items:flex-start; padding:18px; text-align:left; font:12px/1.4 'Segoe UI',Arial,sans-serif; }
.style-sample>* { position:relative; z-index:1; }
.sample-monogram { display:flex; align-items:center; justify-content:center; width:30px; height:30px; margin-bottom:20px; font-size:20px; }
.sample-kicker { font-size:7px; letter-spacing:1.6px; }
.style-sample>strong { font-size:27px; font-weight:400; line-height:1.08; margin:10px 0; max-width:180px; }
.sample-note { font-size:9px; margin-bottom:18px; }
.sample-action { display:flex; justify-content:space-between; width:100%; margin-top:auto; padding:8px 12px; font-size:9px; }
.sample-cove { background:#154c58; color:#f4fbf9; border-radius:12px 12px 48px 12px; font-family:'Trebuchet MS',sans-serif; }
.sample-cove::after { content:""; position:absolute; width:240px; height:100px; border:20px solid #2f6870; border-radius:50%; right:-135px; top:30px; transform:rotate(-30deg); }
.sample-cove .sample-monogram { background:#c3e1d9; color:#154c58; border-radius:50%; }
.sample-cove .sample-action { background:#d5eae3; color:#173f47; border-radius:24px; width:90%; }
.sample-orchard { background:#f4ead5; color:#35442f; border-radius:42px 7px 42px 7px; }
.sample-orchard::after { content:""; position:absolute; right:-32px; top:-10px; width:85px; height:150px; background:#d0d9b2; border-radius:90% 0 90% 0; transform:rotate(15deg); }
.sample-orchard .sample-monogram { background:#8d4934; color:#fff8e9; border-radius:50% 8% 50% 8%; }
.sample-orchard>strong { font:italic 28px/1.05 Georgia,serif; }
.sample-orchard .sample-action { background:#52643e; color:#fffaf0; border-radius:16px 4px; }

:is([data-palette="cove"],[data-palette="orchard"],[data-palette="pulse"]) .page-heading>.button,
:is([data-palette="cove"],[data-palette="orchard"],[data-palette="pulse"]) .page-heading>.primary { flex-shrink:0; white-space:normal; }
:is([data-palette="cove"],[data-palette="orchard"],[data-palette="pulse"]) .page-heading>div { min-width:0; }

/* COVE: a sea-coloured masthead, curved navigation and flowing silhouettes. */
:root[data-palette="cove"] { --surface:#fcfefd; --canvas:#e7f0ed; --ink:#183f48; --muted:#526f72; --line:#bfd3ce; --soft:#dcece6; --primary:#206775; --primary-dark:#174d58; --on-primary:#ffffff; --hero:#154c58; --radius:24px; font-family:'Trebuchet MS','Segoe UI',sans-serif; }
:root[data-palette="cove"][data-scheme="dark"] { --surface:#17363d; --canvas:#10282e; --ink:#e7f3ee; --muted:#acc9c4; --line:#446c6e; --soft:#254b51; --primary:#a3d8cb; --primary-dark:#c1ecdf; --on-primary:#14363d; --hero:#154c58; }
[data-palette="cove"] .sidebar { background:var(--canvas); border-right:0; padding-top:42px; }
[data-palette="cove"] .brand { font-family:'Trebuchet MS',sans-serif; font-weight:400; letter-spacing:3px; }
[data-palette="cove"] .brand-mark { border-radius:50%; background:var(--primary); color:var(--on-primary); }
[data-palette="cove"] .sidebar nav a { border-radius:28px; padding-left:18px; }
[data-palette="cove"] .sidebar nav a.active { background:var(--primary); color:var(--on-primary); }
[data-palette="cove"] .topbar { background:var(--canvas); border-bottom:0; }
[data-palette="cove"] .page-heading { position:relative; isolation:isolate; overflow:hidden; background:var(--hero); color:#f4fbf9; padding:32px; border-radius:18px 18px 72px 18px; }
[data-palette="cove"] .page-heading::after { content:""; position:absolute; z-index:-1; width:300px; height:130px; border:28px solid #2f6870; border-radius:50%; right:-165px; top:-28px; transform:rotate(-30deg); pointer-events:none; }
[data-palette="cove"] .page-heading :is(p,.eyebrow) { color:#c3ded9; }
[data-palette="cove"] .page-heading>.badge { color:var(--ink); }
[data-palette="cove"] .page-heading h1 { font-size:2.65rem; font-weight:400; letter-spacing:-1px; }
[data-palette="cove"] .page-heading .primary { background:#d5eae3; border-color:#d5eae3; color:#173f47; }
[data-palette="cove"] :is(.primary,.secondary,.segmented,.mobile-nav a) { border-radius:26px; }
[data-palette="cove"] :is(.panel,.template-card,.report-audit-card,.appearance-preview) { border-radius:24px; border-color:transparent; box-shadow:0 6px 20px #153e4710; }
[data-palette="cove"] .stat { border:0; border-radius:26px 26px 42px 8px; }
[data-palette="cove"] .stat>strong { font-weight:400; font-size:2.7rem; }
[data-palette="cove"] .audit-bottom { border-radius:26px; }
[data-palette="cove"] .mobile-nav { background:var(--surface); border-radius:24px 24px 0 0; border:0; box-shadow:0 -3px 18px #153e471a; }
[data-palette="cove"] .mobile-nav .active { background:var(--primary); color:var(--on-primary); }

/* ORCHARD: clay navigation, botanical shapes and warm, spacious book typography. */
:root[data-palette="orchard"] { --surface:#fffaf0; --canvas:#f0eadb; --ink:#35442f; --muted:#657052; --line:#c8c9ae; --soft:#e4e9d3; --primary:#52643e; --primary-dark:#3c4b2c; --on-primary:#fffaf0; --hero:#834732; --radius:30px 8px; --petal:#d0d9b2; font-family:'Segoe UI',sans-serif; }
:root[data-palette="orchard"][data-scheme="dark"] { --surface:#2c3426; --canvas:#1d251a; --ink:#f0efdc; --muted:#bec9aa; --line:#616e50; --soft:#3c4831; --primary:#ccdb9a; --primary-dark:#e4ecbd; --on-primary:#2a3820; --petal:#465737; }
[data-palette="orchard"] .sidebar { background:#834732; color:#fff5e1; border:0; border-radius:0 42px 0 0; }
[data-palette="orchard"] .sidebar :is(small,.nav-label,nav a) { color:#f2dfc8; }
[data-palette="orchard"] .sidebar nav a { border-radius:20px 5px; }
[data-palette="orchard"] .sidebar nav a.active { background:#f0e6cc; color:#513b23; }
[data-palette="orchard"] .sidebar-foot { border-color:#ba8c73; }
[data-palette="orchard"] .sidebar .avatar { background:#f0e6cc; color:#513b23; }
[data-palette="orchard"] .brand { font-family:Georgia,serif; font-weight:400; letter-spacing:1px; }
[data-palette="orchard"] .brand-mark { border-radius:50% 8% 50% 8%; background:#f0e6cc; color:#834732; }
[data-palette="orchard"] .topbar { background:var(--canvas); border-bottom:0; }
[data-palette="orchard"] :is(h1,h2) { font-family:'Palatino Linotype','Book Antiqua',Georgia,serif; font-weight:400; }
[data-palette="orchard"] .page-heading { position:relative; isolation:isolate; background:var(--soft); border-radius:42px 8px; padding:30px; overflow:hidden; }
[data-palette="orchard"] .page-heading::after { content:""; position:absolute; z-index:-1; right:50px; top:-60px; width:130px; height:220px; background:var(--petal); border-radius:90% 0 90% 0; transform:rotate(18deg); pointer-events:none; }
[data-palette="orchard"] .page-heading h1 { font-size:2.85rem; font-style:italic; letter-spacing:-.8px; }
[data-palette="orchard"] :is(.panel,.template-card,.report-audit-card,.appearance-preview) { border:1px solid var(--line); border-radius:30px 8px; box-shadow:none; }
[data-palette="orchard"] :is(.primary,.secondary) { border-radius:18px 5px; }
[data-palette="orchard"] .stat { border:0; border-radius:30px 8px; border-bottom:3px solid var(--petal); }
[data-palette="orchard"] .stat>strong { font:400 2.8rem Georgia,serif; }
[data-palette="orchard"] .question { border-top:1px dotted var(--line); }
[data-palette="orchard"] .audit-bottom { border-radius:22px 5px; }
[data-palette="orchard"] .mobile-nav { background:#834732; border-top:0; border-radius:24px 24px 0 0; }
[data-palette="orchard"] .mobile-nav a { color:#f2dfc8; border-radius:20px 5px; }
[data-palette="orchard"] .mobile-nav .active { background:#f0e6cc; color:#513b23; }

/* PULSE: charcoal navigation and dimensional coral, lavender and cyan tiles. */
:root[data-palette="pulse"] { --surface:#ffffff; --canvas:#edf0f4; --ink:#293340; --muted:#566476; --line:#ccd3dd; --soft:#e3e9f0; --primary:#146b85; --primary-dark:#0c5067; --on-primary:#ffffff; --hero:#272e38; --radius:6px; font-family:'Segoe UI',Arial,sans-serif; }
:root[data-palette="pulse"][data-scheme="dark"] { --surface:#303945; --canvas:#232a33; --ink:#f0f3f8; --muted:#bdc8d7; --line:#505e70; --soft:#3d495b; --primary:#69d5eb; --primary-dark:#a4eafa; --on-primary:#172d37; }
[data-palette="pulse"] .sidebar { background:linear-gradient(160deg,#414d60,#252b34 70%); color:#f0f3f8; border-right:1px solid #566173; }
[data-palette="pulse"] .sidebar :is(small,.nav-label,nav a) { color:#c9d3e3; }
[data-palette="pulse"] .sidebar nav a { border-radius:0; }
[data-palette="pulse"] .sidebar nav a.active { background:#252c36; color:#fff; box-shadow:inset 3px 0 #51d0e8; }
[data-palette="pulse"] .sidebar-foot { border-color:#566173; }
[data-palette="pulse"] .sidebar .avatar { background:#a8a6ef; color:#252746; }
[data-palette="pulse"] .brand { letter-spacing:1.5px; font-weight:600; }
[data-palette="pulse"] .brand-mark { background:#69d5eb; color:#172d37; border-radius:8px; box-shadow:0 5px 12px #0003; }
[data-palette="pulse"] .topbar { background:var(--surface); border-bottom:1px solid var(--line); }
[data-palette="pulse"] .page-heading { padding:12px 0 24px; border-bottom:1px solid var(--line); }
[data-palette="pulse"] .page-heading h1 { font-size:2.6rem; font-weight:300; letter-spacing:-1px; }
[data-palette="pulse"] :is(.panel,.template-card,.report-audit-card,.appearance-preview) { border-radius:6px; border:1px solid var(--line); box-shadow:0 8px 20px #10182412; }
[data-palette="pulse"] h2 { font-weight:500; }
[data-palette="pulse"] :is(.primary,.secondary) { border-radius:5px; }
[data-palette="pulse"] .stat { --tile:#ffc6b7; --tile-dark:#803326; --ring:#ffe2d9; background:linear-gradient(145deg,var(--tile),var(--tile) 60%,var(--ring)); color:#292a3a; border:0; border-radius:4px; align-items:center; text-align:center; padding:24px 14px; box-shadow:0 12px 20px #11182426; }
[data-palette="pulse"] .stat:nth-child(2) { --tile:#c5c1ff; --tile-dark:#4e4584; --ring:#e4e0ff; }
[data-palette="pulse"] .stat:nth-child(3) { --tile:#83def0; --tile-dark:#175f70; --ring:#d4f7ff; }
[data-palette="pulse"] .stat>strong { order:-1; display:flex; align-items:center; justify-content:center; width:112px; height:112px; margin:0 0 12px; border:12px solid var(--ring); border-radius:50%; background:var(--tile); color:var(--tile-dark); font-size:2rem; font-weight:600; box-shadow:0 8px 10px #17203030,inset 0 4px 7px #17203026; }
[data-palette="pulse"] .stat>small { color:#3b4056; }
[data-palette="pulse"] .stat>span { font-size:.95rem; }
[data-palette="pulse"] .audit-bottom { border-radius:6px; box-shadow:0 8px 20px #10182426; }
[data-palette="pulse"] .mobile-nav { background:#272e38; border-top:1px solid #566173; }
[data-palette="pulse"] .mobile-nav a { color:#c9d3e3; border-radius:4px; }
[data-palette="pulse"] .mobile-nav .active { color:#b2efff; background:#3d495b; box-shadow:inset 0 2px #69d5eb; }
@media(max-width:760px) {
 [data-palette="pulse"] .stat { padding:15px 5px; }
 [data-palette="pulse"] .stat>strong { width:68px; height:68px; border-width:7px; font-size:1.35rem!important; margin-bottom:5px; }
 [data-palette="pulse"] .stat>span { font-size:.65rem; }
}
@media(max-width:1000px) { .style-gallery { flex-wrap:wrap; } .style-choice { flex-basis:220px; } }
@media(max-width:760px) {
  .style-gallery { flex-direction:column; } .style-choice { flex-basis:auto; } .style-sample { width:100%; min-height:248px; } .style-sample>strong { max-width:220px; font-size:32px; }
  :is([data-palette="cove"],[data-palette="orchard"]) .page-heading { padding:24px 20px; }
  [data-palette="cove"] .page-heading { border-radius:18px 18px 48px 18px; }
  [data-palette="orchard"] .page-heading { border-radius:32px 6px; }
  :is([data-palette="cove"],[data-palette="orchard"],[data-palette="pulse"]) .page-heading h1 { font-size:2rem; overflow-wrap:anywhere; }
  :is([data-palette="cove"],[data-palette="orchard"],[data-palette="pulse"]) .stat>strong { font-size:1.9rem; }
}
@media print { :root[data-scheme][data-palette] { color-scheme:light; --surface:white; --canvas:white; --ink:#183532; --muted:#586e67; --line:#d3dfd8; --soft:#eaf1ec; --primary:#126c69; --on-primary:white; --danger:#a23d3b; --danger-soft:#fff0ef; --amber:#80520f; --amber-soft:#fff4e1; --success:#246545; --success-soft:#e8f5ef; } [data-palette] .quest-app { background:none; } [data-palette] :is(.panel,.stat,.template-card) { box-shadow:none; } [data-palette] .page-heading { background:white; color:#183532; } [data-palette] .page-heading :is(p,.eyebrow) { color:#586e67; } [data-palette] .page-heading::after,.style-gallery { display:none; } }

/* Compact navigation remains a labelled, keyboard-accessible set of links. */
.sidebar-toggle { display:flex; align-items:center; gap:12px; width:100%; min-height:44px; margin-bottom:18px; padding:10px 12px; color:inherit; border:1px solid var(--line); border-radius:6px; }
.sidebar nav a .nav-text { font-size:.85rem; }
.sample-pulse { background:linear-gradient(140deg,#47556b,#252b34 75%); color:#f0f3f8; border:0; border-radius:5px; }
.sample-pulse::after { content:""; position:absolute; width:76px; height:76px; inset:auto -25px 45px auto; border:12px solid #b5adf3; border-radius:50%; box-shadow:0 7px 12px #0005; }
.sample-pulse .sample-monogram { background:#ffb9a9; color:#582c27; border:0; border-radius:7px; box-shadow:0 5px 10px #0003; }
.sample-pulse .sample-kicker { color:#c9d3e3; }
.sample-pulse>strong { font-family:'Segoe UI',sans-serif; font-size:28px; font-weight:300; }
.sample-pulse .sample-action { background:#69d5eb; color:#172d37; border-radius:4px; }
@media(min-width:761px) {
 :root[data-navigation="collapsed"] .sidebar { width:80px; padding:20px 10px; }
 :root[data-navigation="collapsed"] .workspace { margin-left:80px; }
 :root[data-navigation="collapsed"] .sidebar :where(.nav-text,.nav-label,.brand>span:last-child,.sidebar-foot>div) { display:none; }
 :root[data-navigation="collapsed"] .sidebar :is(nav a,.sidebar-toggle,.brand,.sidebar-foot) { justify-content:center; }
 :root[data-navigation="collapsed"] .sidebar nav a { min-height:48px; padding:10px; }
 :root[data-navigation="collapsed"] .sidebar nav a>span { font-size:1.25rem; }
 :root[data-navigation="collapsed"] .sidebar .brand { margin-bottom:26px; }
 :root[data-navigation="collapsed"] .sidebar-toggle { padding:10px; }
 :root[data-navigation-layout="top"] .sidebar { position:relative; width:100%; height:auto; min-height:0; padding:12px 24px; display:flex; flex-direction:row; align-items:center; gap:24px; border-radius:0; border:0; }
 :root[data-navigation-layout="top"] .workspace { margin-left:0; }
 :root[data-navigation-layout="top"] .sidebar :is(.sidebar-toggle,.nav-label,.sidebar-foot,.brand small) { display:none; }
 :root[data-navigation-layout="top"] .sidebar .brand { margin:0; flex-shrink:0; }
 :root[data-navigation-layout="top"] .sidebar .brand>span:last-child { display:block; }
 :root[data-navigation-layout="top"] .sidebar nav { display:flex; flex-direction:row; gap:4px; flex-wrap:wrap; margin:0; }
 :root[data-navigation-layout="top"] .sidebar nav a { margin:0; padding:10px 12px; gap:7px; min-height:44px; }
 :root[data-navigation-layout="top"] .sidebar nav .nav-text { display:inline; font-size:.8rem; }
 :root[data-navigation-layout="top"] .sidebar nav a>span:first-child { font-size:1rem; }
}
@media print { [data-navigation] .workspace { margin-left:0; } }

/* METRO: conventional dashboard chrome, bright blue header and flat colour blocks. */
:root[data-palette="metro"] { --surface:#fff; --canvas:#edf4f7; --ink:#22344a; --muted:#53667a; --line:#d1dde6; --soft:#e1eef7; --primary:#126eaa; --primary-dark:#0c527f; --on-primary:#fff; --hero:#17314d; --radius:4px; font-family:'Segoe UI',Arial,sans-serif; }
:root[data-palette="metro"][data-scheme="dark"] { --surface:#24364b; --canvas:#172535; --ink:#edf5ff; --muted:#b7cadc; --line:#4d647c; --soft:#324c66; --primary:#87d2ff; --primary-dark:#b7e4ff; --on-primary:#17314d; }
[data-palette="metro"] .sidebar { background:#14283e; color:#e6f4ff; border:0; border-radius:0; }
[data-palette="metro"] .sidebar :is(small,.nav-label,nav a) { color:#c5d8ea; }
[data-palette="metro"] .sidebar nav a { border-radius:3px; }
[data-palette="metro"] .sidebar nav a.active { background:#207eb9; color:#fff; }
[data-palette="metro"] .sidebar-foot { border-color:#45617e; }
[data-palette="metro"] .brand-mark { border-radius:3px; background:#91d9ff; color:#14304c; }
[data-palette="metro"] .sidebar .avatar { background:#91d9ff; color:#14304c; }
[data-palette="metro"] .topbar { background:#126eaa; color:white; border:0; }
[data-palette="metro"] .topbar :is(button,a) { color:white; }
[data-palette="metro"] .page-heading { padding:12px 0; }
[data-palette="metro"] .page-heading h1 { font-size:2.1rem; font-weight:500; }
[data-palette="metro"] :is(.panel,.template-card,.report-audit-card,.appearance-preview) { border-radius:4px; box-shadow:none; }
[data-palette="metro"] :is(.primary,.secondary) { border-radius:3px; }
[data-palette="metro"] .stat { background:#b82f55; color:white; border:0; border-radius:3px; position:relative; overflow:hidden; }
[data-palette="metro"] .stat:nth-child(2) { background:#156eaa; }
[data-palette="metro"] .stat:nth-child(3) { background:#6949bf; }
[data-palette="metro"] .stat>small { color:white; }
[data-palette="metro"] .stat>strong { font-weight:400; font-size:2.4rem; }
[data-palette="metro"] .stat::after { content:""; position:absolute; right:-12px; bottom:-20px; width:75px; height:75px; border:14px solid #ffffff18; border-radius:50%; pointer-events:none; }
[data-palette="metro"] .mobile-nav { background:#14283e; border-top:3px solid #3bb2ed; }
[data-palette="metro"] .mobile-nav a { color:#c5d8ea; }
[data-palette="metro"] .mobile-nav .active { background:#207eb9; color:white; }
.sample-metro { background:#eff6fa; color:#22344a; border-radius:4px; border-top:12px solid #2995d1; }
.sample-metro .sample-monogram { background:#14283e; color:#fff; border-radius:3px; }
.sample-metro>strong { font-weight:500; }
.sample-metro .sample-action { background:#126eaa; color:white; border-radius:3px; }
.sample-metro::after { content:""; position:absolute; right:0; bottom:64px; width:16px; height:54px; background:#6949bf; box-shadow:0 -60px #b82f55; }
.style-gallery { flex-wrap:wrap; }
.style-choice { flex-basis:calc(50% - 18px); }
@media(max-width:760px) { .style-choice { flex-basis:auto; } [data-palette="metro"] .stat>strong { font-size:1.8rem; } }
@media print { :root[data-scheme][data-palette] { --surface:white; --canvas:white; --ink:#183532; --muted:#586e67; --line:#d3dfd8; --soft:#eaf1ec; --primary:#126c69; --on-primary:white; } [data-palette] .stat { background:white; color:#183532; box-shadow:none; } [data-palette] .stat>small { color:#586e67; } }

[data-palette="pulse"] .stat { background-color:var(--tile); }
[data-palette="pulse"] .stat>span { color:#292a3a; }
[data-palette="metro"] .stat>span { color:white; }

button.summary-filter { display:flex; flex-direction:column; align-items:flex-start; text-align:left; font-weight:inherit; white-space:normal; }
button.summary-filter:hover { outline:2px solid var(--primary); outline-offset:3px; }
button.summary-filter[aria-pressed="true"] { outline:3px solid var(--primary); outline-offset:3px; }
button.summary-filter:focus-visible { outline:3px solid var(--primary); outline-offset:6px; }

/* Draft template ordering and four overview filters. */
.drag-handle { display:inline-flex; align-items:center; justify-content:center; padding:10px; min-width:40px; cursor:grab; user-select:none; border:1px solid var(--line); border-radius:6px; color:var(--ink); }
.drag-handle:active { cursor:grabbing; }
.question-drop-end { padding:10px; margin:8px 0; border:1px dashed var(--line); color:var(--muted); font-size:.85rem; }
.overview-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
[data-palette="pulse"] .stat:nth-child(4) { --tile:#c6e6b7; --tile-dark:#365b32; --ring:#e4f4db; }
[data-palette="metro"] .stat:nth-child(4) { background:#38633d; }
[data-palette="metro"] .dashboard-stats .stat:nth-child(5) { background:#087e83; }
[data-palette="metro"] .dashboard-stats .stat:nth-child(6) { background:#946200; }
@media(max-width:1100px) { .overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .overview-stats { grid-template-columns:1fr; } }
.drag-handle { touch-action:none; }
.reorder-target { outline:2px dashed var(--primary); outline-offset:2px; }

/* The target keeps its hit area while it opens space for the dragged item. */
[data-drop-position="before"], [data-drop-position="after"] {
  --drop-gap: 52px;
  position: relative;
  background-clip: padding-box;
}
[data-drop-position="before"] { margin-block-start: 0; border-block-start-width: var(--drop-gap); border-block-start-color: transparent; border-block-start-style: solid; }
[data-drop-position="after"] { margin-block-end: 0; border-block-end-width: var(--drop-gap); border-block-end-color: transparent; border-block-end-style: solid; }
/* Question cards normally clip content, including the marker in the drop gap. */
.builder-question:is([data-drop-position="before"], [data-drop-position="after"]) { overflow: visible; }
[data-drop-position="before"]::before, [data-drop-position="after"]::after {
  position: absolute;
  inset-inline: 0;
  height: calc(var(--drop-gap) - 8px);
  display: grid;
  place-items: center;
  pointer-events: none;
  box-sizing: border-box;
  border: 2px dashed var(--primary);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  font-size: .85rem;
  font-weight: 700;
}
[data-drop-position="before"]::before { content: "Drop before"; bottom: calc(100% + 4px); }
[data-drop-position="after"]::after { content: "Drop after"; top: calc(100% + 4px); }
[data-drop-position="end"] {
  outline: 2px dashed var(--primary);
  outline-offset: 2px;
  background: var(--soft);
  color: var(--primary);
  font-weight: 700;
}
.question-drop-end[data-drop-position="end"] { padding-block: 18px; }

/* Retained template questions which are not collected in this version. */
.builder-question.excluded-from-audit{background:var(--amber-soft);border-style:dashed;border-left:4px solid var(--amber)}
.builder-question.excluded-from-audit .question-select strong{text-decoration:line-through;color:var(--muted)}
