/* ═══════════════════════════════════════════════════════════════════
   Risk AI Daily Brief — Apple-inspired design system
   Restraint, materials, optical type, fluid micro-interactions.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design tokens ────────────────────────────────────────────────── */
:root {
  /* System type — SF Pro on Apple, with refined fallbacks */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", "Fira Code", Menlo, monospace;

  /* Motion — strong ease-out (responsive), ease-in-out (on-screen morph) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-press: 120ms;
  --duration-fast: 160ms;
  --duration-ui: 220ms;
  --duration-modal: 280ms;

  /* Apple system blue */
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-blue-active: #006edb;

  --white: #ffffff;
  --black: #000000;

  /* Light theme (default tokens — dark overrides below) */
  --blue: #0071e3;
  --orange: #ff9f0a;
  --green: #30d158;
  --red: #ff453a;

  --primary: var(--apple-blue);
  --primary-hover: var(--apple-blue-hover);
  --primary-light: rgba(0, 113, 227, 0.08);
  --primary-border: rgba(0, 113, 227, 0.22);

  /* Apple.com light canvas */
  --bg-main: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --border-light: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --hairline: rgba(0, 0, 0, 0.06);

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  --text-inverse: #f5f5f7;

  /* Sidebar — deep material, always dark for contrast (macOS-like) */
  --sidebar-bg: rgba(29, 29, 31, 0.92);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-active-bg: rgba(0, 113, 227, 0.95);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-text-active: #ffffff;

  --header-bg: rgba(251, 251, 253, 0.72);
  --input-bg: rgba(255, 255, 255, 0.9);
  --btn-secondary-bg: rgba(0, 0, 0, 0.04);
  --btn-secondary-hover-bg: rgba(0, 0, 0, 0.08);

  --shadow-card:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-hover:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-modal:
    0 24px 80px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.06);
  --table-hover: rgba(0, 0, 0, 0.025);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 980px;

  /* Slate scale → Apple gray ladder (light) */
  --c-slate-50: #f5f5f7;
  --c-slate-100: #ffffff;
  --c-slate-200: #e8e8ed;
  --c-slate-300: #d2d2d7;
  --c-slate-400: #86868b;
  --c-slate-500: #6e6e73;
  --c-slate-600: #424245;
  --c-slate-700: #1d1d1f;
  --c-slate-800: #1d1d1f;
  --c-slate-900: #000000;

  /* Status colors — soft fills, clear text */
  --c-blue-100: rgba(0, 113, 227, 0.1);
  --c-blue-700: #0071e3;

  --c-green-100: rgba(48, 209, 88, 0.14);
  --c-green-700: #248a3d;

  --c-purple-100: rgba(191, 90, 242, 0.12);
  --c-purple-700: #8944ab;

  --c-emerald-50: rgba(48, 209, 88, 0.08);
  --c-emerald-100: rgba(48, 209, 88, 0.14);
  --c-emerald-500: #30d158;
  --c-emerald-700: #248a3d;

  --c-amber-50: rgba(255, 159, 10, 0.1);
  --c-amber-100: rgba(255, 159, 10, 0.16);
  --c-amber-500: #ff9f0a;
  --c-amber-700: #b25000;

  --c-red-50: rgba(255, 69, 58, 0.1);
  --c-red-100: rgba(255, 69, 58, 0.14);
  --c-red-500: #ff453a;
  --c-red-700: #d70015;

  --c-indigo-50: rgba(0, 113, 227, 0.08);
  --c-indigo-100: rgba(0, 113, 227, 0.12);
  --c-indigo-500: #0071e3;
  --c-indigo-700: #0071e3;

  --deep-grey: #d2d2d7;
  --grey-80: rgba(255, 255, 255, 0.72);
}

