/* Citadel's Nautilus palette, matched to current Nexus house tokens. */
[data-palette="house"] {
  --nx-brand-navy: #051c2c;
  --nx-brand-brass: #c2a25a;
  --nx-brand-cream: #f5f1e6;
  --nx-brand-paper: #f7f3ea;
  --nx-accent: #051c2c;
  --nx-on-accent: #fff;
  --nx-gold: #c2a25a;
  --nx-gold-ink: #8a6d2c;
  --nx-gold-soft: rgba(194,162,90,.4);
  --nx-bg: #faf8f3;
  --nx-surface: #fff;
  --nx-surface-soft: #f4f1ea;
  --nx-text: #1d2630;
  --nx-text-strong: #051c2c;
  --nx-text-secondary: #5b6770;
  --nx-border: #e3e1da;
  --nx-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --notice: #f7f3ea;
  --notice-border: var(--nx-gold-soft);
  --font: var(--nx-font-family);
  /* Compatibility aliases keep existing sign-in/admin templates on the palette. */
  --ink: var(--nx-text-strong);
  --navy: var(--nx-text-strong);
  --text: var(--nx-text);
  --muted: var(--nx-text-secondary);
  --teal: var(--nx-accent);
  --bright: var(--nx-gold);
  --paper: var(--nx-bg);
  --surface: var(--nx-surface);
  --line: var(--nx-border);
  --soft: var(--nx-surface-soft);
  --amber: var(--nx-gold-ink);
}
[data-palette="house"][data-theme="dark"] {
  --nx-accent: #c2a25a;
  --nx-on-accent: #051c2c;
  --nx-gold: #cdb074;
  --nx-gold-ink: #cdb074;
  --nx-bg: #051c2c;
  --nx-surface: #0a2438;
  --nx-surface-soft: #0a2c45;
  --nx-text: #ece7db;
  --nx-text-strong: #faf8f3;
  --nx-text-secondary: #aebcc7;
  --nx-border: rgba(174,188,199,.16);
  --notice: #082434;
}
[data-palette="house"] body { font-family: var(--nx-font-family); }
[data-palette="house"] h1,
[data-palette="house"] h2,
[data-palette="house"] .wordmark {
  font-family: Georgia, "Times New Roman", "Iowan Old Style", serif;
  letter-spacing: -.005em;
}
[data-palette="house"] h2 { border-bottom: 1.5px solid var(--nx-gold-soft); padding-bottom: .28em; }
[data-palette="house"] .widget-heading h2 { flex: 1; }
[data-palette="house"] .masthead { background: var(--nx-bg); box-shadow: inset 0 -2px 0 var(--nx-gold-soft); }
[data-palette="house"] .widget,
[data-palette="house"] .widget-picker,
[data-palette="house"] .expanded-widget { border-left: 2px solid var(--nx-gold-soft); }
[data-palette="house"] .eyebrow { color: var(--nx-gold-ink); letter-spacing: .13em; }
[data-palette="house"] .wordmark small { font-family: var(--nx-font-family); }
[data-palette="house"] .button:not(.secondary) { color: var(--nx-on-accent); }
[data-palette="house"] .sidebar nav a.active { box-shadow: inset 3px 0 var(--nx-gold); }
[data-palette="house"] .section-signet,
[data-palette="house"] .module-icon { border: 1px solid var(--nx-gold-soft); color: var(--nx-gold-ink); }
[data-palette="house"] .status-dot.attention { background: var(--nx-gold-ink); }
[data-palette="house"] .status-dot { background: var(--nx-accent); }
[data-palette="house"] .attendance-chart text { font-family: var(--nx-font-family); }
[data-palette="house"] a:not(.button):hover { color: var(--nx-gold-ink); text-decoration: underline; }
[data-palette="house"] :focus-visible { outline-color: var(--nx-gold); }
[data-palette="house"] .expanded-widget { width: 100%; max-height: none; margin: 0 0 22px; box-shadow: none; }

