/* =========================================================================
   Virtualis SIS — Editorial-modern visual system
   Light surfaces, classical Quintivium typography (Georgia + Palatino).
   v2026.05.05 — full overhaul. Linear/Stripe/Vercel-class polish with a
   New Yorker-style serif voice. Designed by a senior UI/UX engineer for
   Zeus Rodriguez. Do not regress.
   ========================================================================= */

:root {
  /* Brand */
  --navy:        #1A2F4B;
  --navy-deep:   #0A1628;
  --navy-mid:    #122340;
  --navy-soft:   #2A4163;
  --navy-ink:    #142339;

  /* RCorp metallic gold palette — refined, not mustard */
  --gold:        #C9A961;
  --gold-light:  #E5CD9A;
  --gold-bright: #D4B36E;
  --gold-deep:   #8C7338;
  --gold-shimmer:#F0DCA8;
  --gold-warm:   #E5CD9A;
  --gold-pale:   #F2EAD2;
  --gold-text:   #8C7338;

  --parchment:   #FDF5E6;
  --parchment-2: #FBF8EE;

  /* Neutrals — warm editorial */
  --bg:           #F7F5F0;
  --bg-tinted:    #F1EEE5;
  --surface:      #FFFFFF;
  --surface-2:    #FBFAF6;
  --sidebar-bg:   #FBF9F2;
  --sidebar-edge: #ECE6D5;
  --border:       #E8E2D2;
  --border-strong:#D6CEB8;
  --hairline:     #F0EBDC;

  /* Text */
  --text:         #1A2F4B;
  --text-body:    #2C2C2E;
  --text-muted:   #6E6B63;
  --text-faint:   #7B786E;

  /* Legacy aliases — pre-overhaul templates (calendar, messages) reference
     these older names. Map them onto canonical tokens so those views render
     correctly instead of falling back to inherited/black. */
  --brand-primary:     var(--navy);
  --brand-paper:       var(--parchment);
  --brand-border:      var(--border);
  --brand-accent:      var(--gold);
  --brand-accent-text: var(--gold-deep);
  --ink-soft:          var(--text-muted);
  --gray:              var(--text-faint);

  /* Status */
  --ok:           #2E7D5F;
  --ok-bg:        #E8F2EC;
  --warn:         #B07407;
  --warn-bg:      #FBF1D9;
  --error:        #A0312E;
  --error-bg:     #FBE9E6;
  --info:         #1F4F8B;
  --info-bg:      #E5EDF7;

  /* Shadows — soft, layered, modern */
  --shadow-xs:    0 1px 2px rgba(15,30,51,0.04);
  --shadow-sm:    0 1px 2px rgba(15,30,51,0.04), 0 1px 3px rgba(15,30,51,0.04);
  --shadow-md:    0 4px 14px rgba(15,30,51,0.06), 0 2px 5px rgba(15,30,51,0.04);
  --shadow-lg:    0 14px 32px rgba(15,30,51,0.10), 0 4px 12px rgba(15,30,51,0.05);
  --shadow-xl:    0 30px 70px rgba(15,30,51,0.14), 0 8px 24px rgba(15,30,51,0.06);
  --shadow-gold:  0 6px 22px rgba(201,169,97,0.34), 0 2px 6px rgba(140,115,56,0.20);
  --shadow-navy:  0 8px 24px rgba(15,30,51,0.30), 0 3px 8px rgba(15,30,51,0.18);
  --inset-light:  inset 0 1px 0 rgba(255,255,255,0.20);
  --inset-gold:   inset 0 1px 0 rgba(255,236,178,0.60);

  /* Radii */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* Motion */
  --t-fast: 130ms cubic-bezier(0.4, 0, 0.2, 1);
  --t:      210ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 340ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-w: 272px;
}

* { box-sizing: border-box; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(140,115,56,0.16);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(140,115,56,0.32); background-clip: padding-box; border: 2px solid transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(201,169,97,0.32); color: var(--navy-deep); }

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--gold-deep); }

h1, h2, h3, h4, h5 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  font-weight: 700;
  text-wrap: balance;
  letter-spacing: -0.014em;
  margin-top: 0;
  line-height: 1.2;
}
h1 { font-size: 2.05rem; margin-bottom: 0.45rem; }
h2 { font-size: 1.35rem; margin-bottom: 0.55rem; }
h3 { font-size: 1.05rem; color: var(--gold-deep); letter-spacing: 0.02em; }
h4 { font-size: 0.92rem; }

p { margin: 0.5rem 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.muted { color: var(--text-muted); font-size: 0.92rem; }
.faint { color: var(--text-faint); font-size: 0.88rem; }
.right { text-align: right; }
.center { text-align: center; }

/* =========================================================================
   App shell
   ========================================================================= */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--bg);
}

/* =========================================================================
   Sidebar — light editorial cream, logo reads in full, modern admin feel
   ========================================================================= */
.sidebar {
  background:
    linear-gradient(180deg, #FFFDF5 0%, var(--sidebar-bg) 60%, #F6F1DF 100%);
  color: var(--navy-ink);
  padding: 1.6rem 0.95rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow:
    inset -1px 0 0 var(--sidebar-edge),
    1px 0 0 rgba(15,30,51,0.02);
  display: flex;
  flex-direction: column;
}

/* Decorative top accent rule */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background:
    linear-gradient(90deg,
      transparent 0%,
      var(--gold-deep) 18%,
      var(--gold) 38%,
      var(--gold-shimmer) 50%,
      var(--gold) 62%,
      var(--gold-deep) 82%,
      transparent 100%);
  opacity: 0.85;
}

.brand-mark {
  display: block;
  padding: 0.35rem 0.4rem 1.1rem;
  margin: 0 0 0.85rem;
  position: relative;
  text-decoration: none;
  transition: transform var(--t);
}
.brand-mark::after {
  content: '';
  position: absolute;
  left: 0.6rem; right: 0.6rem; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 20%, var(--border-strong) 80%, transparent);
}
.brand-mark:hover { transform: translateY(-1px); }
.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78px;
  object-fit: contain;
  /* Logo is dark navy + gold on transparent — show it as designed */
  filter: drop-shadow(0 1px 2px rgba(15,30,51,0.10));
}
.brand-tag {
  font-family: Georgia, serif;
  font-size: 0.62rem;
  color: var(--gold-deep);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 0.85rem;
  font-weight: 700;
}

/* legacy compatibility */
.brand-sub { display: none; }
.brand { /* legacy alias kept harmless */ }

/* Nav */
.nav { list-style: none; padding: 0 0.15rem; margin: 0; flex: 1; }
.nav li { margin: 1px 0; }
.nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--navy-ink);
  padding: 0.55rem 0.8rem;
  border-radius: var(--r-sm);
  font-size: 0.93rem;
  font-family: Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.005em;
  position: relative;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.nav a .nav-ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep);
  opacity: 0.85;
  transition: color var(--t-fast), opacity var(--t-fast), transform var(--t-fast);
}
.nav a .nav-ico svg { width: 100%; height: 100%; display: block; }

.nav a:hover {
  background: rgba(201, 169, 97, 0.12);
  color: var(--navy-deep);
}
.nav a:hover .nav-ico {
  color: var(--gold-deep);
  opacity: 1;
  transform: scale(1.05);
}
.nav a.active,
.nav a[aria-current="page"] {
  background:
    linear-gradient(90deg, rgba(201,169,97,0.20) 0%, rgba(201,169,97,0.05) 100%);
  color: var(--navy-deep);
  font-weight: 700;
  box-shadow:
    inset 3px 0 0 var(--gold),
    0 1px 2px rgba(15,30,51,0.04);
}
.nav a.active .nav-ico,
.nav a[aria-current="page"] .nav-ico { color: var(--gold-deep); opacity: 1; }

.nav .group {
  color: var(--gold-deep);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-family: Georgia, serif;
  font-weight: 700;
  padding: 1.4rem 0.85rem 0.45rem;
  position: relative;
}
.nav .group:first-of-type { padding-top: 0.75rem; }

/* Sidebar footer / sign-out is the last <li> — give it a touch of separation */
.nav li:last-child {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.nav li:last-child a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.nav li:last-child a:hover { color: var(--error); background: rgba(160,49,46,0.06); }

/* =========================================================================
   Main content
   ========================================================================= */
.main {
  padding: 2.5rem 3rem 4rem;
  max-width: 100%;
  overflow-x: auto;
  background: var(--bg);
}

/* =========================================================================
   Page header
   ========================================================================= */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.page-head h1 {
  margin: 0;
  font-size: 2.25rem;
  letter-spacing: -0.018em;
}
.page-head > div {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.crumbs {
  color: var(--text-muted);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: Georgia, serif;
  margin-bottom: 0.45rem;
  font-weight: 600;
}
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--gold-deep); }
.crumbs span { color: var(--text-faint); margin: 0 0.4rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}
.section-head h2 { margin: 0; }

/* =========================================================================
   Flash messages
   ========================================================================= */
.flash {
  padding: 0.85rem 1.15rem 0.85rem 1.5rem;
  border-radius: var(--r-md);
  margin-bottom: 1rem;
  font-size: 0.94rem;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  border: 1px solid transparent;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-xs);
}
.flash::before {
  content: '';
  width: 4px;
  position: absolute;
  left: 0.5rem;
  top: 0.6rem;
  bottom: 0.6rem;
  border-radius: 2px;
}
.flash.ok    { background: var(--ok-bg);    color: var(--ok);    border-color: rgba(46,125,95,0.16); }
.flash.ok::before    { background: var(--ok); }
.flash.error { background: var(--error-bg); color: var(--error); border-color: rgba(160,49,46,0.18); }
.flash.error::before { background: var(--error); }
.flash.warn  { background: var(--warn-bg);  color: var(--warn);  border-color: rgba(176,116,7,0.20); }
.flash.warn::before  { background: var(--warn); }
.flash.info  { background: var(--info-bg);  color: var(--info);  border-color: rgba(31,79,139,0.16); }
.flash.info::before  { background: var(--info); }

