/* ============================================================================
   PrepareBuddy — Unified Theme Tokens (opt-in)
   Location: static/css/theme.css
   Loaded:   immediately after bootstrap.min.css in templates/partial/base.html.

   ARCHITECTURE — strict opt-in. Nothing global re-skins.
   ----------------------------------------------------------------------------
   Layer 1 (always-on, inert):
     :root { --pb-* } token definitions. CSS variables only. No selectors that
     match anything on a legacy page. Loading this file alone changes NOTHING
     visually anywhere.

   Layer 2 (opt-in only):
     Every Bootstrap variable override (--bs-*), every body/heading/button/
     card/form/badge/table/alert style is scoped under `body`. A
     page picks up the new design ONLY when its template emits
       {% block body_class %}pb-themed{% endblock %}
     on <body>.

   Why scoped:
     The product is in production. Unmigrated apps must look pixel-identical
     to today until each one is deliberately migrated and verified. No global
     re-skin ships until every app has been migrated and soaked in prod
     (Phase 5 of plans/site_redesign_blueprint.md).

   Source values:
     Tokens come from canonical DESIGN.md §2-§4 and the Claude Design
     handoff at /tmp/claude-design-extract/.../claude-code-handoff/theme.css
     (now mirrored at /claude-code-handoff/ in the repo). Identical values;
     only the scoping is changed.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   Layer 1 — Tokens (always available, no visible effect)
   ---------------------------------------------------------------------------- */
:root {
  /* Brand */
  --pb-navy:        #0B1E4B;
  --pb-navy-2:      #112A66;
  --pb-blue:        #0A6BFF;
  --pb-blue-600:    #0556D6;
  --pb-blue-700:    #0445B0;
  --pb-blue-50:     #EAF2FF;
  --pb-blue-100:    #D5E4FF;
  --pb-sky:         #E8F2FF;

  /* Neutrals */
  --pb-ink:         #0D1530;
  --pb-ink-2:       #2B3452;
  --pb-ink-3:       #5B6686;
  --pb-line:        #E5EAF4;
  --pb-line-2:      #EEF2FA;
  --pb-bg:          #FBFCFE;
  --pb-bg-2:        #F4F7FC;
  --pb-white:       #FFFFFF;

  /* System */
  --pb-success:     #16B27A;
  --pb-success-50:  #E7F7F0;
  --pb-warn:        #FFB020;
  --pb-warn-50:     #FFF5E1;
  --pb-danger:      #E5484D;
  --pb-danger-50:   #FDECED;

  /* Extended palette (added May 2026 with the test-page redesign — used by
     analytical surfaces like test_result.html for coral/amber/mint accents
     called out in the new claude.ai/design package). */
  --pb-coral:       #FF6B5C;
  --pb-amber:       #FFB020;  /* alias of --pb-warn for grade-B/B+ contexts */
  --pb-mint:        #A6E3C7;
  --pb-violet:      #7C5CFF;
  --pb-ink-4:       #94A0B5;  /* decorative dots only — never readable text */

  /* Typography */
  --pb-font:        'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pb-font-serif:  'Source Serif Pro', Georgia, "Times New Roman", serif;
  --pb-font-mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --pb-r-sm:        8px;
  --pb-r:           12px;
  --pb-r-lg:        18px;
  --pb-r-xl:        24px;

  --pb-shadow-sm:   0 1px 2px rgba(11,30,75,.06), 0 1px 1px rgba(11,30,75,.04);
  --pb-shadow-md:   0 10px 30px -10px rgba(11,30,75,.18), 0 4px 10px -4px rgba(11,30,75,.08);
  --pb-shadow-lg:   0 30px 60px -20px rgba(11,30,75,.28), 0 10px 20px -10px rgba(11,30,75,.12);
}

/* ----------------------------------------------------------------------------
   Layer 2 — Opt-in re-skin (applies only to <body class="pb-themed">)
   ---------------------------------------------------------------------------- */

body {
  /* ---------- Semantic tokens ----------
     Brand primitives live in :root. App and template CSS should consume these
     SEMANTIC names instead of the brand primitives directly — so a future
     re-brand only edits theme.css and apps don't need to know about hex values
     at all. Mirrors DESIGN.md §2.2 verbatim. */
  --surface-page:       var(--pb-bg);
  --surface-section:    var(--pb-bg-2);
  --surface-card:       var(--pb-white);
  --surface-dark:       var(--pb-navy);
  --surface-tint:       var(--pb-blue-50);

  --text-primary:       var(--pb-ink);
  --text-body:          var(--pb-ink-2);
  --text-muted:         var(--pb-ink-3);
  --text-on-dark:       #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, .72);

  --border-default:     var(--pb-line);
  --border-subtle:      var(--pb-line-2);
  --border-strong:      #CDD5E6;
  --border-on-dark:     rgba(255, 255, 255, .12);

  --accent:             var(--pb-blue);
  --accent-hover:       var(--pb-blue-600);
  --accent-pressed:     var(--pb-blue-700);
  --accent-tint:        var(--pb-blue-50);
  --accent-tint-border: var(--pb-blue-100);

  --state-success:      var(--pb-success);
  --state-warn:         var(--pb-warn);
  --state-danger:       var(--pb-danger);

  /* Bootstrap variable overrides — scoped, not global */
  --bs-primary:          #0A6BFF;
  --bs-primary-rgb:      10,107,255;
  --bs-secondary:        #5B6686;
  --bs-secondary-rgb:    91,102,134;
  --bs-success:          #16B27A;
  --bs-success-rgb:      22,178,122;
  --bs-danger:           #E5484D;
  --bs-danger-rgb:       229,72,77;
  --bs-warning:          #FFB020;
  --bs-warning-rgb:      255,176,32;

  --bs-body-font-family: var(--pb-font);
  --bs-body-font-size:   16px;
  --bs-body-color:       #0D1530;
  --bs-body-bg:          #FBFCFE;
  /* Headings inherit color from their parent container. Without this, Bootstrap
     5.3's `h1-h6 { color: var(--bs-heading-color) }` resolves to null and h1
     falls back to black, ignoring `.hero { color: white }` parents and producing
     dark-text-on-dark-bg. */
  --bs-heading-color:    inherit;

  --bs-border-color:     #E5EAF4;
  --bs-border-radius:    12px;
  --bs-border-radius-sm: 8px;
  --bs-border-radius-lg: 18px;

  --bs-link-color:       #0556D6;
  --bs-link-hover-color: #0445B0;

  /* Body */
  font-family: var(--pb-font);
  /* --pb-ink-2 (lighter shade) is the body baseline since headings + paragraphs
     no longer set color directly — they inherit from here. Pages override at
     ancestor level (e.g. dark-hero { color: white }) and the override cascades
     into all child text without per-page heading/<p> color rules. */
  color: var(--pb-ink-2);
  background: var(--pb-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Headings, body text, links — wrapped in :where() so each rule has 0
   specificity for the inner selector. Pages override without !important.

   Key conservatism rules learned the hard way:
   1. theme.css must NOT apply layout-affecting properties (text-wrap: pretty,
      max-width on bare elements, etc) to broad selectors. Subtle re-flowing of
      paragraphs reaches into page layouts unexpectedly.
   2. A bare `<a>` color rule clobbers every link-styled-as-button (Google
      login, gradient CTAs, etc). Scope link color rules to <a> INSIDE flowing
      text only; <a> styled as buttons keeps whatever color their class sets.
*/
/* Headings: typography only, NO color rule. Headings inherit color from
   their nearest ancestor that sets `color` (default: body's --pb-ink).
   Why no color: pages with dark-hero parents (e.g. .ur-admin-header { color: white })
   contain bare <h2> children. A direct `color: var(--pb-ink)` rule here would beat
   inheritance and render dark-on-dark. Inheriting fixes that without per-page edits. */
body :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--pb-font);
  letter-spacing: -.02em;
  font-weight: 700;
  text-wrap: balance;
  /* `color: inherit` restores the natural cascade so headings inherit from
     their nearest ancestor (e.g. .hero { color: white }). Without this, legacy
     `static/css/style.css` has a global `h1, h2, ... { color: #00306e }` rule
     that wins over theme.css and renders dark text inside dark-hero parents. */
  color: inherit;
}
body :where(h1) { font-weight: 800; letter-spacing: -.03em; }

/* Body text: NO color rule. <p> inherits from nearest ancestor that sets `color`.
   Default = body's --pb-ink. Dark-hero parents that set `color: white` cascade
   through to <p> children automatically. Same reasoning as headings above. */

/* Text links inside flowing content. <a> outside flowing text (buttons,
   nav items, gradient CTAs) keeps whatever color its class defines — theme.css
   does not touch them. This prevents blue text on gradient buttons. */
body :where(p, li, td, blockquote, dd, span) :where(a) {
  color: var(--pb-blue-600);
  text-decoration: none;
  transition: .15s;
}
body :where(p, li, td, blockquote, dd, span) :where(a):hover {
  color: var(--pb-navy);
}

/* Utility — monospace label and eyebrow */
body .pb-mono { font-family: var(--pb-font-mono); }
body .pb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--pb-font-mono);
  font-size: 12px; font-weight: 500; letter-spacing: .08em;
  color: var(--pb-blue-600); text-transform: uppercase;
  padding: 6px 10px; border: 1px solid var(--pb-blue-100);
  border-radius: 999px; background: var(--pb-blue-50);
}

/* Buttons — re-skin Bootstrap variants + app-wide button classes */
body .btn {
  border-radius: var(--pb-r);
  font-weight: 600;
  font-family: var(--pb-font);
  transition: .15s ease;
  padding: 10px 18px;
}
body .btn-primary {
  background: var(--pb-ink);
  border-color: var(--pb-ink);
  color: #fff;
}
body .btn-primary:hover,
body .btn-primary:focus {
  background: var(--pb-navy);
  border-color: var(--pb-navy);
  transform: translateY(-1px);
  box-shadow: var(--pb-shadow-md);
}
body .btn-outline-primary {
  border-color: var(--pb-line);
  color: var(--pb-ink);
  background: #fff;
}
body .btn-outline-primary:hover {
  background: var(--pb-bg-2);
  border-color: var(--pb-ink);
  color: var(--pb-ink);
}
body .btn-secondary {
  background: var(--pb-bg-2);
  color: var(--pb-ink-2);
  border-color: var(--pb-line);
}
body .btn-success { background: var(--pb-success); border-color: var(--pb-success); color: #fff; }
body .btn-danger  { background: var(--pb-danger);  border-color: var(--pb-danger);  color: #fff; }

/* Accent button — solid brand blue. Use for marketing CTAs that promote our
   own product. DESIGN.md §6.1: "When promoting our own product (CTAs in
   marketing)". One per screen ideal; equal-weight peers OK. */
body .btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
body .btn-accent:hover,
body .btn-accent:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--pb-shadow-md);
  color: #fff;
}

/* Ghost button — transparent with ink text. Use for toolbar actions and
   in-card actions where a solid button would compete with primary CTAs. */
body .btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-primary);
}
body .btn-ghost:hover,
body .btn-ghost:focus {
  background: var(--surface-section);
  color: var(--text-primary);
}

/* Note: .btn-link is NOT one of the canonical button variants implemented in this
   design system (see /design-system/ reference page — only the 6 visible variants
   primary / outline-primary / secondary / accent / ghost / success+danger ship).
   DESIGN.md §6.1 mentions a "link" variant in the spec table, but the implementation
   intentionally omits it to keep table-row actions using real buttons (outline + ghost)
   instead of bare text links. Use .btn-outline-primary.btn-sm for primary row actions
   and .btn-ghost.btn-sm for secondary/overflow row actions. */

body .auth-btn,
body .nav-cta-button,
body .custom-popup {
  background: var(--pb-ink);
  color: #fff !important;
  border-radius: var(--pb-r);
  font-weight: 600;
  padding: 10px 20px;
  transition: .15s;
  border: 1px solid var(--pb-ink);
}
body .auth-btn:hover,
body .nav-cta-button:hover,
body .custom-popup:hover {
  background: var(--pb-navy);
  border-color: var(--pb-navy);
  color: #fff !important;
}

/* Cards / surfaces */
body .card,
body .widget,
body .custom-exam-card,
body .course-card,
body .instructor-card,
body .blog-card {
  background: #fff;
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-r-lg);
  box-shadow: var(--pb-shadow-sm);
}

/* Forms */
body .form-control,
body .form-select,
body .form-check-input {
  border-color: var(--pb-line);
  border-radius: var(--pb-r);
  font-family: var(--pb-font);
  color: var(--pb-ink);
}
body .form-control:focus,
body .form-select:focus,
body .form-check-input:focus {
  border-color: var(--pb-blue);
  box-shadow: 0 0 0 3px var(--pb-blue-50);
  outline: none;
}
body .form-label { color: var(--pb-ink-2); font-weight: 600; font-size: 14px; }

/* Form check inputs (radio + checkbox) — improve visibility over Bootstrap defaults.
   Bootstrap 5 ships these at 1em with a faint 1px border (~#dee2e6) which on white bg
   reads as a tiny gray dot. Test-taking flows need clear, immediately-clickable controls.
   Increase size, strengthen border. Brand colors on focus + checked. */
body .form-check-input {
  width: 1.15em;
  height: 1.15em;
  border: 2px solid var(--pb-ink-3);
  margin-top: .175em;
}
body .form-check-input:hover { border-color: var(--pb-blue); }
body .form-check-input:focus {
  border-color: var(--pb-blue);
  box-shadow: 0 0 0 .2rem var(--pb-blue-100);
}
body .form-check-input:checked {
  background-color: var(--pb-blue);
  border-color: var(--pb-blue);
}