/* Dark theme — macOS / Apple.com night */
:root,
:root[data-theme="dark"] {
  --blue: #0a84ff;
  --orange: #ff9f0a;
  --green: #30d158;
  --red: #ff453a;

  --primary: #0a84ff;
  --primary-hover: #409cff;
  --primary-light: rgba(10, 132, 255, 0.12);
  --primary-border: rgba(10, 132, 255, 0.28);

  --bg-main: #000000;
  --bg-elevated: #1c1c1e;
  --bg-card: rgba(28, 28, 30, 0.78);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --hairline: rgba(255, 255, 255, 0.06);

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-muted: #6e6e73;
  --text-inverse: #1d1d1f;

  --sidebar-bg: rgba(22, 22, 24, 0.88);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-active-bg: #0a84ff;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --sidebar-text: rgba(255, 255, 255, 0.62);
  --sidebar-text-active: #ffffff;

  --header-bg: rgba(0, 0, 0, 0.55);
  --input-bg: rgba(44, 44, 46, 0.9);
  --btn-secondary-bg: rgba(255, 255, 255, 0.08);
  --btn-secondary-hover-bg: rgba(255, 255, 255, 0.12);

  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-hover:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 40px rgba(0, 0, 0, 0.55);
  --shadow-modal:
    0 28px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  --table-hover: rgba(255, 255, 255, 0.04);

  --c-slate-50: #000000;
  --c-slate-100: rgba(28, 28, 30, 0.9);
  --c-slate-200: #2c2c2e;
  --c-slate-300: #3a3a3c;
  --c-slate-400: #8e8e93;
  --c-slate-500: #98989d;
  --c-slate-600: #d1d1d6;
  --c-slate-700: #e5e5ea;
  --c-slate-800: #f2f2f7;
  --c-slate-900: #ffffff;

  --c-blue-100: rgba(10, 132, 255, 0.16);
  --c-blue-700: #64b5ff;

  --c-green-100: rgba(48, 209, 88, 0.16);
  --c-green-700: #30d158;

  --c-purple-100: rgba(191, 90, 242, 0.16);
  --c-purple-700: #da8fff;

  --c-emerald-50: rgba(48, 209, 88, 0.1);
  --c-emerald-100: rgba(48, 209, 88, 0.16);
  --c-emerald-500: #30d158;
  --c-emerald-700: #30d158;

  --c-amber-50: rgba(255, 159, 10, 0.12);
  --c-amber-100: rgba(255, 159, 10, 0.18);
  --c-amber-500: #ff9f0a;
  --c-amber-700: #ffb340;

  --c-red-50: rgba(255, 69, 58, 0.12);
  --c-red-100: rgba(255, 69, 58, 0.18);
  --c-red-500: #ff453a;
  --c-red-700: #ff6961;

  --c-indigo-50: rgba(10, 132, 255, 0.1);
  --c-indigo-100: rgba(10, 132, 255, 0.16);
  --c-indigo-500: #0a84ff;
  --c-indigo-700: #64b5ff;

  --deep-grey: #3a3a3c;
  --grey-80: rgba(28, 28, 30, 0.78);
}

/* Explicit light overrides (when user toggles light on dark-first default) */
:root[data-theme="light"] {
  --blue: #0071e3;
  --orange: #ff9f0a;
  --green: #30d158;
  --red: #ff453a;

  --primary: #0071e3;
  --primary-hover: #0077ed;
  --primary-light: rgba(0, 113, 227, 0.08);
  --primary-border: rgba(0, 113, 227, 0.22);

  --bg-main: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --border-light: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --hairline: rgba(0, 0, 0, 0.06);

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  --text-inverse: #f5f5f7;

  --sidebar-bg: rgba(29, 29, 31, 0.92);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-active-bg: rgba(0, 113, 227, 0.95);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-text-active: #ffffff;

  --header-bg: rgba(251, 251, 253, 0.72);
  --input-bg: rgba(255, 255, 255, 0.9);
  --btn-secondary-bg: rgba(0, 0, 0, 0.04);
  --btn-secondary-hover-bg: rgba(0, 0, 0, 0.08);

  --shadow-card:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-hover:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-modal:
    0 24px 80px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.06);
  --table-hover: rgba(0, 0, 0, 0.025);

  --c-slate-50: #f5f5f7;
  --c-slate-100: #ffffff;
  --c-slate-200: #e8e8ed;
  --c-slate-300: #d2d2d7;
  --c-slate-400: #86868b;
  --c-slate-500: #6e6e73;
  --c-slate-600: #424245;
  --c-slate-700: #1d1d1f;
  --c-slate-800: #1d1d1f;
  --c-slate-900: #000000;

  --c-blue-100: rgba(0, 113, 227, 0.1);
  --c-blue-700: #0071e3;
  --c-green-100: rgba(48, 209, 88, 0.14);
  --c-green-700: #248a3d;
  --c-purple-100: rgba(191, 90, 242, 0.12);
  --c-purple-700: #8944ab;
  --c-emerald-50: rgba(48, 209, 88, 0.08);
  --c-emerald-100: rgba(48, 209, 88, 0.14);
  --c-emerald-500: #30d158;
  --c-emerald-700: #248a3d;
  --c-amber-50: rgba(255, 159, 10, 0.1);
  --c-amber-100: rgba(255, 159, 10, 0.16);
  --c-amber-500: #ff9f0a;
  --c-amber-700: #b25000;
  --c-red-50: rgba(255, 69, 58, 0.1);
  --c-red-100: rgba(255, 69, 58, 0.14);
  --c-red-500: #ff453a;
  --c-red-700: #d70015;
  --c-indigo-50: rgba(0, 113, 227, 0.08);
  --c-indigo-100: rgba(0, 113, 227, 0.12);
  --c-indigo-500: #0071e3;
  --c-indigo-700: #0071e3;

  --deep-grey: #d2d2d7;
  --grey-80: rgba(255, 255, 255, 0.72);
}