/* =========================================================================
   Cards
   ========================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h2 { margin-top: 0; font-size: 1.18rem; }
.card h2 + .muted { margin-top: -0.35rem; margin-bottom: 0.85rem; }
.card.flat { box-shadow: none; }
.card.flat:hover { box-shadow: var(--shadow-xs); }
.card.accent {
  border-top: 4px solid var(--gold);
  padding-top: 1.4rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

/* =========================================================================
   Stat / KPI tiles
   ========================================================================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.6rem 1.75rem 1.65rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background:
    linear-gradient(90deg,
      var(--gold-deep) 0%,
      var(--gold) 22%,
      var(--gold-shimmer) 50%,
      var(--gold) 78%,
      var(--gold-deep) 100%);
  box-shadow: 0 1px 4px rgba(201,169,97,0.30);
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.stat .label {
  font-size: 0.68rem;
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-family: Georgia, serif;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.stat .value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.025em;
  display: block;
}
.stat .trend {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.55rem;
  font-style: italic;
}

/* =========================================================================
   Buttons — premium, depth-rich, metallic
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background:
    linear-gradient(180deg, var(--navy-soft) 0%, var(--navy) 50%, var(--navy-deep) 100%);
  color: #FFEFCE;
  border: 1px solid var(--navy-deep);
  padding: 0.62rem 1.4rem;
  border-radius: var(--r-sm);
  font-family: Georgia, serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    var(--shadow-navy),
    var(--inset-light);
  transition: all var(--t-fast);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.btn:hover {
  background:
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(15,30,51,0.36),
    0 4px 10px rgba(15,30,51,0.20),
    var(--inset-gold);
  color: var(--gold-shimmer);
  border-color: var(--gold);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm), var(--inset-light);
}
.btn:focus-visible {
  outline: 2px solid transparent;
  box-shadow:
    0 0 0 4px rgba(201,169,97,0.36),
    var(--shadow-navy),
    var(--inset-light);
}

/* Gold — luxurious metallic finish */
.btn.gold {
  background:
    linear-gradient(180deg,
      var(--gold-shimmer) 0%,
      var(--gold-bright) 30%,
      var(--gold) 70%,
      var(--gold-deep) 100%);
  color: var(--navy-deep);
  border: 1px solid var(--gold-deep);
  box-shadow:
    var(--shadow-gold),
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(140,115,56,0.30);
  text-shadow: 0 1px 0 rgba(255,255,255,0.30);
}
.btn.gold:hover {
  background:
    linear-gradient(180deg,
      #FCEAB8 0%,
      var(--gold-shimmer) 25%,
      var(--gold-bright) 70%,
      var(--gold) 100%);
  color: var(--navy-deep);
  border-color: var(--gold-deep);
  box-shadow:
    0 12px 32px rgba(201,169,97,0.48),
    0 3px 10px rgba(140,115,56,0.30),
    inset 0 1px 0 rgba(255,255,255,0.70);
}
.btn.gold:active {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow:
    inset 0 2px 4px rgba(140,115,56,0.32),
    inset 0 1px 0 rgba(255,255,255,0.20);
}