/* Badges */
body .badge {
  border-radius: 999px;
  font-family: var(--pb-font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .04em;
  padding: 4px 10px;
}
/* Bootstrap's .bg-primary/.bg-success/.bg-danger naturally compose with .bg-opacity-* via
   --bs-bg-opacity. We keep --bs-*-rgb tokens above re-mapped to PB palette so those
   utilities produce PB colors automatically. No !important overrides here — they would
   kill the rgba opacity calc and render solid-on-solid (e.g. bg-primary + bg-opacity-10
   + text-primary = blue-on-blue and unreadable). */

/* Bootstrap 5.0/5.1 polyfill for .bg-opacity-* utilities (added natively in 5.2+).
   48 templates across the site use `bg-white bg-opacity-20` and similar; without
   this polyfill, the .bg-opacity-* class is silently ignored and a fully-opaque
   white box renders, hiding white text on top (e.g. test_detail.html "165 minutes"
   box on green hero). The CSS variable approach matches Bootstrap 5.2+'s API so
   any future Bootstrap upgrade just works. */
.bg-opacity-5  { --bs-bg-opacity: 0.05; }
.bg-opacity-10 { --bs-bg-opacity: 0.10; }
.bg-opacity-15 { --bs-bg-opacity: 0.15; }
.bg-opacity-20 { --bs-bg-opacity: 0.20; }
.bg-opacity-25 { --bs-bg-opacity: 0.25; }
.bg-opacity-50 { --bs-bg-opacity: 0.50; }
.bg-opacity-75 { --bs-bg-opacity: 0.75; }
.bg-opacity-100 { --bs-bg-opacity: 1; }
/* Force the rgba()-based bg utilities so .bg-opacity-* actually composes.
   Bootstrap 5.0 ships these as solid `background-color: #xxx !important`,
   which overrides the var() unless we re-declare. */
body .bg-white    { background-color: rgba(255, 255, 255, var(--bs-bg-opacity, 1)) !important; }
body .bg-primary  { background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important; }
body .bg-success  { background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity, 1)) !important; }
body .bg-danger   { background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity, 1)) !important; }
body .bg-warning  { background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity, 1)) !important; }
body .bg-info     { background-color: rgba(var(--bs-info-rgb, 13, 202, 240), var(--bs-bg-opacity, 1)) !important; }
body .bg-secondary { background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important; }
body .bg-dark     { background-color: rgba(var(--bs-dark-rgb, 33, 37, 41), var(--bs-bg-opacity, 1)) !important; }

/* Tables */
body .table {
  color: var(--pb-ink);
  --bs-table-border-color: var(--pb-line-2);
}
body .table > thead {
  background: var(--pb-bg-2);
  color: var(--pb-ink-3);
  font-family: var(--pb-font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body .table > thead th { border-bottom: 1px solid var(--pb-line); padding: 12px 16px; font-weight: 600; }
body .table > tbody td { padding: 14px 16px; }

/* Alerts */
body .alert         { border-radius: var(--pb-r); border-width: 1px; }
body .alert-primary { background: var(--pb-blue-50);    color: var(--pb-blue-700); border-color: var(--pb-blue-100); }
body .alert-success { background: var(--pb-success-50); color: #0B6A43;            border-color: #C5ECD9; }
body .alert-warning { background: var(--pb-warn-50);    color: #8A5A00;            border-color: #FCE3AB; }
body .alert-danger  { background: var(--pb-danger-50);  color: #A01F22;            border-color: #F7C7C9; }

/* ============================================================================
   COMPONENT PATTERNS — pre-built recipes from DESIGN.md §7.
   Apps and templates use these instead of re-implementing patterns inline.
   When migrating an app, rewire markup to these classes; brand changes flow
   from theme.css automatically.
   ============================================================================ */

/* Section header pattern — eyebrow + title + lead. Used on every marketing
   section and many in-app section openers. DESIGN.md §7.1. */
body .pb-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
body .pb-section-header .pb-eyebrow { margin-bottom: 16px; }
body .pb-section-header h2 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; }
body .pb-section-header .pb-lead { font-size: 18px; color: var(--text-body); max-width: 50ch; margin: 0 auto; }
body .pb-section-header.left { text-align: left; margin-left: 0; }
body .pb-section-header.left .pb-lead { margin-left: 0; margin-right: 0; }

/* Stat strip — 3-4 metrics on a tinted background. DESIGN.md §7.3. */
body .pb-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 48px;
  background: var(--surface-tint);
  border-radius: var(--pb-r-xl);
  text-align: center;
}
body .pb-stat-strip .pb-stat-value {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--accent-hover);
  font-variant-numeric: tabular-nums;
  margin: 0 0 8px;
}
body .pb-stat-strip .pb-stat-label {
  font-family: var(--pb-font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

/* Feature triplet — 3-card row, equal height, no shadow at rest. DESIGN.md §7.2. */
body .pb-feature-triplet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
body .pb-feature-triplet .pb-feature-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--pb-r-lg);
  padding: 32px;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}
body .pb-feature-triplet .pb-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--pb-shadow-md);
}
body .pb-feature-triplet .pb-feature-card .pb-feature-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--pb-r-sm);
  background: var(--accent-tint);
  color: var(--accent-hover);
  margin-bottom: 16px;
}
body .pb-feature-triplet .pb-feature-card h4 { margin: 0 0 8px; font-size: 22px; }
body .pb-feature-triplet .pb-feature-card p  { margin: 0; font-size: 14px; line-height: 1.55; }

/* Empty state — centered illustration + h3 + body + button. DESIGN.md §7.6.
   No "Oops!" or sad-face emoji — the never-list catches that. */
body .pb-empty-state {
  text-align: center;
  padding: 64px 24px;
  max-width: 480px;
  margin: 0 auto;
}
body .pb-empty-state .pb-empty-illustration {
  width: 200px; height: 200px;
  margin: 0 auto 24px;
  opacity: .9;
}
body .pb-empty-state h3 { margin: 0 0 8px; font-size: 24px; }
body .pb-empty-state .pb-empty-body { color: var(--text-body); font-size: 18px; margin: 0 0 24px; }

/* Progress stepper — step circles + connectors. DESIGN.md §7.11. */
body .pb-progress-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}
body .pb-progress-stepper .pb-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
body .pb-progress-stepper .pb-step + .pb-step::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--border-default);
  z-index: 0;
}
body .pb-progress-stepper .pb-step.is-complete + .pb-step::before { background: var(--accent); }
body .pb-progress-stepper .pb-step-circle {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--surface-card);
  border: 2px solid var(--border-default);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--pb-font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  position: relative; z-index: 1;
}
body .pb-progress-stepper .pb-step.is-complete .pb-step-circle,
body .pb-progress-stepper .pb-step.is-current  .pb-step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-dark);
}
body .pb-progress-stepper .pb-step-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
body .pb-progress-stepper .pb-step.is-current .pb-step-label { color: var(--text-primary); font-weight: 600; }

/* Elevated card variant — hover lifts more visibly. */
body .pb-card-elevated {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--pb-r-lg);
  padding: 32px;
  box-shadow: var(--pb-shadow-sm);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}
body .pb-card-elevated:hover {
  transform: translateY(-2px);
  box-shadow: var(--pb-shadow-md);
}

/* Accent stripe divider — brand signature, used in place of horizontal lines
   for section dividers. DESIGN.md §6.7. */
body .pb-divider-stripe {
  display: block;
  width: 28px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0 0 24px;
}

/* Lead paragraph — slightly larger, pretty-wrapped for marketing copy.
   `text-wrap: pretty` is opt-in via this class; we don't apply it to bare <p>
   because it changes line-breaking globally and creates orphan-line surprises
   on legacy templates. */
body :where(.pb-lead) {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-body);
  text-wrap: pretty;
}

/* Mono eyebrow utility (also used in header pattern above). DESIGN.md §3.2. */
/* (defined earlier in the typography section as .pb-eyebrow) */

/* ============================================================================
   Listening task-type chip (Phase 5A, May 2026)
   ----------------------------------------------------------------------------
   A pill-shaped chip rendered above each listening clip's audio player to
   surface the clip's content_type (PTE Academic: "Write From Dictation",
   "Select Missing Word"; IELTS: "Conversation", "Lecture"; etc.). Sits
   inside `.ts-audio-stage` which has a dark navy gradient background and
   white text — the chip uses an opaque white surface so it stands out
   regardless of the parent palette, and its own explicit color tokens win
   over the parent's `color: white` inheritance.
   ============================================================================ */