/* ── Base ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans) !important;
  background-color: var(--bg-main) !important;
  color: var(--text-primary) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: -0.01em;
  line-height: 1.47;
}

/* Soft ambient wash — like apple.com depth without noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(0, 113, 227, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 100%, rgba(0, 0, 0, 0.03), transparent 50%);
}

:root[data-theme="dark"] body::before,
:root:not([data-theme="light"]) body::before {
  background:
    radial-gradient(ellipse 70% 45% at 75% -5%, rgba(10, 132, 255, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(255, 255, 255, 0.02), transparent 45%);
}

main {
  position: relative;
  z-index: 1;
}

/* Scrollbar — quiet */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
  background-clip: content-box;
  border: 2px solid transparent;
}
:root[data-theme="dark"] ::-webkit-scrollbar-thumb,
:root:not([data-theme="light"]) ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  background-clip: content-box;
  border: 2px solid transparent;
}

/* ── Typography ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
}

.page-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary) !important;
}

.display-stat {
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

/* ── Frosted header ───────────────────────────────────────────────── */
header {
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  background-color: var(--header-bg) !important;
  border-bottom: 1px solid var(--hairline) !important;
  box-shadow: none !important;
}

/* ── Sidebar material ─────────────────────────────────────────────── */
aside.app-sidebar {
  background: var(--sidebar-bg) !important;
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  border-right: 1px solid var(--sidebar-border) !important;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.2);
}

aside.app-sidebar .brand-mark {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

aside.app-sidebar .brand-label {
  color: #f5f5f7;
  font-weight: 600;
  letter-spacing: -0.02em;
}

aside.app-sidebar nav a {
  color: var(--sidebar-text) !important;
  border-radius: var(--radius-md) !important;
  margin-bottom: 2px;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-press) var(--ease-out) !important;
}

aside.app-sidebar nav a:hover {
  background-color: var(--sidebar-hover-bg) !important;
  color: #ffffff !important;
}

aside.app-sidebar nav a:active {
  transform: scale(0.98);
}

aside.app-sidebar nav a[aria-current="page"] {
  background: var(--sidebar-active-bg) !important;
  color: var(--sidebar-text-active) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 4px 14px rgba(0, 113, 227, 0.28) !important;
  border-left: none !important;
  padding-left: 0.875rem !important;
  font-weight: 500;
}

aside.app-sidebar .sidebar-footer a {
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.25rem;
  transition: color var(--duration-fast) var(--ease-out);
}

/* ── Cards / surfaces ─────────────────────────────────────────────── */
.bg-white,
.surface-card {
  background-color: var(--bg-card) !important;
  border-color: var(--border-light) !important;
  backdrop-filter: saturate(160%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(160%) blur(20px) !important;
  box-shadow: var(--shadow-card) !important;
  border-radius: var(--radius-lg) !important;
  transition:
    transform var(--duration-ui) var(--ease-out),
    box-shadow var(--duration-ui) var(--ease-out),
    border-color var(--duration-ui) var(--ease-out) !important;
}

/* Interactive cards only lift on fine pointers */
@media (hover: hover) and (pointer: fine) {
  a.bg-white:hover,
  a.surface-card:hover,
  .card-interactive:hover {
    border-color: var(--border-hover) !important;
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-2px);
  }

  /* Static panels (tables) shouldn't bounce on hover */
  div.bg-white:hover:not(.card-interactive):not(a) {
    transform: none;
    border-color: var(--border-light) !important;
  }
}