/* Ghost — soft tinted surface, NOT a plain outline */
.btn.ghost {
  background:
    linear-gradient(180deg, #FFFFFF 0%, #FBF9F2 100%);
  color: var(--navy);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 1px 2px rgba(15,30,51,0.06),
    inset 0 1px 0 rgba(255,255,255,0.80);
  text-shadow: none;
}
.btn.ghost::before { display: none; }
.btn.ghost:hover {
  background:
    linear-gradient(180deg, #FFFAEC 0%, #F5E9C5 100%);
  color: var(--navy-deep);
  border-color: var(--gold);
  box-shadow:
    0 6px 16px rgba(201,169,97,0.20),
    0 2px 4px rgba(15,30,51,0.06),
    inset 0 1px 0 rgba(255,255,255,0.80);
}

/* Danger — rich crimson */
.btn.danger {
  background:
    linear-gradient(180deg, #D45A55 0%, #B0383A 50%, #872825 100%);
  border-color: #6E1F1D;
  color: #FFF6F4;
  box-shadow:
    0 6px 18px rgba(135,40,37,0.30),
    inset 0 1px 0 rgba(255,255,255,0.20);
}
.btn.danger:hover {
  background:
    linear-gradient(180deg, #C04945 0%, #872825 50%, #5E1614 100%);
  color: white;
  box-shadow:
    0 10px 24px rgba(135,40,37,0.38),
    inset 0 1px 0 rgba(255,255,255,0.20);
}

/* Success — deep emerald */
.btn.success {
  background:
    linear-gradient(180deg, #54B086 0%, #2E7D5F 50%, #1F5A43 100%);
  border-color: #174A36;
  color: #F4FBF7;
  box-shadow:
    0 6px 18px rgba(46,125,95,0.30),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn.success:hover {
  background:
    linear-gradient(180deg, #3F9D74 0%, #1F5A43 50%, #154031 100%);
  color: white;
  box-shadow:
    0 10px 24px rgba(46,125,95,0.38),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

.btn.small {
  padding: 0.42rem 1.05rem;
  font-size: 0.82rem;
}
.btn.tiny {
  padding: 0.3rem 0.8rem;
  font-size: 0.76rem;
}
.btn.block { display: flex; width: 100%; }

/* Toolbar */
.toolbar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar input[type=text],
.toolbar input[type=search] {
  padding: 0.55rem 0.95rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: var(--bg-tinted);
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 0.94rem;
  width: 100%;
  transition: all var(--t-fast);
}
.toolbar input[type=text]:focus,
.toolbar input[type=search]:focus {
  outline: 2px solid transparent;
  background: var(--surface);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,169,97,0.14);
}

/* =========================================================================
   Tables
   ========================================================================= */
table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.94rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.data th {
  background: linear-gradient(180deg, #FBFAF6 0%, #F4F0E0 100%);
  color: var(--navy);
  font-family: Georgia, serif;
  font-weight: 700;
  text-align: left;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
table.data td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr { transition: background var(--t-fast); }
table.data tbody tr:hover td { background: rgba(253, 245, 230, 0.45); }
table.data .right { text-align: right; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; font-family: Georgia, serif; }
table.data tr.empty td,
table.data td[colspan].empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

/* =========================================================================
   Forms
   ========================================================================= */
form .field { margin-bottom: 1.15rem; }
form label {
  display: block;
  font-size: 0.74rem;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-family: Georgia, serif;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
form input[type=text], form input[type=email], form input[type=password],
form input[type=date], form input[type=time], form input[type=number],
form input[type=tel], form input[type=datetime-local], form input[type=url],
form input[type=search],
form select, form textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 0.98rem;
  background: var(--surface);
  color: var(--text-body);
  transition: all var(--t-fast);
}
form textarea { min-height: 5.5rem; resize: vertical; line-height: 1.55; }
form input:focus, form select:focus, form textarea:focus {
  outline: 2px solid transparent;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,169,97,0.16);
}
form input::placeholder, form textarea::placeholder {
  color: var(--text-faint);
  font-style: italic;
}
form input[type=file] {
  padding: 0.55rem;
  background: var(--bg-tinted);
  border-style: dashed;
  cursor: pointer;
}
form input[type=file]:hover { border-color: var(--gold); background: var(--parchment-2); }

form input[type=checkbox], form input[type=radio] {
  width: auto;
  margin-right: 0.4rem;
  accent-color: var(--gold);
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* =========================================================================
   Tags / status pills
   ========================================================================= */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.78rem;
  border-radius: var(--r-pill);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-family: Georgia, serif;
  border: 1px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
}
.tag.enrolled, .tag.proficient, .tag.confirmed, .tag.completed,
.tag.paid, .tag.final, .tag.filled, .tag.approved, .tag.minor,
.tag.returned, .tag.scholarship {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: rgba(46,125,95,0.20);
}
.tag.withdrawn, .tag.declined, .tag.cancelled, .tag.voided,
.tag.major, .tag.beginning, .tag.denied {
  background: var(--error-bg);
  color: var(--error);
  border-color: rgba(160,49,46,0.20);
}
.tag.pending, .tag.late, .tag.moderate, .tag.developing, .tag.open {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: rgba(176,116,7,0.22);
}
.tag.live, .tag.advanced, .tag.partial, .tag.resubmitted,
.tag.in_progress, .tag.az_esa, .tag.wi_choice, .tag.mpcp {
  background: var(--parchment);
  color: var(--gold-deep);
  border-color: rgba(201,169,97,0.22);
}
.tag.flex, .tag.draft, .tag.submitted, .tag.invited, .tag.planned,
.tag.closed, .tag.sent, .tag.private, .tag.graduated {
  background: var(--info-bg);
  color: var(--info);
  border-color: rgba(31,79,139,0.18);
}
.tag.critical { background: #4B0F0F; color: #fff; border-color: #4B0F0F; }

/* =========================================================================
   Login / public pages
   ========================================================================= */
.login-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 18% 18%, rgba(201,169,97,0.16), transparent 52%),
    radial-gradient(ellipse at 82% 82%, rgba(26,47,75,0.10), transparent 52%),
    linear-gradient(160deg, #FFFDF5 0%, var(--parchment) 60%, #F4ECD2 100%);
  padding: 2rem;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.75rem 2.75rem 2.5rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 460px;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background:
    linear-gradient(90deg,
      var(--gold-deep) 0%,
      var(--gold) 30%,
      var(--gold-shimmer) 50%,
      var(--gold) 70%,
      var(--gold-deep) 100%);
}
.login-card .login-brand {
  text-align: center;
  margin-bottom: 1.6rem;
}
.login-card .login-brand img {
  width: 100%;
  max-width: 280px;
  height: auto;
}
.login-card h1 {
  font-family: Georgia, serif;
  margin-bottom: 0.4rem;
  font-size: 1.55rem;
  text-align: center;
}
.login-card .sub {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 1.85rem;
  font-style: italic;
  text-align: center;
}

/* =========================================================================
   Profile / detail page
   ========================================================================= */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.94rem;
  gap: 1rem;
}
.detail-list li:last-child { border-bottom: none; }
.detail-list .lbl {
  color: var(--text-muted);
  font-family: Georgia, serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.detail-list .val {
  color: var(--text);
  text-align: right;
}

/* =========================================================================
   Detail grid — modern alternative to .detail-list
   Two-column auto-fit grid with each pair as a stat-like cell
   ========================================================================= */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.detail-grid li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.detail-grid li:hover {
  border-color: var(--gold);
  background: var(--surface);
}
.detail-grid .lbl {
  color: var(--text-muted);
  font-family: Georgia, serif;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  line-height: 1.2;
}
.detail-grid .val {
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
  word-break: break-word;
}
.detail-grid .val.muted, .detail-grid .val .muted {
  color: var(--text-faint);
  font-weight: 400;
}

/* =========================================================================
   Profile hero — for individual student / family / staff pages
   ========================================================================= */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  padding: 1.4rem 1.65rem;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(201,169,97,0.10), transparent 55%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
}
.profile-hero .avatar { flex: 0 0 auto; }
.profile-hero .info { flex: 1; min-width: 0; }
.profile-hero .crumbs { margin-bottom: 0.25rem; }
.profile-hero h1 { margin: 0 0 0.5rem; font-size: 1.85rem; line-height: 1.15; }
.profile-hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.4rem;
}
.profile-hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-self: center;
}

/* Avatar — gold-gradient initials circle */
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy-deep);
  letter-spacing: -0.02em;
  background:
    radial-gradient(circle at 30% 25%, var(--gold-shimmer), transparent 60%),
    linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(140,115,56,0.30);
  text-shadow: 0 1px 0 rgba(255,255,255,0.30);
  flex-shrink: 0;
}
.avatar.sm { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar.lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar.navy {
  background:
    radial-gradient(circle at 30% 25%, var(--navy-soft), transparent 60%),
    linear-gradient(135deg, var(--navy-soft) 0%, var(--navy) 50%, var(--navy-deep) 100%);
  color: var(--gold-shimmer);
  text-shadow: 0 1px 0 rgba(0,0,0,0.40);
}

/* Grade chip — small inline meta badge */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: Georgia, serif;
  font-size: 0.82rem;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.chip a { color: var(--navy); }
.chip a:hover { color: var(--gold-deep); }

/* =========================================================================
   Category cards — colored, distinct sections (e.g. notes by category)
   ========================================================================= */
.cat-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem 1.1rem;
  margin-bottom: 0.85rem;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
}
.cat-card .cat-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}
.cat-card .cat-icon {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-card .cat-icon svg { width: 16px; height: 16px; }
.cat-card .cat-title {
  font-family: Georgia, serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.cat-card .cat-body { color: var(--text-body); font-size: 0.95rem; }
.cat-card .cat-body p { margin: 0.3rem 0; }
.cat-card .cat-body .detail-grid { margin-top: 0.4rem; }

/* Color variants */
.cat-card.cat-blue {
  background: linear-gradient(180deg, #F2F6FB 0%, var(--surface) 60%);
  border-color: rgba(31,79,139,0.16);
}
.cat-card.cat-blue::before { background: var(--info); }
.cat-card.cat-blue .cat-icon { background: var(--info-bg); color: var(--info); }

.cat-card.cat-gold {
  background: linear-gradient(180deg, #FBF6E5 0%, var(--surface) 60%);
  border-color: rgba(201,169,97,0.28);
}
.cat-card.cat-gold::before { background: var(--gold); }
.cat-card.cat-gold .cat-icon { background: var(--gold-pale); color: var(--gold-deep); }

.cat-card.cat-green {
  background: linear-gradient(180deg, #EFF7F2 0%, var(--surface) 60%);
  border-color: rgba(46,125,95,0.18);
}
.cat-card.cat-green::before { background: var(--ok); }
.cat-card.cat-green .cat-icon { background: var(--ok-bg); color: var(--ok); }

.cat-card.cat-rose {
  background: linear-gradient(180deg, #FBF1EF 0%, var(--surface) 60%);
  border-color: rgba(160,49,46,0.16);
}
.cat-card.cat-rose::before { background: var(--error); }
.cat-card.cat-rose .cat-icon { background: var(--error-bg); color: var(--error); }

.cat-card.cat-neutral {
  background: linear-gradient(180deg, var(--bg-tinted) 0%, var(--surface) 60%);
  border-color: var(--border);
}
.cat-card.cat-neutral::before { background: var(--gold-deep); }
.cat-card.cat-neutral .cat-icon { background: var(--bg-tinted); color: var(--gold-deep); }

/* Sub-nav (used as page-level secondary navigation, distinct from primary tabs) */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.5rem;
  padding: 0.45rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}
.subnav a {
  padding: 0.5rem 0.95rem;
  border-radius: var(--r-sm);
  font-family: Georgia, serif;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--t-fast);
}
.subnav a:hover {
  background: var(--surface);
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}
.subnav a.active, .subnav a.current {
  background: var(--surface);
  color: var(--navy);
  box-shadow:
    var(--shadow-sm),
    inset 0 -2px 0 var(--gold);
  font-weight: 700;
}

/* =========================================================================
   Tabs
   ========================================================================= */
.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding: 0;
  flex-wrap: wrap;
}
.tabs a {
  padding: 0.7rem 1.15rem;
  font-family: Georgia, serif;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.012em;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: all var(--t-fast);
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}
.tabs a:hover {
  color: var(--navy);
  background: rgba(201,169,97,0.06);
}
.tabs a.active, .tabs a.current {
  color: var(--navy);
  border-bottom-color: var(--gold);
  font-weight: 700;
}

/* =========================================================================
   Empty state
   ========================================================================= */
.empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  color: var(--text-muted);
}
.empty h3 { color: var(--navy); margin-bottom: 0.5rem; font-size: 1.1rem; }
.empty p { color: var(--text-muted); margin: 0.5rem 0 1rem; }

/* =========================================================================
   Misc UI primitives
   ========================================================================= */
.attendance-grid input[type=number] { max-width: 80px; }

.gb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gb-table th, .gb-table td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
}
.gb-table thead th {
  background: var(--parchment-2);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: 6rem;
  font-size: 0.78rem;
}
.gb-table thead th.name {
  writing-mode: initial;
  transform: none;
  height: auto;
  text-align: left;
}

.legal-box {
  background: var(--parchment-2);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.legal-box strong { color: var(--navy); font-family: Georgia, serif; }

.callout {
  background: var(--info-bg);
  border-left: 4px solid var(--info);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 1rem 0;
  font-size: 0.94rem;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.kbd {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: var(--bg-tinted);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: Georgia, monospace;
  font-size: 0.84rem;
  color: var(--navy);
}

.page-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.page-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* =========================================================================
   Dashboard hero — navy keepsake against the lighter shell
   ========================================================================= */
.dash-hero {
  background:
    radial-gradient(ellipse at 88% 0%, rgba(229,205,154,0.32), transparent 56%),
    radial-gradient(ellipse at 12% 100%, rgba(201,169,97,0.16), transparent 56%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, var(--navy-deep) 100%);
  color: var(--parchment);
  padding: 2.25rem 2.5rem;
  border-radius: var(--r-xl);
  margin-bottom: 1.75rem;
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(229,205,154,0.18);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201,169,97,0.22);
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background:
    linear-gradient(90deg,
      transparent 0%,
      var(--gold) 25%,
      var(--gold-shimmer) 50%,
      var(--gold) 75%,
      transparent 100%);
}
.dash-hero h1 {
  color: #FFFFFF;
  margin-bottom: 0.4rem;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
}
.dash-hero p {
  color: rgba(253,245,230,0.82);
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    background: var(--bg);
  }
  .sidebar {
    position: static;
    height: auto;
    box-shadow: inset 0 -1px 0 var(--sidebar-edge);
    padding: 1.25rem 1rem 1.5rem;
  }
  .main { padding: 1.5rem 1.25rem 3rem; }
  .row2, .row3, .row4 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 1.65rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .toolbar { border-radius: var(--r-md); padding: 0.6rem; }
}

/* =========================================================================
   Print
   ========================================================================= */
@media print {
  .sidebar, .page-head .btn, .page-head a.btn, .flash, .crumbs, .toolbar {
    display: none !important;
  }
  .app {
    display: block !important;
    grid-template-columns: none !important;
    background: #fff !important;
  }
  .main { padding: 0 !important; max-width: none !important; }
  body { background: #fff; }
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
  a { color: inherit; text-decoration: none; }
}

/* =========================================================================
   CLASSICAL TREATMENT — Virtualis flagship components
   Scoped under .classical-page so they only fire on themed course/lesson views.
   Mirrors arizona.virtualis.school cls-* vocabulary: page-banner, scripture-block
   (with curator-trigger popup), curator-card, poem-plate, ornamental-divider.
   ========================================================================= */

.classical-page {
  --rubric: #8B1A1A;
  --rubric-soft: #B14545;
  --vellum: #F9F0D5;
  --vellum-2: #F4E8CC;
  --gold-edge: #D4B05F;
  --gold-deeper: #8C7338;
  --ink: #2a1a0d;
}

/* Themed page-banner: the hero, big title + tagline, optional artwork backdrop */
/* Redesigned 2026-06-10 — LIGHT card, multi-color accents (dark used only as accents, never a large fill). */
.classical-page .page-banner {
  position: relative;
  isolation: isolate;
  margin: 0 0 1.4rem;
  padding: 2.7rem 2.4rem 2.4rem;
  text-align: center;
  border-radius: 16px;
  overflow: hidden;
  background: #FCFBF8;
  color: var(--navy);
  border: 1px solid #ECE6D5;
  box-shadow: 0 6px 18px rgba(120,100,55,.10);
}
/* multi-color top rail — the signature accent */
.classical-page .page-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  z-index: 2;
  background: linear-gradient(90deg, #1A2F4B 0%, #2E6E8E 30%, #C9A961 64%, #C2622E 100%);
}
/* faint gold ring accent, top-right */
.classical-page .page-banner::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: -64px; right: -54px;
  width: 230px; height: 230px;
  border-radius: 50%;
  border: 2px solid rgba(184,134,11,.13);
  pointer-events: none;
}
.classical-page .page-banner > * { position: relative; z-index: 1; }
/* No dark image fill — hero art leads the course CARD, not the header. */
.classical-page .page-banner.has-hero { background: #FCFBF8; color: var(--navy); }
.classical-page .page-banner .kicker {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-variant: normal;
  font-size: .66rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #9A7B2E;
  margin: 0 0 .7rem;
  padding: 0;
  border: 0;
}
/* short multi-color accent rule under the kicker */
.classical-page .page-banner .kicker::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: .7rem auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #1A2F4B 0%, #C9A961 55%, #C2622E 100%);
}
.classical-page .page-banner h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -.01em;
  color: var(--navy);
}
.classical-page .page-banner h1::first-letter { color: inherit; }
.classical-page .page-banner.has-hero h1 { color: var(--navy); }
.classical-page .page-banner.has-hero h1::first-letter { color: inherit; }
.classical-page .page-banner .tagline {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  color: #8A6D1F;
  margin: .55rem auto 0;
  max-width: 700px;
  letter-spacing: .02em;
}
.classical-page .page-banner.has-hero .tagline { color: #8A6D1F; }
.classical-page .page-banner.has-hero .kicker { color: #9A7B2E; border: 0; }

/* Curator card — museum-label */
.classical-page .curator-card {
  max-width: 720px;
  margin: 0 auto 1.6rem;
  background: var(--vellum);
  background-image: linear-gradient(180deg, var(--vellum) 0%, var(--vellum-2) 100%);
  border: 1px solid var(--gold-deeper);
  border-left: 4px solid var(--rubric);
  border-radius: 2px;
  padding: 1.1rem 1.5rem 1.1rem;
  box-shadow: 0 3px 16px rgba(74,46,26,.10), inset 0 0 0 1px var(--gold-edge);
}
.classical-page .curator-label {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rubric);
  font-weight: 700;
  margin: 0 0 0.3rem;
  padding: 3px 10px;
  border: 1px solid var(--rubric);
}
.classical-page .curator-title {
  color: var(--ink);
  font-family: Georgia, serif;
  font-variant: small-caps;
  font-weight: 900;
  font-size: 1.15rem;
  margin: 0.3rem 0 0.1rem;
  letter-spacing: 0.5px;
}
.classical-page .curator-title::first-letter { color: var(--rubric); }
.classical-page .curator-provenance {
  color: var(--rubric);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.78rem;
  margin: 0 0 0.6rem;
}
.classical-page .curator-ethos {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}
.classical-page .curator-ethos em { color: var(--rubric); font-style: italic; }
.classical-page .curator-further {
  margin-top: 0.6rem;
  font-family: Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
}
.classical-page .curator-further a {
  color: var(--rubric);
  text-decoration: underline;
  font-weight: 700;
  font-style: normal;
}
.classical-page .curator-further a:hover { color: #5c0f0f; }

/* Scripture block — framed, large quote glyph, click to reveal context popup */
.classical-page .scripture-block {
  max-width: 800px;
  margin: 1.5rem auto;
  background: #fff;
  border: 1px solid var(--gold-deeper);
  border-left: 6px solid var(--rubric);
  border-radius: 2px;
  padding: 1.6rem 1.8rem 1.4rem 3rem;
  box-shadow: 0 3px 18px rgba(74,46,26,.10), inset 0 0 0 1px var(--gold-edge);
  position: relative;
}
.classical-page .scripture-block::before {
  content: '\201C';
  position: absolute;
  top: 0.4rem;
  left: 0.9rem;
  font-family: Georgia, serif;
  font-size: 3.4rem;
  color: var(--rubric);
  opacity: 0.5;
  line-height: 1;
}
.classical-page .scripture-block blockquote {
  margin: 0 0 0.6rem;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink);
}
.classical-page .scripture-block cite {
  font-family: Georgia, serif;
  font-style: normal;
  font-variant: small-caps;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--rubric);
  font-weight: 700;
  display: block;
  margin-top: 0.6rem;
}
.classical-page .scripture-block cite::before {
  content: '\271C\00a0';
  color: var(--gold-edge);
}
.classical-page .scripture-block.curator-trigger {
  cursor: pointer;
  transition: box-shadow 130ms;
}
.classical-page .scripture-block.curator-trigger:hover {
  box-shadow: 0 5px 22px rgba(74,46,26,.18), inset 0 0 0 1px var(--gold-edge);
}
.classical-page .scripture-block.curator-trigger::after {
  content: 'Tap for context →';
  position: absolute;
  right: 1rem;
  bottom: 0.4rem;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.72rem;
  color: var(--gold-deeper);
  opacity: 0.7;
}

/* Poem plate — 3D framed vellum aside */
.classical-page .poem-plate {
  max-width: 620px;
  margin: 2rem auto;
  background: var(--vellum);
  border: 1px double var(--gold-deeper);
  border-radius: 2px;
  padding: 1.6rem 2rem 1.2rem;
  text-align: center;
  box-shadow:
    inset 0 0 0 1px var(--gold-edge),
    inset 0 0 0 5px var(--vellum),
    inset 0 0 0 6px var(--gold-edge),
    0 6px 22px rgba(74,46,26,.16);
  position: relative;
}
.classical-page .poem-plate::before {
  content: '❦';
  display: block;
  font-size: 1.2rem;
  color: var(--rubric);
  margin-bottom: 0.5rem;
}
.classical-page .poem-plate .poem-verse {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-line;
  margin: 0 0 0.7rem;
}
.classical-page .poem-plate .poem-attr {
  font-family: Georgia, serif;
  font-variant: small-caps;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--rubric);
}

/* Section heading + gold rule + ornamental divider */
.classical-page .section-title {
  text-align: center;
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  color: var(--navy);
  margin: 1.2rem 0 0.4rem;
}
.classical-page .gold-rule {
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deeper), var(--gold-edge), var(--gold-deeper));
  border: none;
  margin: 0 auto 1.6rem;
  border-radius: 2px;
  position: relative;
}
.classical-page .gold-rule::after {
  content: '✦';
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--bg);
  padding: 0 8px;
  font-size: 0.95rem;
  color: var(--gold-deeper);
}
.classical-page .ornamental-divider {
  text-align: center;
  margin: 2.4rem 0;
  position: relative;
}
.classical-page .ornamental-divider::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-edge) 40%, var(--gold-deeper) 50%, var(--gold-edge) 60%, transparent);
  margin-bottom: 0.8rem;
}
.classical-page .ornamental-divider::after {
  content: '✦';
  font-size: 1.2rem;
  color: var(--gold-deeper);
}