/* Login is a fixed navy/brass surface before a user preference is available. */
[data-palette="house"] body.auth-page { background: var(--nx-brand-navy); color: var(--nx-brand-cream); }
[data-palette="house"] .auth-layout { max-width: 500px; min-height: 100dvh; padding-top: clamp(30px,6vh,70px); }
[data-palette="house"] .auth-brand { align-items: center; margin-bottom: 30px; }
[data-palette="house"] .auth-brand .brand-logo { width: 220px; padding: 12px; background: var(--nx-brand-paper); border: 1px solid var(--nx-gold-soft); border-radius: 4px; }
[data-palette="house"] .auth-brand .brand-label { color: var(--nx-brand-cream); font: 700 2rem/1.1 Georgia,"Times New Roman",serif; letter-spacing: -.005em; text-transform: none; margin-top: 10px; }
[data-palette="house"] .auth-brand::after { content: ''; display: block; width: 72px; height: 2px; background: var(--nx-brand-brass); margin-top: 14px; }
[data-palette="house"] .auth-panel { background: var(--nx-brand-paper); color: var(--nx-brand-navy); border: 1px solid var(--nx-gold-soft); border-top: 3px solid var(--nx-brand-brass); box-shadow: 0 14px 34px rgba(1,10,18,.4); }
[data-palette="house"] .auth-panel h1 { font-size: 1.9rem; }
[data-palette="house"] .auth-panel .button:hover { background: var(--nx-brand-navy); text-decoration: underline; }
[data-palette="house"] .auth-panel .button { background: var(--nx-brand-navy); border-color: var(--nx-brand-navy); color: var(--nx-brand-paper); }
[data-palette="house"] .auth-panel input { border-color: var(--nx-gold-soft); }
[data-palette="house"] .auth-caption { color: var(--nx-brand-cream); opacity: .78; text-align: center; }