a.bg-white:active,
a.surface-card:active,
.card-interactive:active {
  transform: scale(0.985) translateY(0);
  transition-duration: var(--duration-press) !important;
}

/* ── Tables ───────────────────────────────────────────────────────── */
tbody tr {
  transition: background-color var(--duration-fast) ease !important;
}
tbody tr:hover {
  background-color: var(--table-hover) !important;
}

/* ── Forms ────────────────────────────────────────────────────────── */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
select,
textarea {
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  background-color: var(--input-bg) !important;
  color: var(--text-primary) !important;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-border) !important;
}

/* iOS-style toggle */
.peer:checked ~ .peer-checked\:bg-blue-600 {
  background-color: var(--primary) !important;
}
.peer:focus ~ div {
  box-shadow: 0 0 0 3px var(--primary-border) !important;
}

input[type="checkbox"] {
  border-radius: 5px !important;
  border: 1px solid var(--border-light) !important;
  transition:
    background-color var(--duration-press) var(--ease-out),
    border-color var(--duration-press) var(--ease-out),
    box-shadow var(--duration-press) var(--ease-out) !important;
}
input[type="checkbox"]:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: none !important;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
button,
a[class*="bg-blue"],
input[type="submit"] {
  -webkit-tap-highlight-color: transparent;
}

button.bg-blue-600,
a.bg-blue-600,
input[type="submit"].bg-blue-600 {
  background: var(--primary) !important;
  color: #ffffff !important;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-press) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 1px 2px rgba(0, 0, 0, 0.12) !important;
  border: none !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
}

@media (hover: hover) and (pointer: fine) {
  button.bg-blue-600:hover,
  a.bg-blue-600:hover,
  input[type="submit"].bg-blue-600:hover {
    background: var(--primary-hover) !important;
    transform: none !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.2) inset,
      0 4px 14px rgba(0, 113, 227, 0.28) !important;
  }
}

button.bg-blue-600:active,
a.bg-blue-600:active,
input[type="submit"].bg-blue-600:active {
  transform: scale(0.97) !important;
  background: var(--apple-blue-active) !important;
}

:root[data-theme="dark"] button.bg-blue-600:active,
:root[data-theme="dark"] a.bg-blue-600:active {
  background: #0077ed !important;
}

button.bg-blue-600:disabled,
a.bg-blue-600:disabled {
  background: var(--deep-grey) !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.55;
  cursor: not-allowed;
}

/* Secondary / ghost buttons */
button.bg-slate-100,
a.bg-slate-100 {
  background-color: var(--btn-secondary-bg) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    transform var(--duration-press) var(--ease-out),
    color var(--duration-fast) var(--ease-out) !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 500 !important;
}

@media (hover: hover) and (pointer: fine) {
  button.bg-slate-100:hover,
  a.bg-slate-100:hover {
    background-color: var(--btn-secondary-hover-bg) !important;
    border-color: var(--border-hover) !important;
    color: var(--text-primary) !important;
    transform: none;
  }
}

button.bg-slate-100:active,
a.bg-slate-100:active {
  transform: scale(0.97);
}

/* Icon / theme toggle press */
.icon-btn {
  border-radius: var(--radius-pill);
  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-press) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}
.icon-btn:active {
  transform: scale(0.94);
}

/* ── Links ────────────────────────────────────────────────────────── */
a.text-blue-600,
a.text-blue-500 {
  color: var(--primary) !important;
  transition: opacity var(--duration-fast) var(--ease-out);
}
a.text-blue-600:hover,
a.text-blue-500:hover {
  opacity: 0.78;
}