/* Module + lesson tree on classical course page */
.classical-page .module-block {
  background: #fff;
  border: 1px solid var(--gold-edge);
  border-radius: 6px;
  padding: 1.2rem 1.6rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.classical-page .module-block h3 {
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--navy);
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.classical-page .module-block h3::first-letter { color: var(--rubric); font-style: normal; }
.classical-page .module-block ul { margin: 0; padding-left: 1.2rem; }
.classical-page .module-block ul li {
  margin: 0.3rem 0;
  font-family: Georgia, serif;
}
.classical-page .module-block ul li a { color: var(--navy); }
.classical-page .module-block ul li a:hover { color: var(--rubric); }

/* Curator popup overlay (triggered by .curator-trigger element) */
.curator-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 50, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.curator-popup-backdrop.open { display: flex; }
.curator-popup {
  max-width: 560px;
  background: #F9F0D5;
  background-image: linear-gradient(180deg, #F9F0D5 0%, #F4E8CC 100%);
  border: 1px solid #8a6611;
  border-left: 4px solid #8B1A1A;
  border-radius: 2px;
  padding: 1.6rem 1.8rem 1.4rem;
  box-shadow: 0 18px 60px rgba(15,25,50,0.45), inset 0 0 0 1px #D4B05F;
  position: relative;
}
.curator-popup-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: #8B1A1A;
  font-size: 1.4rem;
  font-family: Georgia, serif;
  cursor: pointer;
  line-height: 1;
}
.curator-popup-label {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8B1A1A;
  font-weight: 700;
  padding: 3px 10px;
  border: 1px solid #8B1A1A;
  margin-bottom: 0.5rem;
}
.curator-popup h3 {
  font-family: Georgia, serif;
  font-variant: small-caps;
  font-weight: 900;
  color: #2a1a0d;
  margin: 0.3rem 0 0.4rem;
  font-size: 1.2rem;
}
.curator-popup p {
  font-family: Georgia, serif;
  color: #2a1a0d;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* =========================================================================
   CLASSICAL — INNER PAGE COMPONENTS (lesson + assignment views)
   Tighter banner, illuminated content frame, rubricated drop-cap,
   fleuron navigation between previous/next lessons.
   ========================================================================= */

.classical-page .page-banner.compact {
  padding: 1.6rem 1.4rem 1.7rem;
  border-bottom: 4px double var(--gold-edge);
}
.classical-page .page-banner.compact h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.25rem;
}

.classical-page .illuminated-frame {
  max-width: 880px;
  margin: 1.4rem auto;
  background: #FFFDF5;
  border: 1px solid var(--gold-deeper);
  border-radius: 2px;
  padding: 2.2rem 2.6rem;
  box-shadow:
    inset 0 0 0 1px var(--gold-edge),
    inset 0 0 0 5px #FFFDF5,
    inset 0 0 0 6px var(--gold-edge),
    0 4px 22px rgba(74,46,26,.10);
  position: relative;
}
.classical-page .illuminated-frame::before {
  content: '✦';
  position: absolute;
  top: 8px; left: 12px;
  font-size: 0.95rem;
  color: var(--gold-deeper);
}
.classical-page .illuminated-frame::after {
  content: '✦';
  position: absolute;
  top: 8px; right: 12px;
  font-size: 0.95rem;
  color: var(--gold-deeper);
}
.classical-page .illuminated-frame > .frame-bottom {
  text-align: center;
  margin-top: 1.4rem;
  color: var(--gold-deeper);
  font-size: 0.9rem;
  letter-spacing: 0.6rem;
}

.classical-page .lesson-body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}
/* Drop-cap: opt-in via .has-dropcap on the .lesson-body. Keeps it off
   submit-form prose, teacher feedback, and short blurbs where it would jar. */
.classical-page .lesson-body.has-dropcap > p:first-of-type::first-letter,
.classical-page .lesson-body.has-dropcap > div:first-of-type > p:first-of-type::first-letter {
  font-family: Georgia, serif;
  font-size: 3.6rem;
  font-weight: 900;
  color: var(--rubric);
  float: left;
  line-height: 1;                  /* sit on its own baseline, don't crash into the next line */
  padding: 0.45rem 0.85rem 0 0;    /* generous gap between the cap and "ubmission" */
  margin: 0 0 -0.05rem 0;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}
.classical-page .lesson-body.has-dropcap > p:first-of-type,
.classical-page .lesson-body.has-dropcap > div:first-of-type > p:first-of-type {
  line-height: 1.85;               /* loosen body lines around the cap so they don't crowd it */
}
.classical-page .lesson-body h2,
.classical-page .lesson-body h3 {
  font-family: Georgia, serif;
  color: var(--navy);
  font-weight: 900;
  margin: 1.4rem 0 0.4rem;
}
.classical-page .lesson-body h2 {
  font-style: italic;
  font-size: 1.45rem;
  text-align: center;
  padding-top: 0.3rem;
  border-top: 1px solid var(--gold-edge);
}
.classical-page .lesson-body h3 { font-size: 1.15rem; color: var(--gold-deeper); }
.classical-page .lesson-body img {
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  display: block;
  border-radius: 2px;
  border: 1px solid var(--gold-edge);
  box-shadow: inset 0 0 0 4px #fff, 0 2px 12px rgba(74,46,26,.12);
}
.classical-page .lesson-body a {
  color: var(--rubric);
  text-decoration: underline;
  text-decoration-color: var(--gold-edge);
  text-underline-offset: 2px;
}
.classical-page .lesson-body a:hover { color: var(--navy); }
.classical-page .lesson-body blockquote {
  border-left: 3px solid var(--gold-edge);
  padding: 0.6rem 1.2rem;
  margin: 1.2rem 0;
  background: var(--vellum-2);
  font-style: italic;
}