/* Nexus reference: navy rails in both themes and silver/brass medallions. */
[data-palette="house"] .page-heading { padding:22px 24px; border:1px solid var(--nx-frame); border-bottom:2px solid var(--nx-brand-brass); border-radius:14px; background:var(--nx-brand-navy); color:var(--nx-brand-cream); }
[data-palette="house"] .page-heading > div:first-child { position:relative; padding-left:66px; min-width:0; }
[data-palette="house"] .page-heading .heading-icon { position:absolute; left:0; top:5px; width:50px; height:50px; margin:0; }
[data-palette="house"] .page-heading h1 { color:var(--nx-brand-cream); margin-top:4px; }
[data-palette="house"] .page-heading .eyebrow { color:var(--nx-brand-brass); }
[data-palette="house"] .page-heading .intro { color:#c3cdd0; }
[data-palette="house"] .widget,
[data-palette="house"] .workbench-grid > .widget { --widget-inset:20px; padding:var(--widget-inset); border-radius:14px; border:1px solid var(--nx-frame-soft); overflow:clip; }
[data-palette="house"] .widget > .widget-heading { background:var(--nx-brand-navy); color:var(--nx-brand-cream); margin:calc(-1 * var(--widget-inset)) calc(-1 * var(--widget-inset)) 20px; padding:12px 16px; min-height:62px; border-bottom:2px solid var(--nx-brand-brass); align-items:center; }
[data-palette="house"] .widget-heading h2 { display:flex; align-items:center; gap:9px; color:var(--nx-brand-cream); border:0; padding:0; min-width:0; font-size:1.15rem; line-height:1.3; }
[data-palette="house"] .widget-heading .eyebrow,
[data-palette="house"] .widget-heading .icon-button { color:var(--nx-brand-brass); }
[data-palette="house"] .widget-heading .muted { color:#c3cdd0; }
[data-palette="house"] .widget-heading > .icon-button { margin:0; }
[data-palette="house"] .widget-heading .icon-button:hover { background:#18394c; border-color:var(--nx-brand-brass); }
[data-palette="house"] .section-icon { width:30px; height:30px; }
[data-palette="house"] .widget-heading .section-icon { width:34px; height:34px; }
[data-palette="house"] .sidebar .nav-icon { width:30px; flex-shrink:0; }
[data-palette="house"] .sidebar-bottom .section-icon { width:28px; height:28px; }
[data-palette="house"] .section-signet,
[data-palette="house"] .module-icon { background:transparent; border:0; }
[data-palette="house"] .module-icon .section-icon { width:40px; height:40px; }
[data-palette="house"] .section-signet .section-icon { width:36px; height:36px; }
[data-palette="house"] .widget-edit-controls { border-bottom:1px solid var(--nx-gold-soft); padding-bottom:14px; }
@media(max-width:600px) {
  [data-palette="house"] .page-heading { padding:18px 16px; }
  [data-palette="house"] .page-heading > div:first-child { padding-left:51px; }
  [data-palette="house"] .page-heading .heading-icon { width:40px; height:40px; }
  [data-palette="house"] .widget,
  [data-palette="house"] .workbench-grid > .widget { --widget-inset:18px; }
  [data-palette="house"] .widget-heading h2 { font-size:1.05rem; }
}
@media print {
  [data-palette="house"] .page-heading,
  [data-palette="house"] .widget > .widget-heading { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}
/* Match the source workbench banner scale (Nexus ScopedWorkbench). */
[data-palette="house"] .page-heading { padding:12px 16px; border-radius:12px; }
[data-palette="house"] .page-heading h1 { font-size:1.5rem; line-height:1.3; font-weight:700; margin:0; }
[data-palette="house"] .page-heading .intro { font-size:.75rem; line-height:1.45; margin:2px 0 0; }
[data-palette="house"] .page-heading > div:first-child { padding-left:52px; }
[data-palette="house"] .page-heading .heading-icon { width:40px; height:40px; font-size:.92rem; top:4px; }

/* Nexus shell: 56px masthead, 12px outer inset and 8px widget gutters. */
:root { --citadel-masthead:56px; --nx-scrollbar-thumb:#9a895d; --nx-scrollbar-thumb-hover:#c2a25a; --nx-scrollbar-track:transparent; }
[data-palette="house"] .masthead { height:var(--citadel-masthead); min-height:var(--citadel-masthead); padding:0 16px; gap:16px; }
[data-palette="house"] .brand { gap:12px; }
[data-palette="house"] .brand img { width:112px; height:auto; }
[data-palette="house"] .wordmark { font-size:1.25rem; }
[data-palette="house"] .wordmark small { font-size:.6rem; }
[data-palette="house"] .app-frame { min-height:calc(100vh - var(--citadel-masthead)); }
[data-palette="house"] .sidebar { top:var(--citadel-masthead); height:calc(100vh - var(--citadel-masthead)); padding:12px; }
[data-palette="house"] main { max-width:none; padding:12px; margin:0; }
[data-palette="house"] .save-status:empty { height:0; padding:0; }
[data-palette="house"] .page-heading { margin:0 0 12px; }
[data-palette="house"] .page-story { margin:12px 0 20px; padding-block:20px; }
[data-palette="house"] .widget-grid.workbench-grid { gap:8px; align-items:start; }
[data-palette="house"] .citadel-workbench > .nx-workbench__workspace > .nx-workbench__widget-rail { top:calc(var(--citadel-masthead) + 12px); max-height:calc(100vh - var(--citadel-masthead) - 24px); }
/* Fixed-size cards scroll only their body; headers remain visible. */
[data-palette="house"] .workbench-grid > .widget { display:flex; flex-direction:column; padding:0; height:440px; min-height:0; scroll-margin-top:calc(var(--citadel-masthead) + 12px); }
[data-palette="house"] .workbench-grid > .widget.size-s { height:308px; }
[data-palette="house"] .workbench-grid > .widget.size-l { height:572px; }
[data-palette="house"] .workbench-grid > .widget.size-xl { height:660px; }
[data-palette="house"] .workbench-grid > .widget.section-expanded { height:calc(100dvh - var(--citadel-masthead) - 24px); min-height:308px; }
[data-palette="house"] .workbench-grid > .widget > .widget-heading { flex-shrink:0; margin:0; }
[data-palette="house"] .workbench-grid > .widget > .widget-edit-controls { flex-shrink:0; margin:0; padding:8px 12px; }
[data-palette="house"] .widget-body-content { padding:12px; min-width:0; }
[data-palette="house"] .widget-body:focus-visible { outline:2px solid var(--nx-brand-brass); outline-offset:-3px; }
@media(max-width:679px) {
 :root { --citadel-masthead:52px; }
 [data-palette="house"] .masthead { padding-inline:8px; gap:8px; }
 [data-palette="house"] .brand img { width:90px; }
 [data-palette="house"] .citadel-workbench > .nx-workbench__workspace > .nx-workbench__widget-rail { top:auto; max-height:none; }
}
@media print {
 [data-palette="house"] .workbench-grid > .widget { height:auto !important; }
 [data-palette="house"] .nx-workbench__widget-body { overflow:visible; }
}

[data-palette="house"] .expanded-widget { display:flex; flex-direction:column; height:calc(100dvh - var(--citadel-masthead) - 24px); min-height:308px; padding:0; }
[data-palette="house"] .expanded-widget > .widget-heading { margin:0; flex-shrink:0; }
@media print { [data-palette="house"] .expanded-widget { height:auto; } }
[data-palette="house"] .workbench-grid > .widget[hidden] { display:none; }

[data-palette="house"] .workbench-grid > .widget.section-expanded { grid-column:1 / -1; }
/* Larger readable cream glyphs inside the same steel/brass instrument ring. */
[data-palette="house"] .section-icon.nx-nav-signet { --nx-instrument-face:76%; }
[data-palette="house"] .sidebar .section-icon { width:36px; height:36px; font-size:1.1rem; }
[data-palette="house"] .sidebar .nav-icon { width:36px; }
[data-palette="house"] .citadel-workbench .nx-workbench__widget-icons .section-icon { width:40px; height:40px; font-size:1.2rem; }
[data-palette="house"] .citadel-workbench .widget-heading .nx-workbench__widget-icon { width:34px; height:34px; font-size:1rem; flex-shrink:0; }
[data-palette="house"] .citadel-workbench .nx-workbench__widget-icons button { width:48px; height:48px; }
.citadel-widget-tooltip { position:fixed; z-index:2000; width:240px; max-width:calc(100vw - 16px); padding:10px 14px; border:1px solid #c2a25a; border-radius:8px; background:#051c2c; color:#fff8e8; box-shadow:0 4px 16px #051c2c33; pointer-events:none; font-size:.875rem; }
.citadel-widget-tooltip strong,.citadel-widget-tooltip span { display:block; }
.citadel-widget-tooltip span { color:#dfc990; margin-top:3px; font-size:.75rem; }
@media(max-width:679px) {
 [data-palette="house"] .citadel-workbench .nx-workbench__widget-icons { display:grid; }
 [data-palette="house"] .citadel-workbench .nx-workbench__widget-icons > [role="group"] { display:flex; flex-wrap:wrap; justify-content:center; }
}
@media(max-width:679px) {
 [data-palette="house"] .citadel-workbench .nx-workbench__workspace[data-rail-open="false"] .nx-workbench__widget-picker { display:block; }
}
.microsoft-sign-in { display:flex; justify-content:center; align-items:center; gap:12px; margin-block:20px 12px; }
.microsoft-mark { display:grid; grid-template-columns:repeat(2,9px); grid-template-rows:repeat(2,9px); gap:2px; }
.microsoft-mark i { background:#f25022; }.microsoft-mark i:nth-child(2){background:#7fba00}.microsoft-mark i:nth-child(3){background:#00a4ef}.microsoft-mark i:nth-child(4){background:#ffb900}

.shared-file-path { margin-bottom:16px; overflow-wrap:anywhere; }