/* ── Brief builder ────────────────────────────────────────────────── */
.sticky-panel {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

.brief-output {
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  background-color: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  padding: 1rem 1.125rem !important;
  max-height: 340px;
  overflow-y: auto;
  color: var(--text-primary) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.border-blue-300 {
  border-color: var(--primary) !important;
  background-color: var(--primary-light) !important;
  box-shadow: 0 0 0 1px var(--primary-border) !important;
}

.score-high { color: var(--c-emerald-700); font-weight: 600; }
.score-mid  { color: var(--c-amber-700); font-weight: 600; }
.score-low  { color: var(--text-muted); }

/* ── Badges ───────────────────────────────────────────────────────── */
.badge-rss {
  background-color: var(--c-blue-100) !important;
  color: var(--c-blue-700) !important;
  border: 1px solid transparent !important;
}

.badge-google-alerts {
  background-color: var(--c-green-100) !important;
  color: var(--c-green-700) !important;
  border: 1px solid transparent !important;
}

/* Soft pill badges */
span.rounded-full {
  letter-spacing: -0.01em;
}

/* ── Modals ───────────────────────────────────────────────────────── */
.fixed.bg-black\/40,
.fixed.bg-black\/50 {
  background-color: rgba(0, 0, 0, 0.36) !important;
  backdrop-filter: saturate(140%) blur(12px) !important;
  -webkit-backdrop-filter: saturate(140%) blur(12px) !important;
  transition: opacity var(--duration-modal) var(--ease-out) !important;
}

.bg-white.rounded-lg.shadow-xl {
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-modal) !important;
  background-color: var(--bg-elevated) !important;
}

/* ── Content reveal (page enter) ──────────────────────────────────── */
@keyframes apple-rise {
  from {
    opacity: 0;
    translate: 0 10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.content-reveal > * {
  animation: apple-rise var(--duration-modal) var(--ease-out) backwards;
}

.content-reveal > *:nth-child(1) { animation-delay: 0ms; }
.content-reveal > *:nth-child(2) { animation-delay: 40ms; }
.content-reveal > *:nth-child(3) { animation-delay: 80ms; }
.content-reveal > *:nth-child(4) { animation-delay: 120ms; }
.content-reveal > *:nth-child(5) { animation-delay: 160ms; }
.content-reveal > *:nth-child(6) { animation-delay: 200ms; }
.content-reveal > *:nth-child(7) { animation-delay: 240ms; }
.content-reveal > *:nth-child(8) { animation-delay: 280ms; }

/* Nested grids: stagger children of first-level grids */
.stagger-in > * {
  opacity: 0;
  animation: apple-rise var(--duration-modal) var(--ease-out) both;
}
.stagger-in > *:nth-child(1) { animation-delay: 20ms; }
.stagger-in > *:nth-child(2) { animation-delay: 60ms; }
.stagger-in > *:nth-child(3) { animation-delay: 100ms; }
.stagger-in > *:nth-child(4) { animation-delay: 140ms; }
.stagger-in > *:nth-child(5) { animation-delay: 180ms; }
.stagger-in > *:nth-child(6) { animation-delay: 220ms; }
.stagger-in > *:nth-child(7) { animation-delay: 260ms; }
.stagger-in > *:nth-child(8) { animation-delay: 300ms; }
.stagger-in > *:nth-child(9) { animation-delay: 340ms; }
.stagger-in > *:nth-child(n+10) { animation-delay: 360ms; }

/* Stat card icon wells */
.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

/* ── Theme toggle ─────────────────────────────────────────────────── */
.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-press) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}
.theme-toggle:hover {
  background: var(--btn-secondary-bg);
  color: var(--text-primary);
}
.theme-toggle:active {
  transform: scale(0.94);
}

/* ── Emphasis (no forced red — reserved for true errors) ──────────── */
strong, b {
  font-weight: 600;
  color: inherit;
}
.highlight-text {
  color: var(--primary) !important;
  font-weight: 600 !important;
}

/* ── Status color utilities ───────────────────────────────────────── */
.bg-blue-100 { background-color: var(--c-blue-100) !important; }
.text-blue-700 { color: var(--c-blue-700) !important; }

.bg-green-100 { background-color: var(--c-green-100) !important; }
.text-green-700 { color: var(--c-green-700) !important; }

.bg-purple-100 { background-color: var(--c-purple-100) !important; }
.text-purple-700 { color: var(--c-purple-700) !important; }

.bg-emerald-50 { background-color: var(--c-emerald-50) !important; }
.text-emerald-700 { color: var(--c-emerald-700) !important; }
.border-emerald-100 { border-color: var(--c-emerald-100) !important; }

.bg-amber-50 { background-color: var(--c-amber-50) !important; }
.text-amber-700 { color: var(--c-amber-700) !important; }
.border-amber-100 { border-color: var(--c-amber-100) !important; }

.bg-red-50 { background-color: var(--c-red-50) !important; }
.text-red-700 { color: var(--c-red-700) !important; }
.border-red-100 { border-color: var(--c-red-100) !important; }

.bg-indigo-50 { background-color: var(--c-indigo-50) !important; }
.text-indigo-700 { color: var(--c-indigo-700) !important; }
.border-indigo-100 { border-color: var(--c-indigo-100) !important; }

/* ── Alpine cloak ─────────────────────────────────────────────────── */
[x-cloak] {
  display: none !important;
}

/* ── Selection ────────────────────────────────────────────────────── */
::selection {
  background: rgba(0, 113, 227, 0.22);
  color: inherit;
}

/* ── Focus visible (keyboard) ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .content-reveal > *,
  .stagger-in > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ── Reduced transparency ─────────────────────────────────────────── */
@media (prefers-reduced-transparency: reduce) {
  header,
  aside.app-sidebar,
  .bg-white,
  .surface-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  header {
    background-color: var(--bg-elevated) !important;
  }
  :root[data-theme="light"] .bg-white,
  :root[data-theme="light"] .surface-card {
    background-color: #ffffff !important;
  }
  :root[data-theme="dark"] .bg-white,
  :root[data-theme="dark"] .surface-card,
  :root:not([data-theme="light"]) .bg-white {
    background-color: #1c1c1e !important;
  }
}

/* ── High contrast ────────────────────────────────────────────────── */
@media (prefers-contrast: more) {
  .bg-white,
  .surface-card,
  header {
    border-color: var(--text-muted) !important;
    backdrop-filter: none !important;
  }
}

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
  aside, header, .no-print {
    display: none !important;
  }
  main {
    margin-left: 0 !important;
  }
  body::before {
    display: none;
  }
  .brief-output {
    max-height: none;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    page-break-inside: avoid;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Public brief app (app_base.html) — editorial reading surface
   ═══════════════════════════════════════════════════════════════════ */

body.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(0, 113, 227, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(191, 90, 242, 0.06), transparent 50%),
    var(--bg-main) !important;
  color: var(--text-primary);
}

.app-topbar {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--hairline);
}