/* ── Classical section headings (promoted by add_typed_inputs.php) ────────
   Three flavors:
     .lesson-section                 — typed-answer section (Wonder Questions, etc.)
     .lesson-section--paper          — paper-only section (Copywork, Sketch, etc.)
     .lesson-section--narrative      — read-only section start (Today's Reading, etc.)
   All share the same dramatic look: heavy serif, navy ink, gold rule under.
   Distinguished by a small left-mark icon. */
.classical-page .lesson-body .lesson-section {
  display: block;
  position: relative;
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-style: normal;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--navy, #0A2C54);
  letter-spacing: -0.005em;
  margin: 2.4rem 0 0.85rem;
  padding: 0 0 0.55rem 1.6rem;
  border-top: 0;
  border-bottom: 1px solid var(--gold-edge, #e8d49a);
  text-align: left;
  text-wrap: balance;
}
.classical-page .lesson-body .lesson-section::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.35rem;
  font-size: 1.05rem;
  color: var(--gold-deep, #D4A547);
  line-height: 1;
}
.classical-page .lesson-body .lesson-section--paper::before { content: "✍"; }
.classical-page .lesson-body .lesson-section--narrative::before { content: "❦"; }

/* The first paragraph after each section heading gets a small drop-cap so each
   section reads like the start of a new chapter — keeps the eye moving and
   makes every section visually anchored. */
.classical-page .lesson-body .lesson-section + p::first-letter {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--rubric, #8B6F1F);
  float: left;
  line-height: 1;
  padding: 0.35rem 0.55rem 0 0;
  margin: 0;
}
.classical-page .lesson-body .lesson-section + p {
  line-height: 1.8;
  margin-top: 0.4rem;
}

/* Sub-headings (h3) tucked under sections — quieter italic eyebrow */
.classical-page .lesson-body h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--gold-deeper, #8B6F1F);
  text-align: left;
  margin: 1.6rem 0 0.4rem;
  border: 0;
  padding: 0;
}

/* h4 — smaller still, all-caps eyebrow */
.classical-page .lesson-body h4 {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-deeper, #8B6F1F);
  margin: 1.3rem 0 0.3rem;
}

/* Ornamental section divider — drop into HTML as <hr class="fleuron"> if needed,
   AND also auto-rendered between consecutive lesson-sections via ::before below. */
.classical-page .lesson-body hr.fleuron {
  border: 0;
  text-align: center;
  margin: 2rem 0;
  overflow: visible;
  height: 1rem;
}
.classical-page .lesson-body hr.fleuron::after {
  content: "✦  ✦  ✦";
  color: var(--gold-deep, #D4A547);
  letter-spacing: 0.6em;
  font-size: 0.9rem;
}

/* Make tables (when they have real content) feel like classical info-cards */
.classical-page .lesson-body table.lesson-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.2rem 0;
  border: 1px solid var(--gold-edge, #e8d49a);
  border-radius: 8px;
  overflow: hidden;
  background: #fffef9;
}
.classical-page .lesson-body table.lesson-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1ebd9;
  font-family: Georgia, 'Palatino Linotype', serif;
  line-height: 1.55;
}
.classical-page .lesson-body table.lesson-table tr:last-child td { border-bottom: 0; }

/* Lists — tighten spacing + use a fancier marker */
.classical-page .lesson-body ul,
.classical-page .lesson-body ol {
  margin: 0.7rem 0 1.1rem 0;
  padding-left: 1.6rem;
}
.classical-page .lesson-body ul > li,
.classical-page .lesson-body ol > li {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}
.classical-page .lesson-body ul > li::marker {
  color: var(--gold-deep, #D4A547);
}

/* Fleuron navigation row between lessons */
.classical-page .fleuron-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 880px;
  margin: 1.6rem auto 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--gold-edge);
}
.classical-page .fleuron-nav .ctr {
  text-align: center;
  color: var(--gold-deeper);
  font-size: 1rem;
}
.classical-page .fleuron-nav .prev a,
.classical-page .fleuron-nav .next a {
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--navy);
  text-decoration: none;
  display: inline-block;
  max-width: 280px;
  line-height: 1.35;
}
.classical-page .fleuron-nav .prev a:hover,
.classical-page .fleuron-nav .next a:hover { color: var(--rubric); }
.classical-page .fleuron-nav .prev { text-align: left; }
.classical-page .fleuron-nav .next { text-align: right; }
.classical-page .fleuron-nav .prev .arrow { color: var(--gold-deeper); margin-right: 0.3rem; }
.classical-page .fleuron-nav .next .arrow { color: var(--gold-deeper); margin-left: 0.3rem; }
.classical-page .fleuron-nav .nav-kicker {
  display: block;
  font-family: Georgia, serif;
  font-variant: small-caps;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--gold-deeper);
  font-style: normal;
  margin-bottom: 0.15rem;
}