body.pb-themed .listening-test-shell .ts-task-chip,
body .ts-task-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  margin: 0 0 14px;
  background: var(--surface-card, #ffffff);
  border-left: 4px solid var(--accent, #e85d04);
  border-radius: 4px 999px 999px 4px;
  font-family: var(--pb-font-mono, ui-monospace, monospace);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
body.pb-themed .listening-test-shell .ts-task-chip .ts-task-chip-eyebrow,
body .ts-task-chip .ts-task-chip-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted, #6b7280);
}
body.pb-themed .listening-test-shell .ts-task-chip .ts-task-chip-sep,
body .ts-task-chip .ts-task-chip-sep {
  color: var(--text-muted, #6b7280);
  font-weight: 700;
  /* dot middot — keeps visual separation between eyebrow and label even if
     parent CSS strips the chip's flex/gap layout (e.g. stale browser cache). */
}
body.pb-themed .listening-test-shell .ts-task-chip .ts-task-chip-label,
body .ts-task-chip .ts-task-chip-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-primary, #1f2937);
}

/* ============================================================================
   OET Speaking role-play card (Phase 3, May 2026)
   ----------------------------------------------------------------------------
   Used by test_speaking.html (test-taking) AND test_result.html (result page)
   to render an OET Speaking role-play examiner card with SETTING / SCENARIO /
   TASKS / timing. The patient_brief field on the underlying SpeakingPrompt is
   examiner-only and intentionally NEVER rendered in either template.
   The card sits inside `.ts-sp-prompt-card` on the test-taking stage which
   sets `color: #f4f7fc` (near-white) on its children. Selectors below win on
   specificity (`body .oet-roleplay-card` = 0,0,2,1) so dark text always shows
   regardless of the parent stage's color inheritance — same approach as the
   "Dark-hero text" rule in CLAUDE.md.
   ============================================================================ */
body .oet-roleplay-card {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-left: 6px solid var(--accent);
  border-radius: var(--pb-r-lg);
  padding: 24px 28px;
  margin-top: 12px;
  box-shadow: var(--pb-shadow-sm);
  font-family: var(--pb-font-body, inherit);
  font-size: 15px;
  line-height: 1.55;
}
body .oet-roleplay-card .oet-card-eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
body .oet-roleplay-card .oet-card-title {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.3;
}
body .oet-roleplay-card .oet-card-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
body .oet-roleplay-card .oet-card-section { margin-bottom: 16px; }
body .oet-roleplay-card .oet-card-setting {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}
body .oet-roleplay-card .oet-card-scenario {
  color: var(--text-body);
}
body .oet-roleplay-card .oet-card-scenario p { margin-bottom: 8px; }
body .oet-roleplay-card .oet-card-tasks {
  color: var(--text-primary);
  margin: 0;
  padding-left: 20px;
}
body .oet-roleplay-card .oet-card-tasks li {
  color: var(--text-primary);
  margin-bottom: 6px;
}
body .oet-roleplay-card .oet-card-timing {
  color: var(--text-body);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
  font-size: 14px;
}
body .oet-roleplay-card .oet-card-timing strong {
  color: var(--text-primary);
  font-weight: 700;
}
body .oet-roleplay-card .oet-card-timing .oet-icon-prep { color: var(--state-success, #10b981); margin-right: 6px; }
body .oet-roleplay-card .oet-card-timing .oet-icon-resp { color: var(--state-danger, #dc2626); margin-right: 6px; }

/* ============================================================================
   LEGACY TEMPLATE ACCOMMODATIONS — narrowly-scoped fixes for shared chrome
   ============================================================================ */

/* Legacy template accommodations — fix visibility issues on shared chrome
   used across many pages. Keep narrowly-scoped to specific known classes. */

/* Page-content container width — match the nav's 1240px so chrome and content
   align on wide screens. Without this, Bootstrap's default `.container` goes
   to 1320px at the xxl breakpoint (≥1400px viewport) while nav-two locks to
   1240px, making page content overflow the nav by 80px on each side.

   DESIGN.md §5 specifies 1240px for text-heavy pages (which marketing pages
   effectively are) and 1440px for wider content. 1240 chosen because the nav
   is already at 1240; widening would require updating the nav too. Switch
   to 1440 later if/when nav width is also updated. */
body .container { max-width: 1240px; }

/* breadcrumbs hero subtitle has no color OR width constraint in style.css. On
   legacy pages it inherits body color (dark gray) and stretches full-width,
   producing ugly orphan-line wraps on wide screens. After pb-themed sets body
   color to dark navy, dark-on-dark made it invisible. Fix: white text +
   constrained line length + balanced wrap (so 2 lines have similar length).
   `margin: 0 auto` centers the block within the parent's text-align: center;
   without auto, the <p> stretches full-width and lines wrap weirdly. */
body .breadcrumbs-subtitle {
  color: #fff;
  opacity: 0.9;
  font-size: 18px;
  max-width: 56ch;
  margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}

/* Selection / focus — scoped so unmigrated pages keep their existing styles */
body ::selection    { background: var(--pb-blue-100); color: var(--pb-ink); }
body :focus-visible { outline: 2px solid var(--pb-blue); outline-offset: 2px; }

/* ============================================================
   STAT WIDGET TYPOGRAPHY POLISH
   ============================================================
   Zero-specificity defaults via :where() so per-page CSS still wins.
   Only sets typography (no color, no size) — color and font-size
   stay whatever the page sets. This makes every dashboard's numbers
   feel intentional: tabular-nums so digits align, tighter letter-spacing,
   slightly heavier weight. Applies to common stat-widget class names
   used across dashboards / result cards / kpi rows.
   ============================================================ */
body :where(.metric-value, .stat-value, .kpi-value, .section-score, .score-display, .pp-score .n) {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* ============================================================
   SIGNATURE ELEMENTS — see DESIGN.md §21
   ============================================================
   Eight visual moments that make a screen unmistakably PrepareBuddy.
   Reusable site-wide. Reach for these instead of inventing decorative widgets.
   Live reference: /design-system/ shows all 8.
   ============================================================ */

/* 01 · Band Ring — animated arc that fills to a band score */
.sig-ring{position:relative;width:280px;height:280px;display:inline-block}
.sig-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.sig-ring .track{fill:none;stroke:var(--pb-line);stroke-width:14}
.sig-ring .arc{fill:none;stroke-width:14;stroke-linecap:round;stroke-dasharray:760;stroke-dashoffset:232}
/* Stroke color is set per-page via the SVG `stroke="..."` presentation
   attribute (e.g. `stroke="url(#sigRingGrad)"` after defining a
   `<linearGradient id="sigRingGrad">` in <defs>), or via the `--on-dark`
   variant which forces white. We deliberately don't set a default `stroke`
   in this base rule because CSS would override the inline stroke attribute
   and break per-page gradient references. */

/* Percent / unit suffix sitting next to the .num inside .center — properly
   baseline-aligned mono superscript. Use this instead of inline-styled
   <small style="vertical-align:top"> which collides with tall digits. */
.sig-ring .num-pct {
  font-size: 0.4em;
  font-family: var(--pb-font-mono);
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 0.55em;
  margin-left: 6px;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
  color: var(--pb-blue);
}
.sig-ring--on-dark .num-pct { color: rgba(255,255,255,0.85); }
.sig-ring.animate .arc{stroke-dashoffset:760;animation:sigRingFill 1.6s cubic-bezier(.4,0,.2,1) .2s forwards}
@keyframes sigRingFill{to{stroke-dashoffset:232}}
.sig-ring .center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.sig-ring .num{font-size:88px;font-weight:800;letter-spacing:-.04em;line-height:1;background:linear-gradient(135deg,var(--pb-blue),var(--pb-blue-600));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.sig-ring .lbl{font-family:var(--pb-font-mono);font-size:12px;color:var(--pb-ink-3);letter-spacing:.12em;text-transform:uppercase;margin-top:6px;font-weight:600}
.sig-ring--sm{width:140px;height:140px}
.sig-ring--sm .num{font-size:42px}
.sig-ring--sm .lbl{font-size:10px;margin-top:2px}

/* Hero variant — fits inside a result-page header band, holds the existing
   .overall-score / .score-number text inside .center so JS animation
   continues to work (innerHTML replacement targets the inner div, ring SVG
   sibling stays intact). */
.sig-ring--hero{width:240px;height:240px;display:block;margin:0 auto}
.sig-ring--hero .center{padding:6px}

/* On-dark variant: white-stroke ring for navy/blue gradient hero backgrounds.
   Number color stays whatever the inner text already has (typically white). */
.sig-ring--on-dark .track{stroke:rgba(255,255,255,.22)}
.sig-ring--on-dark .arc{stroke:#fff}
.sig-ring--on-dark .num{
  background:none;
  -webkit-text-fill-color:initial;
  color:#fff;
}

/* 02 · Voice Waveform — 12 bars, always blue gradient */
.sig-wave{display:inline-flex;align-items:flex-end;gap:4px;height:64px}
.sig-wave .b{width:6px;height:100%;border-radius:3px;background:linear-gradient(135deg,var(--pb-blue),var(--pb-blue-600));animation:sigWave 1.4s ease-in-out infinite;transform-origin:bottom}
@keyframes sigWave{0%,100%{transform:scaleY(.35)}50%{transform:scaleY(1)}}
.sig-wave .b:nth-child(1){animation-delay:0s}
.sig-wave .b:nth-child(2){animation-delay:.08s}
.sig-wave .b:nth-child(3){animation-delay:.16s}
.sig-wave .b:nth-child(4){animation-delay:.24s}
.sig-wave .b:nth-child(5){animation-delay:.32s}
.sig-wave .b:nth-child(6){animation-delay:.40s}
.sig-wave .b:nth-child(7){animation-delay:.48s}
.sig-wave .b:nth-child(8){animation-delay:.40s}
.sig-wave .b:nth-child(9){animation-delay:.32s}
.sig-wave .b:nth-child(10){animation-delay:.24s}
.sig-wave .b:nth-child(11){animation-delay:.16s}
.sig-wave .b:nth-child(12){animation-delay:.08s}
.sig-wave.static .b{animation:none}
.sig-wave.static .b:nth-child(1){height:30%}
.sig-wave.static .b:nth-child(2){height:55%}
.sig-wave.static .b:nth-child(3){height:80%}
.sig-wave.static .b:nth-child(4){height:65%}
.sig-wave.static .b:nth-child(5){height:90%}
.sig-wave.static .b:nth-child(6){height:100%}
.sig-wave.static .b:nth-child(7){height:75%}
.sig-wave.static .b:nth-child(8){height:45%}
.sig-wave.static .b:nth-child(9){height:70%}
.sig-wave.static .b:nth-child(10){height:50%}
.sig-wave.static .b:nth-child(11){height:35%}
.sig-wave.static .b:nth-child(12){height:20%}

/* 03 · Annotated Essay — serif passage with AI feedback overlays */
.sig-essay{background:#fff;border:1px solid var(--pb-line);border-radius:22px;padding:32px 36px;font-family:Georgia,serif;font-size:18px;line-height:1.7;color:var(--pb-ink);box-shadow:var(--pb-shadow-md);position:relative}
.sig-essay::before{content:'Task 2 · sample';position:absolute;top:-13px;left:24px;font-family:var(--pb-font-mono);font-size:11px;color:var(--pb-blue-600);background:var(--pb-blue-50);border:1px solid var(--pb-blue-100);padding:4px 12px;border-radius:999px;letter-spacing:.08em;text-transform:uppercase;font-weight:600}
.sig-essay.no-pill::before{content:none;display:none}
.sig-essay .ann{position:relative;cursor:help;padding:0 2px;border-radius:4px}
.sig-essay .ann.good{background:rgba(22,178,122,.12);border-bottom:2px solid var(--pb-success)}
.sig-essay .ann.bad{background:rgba(229,72,77,.10);border-bottom:2px solid var(--pb-danger)}
.sig-essay .ann.tip{background:rgba(10,107,255,.10);border-bottom:2px solid var(--pb-blue)}
.sig-essay .ann.warn{background:rgba(255,176,32,.14);border-bottom:2px solid #FFB020}
.sig-essay .ann .pop{position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%);background:var(--pb-ink);color:#fff;font-family:var(--pb-font);font-size:12px;font-weight:500;padding:8px 12px;border-radius:8px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s;box-shadow:var(--pb-shadow-md);z-index:5}
.sig-essay .ann:hover .pop{opacity:1}
.sig-essay .ann .tag{display:inline-block;vertical-align:super;margin-left:3px;font-family:var(--pb-font-mono);font-size:8px;font-weight:700;padding:2px 5px;border-radius:3px;letter-spacing:.08em;color:#fff}
.sig-essay .ann.good .tag{background:var(--pb-success)}
.sig-essay .ann.bad .tag{background:var(--pb-danger)}
.sig-essay .ann.tip .tag{background:var(--pb-blue)}
.sig-essay .ann.warn .tag{background:#FFB020}

/* 04 · Before → After Pillar — "after" is always blue and always larger */
.sig-pillars{display:flex;align-items:stretch;gap:24px;justify-content:center;flex-wrap:wrap}
.sig-pillar{flex:1;min-width:200px;max-width:280px;padding:28px 24px;border-radius:20px;text-align:center;background:#fff;border:2px solid var(--pb-line)}
.sig-pillar.win{background:var(--pb-blue);border-color:var(--pb-blue);color:#fff;transform:scale(1.06);box-shadow:var(--pb-shadow-lg)}
.sig-pillar .ll{font-family:var(--pb-font-mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--pb-ink-3);margin-bottom:14px;font-weight:600}
.sig-pillar.win .ll{color:var(--pb-blue-100)}
.sig-pillar .num{font-size:80px;font-weight:800;letter-spacing:-.04em;line-height:.9}
.sig-pillar .meta{font-size:13px;margin-top:10px;color:var(--pb-ink-2);font-weight:500}
.sig-pillar.win .meta{color:var(--pb-blue-100)}
.sig-arrow{display:grid;place-items:center;font-size:40px;font-weight:800;color:var(--pb-blue)}

/* 05 · Live Ticker — auto-scrolling band of recent wins */
.sig-ticker{overflow:hidden;position:relative;background:#fff;border:1px solid var(--pb-line);border-radius:999px;padding:13px 0;box-shadow:var(--pb-shadow-sm);-webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.sig-ticker-track{display:inline-flex;gap:42px;white-space:nowrap;animation:sigTicker 40s linear infinite;padding-left:42px}
.sig-ticker:hover .sig-ticker-track{animation-play-state:paused}
@keyframes sigTicker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.sig-ticker-item{display:inline-flex;align-items:center;gap:10px;font-size:14px;font-weight:500;color:var(--pb-ink-2)}
.sig-ticker-item .live{width:8px;height:8px;border-radius:999px;background:var(--pb-success);box-shadow:0 0 10px var(--pb-success);animation:sigPulse 2s ease-in-out infinite}
@keyframes sigPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}}
.sig-ticker-item b{color:var(--pb-ink);font-weight:700}
.sig-ticker-item .arrow{color:var(--pb-blue);font-weight:700}
.sig-ticker-item .delta{color:var(--pb-success);font-weight:700;font-family:var(--pb-font-mono);font-size:12px}

/* 06 · Aurora Background — slow animated mesh, MAX ONE PER PAGE */
.sig-aurora{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:inherit}
.sig-aurora .blob{position:absolute;border-radius:50%;filter:blur(80px);opacity:.55;mix-blend-mode:screen}
.sig-aurora .b1{width:480px;height:480px;background:var(--pb-blue);left:-120px;top:-120px;animation:sigFloat1 14s ease-in-out infinite}
.sig-aurora .b2{width:520px;height:520px;background:#6E8BFF;right:-160px;top:-80px;animation:sigFloat2 18s ease-in-out infinite}
.sig-aurora .b3{width:380px;height:380px;background:#00D4FF;left:30%;bottom:-160px;opacity:.35;animation:sigFloat3 22s ease-in-out infinite}
@keyframes sigFloat1{0%,100%{transform:translate(0,0)}33%{transform:translate(80px,60px)}66%{transform:translate(-40px,100px)}}
@keyframes sigFloat2{0%,100%{transform:translate(0,0)}50%{transform:translate(-100px,80px)}}
@keyframes sigFloat3{0%,100%{transform:translate(0,0)}50%{transform:translate(120px,-60px)}}

/* 07 · Big Number — oversized count-up stat with mono kicker */
.sig-bignum{text-align:center}
.sig-bignum .ll{font-family:var(--pb-font-mono);font-size:11px;color:var(--pb-ink-3);letter-spacing:.12em;text-transform:uppercase;margin-bottom:6px;font-weight:600}
.sig-bignum .n{font-size:96px;font-weight:800;letter-spacing:-.05em;line-height:.9;background:linear-gradient(135deg,var(--pb-blue),var(--pb-blue-600));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.sig-bignum .body{font-size:14px;color:var(--pb-ink-2);margin-top:8px;font-weight:500}

/* 08 · Hand-drawn Underline — SVG accent, MAX ONE PER PAGE
   Default = brand blue on light backgrounds.
   .hl.on-dark variant = white for use inside dark hero strips (per DESIGN.md §21.8). */
.hl{position:relative;display:inline-block;padding:0 4px}
.hl svg{position:absolute;left:0;right:0;bottom:-8px;width:100%;height:16px;pointer-events:none;overflow:visible}
.hl path{stroke:var(--pb-blue);stroke-width:3;fill:none;stroke-linecap:round;stroke-dasharray:600;stroke-dashoffset:600;animation:sigDraw 1.4s cubic-bezier(.4,0,.2,1) .3s forwards}
.hl.on-dark path{stroke:#fff}
/* Catch-all: any .hl inside a known dark hero is automatically on-dark.
   Lets pages drop `.hl` without remembering to add `.on-dark` on each instance. */
:is(.dashboard-header,.evaluation-header,.assignment-header,.assessment-header,.assign-header,.create-header,.edit-header,.review-header,.feedback-header,.performance-header,.search-header,.submit-header,.submission-header,.teacher-header,.batch-dashboard-header,.batch-header,.batch-results-header,.ledger-header,.rubric-header,.compare-header,.config-header,.overview-header,.references-header,.reference-header,.upload-header,.debug-header,.ai-header,.analytics-header,.clone-header,.evaluate-header,.preview-header,.form-header,.delete-header,.ai-models-header,.comparison-header,.edit-feedback-header,.dark-hero,.cream-hero,.detail-hero,.test-hero,.batch-hero,.dh-hero) .hl path{stroke:#fff}
@keyframes sigDraw{to{stroke-dashoffset:0}}

/* Signature showcase grid — used on landing page + design-system reference */
.sig-section{padding:80px 0;background:var(--pb-bg-2)}
.sig-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:24px;margin-top:40px}
.sig-card{background:#fff;border:1px solid var(--pb-line);border-radius:22px;padding:36px;box-shadow:var(--pb-shadow-sm)}
.sig-card .meta{font-family:var(--pb-font-mono);font-size:11px;color:var(--pb-blue);letter-spacing:.12em;text-transform:uppercase;font-weight:600;margin-bottom:14px}
.sig-card h3{font-size:22px;margin-bottom:8px;color:var(--pb-ink)}
.sig-card p{font-size:14.5px;color:var(--pb-ink-2)}
.sig-c-ring{grid-column:span 4;display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px}
.sig-c-essay{grid-column:span 8}
.sig-c-pillars{grid-column:span 7}
.sig-c-bignum{grid-column:span 5;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;background:var(--pb-ink);color:#fff;border-color:var(--pb-ink)}
.sig-c-bignum .meta{color:var(--pb-blue-100)}
.sig-c-bignum .body{color:rgba(255,255,255,.7)}
.sig-c-bignum h3{color:#fff}
@media(max-width:900px){.sig-c-ring,.sig-c-essay,.sig-c-pillars,.sig-c-bignum{grid-column:span 12}}

/* ============================================================
   PB BREADCRUMB — canonical brand breadcrumb header
   Used at the top of internal pages (dashboards, lists, detail
   pages, results) to anchor location + page title. Promoted
   from static/css/modern-breadcrumbs.css so every pb-themed
   page gets it without per-page <link> imports. See DESIGN.md.

   Markup pattern:
     <div class="pb-breadcrumb">
       <div class="container">
         <div class="pb-breadcrumb-content">
           <h1 class="page-title">{{ page_title }}</h1>
           <ul class="breadcrumb-nav">
             <li><a href="/">Home</a></li>
             <li><a href="...">Section</a></li>
             <li>Current page</li>
           </ul>
         </div>
       </div>
     </div>

   The legacy `.breadcrumbs` class is kept as an alias so the
   ~10 templates still using that name keep rendering correctly
   without per-page edits.
   ============================================================ */
body.pb-themed .pb-breadcrumb,
body.pb-themed .breadcrumbs{
  background: linear-gradient(135deg, var(--pb-navy) 0%, var(--pb-blue-600) 100%);
  padding: 32px 0;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
body.pb-themed .pb-breadcrumb::before,
body.pb-themed .breadcrumbs::before{
  content:'';
  position:absolute;
  inset:0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events:none;
}
body.pb-themed .pb-breadcrumb .container,
body.pb-themed .breadcrumbs .container{
  position:relative;
  z-index:1;
}
body.pb-themed .pb-breadcrumb-content,
body.pb-themed .breadcrumbs-content{
  position:relative;
  z-index:1;
}
body.pb-themed .pb-breadcrumb .page-title,
body.pb-themed .breadcrumbs .page-title{
  color:#fff;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}
body.pb-themed .pb-breadcrumb .breadcrumb-nav,
body.pb-themed .breadcrumbs .breadcrumb-nav{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-family: var(--pb-font-mono);
  font-size: .82rem;
  letter-spacing: .04em;
}
body.pb-themed .pb-breadcrumb .breadcrumb-nav li,
body.pb-themed .breadcrumbs .breadcrumb-nav li{
  display:flex;
  align-items:center;
  color: rgba(255,255,255,.85);
}
body.pb-themed .pb-breadcrumb .breadcrumb-nav li a,
body.pb-themed .breadcrumbs .breadcrumb-nav li a{
  color: rgba(255,255,255,.85);
  text-decoration:none;
  padding: 3px 8px;
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
body.pb-themed .pb-breadcrumb .breadcrumb-nav li a:hover,
body.pb-themed .breadcrumbs .breadcrumb-nav li a:hover{
  color:#fff;
  background: rgba(255,255,255,.12);
}
body.pb-themed .pb-breadcrumb .breadcrumb-nav li:not(:last-child)::after,
body.pb-themed .breadcrumbs .breadcrumb-nav li:not(:last-child)::after{
  content:'›';
  margin: 0 6px;
  color: rgba(255,255,255,.55);
  font-size: 1.1rem;
  font-weight: 300;
  font-family: var(--pb-font);
}
body.pb-themed .pb-breadcrumb .breadcrumb-nav li:last-child,
body.pb-themed .breadcrumbs .breadcrumb-nav li:last-child{
  color:#fff;
  font-weight: 600;
}
body.pb-themed .pb-breadcrumb .breadcrumb-nav li i,
body.pb-themed .pb-breadcrumb .breadcrumb-nav li .fas,
body.pb-themed .pb-breadcrumb .breadcrumb-nav li .far,
body.pb-themed .breadcrumbs .breadcrumb-nav li i,
body.pb-themed .breadcrumbs .breadcrumb-nav li .fas,
body.pb-themed .breadcrumbs .breadcrumb-nav li .far{
  margin-right: 5px;
  font-size: .85rem;
}
@media (max-width: 768px){
  body.pb-themed .pb-breadcrumb,
  body.pb-themed .breadcrumbs{ padding: 22px 0; }
  body.pb-themed .pb-breadcrumb .page-title,
  body.pb-themed .breadcrumbs .page-title{ font-size: 1.45rem; }
  body.pb-themed .pb-breadcrumb .breadcrumb-nav,
  body.pb-themed .breadcrumbs .breadcrumb-nav{ font-size: .75rem; }
}
/* Compact variant for tight pages */
body.pb-themed .pb-breadcrumb.is-compact,
body.pb-themed .breadcrumbs.breadcrumbs-compact{
  padding: 16px 0;
  margin-bottom: 22px;
}
body.pb-themed .pb-breadcrumb.is-compact .page-title,
body.pb-themed .breadcrumbs.breadcrumbs-compact .page-title{
  font-size: 1.4rem;
  margin-bottom: 6px;
}

/* ============================================================================
   ASSESSMENT-APP COMPONENT VOCABULARY (May 2026)
   ----------------------------------------------------------------------------
   Patterns ported from the Claude Design assessment-preview bundle. These are
   the building blocks for the teacher dashboard, assessment-detail, review
   (essay grading), rubric editor, batch evaluation, teacher calibration, and
   student-feedback views.

   All values pull from existing :root tokens — no new hex literals introduced.
   The few rgba(...) overlays embed brand token RGB values so a theme re-color
   automatically cascades. Hand-picked variants (story-card.warn etc.) reuse
   our existing semantic tints (--pb-warn-50, --pb-danger-50).

   Scope: rules apply globally to <body>. Templates that already define one of
   these class names locally (e.g. .dash-hero on language_tests dashboard,
   .criterion-card on assessment/edit_rubric.html) keep their page-specific
   look because their inline <style> block loads after theme.css OR because
   their selector is more specific (e.g. .dashboard-shell .dash-hero).
   ============================================================================ */

/* --- Chrome utilities (aliases of existing patterns) --- */
body .eyebrow { font-family: var(--pb-font-mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pb-ink-3); margin: 0 0 8px; }
body .h-section { font-family: var(--pb-font); font-size: 22px; font-weight: 800; letter-spacing: -.015em; color: var(--pb-ink); margin: 0 0 4px; }
body .muted { color: var(--pb-ink-3); }
body .mono  { font-family: var(--pb-font-mono); font-variant-numeric: tabular-nums; }

/* Pill family (used inline in tables, hero meta, status indicators) */
body .pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-family: var(--pb-font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
body .pill.success  { background: var(--pb-success-50); color: #0F7A4F; }
body .pill.warn     { background: var(--pb-warn-50);    color: #8A5A00; }
body .pill.danger   { background: var(--pb-danger-50);  color: #9B1C20; }
body .pill.info     { background: var(--pb-blue-50);    color: var(--pb-blue-700); }
body .pill.violet   { background: rgba(124, 92, 255, .12); color: #5A3FCB; }
body .pill.neutral  { background: var(--pb-bg-2);       color: var(--pb-ink-2); }
body .pill .dot     { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Icon button (square 34px with line border).
   Doubled-class selector `body .iconbtn.iconbtn` raises specificity to (0,0,2,1)
   so this beats 3rd-party stylesheets that scope anchor colors with selectors
   like `.evaluation-card-body a` (assessment/_theme.html paints those green). */
body .iconbtn.iconbtn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--pb-line); background: #fff; display: grid; place-items: center; color: var(--pb-ink-2); cursor: pointer; transition: .15s; text-decoration: none; }
body .iconbtn.iconbtn:hover { background: var(--pb-bg-2); color: var(--pb-ink); text-decoration: none; }
body a.iconbtn.iconbtn { color: var(--pb-ink-2); }
body a.iconbtn.iconbtn:hover { color: var(--pb-ink); }
body .iconbtn.iconbtn i { color: inherit; }

/* --- Card head (used inside .card / .pb-card-elevated) --- */
body .card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
body .card-head .title { display: flex; flex-direction: column; gap: 2px; }
body .card-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
body .card-head .actions { display: flex; gap: 6px; align-items: center; }

/* --- Stat row (4-col metric grid) --- */
body .stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
body .stat-row .stat,
body .stat { background: #fff; border: 1px solid var(--pb-line); border-radius: 14px; padding: 18px; }
body .stat .k { font-family: var(--pb-font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--pb-ink-3); margin-bottom: 8px; }
body .stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--pb-ink); }
body .stat .v small { font-family: var(--pb-font-mono); font-size: 13px; color: var(--pb-ink-3); font-weight: 600; margin-left: 4px; }
body .stat .trend { font-family: var(--pb-font-mono); font-size: 11px; font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
body .stat .trend.up   { color: var(--pb-success); }
body .stat .trend.dn   { color: var(--pb-danger); }
body .stat .trend.flat { color: var(--pb-ink-3); }
@media (max-width: 1100px) { body .stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { body .stat-row { grid-template-columns: 1fr; } }

/* --- Chips (filter tabs above tables) --- */
body .chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
body .chip { padding: 6px 12px; background: #fff; border: 1px solid var(--pb-line); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--pb-ink-2); cursor: pointer; font-family: var(--pb-font); transition: .15s; }
body .chip:hover { border-color: var(--pb-ink-3); }
body .chip.active { background: var(--pb-navy); color: #fff; border-color: var(--pb-navy); }
body .chip .ct { font-family: var(--pb-font-mono); font-size: 10.5px; color: var(--pb-ink-3); margin-left: 6px; }
body .chip.active .ct { color: rgba(255, 255, 255, .7); }

/* --- Dashboard hero (gradient navy → blue, with optional sig-ring on right) --- */
body .dash-hero { position: relative; background: linear-gradient(135deg, var(--pb-navy) 0%, var(--pb-navy-2) 60%, var(--pb-blue-600) 100%); color: #fff; padding: 38px 40px 44px; overflow: hidden; border-radius: var(--pb-r-lg); }
body .dash-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 90% 20%, rgba(124, 92, 255, .35), transparent 60%), radial-gradient(40% 70% at 0% 100%, rgba(255, 176, 32, .12), transparent 60%); pointer-events: none; }
body .dash-hero-grid { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
body .dash-hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 8px 0 6px; text-wrap: balance; color: #fff; }
body .dash-hero .lede { font-family: var(--pb-font-serif); font-size: 18px; font-style: italic; color: rgba(255, 255, 255, .84); max-width: 520px; margin: 14px 0 24px; text-wrap: pretty; }
body .dash-hero .eyebrow { color: rgba(255, 255, 255, .65); margin-bottom: 6px; }
body .dash-hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
body .dash-hero .hbtn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; border: 1px solid transparent; font-family: var(--pb-font); text-decoration: none; transition: .15s; }
body .dash-hero .hbtn.primary { background: #fff; color: var(--pb-navy); }
body .dash-hero .hbtn.primary:hover { transform: translateY(-1px); box-shadow: var(--pb-shadow-md); color: var(--pb-navy); }
body .dash-hero .hbtn.ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .18); }
body .dash-hero .hbtn.ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
body .dash-ring { position: relative; width: 220px; height: 220px; flex-shrink: 0; }
body .dash-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
body .dash-ring .track { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 14; }
body .dash-ring .arc { fill: none; stroke-width: 14; stroke-linecap: round; }
body .dash-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body .dash-ring-c .n { font-size: 64px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
body .dash-ring-c .lbl { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .65); margin-top: 6px; }
@media (max-width: 900px) {
  body .dash-hero-grid { grid-template-columns: 1fr; }
  body .dash-ring { width: 160px; height: 160px; margin: 0 auto; }
  body .dash-hero { padding: 28px 22px 32px; }
  body .dash-hero h1 { font-size: 26px; }
}

body .dash-body { padding: 32px 0 0; background: var(--pb-bg); }
body .dash-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 32px; }
@media (max-width: 1024px) { body .dash-split { grid-template-columns: 1fr; } }

/* --- Continue / submissions queue --- */
body .queue { display: flex; flex-direction: column; gap: 1px; background: var(--pb-line); border-radius: 12px; overflow: hidden; }
body .q-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 14px; align-items: center; padding: 12px 14px; background: #fff; font-size: 13px; text-decoration: none; color: inherit; transition: .15s; }
body a.q-row:hover { background: var(--pb-bg-2); }
body .q-row .qn { width: 32px; height: 32px; border-radius: 9px; background: var(--pb-line-2); color: var(--pb-navy); font-family: var(--pb-font-mono); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
body .q-row .meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
body .q-row .t { font-weight: 600; color: var(--pb-ink); font-size: 13.5px; }
body .q-row .sub { font-family: var(--pb-font-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--pb-ink-3); text-transform: uppercase; }
body .q-row .due { font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-2); }
body .q-row .ct { font-family: var(--pb-font-mono); font-size: 12px; font-weight: 700; color: var(--pb-ink); }
body .q-row .go { color: var(--pb-ink-3); font-size: 14px; }
body .q-row.urgent .qn { background: var(--pb-danger-50); color: #9B1C20; }
body .q-row.urgent .due { color: #9B1C20; font-weight: 600; }

/* --- Story band (3-card column of attention notes) --- */
body .story { display: flex; flex-direction: column; gap: 14px; }
body .story-card { padding: 18px; border-radius: 14px; border: 1px solid var(--pb-line); position: relative; overflow: hidden; }
body .story-card.good { background: linear-gradient(135deg, var(--pb-navy), var(--pb-navy-2)); color: #fff; border-color: transparent; }
body .story-card.warn { background: var(--pb-warn-50); border-color: #F2E0AC; }
body .story-card.coral { background: var(--pb-danger-50); border-color: #F5C8C0; }
body .story-card .k { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-bottom: 6px; }
body .story-card.good .k { color: var(--pb-mint); opacity: 1; }
body .story-card h4 { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
body .story-card .num-big { font-size: 36px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; margin: 6px 0; }
body .story-card p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; opacity: .85; }

/* --- Activity heatmap (53 weeks × 7 days) --- */
body .heat { display: grid; grid-template-columns: repeat(26, 1fr); grid-auto-rows: 14px; gap: 3px; margin-top: 14px; }
body .heat .cell { border-radius: 3px; background: var(--pb-line-2); }
body .heat .cell.l1 { background: var(--pb-blue-100); }
body .heat .cell.l2 { background: #9DB5E5; }
body .heat .cell.l3 { background: #5A8AD9; }
body .heat .cell.l4 { background: var(--pb-blue); }
body .heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-family: var(--pb-font-mono); font-size: 10px; color: var(--pb-ink-3); letter-spacing: .08em; text-transform: uppercase; }
body .heat-legend .sq { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }

/* --- Detail hero (assess_detail.html — cream-tinted strip with breadcrumbs) --- */
body .det-hero { background: var(--pb-bg-2); padding: 32px 40px; border-bottom: 1px solid var(--pb-line); border-radius: var(--pb-r-lg) var(--pb-r-lg) 0 0; }
body .det-hero .crumbs { font-family: var(--pb-font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--pb-ink-3); margin-bottom: 10px; }
body .det-hero .crumbs a { color: var(--pb-ink-3); text-decoration: none; }
body .det-hero .crumbs a:hover { color: var(--pb-blue-600); }
body .det-hero .crumbs .sep { margin: 0 8px; color: var(--pb-ink-4); }
body .det-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: flex-end; }
body .det-hero h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; color: var(--pb-ink); }
body .det-hero .sub { font-family: var(--pb-font-serif); font-size: 17px; color: var(--pb-ink-2); font-style: italic; margin: 10px 0 0; max-width: 580px; text-wrap: pretty; }
body .det-meta { display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
body .det-meta > div { display: flex; flex-direction: column; gap: 2px; }
body .det-meta .k { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--pb-ink-3); }
body .det-meta .v { font-size: 14px; font-weight: 600; color: var(--pb-ink); font-variant-numeric: tabular-nums; }
body .det-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
body .det-body { padding: 32px 0; display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 1024px) { body .det-body { grid-template-columns: 1fr; } }

body .det-progress { background: #fff; border: 1px solid var(--pb-line); border-radius: 16px; padding: 20px 22px; margin-bottom: 20px; }
body .det-progress-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; gap: 12px; }
body .det-progress-head .big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
body .det-progress-head .big small { font-family: var(--pb-font-mono); font-size: 14px; color: var(--pb-ink-3); font-weight: 600; margin-left: 6px; }
body .det-progress-bar { height: 10px; background: var(--pb-line); border-radius: 999px; overflow: hidden; display: flex; }
body .det-progress-bar .a { background: var(--pb-success); }
body .det-progress-bar .b { background: var(--pb-warn); }
body .det-progress-bar .c { background: var(--pb-line-2); }
body .det-progress-legend { display: flex; gap: 18px; margin-top: 10px; font-family: var(--pb-font-mono); font-size: 11px; letter-spacing: .06em; color: var(--pb-ink-2); text-transform: uppercase; flex-wrap: wrap; }
body .det-progress-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: middle; }

body .aside-card { background: #fff; border: 1px solid var(--pb-line); border-radius: 16px; padding: 18px 20px; }
body .aside-card h4 { font-size: 13px; font-weight: 700; margin: 0 0 14px; font-family: var(--pb-font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--pb-ink-3); }
body .aside-card .action-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--pb-line-2); font-size: 13px; }
body .aside-card .action-row:last-child { border-bottom: 0; }
body .aside-card .action-row i { color: var(--pb-blue); font-size: 14px; width: 18px; }
body .aside-card .action-row .label { flex: 1; }
body .aside-card .action-row .v { font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-3); }

body .qs-list { display: flex; flex-direction: column; gap: 1px; background: var(--pb-line); border-radius: 12px; overflow: hidden; }
body .qs-row { background: #fff; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; font-size: 13px; }
body .qs-row .n { font-family: var(--pb-font-mono); font-size: 11px; font-weight: 700; color: var(--pb-ink-3); width: 24px; }
body .qs-row .t { font-weight: 600; color: var(--pb-ink); }
body .qs-row .tag { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--pb-ink-3); padding: 3px 8px; border-radius: 999px; background: var(--pb-bg-2); border: 1px solid var(--pb-line); }
body .qs-row .pts { font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-2); }

/* --- Review submission (essay grading) --- */
body .rev-bar { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--pb-ink); color: #fff; flex-wrap: wrap; }
body .rev-bar .crumbs { font-family: var(--pb-font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
body .rev-bar .crumbs a { color: rgba(255, 255, 255, .6); text-decoration: none; }
body .rev-bar .crumbs a:hover { color: #fff; }
body .rev-bar .crumbs .sep { margin: 0 8px; opacity: .4; }
body .rev-bar .student { display: flex; align-items: center; gap: 10px; margin-left: 14px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .12); }
body .rev-bar .student .av { width: 28px; height: 28px; border-radius: 999px; background: linear-gradient(135deg, var(--pb-warn), var(--pb-coral)); color: #fff; display: grid; place-items: center; font-family: var(--pb-font-mono); font-size: 11px; font-weight: 700; }
body .rev-bar .student .n { font-weight: 600; font-size: 13.5px; color: #fff; }
body .rev-bar .student .e { font-family: var(--pb-font-mono); font-size: 10.5px; color: rgba(255, 255, 255, .55); letter-spacing: .05em; }
body .rev-bar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
body .rev-bar .timer { font-family: var(--pb-font-mono); font-size: 11.5px; color: var(--pb-mint); letter-spacing: .06em; }
body .rev-bar .kbd { font-family: var(--pb-font-mono); font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, .1); color: #fff; }

body .rev-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; min-height: 740px; background: var(--pb-bg); border-radius: var(--pb-r-lg); overflow: hidden; }
@media (max-width: 1024px) { body .rev-grid { grid-template-columns: 1fr; } }
body .rev-essay { padding: 32px 36px; border-right: 1px solid var(--pb-line); background: #fff; }
body .rev-essay .meta { font-family: var(--pb-font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--pb-ink-3); margin-bottom: 6px; }
body .rev-essay h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.015em; color: var(--pb-ink); }
body .rev-essay .stats { display: flex; gap: 18px; margin: 12px 0 22px; padding: 10px 0; border-top: 1px solid var(--pb-line-2); border-bottom: 1px solid var(--pb-line-2); font-family: var(--pb-font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--pb-ink-2); flex-wrap: wrap; }
body .rev-essay .stats b { color: var(--pb-ink); font-weight: 700; }
body .rev-essay .body { font-family: var(--pb-font-serif); font-size: 16.5px; line-height: 1.7; color: var(--pb-ink); }
body .rev-essay .body p { margin: 0 0 14px; }
body .rev-essay .body mark { background: none; padding: 0; border-bottom: 2px solid transparent; cursor: pointer; }
body .rev-essay .body mark.coh { border-color: var(--pb-coral); background: rgba(255, 107, 92, .08); }
body .rev-essay .body mark.lex { border-color: var(--pb-violet); background: rgba(124, 92, 255, .08); }
body .rev-essay .body mark.gr  { border-color: var(--pb-warn); background: rgba(255, 176, 32, .12); }
body .rev-essay .body mark.ta  { border-color: var(--pb-success); background: rgba(22, 178, 122, .08); }
body .rev-essay .ann { display: inline-block; vertical-align: super; font-family: var(--pb-font-mono); font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px; background: var(--pb-ink); color: #fff; margin-left: 2px; cursor: pointer; }

body .rev-grade { padding: 28px 32px; background: var(--pb-bg); overflow-y: auto; max-height: 740px; }
body .rev-grade h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--pb-ink); }
body .rev-grade .sub { font-size: 13px; color: var(--pb-ink-3); margin: 0 0 18px; }

body .ai-suggest { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, rgba(124, 92, 255, .08), rgba(10, 107, 255, .06)); border: 1px solid rgba(124, 92, 255, .2); border-radius: 12px; margin-bottom: 20px; }
body .ai-suggest .icon { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--pb-violet), var(--pb-blue)); color: #fff; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
body .ai-suggest .txt { flex: 1; font-size: 12.5px; color: var(--pb-ink-2); }
body .ai-suggest .txt b { color: var(--pb-ink); font-weight: 700; }
body .ai-suggest .score { font-family: var(--pb-font-mono); font-size: 18px; font-weight: 800; color: var(--pb-navy); font-variant-numeric: tabular-nums; }

/* .crit — criterion grading row (used in the right pane of review_submission) */
body .crit { background: #fff; border: 1px solid var(--pb-line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
body .crit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
body .crit-head .name { display: flex; align-items: center; gap: 10px; }
body .crit-head .swatch { width: 8px; height: 24px; border-radius: 3px; }
body .crit-head h4 { margin: 0; font-size: 14px; font-weight: 700; }
body .crit-head .ai-hint { font-family: var(--pb-font-mono); font-size: 10.5px; color: var(--pb-ink-3); letter-spacing: .04em; }
body .crit-scale { display: flex; gap: 4px; margin-bottom: 10px; }
body .crit-scale button { flex: 1; padding: 8px 0; font-family: var(--pb-font-mono); font-size: 12px; font-weight: 700; border: 1px solid var(--pb-line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--pb-ink-2); font-variant-numeric: tabular-nums; transition: .15s; }
body .crit-scale button:hover { border-color: var(--pb-ink-3); }
body .crit-scale button.sel { background: var(--pb-navy); color: #fff; border-color: var(--pb-navy); }
body .crit-scale button.ai { border-color: rgba(124, 92, 255, .4); background: rgba(124, 92, 255, .04); color: #5A3FCB; }
body .crit textarea { width: 100%; min-height: 54px; border: 1px solid var(--pb-line); border-radius: 8px; padding: 9px 11px; font-family: var(--pb-font); font-size: 12.5px; color: var(--pb-ink); resize: vertical; background: var(--pb-bg); }
body .crit textarea::placeholder { color: var(--pb-ink-4); }
body .crit-desc { font-size: 12px; line-height: 1.5; color: var(--pb-ink-2); background: var(--pb-bg); padding: 8px 10px; border-radius: 8px; margin-bottom: 10px; border-left: 3px solid var(--pb-blue); }
body .crit-desc b { color: var(--pb-ink); font-weight: 700; }

body .overall { background: linear-gradient(135deg, var(--pb-navy), var(--pb-navy-2)); color: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
body .overall .k { font-family: var(--pb-font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .65); margin-bottom: 6px; }
body .overall .num-big { font-size: 46px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; color: #fff; }
body .overall textarea { width: 100%; min-height: 80px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; color: #fff; padding: 10px 12px; font-family: var(--pb-font); font-size: 13px; margin-top: 12px; resize: vertical; }
body .overall textarea::placeholder { color: rgba(255, 255, 255, .4); }

body .dock { display: flex; align-items: center; gap: 10px; padding: 14px 32px; background: #fff; border-top: 1px solid var(--pb-line); position: sticky; bottom: 0; z-index: 10; }
body .dock .save-info { font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-3); letter-spacing: .05em; }
body .dock .save-info b { color: var(--pb-ink); font-weight: 700; }
body .dock .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* --- Rubric editor --- */
body .rub-head { padding: 28px 40px; background: var(--pb-bg-2); border-bottom: 1px solid var(--pb-line); border-radius: var(--pb-r-lg) var(--pb-r-lg) 0 0; }
body .rub-head h1 { margin: 8px 0 4px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--pb-ink); }
body .rub-head .sub { font-family: var(--pb-font-serif); font-style: italic; color: var(--pb-ink-2); font-size: 16px; margin: 0; max-width: 600px; }
body .rub-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* .stepper — flat horizontal step indicator (sibling of pb-progress-stepper but
   left-aligned per-step rather than centered; used in rubric editor + create-assessment) */
body .stepper { display: flex; align-items: center; gap: 0; margin-top: 18px; max-width: 560px; }
body .stepper .step { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; position: relative; }
body .stepper .step::before { content: ""; position: absolute; left: 24px; right: -50%; top: 11px; height: 2px; background: var(--pb-line); z-index: 0; }
body .stepper .step:last-child::before { display: none; }
body .stepper .step .dot { width: 22px; height: 22px; border-radius: 999px; background: #fff; border: 2px solid var(--pb-line); color: var(--pb-ink-3); font-family: var(--pb-font-mono); font-size: 10px; font-weight: 700; display: grid; place-items: center; z-index: 1; }
body .stepper .step.done .dot { background: var(--pb-success); border-color: var(--pb-success); color: #fff; }
body .stepper .step.active .dot { background: var(--pb-navy); border-color: var(--pb-navy); color: #fff; }
body .stepper .step .name { font-family: var(--pb-font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--pb-ink-3); text-transform: uppercase; }
body .stepper .step.active .name { color: var(--pb-ink); }

body .rub-body { padding: 32px 40px; background: var(--pb-bg); display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; min-height: 600px; }
@media (max-width: 1024px) { body .rub-body { grid-template-columns: 1fr; } }

/* Note: .criterion-card is also defined locally on assessment/edit_rubric.html
   and assessment/preview_rubric.html. Their inline <style> loads AFTER theme.css
   so they override these defaults on those pages until we revamp them. */
body .criterion-card { background: #fff; border: 1px solid var(--pb-line); border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; }
body .criterion-card .criterion-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
body .criterion-card .cc-num { width: 34px; height: 34px; border-radius: 9px; background: var(--pb-line-2); color: var(--pb-navy); display: grid; place-items: center; font-family: var(--pb-font-mono); font-size: 13px; font-weight: 700; flex-shrink: 0; }
body .criterion-card h4 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
body .criterion-card .weight { display: flex; align-items: center; gap: 10px; font-family: var(--pb-font-mono); font-size: 12px; color: var(--pb-ink-2); font-variant-numeric: tabular-nums; }
body .criterion-card .weight input { accent-color: var(--pb-navy); width: 90px; }
body .criterion-card .weight-pct { font-weight: 700; color: var(--pb-ink); background: var(--pb-bg-2); padding: 3px 9px; border-radius: 6px; }
body .criterion-card .desc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 6px; }
@media (max-width: 900px) { body .criterion-card .desc-grid { grid-template-columns: repeat(2, 1fr); } }
body .descriptor { background: var(--pb-bg); border: 1px solid var(--pb-line); border-radius: 10px; padding: 12px; font-size: 12.5px; color: var(--pb-ink-2); line-height: 1.5; }
body .descriptor.active { background: #fff; border-color: var(--pb-navy); box-shadow: 0 0 0 3px rgba(11, 30, 75, .08); }
body .descriptor .band { font-family: var(--pb-font-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pb-ink-3); margin-bottom: 6px; }
body .descriptor.active .band { color: var(--pb-navy); }
body .descriptor textarea { width: 100%; border: 0; background: transparent; font-family: var(--pb-font); font-size: 12.5px; line-height: 1.5; color: var(--pb-ink-2); resize: none; outline: none; padding: 0; }

body .rub-preview { background: #fff; border: 1px solid var(--pb-line); border-radius: 14px; padding: 0; align-self: start; position: sticky; top: 120px; overflow: hidden; }
body .rub-preview .pv-head { padding: 14px 18px; border-bottom: 1px solid var(--pb-line); background: linear-gradient(180deg, var(--pb-bg), #fff); }
body .rub-preview .pv-head .k { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--pb-ink-3); }
body .rub-preview .pv-head h3 { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
body .rub-preview .pv-body { padding: 16px 18px; }
body .pv-crit { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--pb-line-2); font-size: 13px; align-items: center; }
body .pv-crit:last-child { border-bottom: 0; }
body .pv-crit .n { display: flex; align-items: center; gap: 8px; }
body .pv-crit .sw { width: 6px; height: 18px; border-radius: 2px; }
body .pv-crit .w { font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-3); font-variant-numeric: tabular-nums; }
body .rub-preview .pv-foot { padding: 14px 18px; background: var(--pb-bg); border-top: 1px solid var(--pb-line); display: flex; justify-content: space-between; font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-2); letter-spacing: .06em; text-transform: uppercase; }
body .rub-preview .pv-foot b { color: var(--pb-ink); font-weight: 700; }

/* --- Batch evaluation hero + scatter + teacher grid --- */
body .batch-hero { padding: 32px 40px; background: var(--pb-ink); color: #fff; position: relative; overflow: hidden; border-radius: var(--pb-r-lg) var(--pb-r-lg) 0 0; }
body .batch-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 80% 20%, rgba(124, 92, 255, .4), transparent 60%), radial-gradient(50% 70% at 10% 100%, rgba(10, 107, 255, .25), transparent 60%); pointer-events: none; }
body .batch-hero-grid { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: flex-end; }
body .batch-hero h1 { margin: 8px 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
body .batch-hero .sub { font-family: var(--pb-font-serif); font-style: italic; color: rgba(255, 255, 255, .8); font-size: 17px; max-width: 560px; margin: 0; }
body .batch-hero .meta { position: relative; display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
body .batch-hero .meta > div { display: flex; flex-direction: column; gap: 2px; }
body .batch-hero .meta .k { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
body .batch-hero .meta .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; }

body .batch-body { padding: 28px 0 0; }
body .batch-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 1200px) { body .batch-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { body .batch-stats { grid-template-columns: repeat(2, 1fr); } }
body .batch-stats .stat { padding: 16px; }
body .batch-stats .stat .v { font-size: 26px; }
body .batch-stats .stat.danger { background: var(--pb-danger-50); border-color: #F5C8C0; }
body .batch-stats .stat.danger .v { color: #9B1C20; }

body .scatter-wrap { background: #fff; border: 1px solid var(--pb-line); border-radius: 16px; padding: 22px 24px; margin-bottom: 20px; }
body .scatter-canvas { position: relative; height: 340px; margin-top: 14px; background: linear-gradient(180deg, var(--pb-bg), #fff); border: 1px solid var(--pb-line-2); border-radius: 10px; padding: 24px 32px 32px 48px; }
body .scatter-canvas .axis-line { position: absolute; background: var(--pb-line); }
body .scatter-canvas .axis-line.x { left: 48px; right: 24px; bottom: 32px; height: 1px; }
body .scatter-canvas .axis-line.y { left: 48px; top: 24px; bottom: 32px; width: 1px; }
body .scatter-canvas .diag { position: absolute; left: 48px; right: 24px; top: 24px; bottom: 32px; background: linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(11, 30, 75, .12) calc(50% - 0.5px), rgba(11, 30, 75, .12) calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
body .scatter-canvas .grid { position: absolute; left: 48px; right: 24px; top: 24px; bottom: 32px; background-image: linear-gradient(var(--pb-line-2) 1px, transparent 1px), linear-gradient(90deg, var(--pb-line-2) 1px, transparent 1px); background-size: calc(100%/6) calc(100%/4); }
body .scatter-canvas .dot { position: absolute; width: 10px; height: 10px; border-radius: 999px; background: var(--pb-blue); transform: translate(-50%, 50%); border: 2px solid #fff; box-shadow: 0 1px 2px rgba(11, 30, 75, .2); }
body .scatter-canvas .dot.outlier { background: var(--pb-coral); width: 14px; height: 14px; }
body .scatter-canvas .dot.outlier::after { content: ""; position: absolute; inset: -6px; border: 1px dashed var(--pb-coral); border-radius: 999px; animation: scatterPulse 2.4s ease-in-out infinite; }
@keyframes scatterPulse { 0%, 100% { opacity: .4; transform: scale(1); } 50% { opacity: .9; transform: scale(1.1); } }
body .scatter-axis-lbl { position: absolute; font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--pb-ink-3); font-weight: 600; }
body .scatter-axis-lbl.x { left: 50%; bottom: 8px; transform: translateX(-50%); }
body .scatter-axis-lbl.y { left: 14px; top: 50%; transform: rotate(-90deg); transform-origin: left top; }
body .scatter-tick { position: absolute; font-family: var(--pb-font-mono); font-size: 10px; color: var(--pb-ink-3); font-variant-numeric: tabular-nums; }
body .scatter-legend { display: flex; gap: 18px; font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-2); letter-spacing: .04em; margin-top: 14px; flex-wrap: wrap; }
body .scatter-legend .sw { width: 10px; height: 10px; border-radius: 999px; display: inline-block; margin-right: 6px; vertical-align: middle; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--pb-line); }

body .tg-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--pb-line-2); font-size: 13px; }
body .tg-row:last-child { border-bottom: 0; }
body .tg-row .tname { display: flex; align-items: center; gap: 10px; font-weight: 600; }
body .tg-row .tname .av { width: 28px; height: 28px; border-radius: 999px; background: linear-gradient(135deg, var(--pb-blue), var(--pb-violet)); color: #fff; display: grid; place-items: center; font-family: var(--pb-font-mono); font-size: 11px; font-weight: 700; }
body .tg-row .range { position: relative; height: 6px; background: var(--pb-line); border-radius: 999px; }
body .tg-row .range i { position: absolute; top: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pb-warn), var(--pb-blue)); }
body .tg-row .range .mid { position: absolute; top: -2px; width: 2px; height: 10px; background: var(--pb-ink-2); border-radius: 1px; }
body .tg-row .delta { font-family: var(--pb-font-mono); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
body .tg-row .delta.ok   { color: var(--pb-success); }
body .tg-row .delta.warn { color: var(--pb-warn); }
body .tg-row .delta.bad  { color: var(--pb-danger); }

/* --- Teacher calibration report --- */
body .tcal-hero { background: linear-gradient(135deg, var(--pb-navy) 0%, var(--pb-navy-2) 60%, var(--pb-violet) 100%); color: #fff; padding: 32px 40px; position: relative; overflow: hidden; border-radius: var(--pb-r-lg) var(--pb-r-lg) 0 0; }
body .tcal-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 70% at 90% 30%, rgba(255, 176, 32, .2), transparent 60%); pointer-events: none; }
body .tcal-grid { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center; }
@media (max-width: 768px) { body .tcal-grid { grid-template-columns: 1fr; } }
body .tcal-ring { width: 200px; height: 200px; position: relative; flex-shrink: 0; }
body .tcal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
body .tcal-ring .track { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 12; }
body .tcal-ring .arc { fill: none; stroke-width: 12; stroke-linecap: round; }
body .tcal-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body .tcal-ring-c .n { font-size: 54px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
body .tcal-ring-c .pct { font-family: var(--pb-font-mono); font-size: 14px; color: rgba(255, 255, 255, .7); margin-top: 4px; }
body .tcal-ring-c .lbl { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-top: 6px; }
body .tcal-hero h1 { margin: 8px 0 4px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
body .tcal-hero .sub { font-family: var(--pb-font-serif); font-style: italic; color: rgba(255, 255, 255, .85); font-size: 17px; max-width: 520px; margin: 0; }
body .tcal-pills { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
body .tcal-hero .pp { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); padding: 6px 12px; border-radius: 999px; font-family: var(--pb-font-mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; color: #fff; display: inline-flex; align-items: center; gap: 6px; }
body .tcal-hero .pp .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pb-mint); }

body .tcal-body { padding: 32px 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
body .tcal-body .span-7  { grid-column: span 7; }
body .tcal-body .span-5  { grid-column: span 5; }
body .tcal-body .span-4  { grid-column: span 4; }
body .tcal-body .span-12 { grid-column: span 12; }
@media (max-width: 1024px) { body .tcal-body .span-7, body .tcal-body .span-5, body .tcal-body .span-4 { grid-column: span 12; } }

body .traj { height: 200px; position: relative; margin-top: 14px; background: linear-gradient(180deg, var(--pb-bg), #fff); border: 1px solid var(--pb-line-2); border-radius: 10px; padding: 18px 22px 28px 36px; }
body .traj-line { stroke: var(--pb-blue); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
body .traj-area { fill: rgba(10, 107, 255, .08); }
body .traj-ref  { stroke: var(--pb-coral); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
body .traj-dot  { fill: #fff; stroke: var(--pb-blue); stroke-width: 2; }
body .traj-tick { position: absolute; font-family: var(--pb-font-mono); font-size: 10px; color: var(--pb-ink-3); font-variant-numeric: tabular-nums; }

body .hist { display: flex; align-items: flex-end; gap: 6px; height: 170px; margin-top: 14px; padding: 0 4px; }
body .hist-bar { flex: 1; background: linear-gradient(180deg, #5A92F5, var(--pb-blue-600)); border-radius: 6px 6px 2px 2px; position: relative; min-width: 0; }
body .hist-bar.peak { background: linear-gradient(180deg, var(--pb-warn), var(--pb-coral)); }
body .hist-bar .n { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-family: var(--pb-font-mono); font-size: 10.5px; color: var(--pb-ink-3); font-variant-numeric: tabular-nums; }
body .hist-bar .c { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: var(--pb-font-mono); font-size: 10px; color: var(--pb-ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }

body .he-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
body .he-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 11px 14px; background: #fff; border: 1px solid var(--pb-line-2); border-radius: 10px; font-size: 13px; }
body .he-row.harsh   { border-left: 3px solid var(--pb-coral); }
body .he-row.lenient { border-left: 3px solid var(--pb-success); }
body .he-row .label { font-weight: 600; }
body .he-row .delta { font-family: var(--pb-font-mono); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
body .he-row .delta.bad { color: var(--pb-danger); }
body .he-row .delta.ok  { color: var(--pb-success); }

/* Next-steps recommendation cards (3 variants by accent color) */
body .ns-card { padding: 18px; border-radius: 14px; border: 1px solid var(--pb-line); position: relative; }
body .ns-card.violet { background: linear-gradient(135deg, rgba(124, 92, 255, .07), rgba(10, 107, 255, .04)); border-color: rgba(124, 92, 255, .2); }
body .ns-card.coral  { background: linear-gradient(135deg, rgba(255, 107, 92, .06), rgba(255, 176, 32, .04)); border-color: rgba(255, 107, 92, .2); }
body .ns-card.mint   { background: linear-gradient(135deg, rgba(22, 178, 122, .06), rgba(10, 107, 255, .04)); border-color: rgba(22, 178, 122, .25); }
body .ns-card .k { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--pb-ink-3); margin-bottom: 6px; }
body .ns-card h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
body .ns-card p { margin: 0; font-size: 13px; color: var(--pb-ink-2); line-height: 1.55; }
body .ns-card .cta { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--pb-font-mono); font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--pb-navy); text-decoration: none; }
body .ns-card .cta:hover { color: var(--pb-blue-600); }

/* --- Student feedback view --- */
body .sf-hero { background: linear-gradient(135deg, var(--pb-navy), var(--pb-navy-2) 60%, var(--pb-blue-600)); color: #fff; padding: 36px 40px 44px; position: relative; overflow: hidden; border-radius: var(--pb-r-lg) var(--pb-r-lg) 0 0; }
body .sf-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 80% 20%, rgba(124, 92, 255, .4), transparent 60%); pointer-events: none; }
body .sf-grid { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 42px; align-items: center; }
@media (max-width: 768px) { body .sf-grid { grid-template-columns: 1fr; } }
body .sf-ring { width: 240px; height: 240px; position: relative; flex-shrink: 0; }
body .sf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
body .sf-ring .track { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 14; }
body .sf-ring .arc { fill: none; stroke-width: 14; stroke-linecap: round; }
body .sf-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body .sf-ring-c .lbl { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .7); margin-bottom: 4px; }
body .sf-ring-c .n { font-size: 78px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
body .sf-ring-c .band { margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-family: var(--pb-font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--pb-warn); }
body .sf-hero h1 { margin: 8px 0 4px; font-size: 32px; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; color: #fff; }
body .sf-hero .quote { font-family: var(--pb-font-serif); font-size: 19px; font-style: italic; color: rgba(255, 255, 255, .88); line-height: 1.45; max-width: 560px; margin: 14px 0 0; text-wrap: pretty; border-left: 3px solid var(--pb-warn); padding-left: 14px; }
body .sf-hero .sig { margin-top: 14px; font-family: var(--pb-font-mono); font-size: 11px; letter-spacing: .08em; color: rgba(255, 255, 255, .7); text-transform: uppercase; }

body .sf-body { padding: 32px 0; }
body .sf-by-crit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 1024px) { body .sf-by-crit { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { body .sf-by-crit { grid-template-columns: 1fr; } }

body .sc-card { background: #fff; border: 1px solid var(--pb-line); border-radius: 14px; padding: 18px; position: relative; overflow: hidden; }
body .sc-card .k { font-family: var(--pb-font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--pb-ink-3); margin-bottom: 6px; }
body .sc-card h4 { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
body .sc-card .v { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--pb-ink); }
body .sc-card .v small { font-family: var(--pb-font-mono); font-size: 12px; color: var(--pb-ink-3); margin-left: 6px; font-weight: 600; }
body .sc-card .bar { height: 6px; background: var(--pb-line); border-radius: 999px; margin-top: 10px; overflow: hidden; }
body .sc-card .bar i { display: block; height: 100%; border-radius: 999px; }
body .sc-card.strong .bar i { background: linear-gradient(90deg, var(--pb-success), var(--pb-blue)); }
body .sc-card.weak .bar i { background: linear-gradient(90deg, var(--pb-warn), var(--pb-coral)); }
body .sc-card .delta { display: inline-flex; align-items: center; gap: 4px; font-family: var(--pb-font-mono); font-size: 11px; font-weight: 700; margin-top: 8px; }
body .sc-card.strong .delta { color: var(--pb-success); }
body .sc-card.weak .delta   { color: var(--pb-danger); }

body .sf-essay { background: #fff; border: 1px solid var(--pb-line); border-radius: 16px; padding: 28px 32px; margin-bottom: 24px; }
body .sf-essay h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--pb-ink); }
body .sf-essay .meta { font-family: var(--pb-font-mono); font-size: 11px; letter-spacing: .06em; color: var(--pb-ink-3); text-transform: uppercase; margin-bottom: 16px; }
body .sf-essay .body { font-family: var(--pb-font-serif); font-size: 16px; line-height: 1.75; color: var(--pb-ink); max-width: 740px; }
body .sf-essay .body mark { padding: 0; background: none; border-bottom: 2px solid transparent; }
body .sf-essay .body mark.coh { border-color: var(--pb-coral); background: rgba(255, 107, 92, .08); }
body .sf-essay .body mark.lex { border-color: var(--pb-violet); background: rgba(124, 92, 255, .08); }
body .sf-essay .body mark.gr  { border-color: var(--pb-warn); background: rgba(255, 176, 32, .12); }
body .sf-essay .body mark.ta  { border-color: var(--pb-success); background: rgba(22, 178, 122, .08); }
body .sf-legend { display: flex; gap: 18px; margin-bottom: 18px; font-family: var(--pb-font-mono); font-size: 11px; letter-spacing: .04em; color: var(--pb-ink-2); flex-wrap: wrap; }
body .sf-legend i { width: 18px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; }

body .sf-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 900px) { body .sf-next { grid-template-columns: 1fr; } }

body .sf-foot { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; background: #fff; border: 1px solid var(--pb-line); border-radius: 14px; flex-wrap: wrap; gap: 12px; }
body .sf-foot .info { font-family: var(--pb-font-mono); font-size: 11px; color: var(--pb-ink-3); letter-spacing: .05em; }
body .sf-foot .info b { color: var(--pb-ink); font-weight: 700; }
body .sf-foot .acts { display: flex; gap: 8px; }

/* --- HNC grade dots + pills (from pb-preview.css) --- */
body .grade-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 3px; vertical-align: middle; }
body .grade-dot.d { background: var(--pb-violet); }   /* Distinction */
body .grade-dot.m { background: var(--pb-blue); }     /* Merit */
body .grade-dot.p { background: var(--pb-success); }  /* Pass */
body .grade-dot.r { background: var(--pb-coral); }    /* Refer */
body .grade-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; font-family: var(--pb-font-mono); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
body .grade-pill.d { background: rgba(124, 92, 255, .12); color: #5A3FCB; }
body .grade-pill.m { background: var(--pb-blue-50); color: var(--pb-blue-700); }
body .grade-pill.p { background: var(--pb-success-50); color: #0F7A4F; }
body .grade-pill.r { background: var(--pb-danger-50); color: #9B1C20; }

/* --- Submission table with progress bar (used in dashboard + assess_detail) --- */
body .tbl-bar { position: relative; width: 120px; height: 6px; background: var(--pb-line); border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; }
body .tbl-bar i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pb-warn), var(--pb-blue)); }


/* ──────────────────────────────────────────────────────────────────────────
   BRAND HERO — promoted from assessment/_theme.html to global scope so
   language_tests, billing, dashboard pages (which don't `{% include %}` the
   assessment partial) also pick up the navy gradient + radial glow + white
   text treatment when using one of the recognized hero classes.
   ────────────────────────────────────────────────────────────────────────── */
body.pb-themed :is(.edit-feedback-header,.analytics-header,.ai-header,.preview-header,.evaluation-header,.clone-header,.evaluate-header,.rubric-header,.references-header,.ledger-header,.batch-header,.compare-header,.form-header,.overview-header,.dashboard-header,.config-header,.batch-dashboard-header,.batch-results-header,.reference-header,.upload-header,.debug-header,.assignment-header,.assessment-header,.assign-header,.create-header,.edit-header,.review-header,.feedback-header,.performance-header,.search-header,.submit-header,.submission-header,.teacher-header,.delete-header,.ai-models-header,.comparison-header,.detail-hero) {
  background: linear-gradient(135deg, var(--pb-navy) 0%, #1A3A8C 62%, var(--pb-blue-600) 120%);
  color: var(--pb-white);
  border-radius: var(--pb-r-lg);
  padding: 34px 38px;
  margin-bottom: 30px;
  text-align: left;
  position: relative;
  overflow: visible;
  box-shadow: var(--pb-shadow-sm);
}
body.pb-themed :is(.edit-feedback-header,.analytics-header,.ai-header,.preview-header,.evaluation-header,.clone-header,.evaluate-header,.rubric-header,.references-header,.ledger-header,.batch-header,.compare-header,.form-header,.overview-header,.dashboard-header,.config-header,.batch-dashboard-header,.batch-results-header,.reference-header,.upload-header,.debug-header,.assignment-header,.assessment-header,.assign-header,.create-header,.edit-header,.review-header,.feedback-header,.performance-header,.search-header,.submit-header,.submission-header,.teacher-header,.delete-header,.ai-models-header,.comparison-header,.detail-hero)::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(650px 260px at 90% 0%, rgba(10, 107, 255, .26), transparent 62%),
    radial-gradient(460px 220px at 0% 100%, rgba(255, 255, 255, .11), transparent 64%);
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}
body.pb-themed :is(.edit-feedback-header,.analytics-header,.ai-header,.preview-header,.evaluation-header,.clone-header,.evaluate-header,.rubric-header,.references-header,.ledger-header,.batch-header,.compare-header,.form-header,.overview-header,.dashboard-header,.config-header,.batch-dashboard-header,.batch-results-header,.reference-header,.upload-header,.debug-header,.assignment-header,.assessment-header,.assign-header,.create-header,.edit-header,.review-header,.feedback-header,.performance-header,.search-header,.submit-header,.submission-header,.teacher-header,.delete-header,.ai-models-header,.comparison-header,.detail-hero) > * {
  position: relative;
  z-index: 1;
}
body.pb-themed :is(.edit-feedback-header,.analytics-header,.ai-header,.preview-header,.evaluation-header,.clone-header,.evaluate-header,.rubric-header,.references-header,.ledger-header,.batch-header,.compare-header,.form-header,.overview-header,.dashboard-header,.config-header,.batch-dashboard-header,.batch-results-header,.reference-header,.upload-header,.debug-header,.assignment-header,.assessment-header,.assign-header,.create-header,.edit-header,.review-header,.feedback-header,.performance-header,.search-header,.submit-header,.submission-header,.teacher-header,.delete-header,.ai-models-header,.comparison-header,.detail-hero) :where(h1,h2,h3,h4,h5,h6) {
  color: var(--pb-white);
}
body.pb-themed :is(.edit-feedback-header,.analytics-header,.ai-header,.preview-header,.evaluation-header,.clone-header,.evaluate-header,.rubric-header,.references-header,.ledger-header,.batch-header,.compare-header,.form-header,.overview-header,.dashboard-header,.config-header,.batch-dashboard-header,.batch-results-header,.reference-header,.upload-header,.debug-header,.assignment-header,.assessment-header,.assign-header,.create-header,.edit-header,.review-header,.feedback-header,.performance-header,.search-header,.submit-header,.submission-header,.teacher-header,.delete-header,.ai-models-header,.comparison-header,.detail-hero) :where(p, .lead) {
  color: rgba(255, 255, 255, .85);
}
body.pb-themed :is(.edit-feedback-header,.analytics-header,.ai-header,.preview-header,.evaluation-header,.clone-header,.evaluate-header,.rubric-header,.references-header,.ledger-header,.batch-header,.compare-header,.form-header,.overview-header,.dashboard-header,.config-header,.batch-dashboard-header,.batch-results-header,.reference-header,.upload-header,.debug-header,.assignment-header,.assessment-header,.assign-header,.create-header,.edit-header,.review-header,.feedback-header,.performance-header,.search-header,.submit-header,.submission-header,.teacher-header,.delete-header,.ai-models-header,.comparison-header,.detail-hero) .lead {
  font-family: var(--pb-font-serif, Georgia, "Times New Roman", serif);
  font-style: italic;
  font-size: 17px;
  max-width: 640px;
}

/* ============================================================================
   Phase 1 — Shared Navigation & Footer Styles (May 2026 Redesign)
   Scoped to body.pb-themed so they only apply on migrated pages.
   ============================================================================ */

/* ---------- REACT HEADER (nav-two.html) ---------- */
body.pb-themed .react-header.react-header-two {
  position: sticky; top: 0; z-index: 80;
  background: rgba(251, 252, 254, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(229, 234, 244, .9);
}
body.pb-themed .react-header .menu-part { width: 100%; }
body.pb-themed .react-header .container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
body.pb-themed .react-main-menu > nav { display: flex; align-items: center; justify-content: space-between; min-height: 70px; position: relative; }

/* Logo block */
body.pb-themed .menu-toggle { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 18px; }
body.pb-themed .menu-toggle .logo { display: flex; align-items: center; }
body.pb-themed .menu-toggle .logo-text { display: flex; align-items: center; gap: 10px; }
body.pb-themed .menu-toggle .logo-text img { height: 36px; width: auto; max-height: 40px !important; max-width: 200px !important; }

/* Menus */
body.pb-themed .react-inner-menus { display: flex; align-items: center; flex: 1; justify-content: flex-end; gap: 18px; }
body.pb-themed .react-menus { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
body.pb-themed .react-menus > li { position: relative; }
body.pb-themed .react-menus > li > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 8px;
  font-weight: 500; font-size: 14.5px; color: var(--pb-ink-2);
  transition: .15s; white-space: nowrap;
}
body.pb-themed .react-menus > li > a i { font-size: 13px; color: var(--pb-ink-3); margin-right: 2px; transition: .15s; }
body.pb-themed .react-menus > li:has(> ul) > a::after {
  content: ""; width: 8px; height: 8px; display: inline-block; margin-left: 4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .55; transition: .15s;
}
body.pb-themed .react-menus > li > a:hover,
body.pb-themed .react-menus > li:hover > a { background: var(--pb-blue-50); color: var(--pb-blue-600); }
body.pb-themed .react-menus > li:hover > a i { color: var(--pb-blue-600); }
body.pb-themed .react-menus > li:hover > a::after { opacity: 1; transform: rotate(225deg) translateY(-2px); }

/* Dropdown panel */
body.pb-themed .react-menus > li > ul {
  list-style: none; margin: 0; padding: 10px;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 280px; background: #fff;
  border: 1px solid var(--pb-line); border-radius: 14px;
  box-shadow: 0 20px 40px -10px rgba(11,30,75,.18), 0 8px 16px -8px rgba(11,30,75,.08);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 100;
}
body.pb-themed .react-menus > li:hover > ul,
body.pb-themed .react-menus > li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
body.pb-themed .react-menus > li > ul::before {
  content: ""; position: absolute; top: -6px; left: 22px; width: 10px; height: 10px;
  background: #fff; border-left: 1px solid var(--pb-line); border-top: 1px solid var(--pb-line);
  transform: rotate(45deg);
}
body.pb-themed .react-menus ul li { list-style: none; }
body.pb-themed .react-menus ul li a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--pb-ink-2);
  transition: .12s; white-space: nowrap; font-weight: 500;
}
body.pb-themed .react-menus ul li a:hover { background: var(--pb-blue-50); color: var(--pb-blue-600); transform: translateX(2px); }

/* Section headers inside dropdowns */
body.pb-themed .react-menus ul .nav-section-header { background: none !important; cursor: default !important; padding: 0 !important; margin: 10px 0 2px !important; }
body.pb-themed .react-menus ul .nav-section-header:first-child { margin-top: 2px !important; }
body.pb-themed .react-menus ul .nav-section-header:hover { background: none !important; }
body.pb-themed .react-menus ul .section-title {
  display: flex !important; align-items: center; gap: 8px;
  padding: 6px 12px 6px !important; border-bottom: none !important; margin-bottom: 2px !important;
  font-family: var(--pb-font-mono); font-size: 10.5px !important;
  color: var(--pb-ink-3) !important; text-transform: uppercase; letter-spacing: .08em;
}
body.pb-themed .react-menus ul .section-title i { font-size: 11px !important; color: var(--pb-blue) !important; }
body.pb-themed .react-menus ul .section-title strong { font-weight: 600 !important; color: var(--pb-ink) !important; font-family: var(--pb-font); letter-spacing: 0; }
body.pb-themed .react-menus .text-muted { color: var(--pb-ink-3) !important; font-size: 11px; margin-left: 6px; }

/* Badges inside menu items */
body.pb-themed .react-menus .badge,
body.pb-themed .react-menus .badge-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; background: var(--pb-blue); color: #fff; margin-left: auto;
}
body.pb-themed .react-menus .bg-danger { background: var(--pb-danger) !important; color: #fff; }

/* Right rail */
body.pb-themed .searchbar-part { display: flex; align-items: center; flex-shrink: 0; }
body.pb-themed .react-logins { display: flex; align-items: center; gap: 10px; }
body.pb-themed .notification-icon {
  position: relative; width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center; color: var(--pb-ink-2);
  background: var(--pb-bg-2); border: 1px solid var(--pb-line); transition: .15s;
}
body.pb-themed .notification-icon:hover { background: var(--pb-blue-50); border-color: var(--pb-blue-100); color: var(--pb-blue-600); }
body.pb-themed .notification-icon .badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--pb-danger); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 999px; display: grid; place-items: center; border: 2px solid var(--pb-bg);
}
body.pb-themed .auth-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 9px;
  font-weight: 600; font-size: 14px;
  background: transparent; color: var(--pb-ink);
  border: 1px solid var(--pb-line); transition: .15s; white-space: nowrap;
}
body.pb-themed .auth-btn:hover { background: var(--pb-bg-2); border-color: var(--pb-ink-3); }
body.pb-themed .auth-btn svg { width: 15px; height: 15px; }

/* Navigation CTA */
body.pb-themed .nav-cta-button {
  display: inline-flex !important; align-items: center; gap: 6px;
  background: var(--pb-ink) !important; color: #fff !important;
  padding: 10px 18px !important; border-radius: 9px !important;
  font-weight: 600 !important; font-size: 14px !important; line-height: 1 !important;
  box-shadow: 0 4px 12px -4px rgba(13,21,48,.35);
  transition: .15s; margin-left: 6px; border: 1px solid var(--pb-ink);
}
body.pb-themed .nav-cta-button:hover {
  background: var(--pb-blue) !important; border-color: var(--pb-blue) !important;
  transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(10,107,255,.5);
}

/* Mobile header styling */
body.pb-themed .mobile-actions { display: none; align-items: center; gap: 10px; }
body.pb-themed #menu-btn {
  background: transparent; border: 1px solid var(--pb-line);
  width: 42px; height: 42px; border-radius: 10px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; padding: 0;
}
body.pb-themed #menu-btn .icon-bar { width: 18px; height: 1.8px; background: var(--pb-ink); border-radius: 2px; transition: .2s; }
body.pb-themed #menu-btn.active .icon-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.pb-themed #menu-btn.active .icon-bar:nth-child(2) { opacity: 0; }
body.pb-themed #menu-btn.active .icon-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
body.pb-themed .mobile-notification-icon {
  position: relative; width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center; color: var(--pb-ink-2);
  background: var(--pb-bg-2); border: 1px solid var(--pb-line); font-size: 15px;
}
body.pb-themed .mobile-notification-icon .badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--pb-danger); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 999px; display: grid; place-items: center; border: 2px solid var(--pb-bg);
}
body.pb-themed .mobile-logins a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--pb-line); color: var(--pb-ink); background: #fff;
}
body.pb-themed .mobile-logins svg { width: 14px; height: 14px; }

@media (max-width: 1024px) {
  body.pb-themed .react-menus > li > a { padding: 10px 10px; font-size: 13.5px; }
}
@media (max-width: 900px) {
  body.pb-themed .react-inner-menus {
    position: fixed; top: 70px; left: 0; right: 0; bottom: 0;
    background: #fff; z-index: 90; padding: 16px 24px 24px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    visibility: hidden; opacity: 0; transform: translateX(-100%);
    transition: .25s ease; pointer-events: none;
    flex-direction: column; align-items: stretch; gap: 0;
  }
  body.pb-themed .react-inner-menus.show { visibility: visible; opacity: 1; transform: translateX(0); pointer-events: auto; }
  body.pb-themed .react-menus { flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
  body.pb-themed .react-menus > li { width: 100%; }
  body.pb-themed .react-menus > li > a { width: 100%; justify-content: space-between; padding: 14px 16px; font-size: 15px; border-radius: 10px; }
  body.pb-themed .react-menus > li:has(> ul) > a::after { margin-left: auto; }
  body.pb-themed .react-menus > li > ul {
    position: static; min-width: auto; opacity: 1; visibility: visible;
    transform: none; box-shadow: none; border: none; border-radius: 0;
    background: var(--pb-bg-2); margin: 4px 0 8px; padding: 8px;
  }
  body.pb-themed .react-menus > li > ul::before { display: none; }
  body.pb-themed .react-menus ul li a { padding: 10px 12px; font-size: 14px; }
  body.pb-themed .searchbar-part { margin-top: 14px; width: 100%; }
  body.pb-themed .react-logins { display: none; }
  body.pb-themed .mobile-actions { display: flex; }
  body.pb-themed .menu-toggle { flex: 1; justify-content: space-between; width: 100%; }
}


/* ---------- REACT FOOTER (footer-three.html) ---------- */
body.pb-themed .react-footer.home-four {
  position: relative;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(10,107,255,.18), transparent 60%),
    radial-gradient(900px 500px at 95% 110%, rgba(10,107,255,.12), transparent 60%),
    linear-gradient(180deg, var(--pb-navy) 0%, #07153A 100%);
  color: rgba(255,255,255,.72);
  overflow: hidden;
  isolation: isolate;
}
/* Grid pattern overlay */
body.pb-themed .react-footer.home-four::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .25; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 85%);
}
/* Top hairline accent */
body.pb-themed .react-footer.home-four::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(10,107,255,.55) 20%, rgba(10,107,255,.7) 50%, rgba(10,107,255,.55) 80%, transparent 100%);
}
body.pb-themed .react-footer .footer-top { padding: 88px 0 56px; }

/* Brand column */
body.pb-themed .footer-widget { min-width: 0; }
body.pb-themed .footer-widget-1 .footer-logo { display: flex; align-items: center; margin-bottom: 20px; }
/* No filter — footer-final-logo.png is already brand-colored for dark navy bg
   (white "Prepare" + blue "Buddy" + navy mark). The earlier `brightness(0) invert(1)`
   flattened the brand colors into a solid white blob. */
body.pb-themed .footer-widget-1 .footer-logo img { height: 40px; width: auto; max-height: 44px; }
body.pb-themed .footer-subtitle { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.78); margin: 0 0 22px; max-width: 300px; line-height: 1.55; }
body.pb-themed .footer-address { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
body.pb-themed .footer-address li { display: flex; align-items: flex-start; gap: 12px; padding: 0; font-size: 14px; color: rgba(255,255,255,.8); line-height: 1.5; }
body.pb-themed .footer-address li svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: rgba(255,255,255,.5); stroke-width: 1.8; }
body.pb-themed .footer-address li span,
body.pb-themed .footer-address li a { color: rgba(255,255,255,.8); word-break: break-word; }
body.pb-themed .footer-address li a { transition: color .15s; }
body.pb-themed .footer-address li a:hover { color: #fff; }

/* Column titles */
body.pb-themed .footer-title {
  font-family: var(--pb-font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55);
  margin: 0 0 20px; padding: 0 0 14px; border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
}
body.pb-themed .footer-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 28px; height: 1px; background: var(--pb-blue); }

/* Link lists */
body.pb-themed .react-footer .footer-menu.footer-nowrap ul { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-direction: column; gap: 9px; }
body.pb-themed .react-footer .footer-menu.footer-nowrap ul li { padding: 0; }
body.pb-themed .react-footer .footer-menu.footer-nowrap ul li a {
  font-size: 13.5px; color: rgba(255,255,255,.7); font-weight: 500; line-height: 1.45;
  transition: color .15s, transform .15s; position: relative; display: inline-block;
}
body.pb-themed .react-footer .footer-menu.footer-nowrap ul li a:hover { color: #fff; transform: translateX(2px); }
body.pb-themed .react-footer .footer-menu.footer-nowrap ul li a:hover::before { content: "→"; position: absolute; left: -14px; top: 0; color: var(--pb-blue); font-weight: 700; }

body.pb-themed .react-footer .footer-menu.footer-nowrap ul li[style*="border-top"] {
  margin-top: 20px !important; padding-top: 16px !important; border-top: 1px solid rgba(255,255,255,.08) !important;
}
body.pb-themed .react-footer .footer-menu.footer-nowrap ul li strong {
  font-family: var(--pb-font-mono) !important; font-size: 10.5px !important; font-weight: 600 !important;
  letter-spacing: .16em !important; color: rgba(255,255,255,.55) !important; text-transform: uppercase !important;
}

/* Recent articles list */
body.pb-themed .footer-widget-5 .footer-menu { padding-right: 0 !important; }
body.pb-themed .footer-blog-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
body.pb-themed .footer-blog-item { margin: 0 !important; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
body.pb-themed .footer-blog-item:last-child { border-bottom: none; padding-bottom: 0; }
body.pb-themed .footer-blog-link { color: rgba(255,255,255,.78) !important; font-size: 13.5px; line-height: 1.45; display: block; transition: color .15s; font-weight: 500; text-decoration: none !important; }
body.pb-themed .footer-blog-link:hover { color: #fff !important; }
body.pb-themed .footer-blog-all {
  display: inline-flex !important; align-items: center; gap: 6px; margin-top: 16px !important; font-size: 12px !important;
  color: var(--pb-blue) !important; font-weight: 600 !important; text-decoration: none !important; letter-spacing: .02em;
  padding: 8px 14px; border: 1px solid rgba(10,107,255,.3); border-radius: 999px; background: rgba(10,107,255,.06); transition: .15s;
}
body.pb-themed .footer-blog-all:hover { color: #fff !important; background: var(--pb-blue); border-color: var(--pb-blue); }

/* Copyright band */
body.pb-themed .react-footer .copyright { padding: 22px 0; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.2); position: relative; z-index: 1; }
body.pb-themed .react-footer .copyright .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
body.pb-themed .react-copy-left { font-size: 13px; color: rgba(255,255,255,.55); font-weight: 500; }
body.pb-themed .react-copy-left a { color: rgba(255,255,255,.8); font-weight: 600; transition: .15s; }
body.pb-themed .react-copy-left a:hover { color: var(--pb-blue); }

/* Social list */
body.pb-themed .social-links { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 8px; }
body.pb-themed .social-links li { margin: 0; }
body.pb-themed .social-links li.follow { font-family: var(--pb-font-mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.5); margin-right: 6px; padding: 0 4px; }
body.pb-themed .social-links li a {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.85); transition: .2s; font-size: 14px;
}
body.pb-themed .social-links li a:hover { background: var(--pb-blue); border-color: var(--pb-blue); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px -4px rgba(10,107,255,.5); }

/* Back to top scroll button */
body.pb-themed #backscrollUp {
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 14px;
  background: var(--pb-ink); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 25px -8px rgba(13,21,48,.5); opacity: 0; transform: translateY(12px);
  pointer-events: none; transition: .25s; z-index: 90;
}
body.pb-themed #backscrollUp.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
body.pb-themed #backscrollUp:hover { background: var(--pb-blue); transform: translateY(-2px); }
body.pb-themed #backscrollUp::before { content: ""; width: 10px; height: 10px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(-45deg); margin-top: 4px; }
body.pb-themed #backscrollUp span { display: none; }

@media (max-width: 992px) {
  body.pb-themed .react-footer .footer-top { padding: 64px 0 36px; }
}
@media (max-width: 560px) {
  body.pb-themed .react-footer .copyright .container { justify-content: flex-start; }
  body.pb-themed .social-links { flex-wrap: wrap; }
  body.pb-themed .footer-title { margin-bottom: 16px; }
}