.app-topbar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.app-brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border-light);
}

.app-brand-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}

.app-brand-sub {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.app-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--btn-secondary-bg);
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition:
    transform var(--duration-press) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.app-admin-link:hover {
  color: var(--text-primary);
  background: var(--btn-secondary-hover-bg);
}

.app-admin-link:active {
  transform: scale(0.97);
}

.app-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-pill);
  transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

.app-back-link:hover {
  color: var(--text-primary);
  background: var(--btn-secondary-bg);
}

.app-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  width: 100%;
}

.app-footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.app-hero {
  margin-bottom: 2.25rem;
  max-width: 40rem;
}

.app-kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.app-hero-title {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  margin: 0 0 0.85rem;
}

.app-hero-lead {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 34rem;
}


/* Year tabs — segmented control under hero */
.year-tabs {
  margin: -0.5rem 0 1.75rem;
}

.year-tabs-track {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem;
  border-radius: var(--radius-pill);
  background: var(--btn-secondary-bg);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
}

.year-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-press) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.year-tab:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--bg-elevated) 55%, transparent);
}

.year-tab:active {
  transform: scale(0.97);
}

.year-tab.is-active {
  color: var(--text-primary);
  background: var(--bg-elevated);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 0 0 1px var(--border-light);
}

:root[data-theme="dark"] .year-tab.is-active,
:root:not([data-theme="light"]) .year-tab.is-active {
  background: rgba(44, 44, 46, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.year-tab-label {
  font-variant-numeric: tabular-nums;
}

.year-tab-count {
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.08rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
}

.year-tab.is-active .year-tab-count {
  background: var(--primary);
  color: #fff;
}

.year-tabs-hint {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .year-tab {
    transition: none !important;
  }
}


/* Issue cards */
.brief-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .brief-rail {
    grid-template-columns: 1fr 1fr;
  }
}

.brief-issue {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition:
    transform var(--duration-ui) var(--ease-out),
    box-shadow var(--duration-ui) var(--ease-out),
    border-color var(--duration-ui) var(--ease-out);
}

.brief-issue:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

.brief-issue:active {
  transform: scale(0.99);
}

.brief-issue-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), rgba(191, 90, 242, 0.7));
  opacity: 0.85;
}

.brief-issue-body {
  padding: 1.25rem 1.35rem 1.15rem 1.45rem;
}