/* Assignment status / submit blocks in classical chrome */
.classical-page .status-card {
  max-width: 880px;
  margin: 1rem auto 1.4rem;
  background: var(--vellum);
  border: 1px solid var(--gold-deeper);
  border-left: 4px solid var(--rubric);
  padding: 1rem 1.4rem;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: Georgia, serif;
}
.classical-page .status-card .status-label {
  font-variant: small-caps;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--rubric);
  font-weight: 700;
}
.classical-page .status-card .status-grade {
  margin-left: auto;
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--navy);
}
.classical-page .status-card .status-grade .out-of {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

@media (max-width: 720px) {
  .classical-page .illuminated-frame { padding: 1.4rem 1.2rem; margin: 1rem 0; }
  .classical-page .fleuron-nav { grid-template-columns: 1fr; }
  .classical-page .fleuron-nav .prev, .classical-page .fleuron-nav .next { text-align: center; }
}

/* === Course cards with banner image — all tenants (added 2026-06-10) === */
.courses-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.25rem;align-items:stretch;}
.course-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--surface);text-decoration:none;color:inherit;box-shadow:0 2px 10px rgba(10,44,84,.06);transition:transform .15s ease,box-shadow .15s ease;}
a.course-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(10,44,84,.15);}
.course-card.is-locked{opacity:.82;cursor:not-allowed;}
.course-card.is-locked:hover{transform:none;box-shadow:0 2px 10px rgba(10,44,84,.06);}
.cc-banner{position:relative;width:100%;aspect-ratio:16/7;overflow:hidden;background:var(--navy);}
.cc-banner img{width:100%;height:100%;object-fit:cover;display:block;}
.cc-banner svg{width:100%;height:100%;display:block;}
.cc-lock{position:absolute;top:12px;right:12px;display:inline-flex;align-items:center;gap:.35rem;padding:5px 11px;background:#fdf8ea;border:1px solid var(--gold);border-radius:999px;font-family:'Inter',sans-serif;font-size:.68rem;letter-spacing:1.1px;text-transform:uppercase;color:var(--gold-text);font-weight:700;}
.cc-body{padding:1.05rem 1.2rem 1.2rem;display:flex;flex-direction:column;flex:1 1 auto;}
.cc-code{font-family:'Fraunces',Georgia,serif;font-size:1.22rem;color:var(--navy);margin:0 0 .15rem;line-height:1.15;}
.cc-title{color:var(--text-muted);font-size:.95rem;font-family:Georgia,serif;line-height:1.35;}
.cc-meta{margin-top:.7rem;font-size:.85rem;color:var(--text-muted);line-height:1.55;}
.cc-foot{margin-top:auto;padding-top:.8rem;font-size:.85rem;font-family:Georgia,serif;color:var(--gold-deep);}
.course-card.is-locked .cc-foot{color:#6b7685;}
@media(max-width:760px){.courses-grid{grid-template-columns:1fr;gap:1rem;}}


/* ============================================================
   My Agenda — student "what's due / what's done" planner (2026-06-13)
   Light parchment base · navy hero accent · gold energy · honest status
   ============================================================ */
.agenda-page{max-width:920px;margin:0 auto;}

/* --- header --- */
.agenda-page .ag-head{margin:.2rem 0 1.3rem;}
.agenda-page .ag-head h1{font-family:'Fraunces',Georgia,serif;color:#16233E;font-size:2rem;line-height:1.1;margin:.15rem 0 .55rem;}
.agenda-page .ag-subline{display:flex;flex-wrap:wrap;gap:.5rem;margin:0;}
.agenda-page .ag-pill{font-family:'Inter',sans-serif;font-weight:700;font-size:.82rem;text-decoration:none;padding:.32rem .85rem;border-radius:999px;border:1px solid transparent;transition:filter .15s ease;}
.agenda-page .ag-pill:hover{filter:brightness(.96);}
.agenda-page .ag-pill-red{background:#fbe7e7;color:#9a2727;border-color:#f1cdcd;}
.agenda-page .ag-pill-amber{background:#fcf1d6;color:#8a6d1f;border-color:#eeddb5;}
.agenda-page .ag-pill-blue{background:#e6effb;color:#2b5b9a;border-color:#cfe0f5;}
.agenda-page .ag-pill-green{background:#e7f4ec;color:#1a5a30;border-color:#cfe9d8;}

/* --- HERO Next up --- */
.agenda-page .ag-hero{position:relative;background:linear-gradient(135deg,#1E2F52 0%,#16233E 100%);border-radius:16px;border-left:5px solid #C9A961;padding:1.5rem 1.7rem;box-shadow:0 10px 30px rgba(20,30,60,.22);margin-bottom:1.35rem;}
.agenda-page .ag-hero-eyebrow{font-family:'Inter',sans-serif;font-weight:800;letter-spacing:.12em;font-size:.72rem;color:#D9BE79;margin-bottom:.5rem;}
.agenda-page .ag-hero-title{font-family:'Fraunces',Georgia,serif;color:#FFFDF6;font-size:1.55rem;line-height:1.18;margin:0 0 .55rem;}
.agenda-page .ag-hero-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin:0 0 1.15rem;font-family:'Inter',sans-serif;font-size:.9rem;color:#C7D2E6;}
.agenda-page .ag-hero-pts{color:#E8D9AE;font-weight:600;}
.agenda-page .ag-hero-due{display:inline-flex;align-items:center;gap:.35rem;color:#EBD9A8;font-weight:600;}
.agenda-page .ag-clock{font-size:1.05rem;line-height:1;}
.agenda-page .ag-hero-meta .ag-hero-course{position:relative;padding-right:1rem;}

/* hero buttons */
.agenda-page .ag-btn{display:inline-block;font-family:'Inter',sans-serif;font-weight:700;font-size:1rem;text-decoration:none;padding:.75rem 1.5rem;border-radius:11px;min-height:44px;line-height:1.4;transition:transform .12s ease,box-shadow .15s ease,filter .15s ease;}
.agenda-page .ag-btn-gold{background:linear-gradient(135deg,#E2C271,#C9A961);color:#16233E;box-shadow:0 4px 14px rgba(201,169,97,.4);}
.agenda-page .ag-btn-gold:hover{transform:translateY(-1px);box-shadow:0 7px 20px rgba(201,169,97,.5);}
.agenda-page .ag-btn-red{background:linear-gradient(135deg,#D9544E,#C0392B);color:#fff;box-shadow:0 4px 14px rgba(192,57,43,.38);}
.agenda-page .ag-btn-red:hover{transform:translateY(-1px);box-shadow:0 7px 20px rgba(192,57,43,.5);}
.agenda-page .ag-btn-ghost{background:rgba(255,255,255,.08);color:#F2E7C9;border:1.5px solid #C9A961;}
.agenda-page .ag-btn-ghost:hover{background:rgba(201,169,97,.16);}

/* hero — all-clear variant (light, celebratory) */
.agenda-page .ag-hero-clear{display:flex;align-items:center;gap:1.3rem;background:linear-gradient(135deg,#F4FAF5 0%,#FBF8F1 100%);border-left:5px solid #2E8B57;box-shadow:0 6px 20px rgba(46,139,87,.12);}
.agenda-page .ag-hero-clear .ag-hero-eyebrow{color:#2E8B57;}
.agenda-page .ag-hero-clear .ag-hero-title{color:#16233E;}
.agenda-page .ag-hero-clear .ag-hero-sub{color:#5a6b55;font-family:Georgia,serif;margin:.2rem 0 1rem;}
.agenda-page .ag-hero-check{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:3.4rem;height:3.4rem;border-radius:999px;background:#e7f4ec;color:#1a5a30;font-size:1.7rem;border:2px solid #b6e0c4;}
.agenda-page .ag-hero-clear .ag-btn-ghost{background:#eef6f0;color:#1a5a30;border-color:#2E8B57;}

/* --- glance bar --- */
.agenda-page .ag-glance{display:grid;grid-template-columns:repeat(4,1fr);gap:.75rem;margin-bottom:1.6rem;}
.agenda-page .ag-metric{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15rem;padding:1rem .5rem;border-radius:13px;background:#FBF8F1;border:1px solid #ECE3CD;text-decoration:none;transition:transform .12s ease,box-shadow .15s ease;}
.agenda-page a.ag-metric:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(28,38,66,.1);}
.agenda-page .ag-m-num{font-family:'Fraunces',Georgia,serif;font-size:1.9rem;line-height:1;font-weight:600;}
.agenda-page .ag-m-lbl{font-family:'Inter',sans-serif;font-size:.74rem;letter-spacing:.04em;text-transform:uppercase;color:#8a8470;font-weight:600;}
.agenda-page .ag-m-red .ag-m-num{color:#C0392B;}
.agenda-page .ag-m-amber .ag-m-num{color:#B8860B;}
.agenda-page .ag-m-blue .ag-m-num{color:#2b5b9a;}
.agenda-page .ag-m-green .ag-m-num{color:#1a7a3e;}
.agenda-page .ag-metric.is-zero{opacity:.5;}
.agenda-page .ag-metric.is-zero .ag-m-num{color:#9a937f;}

/* --- bucket sections --- */
.agenda-page .ag-bucket{margin-bottom:1.5rem;scroll-margin-top:1rem;}
.agenda-page .ag-bhead{display:flex;align-items:center;gap:.7rem;font-family:'Fraunces',Georgia,serif;font-size:1.18rem;color:#1A2F4B;margin:0 0 .7rem;padding:.15rem 0 .15rem .85rem;border-left:4px solid #C9A961;}
.agenda-page .ag-bhead.rail-red{border-left-color:#C0392B;}
.agenda-page .ag-bhead.rail-amber{border-left-color:#D4A547;}
.agenda-page .ag-bhead.rail-blue{border-left-color:#3a6fb0;}
.agenda-page .ag-bhead.rail-navy{border-left-color:#36486D;}
.agenda-page .ag-bhead.rail-gold{border-left-color:#C9A961;}
.agenda-page .ag-bcount{font-family:'Inter',sans-serif;font-size:.74rem;font-weight:700;color:#5a4a1f;background:#F0E3C4;padding:1px 9px;border-radius:999px;}
.agenda-page .ag-list{display:flex;flex-direction:column;gap:.55rem;}
.agenda-page .ag-empty-line{font-family:Georgia,serif;font-style:italic;color:#8a8470;padding:.35rem .85rem;margin:0;}

/* --- item card --- */
.agenda-page .ag-item{display:flex;align-items:center;gap:.85rem;padding:.85rem 1rem;border-radius:12px;text-decoration:none;background:#FFFEFB;border:1px solid #ECE3CD;box-shadow:0 2px 8px rgba(28,38,66,.05);transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;}
.agenda-page .ag-item:hover{border-color:#C9A961;box-shadow:0 5px 15px rgba(28,38,66,.11);transform:translateX(2px);}
.agenda-page .ag-item.is-done{opacity:.62;}
.agenda-page .ag-item.is-done .ag-title{text-decoration:line-through;}
.agenda-page .ag-dot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;border-radius:999px;font-size:.9rem;font-weight:700;}
.agenda-page .ag-dot-open{border:2px solid #c7bfa8;background:#fff;}
.agenda-page .ag-dot-done{background:#e7f4ec;color:#1a5a30;border:2px solid #b6e0c4;}
.agenda-page .ag-dot-miss{background:#fbe7e7;color:#9a2727;border:2px solid #f1cdcd;}
.agenda-page .ag-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:.25rem;}
.agenda-page .ag-title{font-family:Georgia,serif;color:#1A2F4B;font-size:1rem;line-height:1.3;}
.agenda-page .ag-tags{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;font-family:'Inter',sans-serif;}
.agenda-page .ag-course{font-weight:700;font-size:.72rem;letter-spacing:.03em;color:#2A3E66;background:#EAF0F8;padding:1px 8px;border-radius:6px;}
.agenda-page .ag-wt{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:#9a937f;font-weight:600;}
.agenda-page .ag-pts{font-size:.74rem;color:#8a6d1f;font-weight:600;}
.agenda-page .ag-right{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:.3rem;text-align:right;}
.agenda-page .ag-due{font-family:'Inter',sans-serif;font-size:.78rem;color:#7a7460;white-space:nowrap;}
.agenda-page .ag-chip{font-family:'Inter',sans-serif;font-weight:700;font-size:.71rem;padding:2px 10px;border-radius:999px;white-space:nowrap;}
.agenda-page .ag-none{background:#eceef4;color:#3a4a6b;}
.agenda-page .ag-draft{background:#fff4d8;color:#8a6d1f;}
.agenda-page .ag-info{background:#e6effb;color:#2b5b9a;}
.agenda-page .ag-ok{background:#e7f4ec;color:#1a5a30;}
.agenda-page .ag-miss{background:#fbe7e7;color:#9a2727;}
.agenda-page .ag-ex{background:#eef0f2;color:#6a7280;}
.agenda-page .ag-lock{background:#efe9dc;color:#8a7f63;}

/* honest red on overdue dates */
.agenda-page #bkt-overdue .ag-due{color:#9a2727;font-weight:600;}

/* --- collapsibles --- */
.agenda-page .ag-more,.agenda-page .ag-done{margin-top:.6rem;}
.agenda-page .ag-more > summary,.agenda-page .ag-done > summary{cursor:pointer;font-family:'Inter',sans-serif;font-weight:600;font-size:.86rem;color:#2A3E66;list-style:none;padding:.55rem .85rem;background:#F4EFE2;border:1px solid #E7DEC8;border-radius:10px;display:inline-block;}
.agenda-page .ag-more > summary::-webkit-details-marker,.agenda-page .ag-done > summary::-webkit-details-marker{display:none;}
.agenda-page .ag-more > summary:hover,.agenda-page .ag-done > summary:hover{background:#EFE7D2;}
.agenda-page .ag-done{margin-top:1rem;}
.agenda-page .ag-done[open] > summary{margin-bottom:.7rem;}
.agenda-page .ag-more[open] > summary{margin-bottom:.55rem;}

/* --- empty state --- */
.agenda-page .ag-empty{text-align:center;padding:2.5rem 1.5rem;}
.agenda-page .ag-empty-ico{font-size:2.4rem;display:block;margin-bottom:.5rem;}
.agenda-page .ag-empty h2{font-family:'Fraunces',Georgia,serif;color:#16233E;margin:.2rem 0 .4rem;}

/* --- responsive --- */
@media(max-width:900px){
  .agenda-page .ag-glance{grid-template-columns:repeat(2,1fr);}
  .agenda-page .ag-item{flex-wrap:wrap;align-items:flex-start;}
  .agenda-page .ag-right{flex-direction:row;align-items:center;width:100%;justify-content:space-between;padding-left:2.5rem;}
}
@media(max-width:560px){
  .agenda-page .ag-head h1{font-size:1.65rem;}
  .agenda-page .ag-hero{padding:1.25rem 1.2rem;}
  .agenda-page .ag-hero-title{font-size:1.3rem;}
  .agenda-page .ag-btn{width:100%;text-align:center;}
}


/* ===== Parity port 2026-06-13: course header media + sub-nav + modules ===== */
/* Course header — circular art medallion on one side (modern, 2026-06-10) */
.classical-page .page-banner.has-media{display:flex;align-items:center;gap:2rem;text-align:left;padding:2.1rem 2.4rem;}
.classical-page .page-banner.has-media .pb-art{flex:0 0 auto;width:176px;height:176px;line-height:0;}
.classical-page .page-banner.has-media .pb-art-img{display:block;width:176px;height:176px;border-radius:50%;background-size:cover;background-position:center;border:3px solid #fff;box-shadow:0 5px 16px rgba(20,30,60,.20),0 0 0 2px #C9A961;}
.classical-page .page-banner.has-media .pb-art svg{display:block;width:176px;height:176px;border-radius:50%;box-shadow:0 5px 16px rgba(20,30,60,.20);}
.classical-page .page-banner.has-media .pb-text{flex:1 1 auto;min-width:0;}
.classical-page .page-banner.has-media .kicker::after{margin-left:0;margin-right:0;}
.classical-page .page-banner.has-media .tagline{margin-left:0;}
@media(max-width:640px){
  .classical-page .page-banner.has-media{flex-direction:column;text-align:center;gap:1rem;padding:1.6rem 1.1rem;}
  .classical-page .page-banner.has-media .kicker::after{margin-left:auto;margin-right:auto;}
  .classical-page .page-banner.has-media .tagline{margin-left:auto;margin-right:auto;}
}

/* === Course sub-nav tabs (Home · Modules · Discussions · Grades) — 2026-06-10 === */
.classical-page .course-subnav{display:flex;flex-wrap:wrap;gap:.3rem;margin:0 0 1.35rem;padding:.35rem;background:#FBF8F1;border:1px solid #E7DEC8;border-radius:12px;box-shadow:0 2px 8px rgba(120,100,55,.06);}
.classical-page .course-subnav .csn-tab{font-family:'Inter',sans-serif;font-weight:600;font-size:.86rem;letter-spacing:.01em;color:#5a5346;text-decoration:none;padding:.5rem 1.15rem;border-radius:9px;transition:background .15s ease,color .15s ease;}
.classical-page .course-subnav .csn-tab:hover{background:#F1E7D2;color:#1A2F4B;}
.classical-page .course-subnav .csn-tab.is-active{background:linear-gradient(135deg,#2A3E66 0%,#16233E 100%);color:#F2E7C9;box-shadow:0 2px 8px rgba(20,30,60,.18);}
.classical-page .course-subnav .csn-tab.is-disabled{opacity:.45;cursor:default;pointer-events:none;background:none;color:#9a917f;}

/* === Modules page === */
.classical-page .modules-list{display:flex;flex-direction:column;gap:1rem;}
.classical-page .mod-unit{border:1px solid #E2D8BF;border-radius:14px;background:#FFFEFB;box-shadow:0 4px 16px rgba(28,38,66,.07);overflow:hidden;}
.classical-page .mod-unit > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:1rem;padding:1.05rem 1.3rem;background:linear-gradient(135deg,#36486D 0%,#243860 100%);border-left:5px solid #C9A961;}
.classical-page .mod-unit > summary::-webkit-details-marker{display:none;}
.classical-page .mod-unit > summary:focus-visible{outline:2px solid #C9A961;outline-offset:-3px;}
.classical-page .mod-unit .mh-num{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2.1rem;height:2.1rem;border-radius:999px;background:rgba(255,255,255,.10);border:1.5px solid #C9A961;color:#F2E7C9;font-family:'Fraunces',Georgia,serif;font-size:1.05rem;}
.classical-page .mod-unit .mh-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:.12rem;}
.classical-page .mod-unit .mh-title{font-family:'Fraunces',Georgia,serif;color:#FFFDF5;font-size:1.12rem;line-height:1.2;}
.classical-page .mod-unit .mh-sum{font-family:Georgia,serif;font-style:italic;color:#D7C79B;font-size:.85rem;line-height:1.3;}
.classical-page .mod-unit .mh-prog{flex:0 0 auto;display:flex;align-items:center;gap:.5rem;}
.classical-page .mod-unit .mh-prog-bar{width:84px;height:7px;border-radius:999px;background:rgba(255,255,255,.18);overflow:hidden;}
.classical-page .mod-unit .mh-prog-bar > span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#D4B36E,#E8C770);}
.classical-page .mod-unit .mh-prog-num{font-family:'Inter',sans-serif;font-size:.78rem;color:#E8DCBB;font-weight:600;}
.classical-page .mod-unit .mh-chev{flex:0 0 auto;color:#C9A961;font-size:1rem;transition:transform .2s ease;}
.classical-page .mod-unit[open] .mh-chev{transform:rotate(180deg);}
.classical-page .mod-unit .module-body{padding:.6rem .9rem 1rem;display:flex;flex-direction:column;gap:.35rem;}
.classical-page .mod-item{display:flex;align-items:center;gap:.8rem;padding:.7rem .85rem;border-radius:10px;text-decoration:none;border:1px solid #EEE6D2;background:#FCFAF3;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;}
.classical-page .mod-item:hover{border-color:#C9A961;box-shadow:0 3px 10px rgba(28,38,66,.10);transform:translateX(2px);}
.classical-page .mod-item .mi-ico{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:8px;background:#F0E8D4;font-size:1rem;line-height:1;}
.classical-page .mod-item.is-done .mi-ico{background:#e7f4ec;color:#1a5a30;font-weight:700;}
.classical-page .mod-item .mi-title{flex:1 1 auto;min-width:0;font-family:Georgia,serif;color:#1A2F4B;line-height:1.3;}
.classical-page .mod-item .mi-meta{flex:0 0 auto;font-family:'Inter',sans-serif;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;color:#9a937f;font-weight:600;}
.classical-page .mod-item.is-done .mi-meta{color:#1a5a30;}
.classical-page .mod-item .mi-pts{flex:0 0 auto;font-family:'Inter',sans-serif;font-size:.78rem;color:#8a6d1f;font-weight:600;}
.classical-page .mod-item .mi-chip{flex:0 0 auto;font-family:'Inter',sans-serif;font-weight:700;font-size:.71rem;padding:2px 10px;border-radius:999px;}
.classical-page .mod-item .mi-pending{background:#eceef4;color:#3a4a6b;}
.classical-page .mod-item .mi-draft{background:#fff4d8;color:#8a6d1f;}
.classical-page .mod-item .mi-info{background:#e6effb;color:#2b5b9a;}
.classical-page .mod-item .mi-ok{background:#e7f4ec;color:#1a5a30;}
.classical-page .mod-item .mi-warn{background:#fceadb;color:#bf5a1f;}

/* === Course home "Course content" CTA (replaces the long inline outline) === */
.classical-page .course-content-cta{display:flex;align-items:center;gap:1rem;padding:1.1rem 1.3rem;border-radius:14px;text-decoration:none;border:1px solid #E2D8BF;background:linear-gradient(135deg,#FFFEFB 0%,#FBF4E4 100%);box-shadow:0 4px 16px rgba(28,38,66,.08);transition:box-shadow .15s ease,transform .15s ease,border-color .15s ease;}
.classical-page .course-content-cta:hover{border-color:#C9A961;transform:translateY(-2px);box-shadow:0 8px 22px rgba(28,38,66,.13);}
.classical-page .course-content-cta .ccc-ico{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:12px;background:linear-gradient(135deg,#2A3E66,#16233E);color:#F2E7C9;font-size:1.4rem;}
.classical-page .course-content-cta .ccc-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:.12rem;}
.classical-page .course-content-cta .ccc-title{font-family:'Fraunces',Georgia,serif;font-size:1.2rem;color:#1A2F4B;}
.classical-page .course-content-cta .ccc-sub{font-family:Georgia,serif;color:#8a6d1f;font-size:.92rem;}
.classical-page .course-content-cta .ccc-go{flex:0 0 auto;font-family:'Inter',sans-serif;font-weight:700;font-size:.86rem;color:#16233E;background:#F0E3C4;padding:.5rem 1rem;border-radius:999px;}
@media(max-width:760px){
  .classical-page .mod-unit > summary{flex-wrap:wrap;gap:.6rem;}
  .classical-page .mod-unit .mh-prog{order:3;width:100%;}
  .classical-page .mod-item{flex-wrap:wrap;}
  .classical-page .course-content-cta{flex-wrap:wrap;}
}


/* === Soften imported lesson content — less boxy, navy ACCENT, contrast + COLOR (2026-06-10) === */
/* Section header bars: medium navy (contrast), light title, gold rails. */
.classical-page .lesson-body div[style*="background:#16233E"]{
  background:linear-gradient(135deg,#36486D 0%,#243860 100%) !important;
  border-left:5px solid #C9A961 !important;
  border-bottom:3px solid #C9A961 !important;
  border-radius:11px 11px 0 0 !important;
}
.classical-page .lesson-body div[style*="background:#16233E"] span{ color:#F2E7C9 !important; vertical-align:middle !important; }
.classical-page .lesson-body div[style*="background:#16233E"] img{
  display:inline-block !important; vertical-align:middle !important;
  border:0 !important; box-shadow:none !important; margin:0 12px 0 0 !important; border-radius:0 !important;
}
/* Section boxes: warm off-white body + soft rounded border + shadow (pops on the tinted backdrop). */
.classical-page .lesson-body div[style*="border:1px solid #B08A2E"]{
  border:1px solid #D7CDB2 !important;
  border-radius:13px !important;
  overflow:hidden !important;
  background:#FCF9F1 !important;
  box-shadow:0 5px 18px rgba(28,38,66,.10) !important;
}
/* FIX: no weird frame box around the logo / inline images. */
.classical-page .lesson-body img{ border:0 !important; box-shadow:none !important; }
/* keep a soft definition only on large figure images */
.classical-page .lesson-body img[style*="width:100%"]{ border-radius:8px !important; box-shadow:0 3px 12px rgba(28,38,66,.10) !important; }
/* COLOR (all pages incl. /courses/2): soft cool->warm tinted backdrop on the content area
   so white cards/panels pop — light, never a big dark fill. */
.app > .main{
  background:linear-gradient(162deg,#DEE7F4 0%,#EAE0C6 52%,#E2D3AE 100%) !important;
}
/* lesson content = a clean white panel sitting on that tinted backdrop. */
.classical-page .lesson-body div[style*="background:#FBF8F1"]{ background:transparent !important; }
.classical-page .illuminated-frame{
  background:#FFFEFB !important;
  border:1px solid #E1D8C0 !important;
  border-radius:16px !important;
  box-shadow:0 6px 22px rgba(28,38,66,.08) !important;
}


/* === Assignment meta strip — one clean row replaces stacked status/attempts boxes (2026-06-10) === */
.classical-page .assign-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:.55rem 1rem;
  margin:0 0 1.3rem; padding:.65rem 1.05rem;
  background:#FBF8F1; border:1px solid #E7DEC8; border-radius:12px;
  box-shadow:0 2px 8px rgba(120,100,55,.06);
  font-family:'Inter',sans-serif; font-size:.86rem; color:#4a463e;
}
.classical-page .assign-meta .am-item{ display:inline-flex; align-items:center; gap:.45rem; }
.classical-page .assign-meta .am-item + .am-item::before,
.classical-page .assign-meta .am-status + .am-item::before{
  content:''; width:1px; height:14px; background:#E0D6BD; margin-right:.55rem; display:inline-block;
}
.classical-page .assign-meta .am-k{
  font-size:.64rem; letter-spacing:.13em; text-transform:uppercase; color:#9A7B2E; font-weight:700;
}
.classical-page .assign-meta .am-status{
  font-weight:700; padding:3px 13px; border-radius:999px; font-size:.76rem; letter-spacing:.02em;
}
.classical-page .assign-meta .am-status.am-pending{ background:#eceef4; color:#3a4a6b; }
.classical-page .assign-meta .am-status.am-draft{ background:#fff4d8; color:#8a6d1f; }
.classical-page .assign-meta .am-status.am-info{ background:#e6effb; color:#2b5b9a; }
.classical-page .assign-meta .am-status.am-warn{ background:#fceadb; color:#bf5a1f; }
.classical-page .assign-meta .am-status.am-ok{ background:#e7f4ec; color:#1a5a30; }
.classical-page .assign-meta .am-resub{ color:#6b6457; }
.classical-page .assign-meta .am-grade{
  margin-left:auto; font-family:Georgia,serif; font-weight:700; color:#1A2F4B; font-size:1.05rem;
}
.classical-page .assign-meta .am-grade .am-out{ color:#9a937f; font-weight:400; font-size:.85rem; }

/* === Course sub-nav tabs (Home · Modules · Discussions · Grades) — 2026-06-10 === */

/* Global course sub-nav (every student page) — 2026-06-13 */
.main > .course-subnav{display:flex;flex-wrap:wrap;gap:.3rem;margin:0 0 1.4rem;padding:.35rem;background:#FBF8F1;border:1px solid #E7DEC8;border-radius:12px;box-shadow:0 2px 8px rgba(120,100,55,.06);}
.main > .course-subnav .csn-tab{font-family:'Inter',sans-serif;font-weight:600;font-size:.86rem;letter-spacing:.01em;color:#5a5346;text-decoration:none;padding:.5rem 1.15rem;border-radius:9px;transition:background .15s ease,color .15s ease;}
.main > .course-subnav .csn-tab:hover{background:#F1E7D2;color:#1A2F4B;}
.main > .course-subnav .csn-tab.is-active{background:linear-gradient(135deg,#2A3E66 0%,#16233E 100%);color:#F2E7C9;box-shadow:0 2px 8px rgba(20,30,60,.18);}

/* =========================================================================
   Students roster (admin/students) — compact, single-line, no overflow
   Added 2026-06-26. Email tucked under name; Email column removed;
   text action buttons replaced with icon buttons.
   ========================================================================= */
table.data.students td,
table.data.students th { padding: 0.7rem 0.85rem; }

table.data.students .stu-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
table.data.students .stu-avatar-initials {
  background: linear-gradient(135deg, #0A2C54 0%, #1d4a85 100%);
  color: #FFE08A;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.85rem; font-weight: 600;
}

table.data.students .name-cell { display: flex; align-items: center; gap: 0.6rem; }
table.data.students .name-stack { display: flex; flex-direction: column; min-width: 0; }
table.data.students .name-line { display: flex; align-items: center; gap: 0.45rem; }
table.data.students .name-line a { white-space: nowrap; font-weight: 600; }
table.data.students .stu-email {
  font-size: 0.8rem; color: var(--text-muted); margin-top: 1px; white-space: nowrap;
}

table.data.students .summer-tag {
  background: #E0F2FE; color: #075985; border-color: rgba(7,89,133,0.18);
  font-size: 0.6rem; padding: 0.14rem 0.5rem; letter-spacing: 0.06em;
}

table.data.students th.col-grade, table.data.students td.col-grade,
table.data.students th.col-enr,   table.data.students td.col-enr { text-align: center; }
table.data.students td.col-grade { font-variant-numeric: tabular-nums; }
table.data.students td.col-enr   { font-variant-numeric: tabular-nums; font-family: Georgia, serif; }
table.data.students .col-when { white-space: nowrap; }

table.data.students .row-actions { display: flex; gap: 0.35rem; justify-content: flex-end; }
table.data.students .row-actions form { display: inline-flex; margin: 0; }

.icon-btn {
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #FFFFFF 0%, #FBF9F2 100%);
  color: var(--navy); cursor: pointer; font-size: 1.02rem; line-height: 1;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.icon-btn:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, #FFFAEC 0%, #F5E9C5 100%);
  color: var(--navy-deep);
}
.icon-btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; } /* --gold failed AA on light surfaces (2026-07-04) */

/* Phone: let the roster table scroll rather than clip (matches .main overflow) */
@media (max-width: 640px) {
  table.data.students .stu-email { font-size: 0.76rem; }
}

/* =========================================================================
   SIDEBAR — Grouped Accordion (2026-06-27). Two-zone rail: a fixed primary
   cluster of daily items, then collapsible labeled groups. Reuses the brand
   tokens, gold active-spine, and parchment look; adds a chevron + panel toggle.
   ========================================================================= */
.nav { display: flex; flex-direction: column; }

/* separate the always-visible primary items from the first group */
.nav .nav-group:first-of-type {
  margin-top: 0.4rem;
  border-top: 1px solid var(--hairline);
  padding-top: 0.15rem;
}

/* group = a collapsible <li> holding a toggle button + a panel */
.nav-group { list-style: none; margin: 0.05rem 0 0; }
.nav-group-toggle {
  display: flex; align-items: center; gap: 0.7rem; width: 100%;
  min-height: 40px; padding: 0.9rem 0.8rem 0.45rem;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--gold-deep); font-family: Georgia, serif; font-weight: 700;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.2em;
  border-radius: var(--r-sm); transition: background var(--t-fast), color var(--t-fast);
}
.nav-group-toggle:hover { background: rgba(201,169,97,0.10); }
.nav-group-toggle:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: -2px; }
.nav-group-toggle .nav-ico { flex: 0 0 16px; width: 16px; height: 16px; opacity: 0.9; }
.nav-group-toggle .nav-chev { margin-left: auto; opacity: 0.65; transition: transform 0.2s ease; }
.nav-group.open > .nav-group-toggle .nav-chev { transform: rotate(90deg); }

/* panel = the group's items; hidden when collapsed */
.nav-panel { list-style: none; padding: 0 0 0.3rem; margin: 0; }
.nav-panel.collapsed { display: none; }
.nav-panel li { margin: 1px 0; }
.nav-panel li a { padding-left: 1.35rem; }

/* sub-labels inside a panel (the Administration buckets) */
.nav-subhead {
  color: var(--gold-deep); font-family: Georgia, serif; font-weight: 700;
  font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.18em;
  padding: 0.8rem 0.85rem 0.25rem 1.35rem; opacity: 0.8; list-style: none;
}

/* notification / to-grade pill (was inline; now a class) */
.nav-badge {
  position: absolute; top: 8px; right: 12px; min-width: 18px; height: 18px;
  padding: 0 5px; background: #D4A547; color: #1a1d23; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* pin Account + Sign out to the bottom of the rail */
.nav-group.account { margin-top: auto; }
.nav .signout { padding-top: 0.7rem; }

/* ---- icon-rail (collapsed sidebar) mode: hide group chrome, show icons ---- */
@media (min-width: 901px) {
  .nav-collapsed .nav-group-toggle { justify-content: center; padding: 0.4rem 0; gap: 0; }
  .nav-collapsed .nav-group-toggle > span:not(.nav-ico),
  .nav-collapsed .nav-group-toggle .nav-chev {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .nav-collapsed .nav-subhead {
    height: 1px; padding: 0; margin: 0.5rem 0.5rem; overflow: hidden;
    font-size: 0; letter-spacing: 0; background: var(--border);
  }
  .nav-collapsed .nav-panel.collapsed { display: block; }   /* reveal icons when rail is collapsed */
  .nav-collapsed .nav-panel li a { padding-left: 0; }
}
/* Append to public/css/virtue.css when deploying the parents-roster redesign.
   The table reuses table.data.students; these add the parent-specific columns. */
table.data.parents .col-phone{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--text-muted);font-size:.9rem;}
table.data.parents .col-children{max-width:250px;}
table.data.parents .kid-count{display:inline-flex;min-width:20px;height:20px;padding:0 6px;align-items:center;justify-content:center;background:var(--gold-pale);color:var(--gold-deep);border-radius:999px;font-family:'Inter',sans-serif;font-size:.72rem;font-weight:700;margin-right:.45rem;vertical-align:middle;}
table.data.parents .kid-names{color:var(--text-muted);font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-width:190px;vertical-align:middle;}
table.data.parents .kid-none{color:var(--warn);font-size:.82rem;font-style:italic;}


/* =========================================================================
   Mobile panel fixes (2026-07-04) — auth first-touch, quiz tap targets,
   in-table link hit areas, course-tab height. Scoped ≤760px; desktop untouched.
   ========================================================================= */
.quiz-opt { display: flex; align-items: flex-start; gap: 0.6rem; }
.quiz-opt input[type=radio], .quiz-opt input[type=checkbox] { flex: 0 0 auto; margin-top: 0.2rem; }
@media (max-width: 760px) {
  /* Login / forgot / reset: 16px kills iOS zoom-on-focus (base is 0.98rem) */
  .login-card input, .login-card select { font-size: 16px !important; min-height: 44px; }
  /* Quiz options: full-width 44px rows */
  .quiz-opt { min-height: 44px; align-items: center; width: 100%; padding: 0.3rem 0; }
  .quiz-opt input[type=radio], .quiz-opt input[type=checkbox] { width: 22px; height: 22px; margin-top: 0; }
  /* In-table links: expand the touch area without changing layout */
  .main table.data td a { position: relative; }
  .main table.data td a::after { content: ''; position: absolute; inset: -12px -6px; }
  /* Course sub-nav tabs reach 44px */
  .classical-page .course-subnav .csn-tab { padding: 0.7rem 1.15rem; }
}