.brief-issue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.brief-issue-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}

.brief-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.brief-chip-ok {
  background: var(--c-emerald-50);
  color: var(--c-emerald-700);
  border-color: rgba(48, 209, 88, 0.28);
}

.brief-chip-mute {
  background: var(--btn-secondary-bg);
  color: var(--text-muted);
  border-color: var(--border-light);
}

.brief-issue-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0 0 0.65rem;
  color: var(--text-primary);
  transition: color var(--duration-fast) var(--ease-out);
}

.brief-issue:hover .brief-issue-title {
  color: var(--primary);
}

.brief-issue-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.brief-issue-stats strong {
  color: var(--text-primary);
  font-weight: 600;
}

.brief-issue-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
}

.brief-issue-arrow {
  display: inline-block;
  transition: transform var(--duration-ui) var(--ease-out);
}

.brief-issue:hover .brief-issue-arrow {
  transform: translateX(3px);
}

/* Empty / buttons */
.app-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
}

.app-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-secondary-bg);
  color: var(--text-muted);
}

.app-empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.app-empty-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 auto 1.25rem;
  max-width: 22rem;
  line-height: 1.5;
}

.app-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--primary);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--duration-press) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

.app-btn-primary:hover {
  background: var(--primary-hover);
}

.app-btn-primary:active {
  transform: scale(0.97);
}

.app-btn-primary.is-ok {
  background: var(--green);
}

.app-btn-primary.is-err {
  background: var(--red);
}

.app-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.app-btn-secondary,
.app-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--btn-secondary-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform var(--duration-press) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

.app-btn-secondary:hover,
.app-btn-ghost:hover {
  background: var(--btn-secondary-hover-bg);
  color: var(--text-primary);
}

.app-btn-secondary:active,
.app-btn-ghost:active {
  transform: scale(0.97);
}

.app-btn-secondary.is-ok {
  border-color: rgba(48, 209, 88, 0.35);
  color: var(--c-emerald-700);
  background: var(--c-emerald-50);
}

/* Builder */
.builder-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.builder-title {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0.15rem 0 0.35rem;
}

.builder-window {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.builder-sel-hint strong {
  color: var(--primary);
}

.builder-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.builder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 960px) {
  .builder-grid {
    grid-template-columns: minmax(0, 1fr) 20rem;
  }
}

.builder-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition:
    border-color var(--duration-ui) var(--ease-out),
    box-shadow var(--duration-ui) var(--ease-out),
    background-color var(--duration-ui) var(--ease-out);
}

.builder-card.is-selected {
  border-color: var(--primary-border);
  background: color-mix(in srgb, var(--primary-light) 70%, var(--bg-card));
  box-shadow: var(--shadow-card), 0 0 0 1px var(--primary-border);
}

.builder-check {
  padding-top: 0.2rem;
  cursor: pointer;
}

.builder-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.builder-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text-primary);
  cursor: pointer;
}

.builder-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: var(--btn-secondary-bg);
}

.builder-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0.4rem 0 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.builder-type {
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.6875rem;
}

.builder-type.is-news {
  background: var(--c-blue-100);
  color: var(--c-blue-700);
}

.builder-type.is-paper {
  background: var(--c-purple-100);
  color: var(--c-purple-700);
}

.builder-summary {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 0.35rem;
}

.builder-judgment {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 0.55rem;
}

.builder-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.builder-link {
  font-size: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  max-width: 70%;
}

.builder-link:hover {
  text-decoration: underline;
}

.builder-fb.is-pos {
  color: var(--c-emerald-700);
  border-color: rgba(48, 209, 88, 0.3);
}

.builder-fb.is-neg {
  color: var(--c-red-700);
  border-color: rgba(255, 69, 58, 0.3);
}

.builder-dock-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  padding: 1rem;
  backdrop-filter: saturate(160%) blur(18px);
}

.builder-dock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.builder-preview {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 16rem;
  overflow: auto;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--btn-secondary-bg);
  border: 1px solid var(--hairline);
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

.builder-dock-actions {
  display: flex;
  gap: 0.5rem;
}

.builder-dock-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .brief-issue,
  .brief-issue-arrow,
  .app-admin-link,
  .app-btn-primary,
  .app-btn-secondary {
    transition: none !important;
  }
  .brief-issue:hover {
    transform: none;
  }
}
