
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/cinzel.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-serif-4.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2');
}



:root {
  --bg-primary: #e8e6e1;
  --bg-card: #fbfaf7;
  --qr-bg: #ffffff;            
  --bg-subtle: #f3f1ec;
  --bg-input: #fdfcfa;         

  --border-subtle: #d9d5cc;
  --border-medium: #bfb9ad;
  --border-focus: #0f2744;

  --text-main: #0b1b30;        
  --text-headings: #0b1b30;    
  --text-body: #1c2a3d;        
  --text-muted: #2f3e52;       
  --text-dim: #46566b;         

  --royal-navy: #0f2744;
  --border-active: #0f2744;       
  --royal-navy-light: #e9eef6;
  --royal-gold: #b8860b;
  --royal-gold-light: #fcf5dc;  
  --royal-gold-border: #e2c275;
  --royal-gold-dark: #854d0e;

  --p1-sapphire: #1e40af;
  --p1-sapphire-bg: #e9eef8;
  --p1-sapphire-border: #c3cfe8;

  --p2-amethyst: #6b21a8;
  --p2-amethyst-bg: #f1eaf8;
  --p2-amethyst-border: #dccdec;

  --p3-burgundy: #991b1b;
  --p3-burgundy-bg: #faf0ee; 
  --p3-burgundy-border: #ecc9c9;

  --p4-emerald: #047857;
  --p4-emerald-bg: #e8f3ed;
  --p4-emerald-border: #bfe0d0;

  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-card-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-card-sans: 'Inter', sans-serif;
  --fs-xs: 0.75rem;    
  --fs-sm: 0.8125rem;  
  --fs-md: 0.875rem;   
  --fs-base: 0.9375rem; 
  --fs-lg: 1rem;       
  --fs-xl: 1.125rem;   
  --fs-2xl: 1.25rem;   
  --fs-3xl: 1.5rem;    

  --radius-sm: 8px;   
  --radius-md: 8px;   
  --radius-lg: 8px;   
  --radius-xl: 10px;
  --dialog-sm: 480px;
  --dialog-md: 660px;
  --dialog-wide: 960px;
  --expanded-height: 960px;    
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px rgba(11, 27, 48, 0.08);
  --shadow-card: 0 1px 0 rgba(11, 27, 48, 0.05), 0 2px 6px rgba(11, 27, 48, 0.06);
  --shadow-panel: 0 1px 2px rgba(11, 27, 48, 0.05), 0 6px 18px -6px rgba(11, 27, 48, 0.12); 
  --shadow-hover: 0 2px 4px rgba(11, 27, 48, 0.08), 0 8px 20px -4px rgba(11, 27, 48, 0.12);
  --shadow-pop: 0 2px 6px rgba(11, 27, 48, 0.08), 0 24px 56px -12px rgba(11, 27, 48, 0.28);
  --ring-focus: 0 0 0 3px rgba(15, 39, 68, 0.12);
  --ring-focus-inset: inset 0 0 0 3px rgba(15, 39, 68, 0.12);  
  --shadow-knob: 0 1px 2px rgba(15, 23, 42, 0.25);             
  --btn-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --btn-highlight-hover: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --btn-press: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  --spinner-track: rgba(255, 255, 255, 0.3);                   

  --bg-tint: #e8eef6;
  --bg-tint-strong: #d6e0ee;
  --navy-solid: #0f2744;          
  --navy-solid-hover: #1a3a63;
  --text-on-solid: #ffffff;       
  --text-on-gold: #0b1b30;        
  --ring-gold: 0 0 0 3px rgba(184, 134, 11, 0.35);
  --text-faint: #526075;          
  --text-faint2: #8a96a6;         
  --link-deep: #1e3a8a;
  --ok-text: #166534;
  --border-blue: #bccbe0;
  --border-blue-strong: #8fa6c8;
  --overlay: rgba(15, 23, 42, 0.45);
  --wave-faint: rgba(255, 255, 255, 0.1);
  --wave-soft: rgba(255, 255, 255, 0.35);
  --wave-bright: rgba(255, 255, 255, 0.8);
  --warn-bg: #fef3c7;
  --warn-border: #fde68a;
  --warn-text: #92400e;
  --error-text: #991b1b;
  --error-border: #fecaca;

  --footer-bg: #0b1b30;
  --footer-surface: #13263f;
  --footer-heading: #ffffff;
  --footer-text: #dbe3ee;
  --footer-dim: #b3c0d1;
  --footer-faint: #8d9bb0;
  --footer-line: #22385a;
  --footer-line-strong: #33507a;
  --footer-gold-text: #e2c275;
  --footer-ok: #5fd38d;

  --ill-fill: #dbe4f0;
  --ill-gold-fill: #fbefc8;

  --band-bg: #0f2744;
  --band-text: #ffffff;
  --band-muted: #b7c3d4;
  --band-gold: #d9ad3c;
  --band-border: #34507a;
  --band-hover: #1a3a63;
  --band-ring: 0 0 0 3px rgba(255, 255, 255, 0.35);

  --share-whatsapp: #25d366;
  --share-facebook: #0866ff;
  --share-x: #000000;
  --share-linkedin: #0a66c2;
  --share-telegram: #26a5e4;
  --share-reddit: #ff4500;
}



*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

textarea {
  resize: none;
}

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-primary);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-primary);
  background-image: none !important;
}

:root {
  --page-gutter: clamp(2rem, 9vw - 4rem, 6rem);
  --page-max: calc(1610px + 2 * var(--page-gutter));
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.75rem var(--page-gutter) 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-bar-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}



.site-header {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--band-bg);
  color: var(--band-text);
  border-top: 4px solid var(--royal-gold);
  box-shadow: var(--shadow-sm);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 82px;
  padding-block: 1.1rem;
}

.header-brand-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.header-brand-link:hover {
  opacity: 0.85;
}

.logo-wrapper {
  position: relative;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-svg-logo {
  width: 46px;
  height: 46px;
}

.site-header .brand-svg-logo rect {
  stroke: var(--band-muted);
  stroke-width: 1.5;
}

.header-brand-title-wrap {
  display: flex;
  align-items: center;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--band-text);
  margin: 0;
  line-height: 1.1;
}

.header-brand-badges {
  display: flex;
  align-items: center;
  margin-left: 0.35rem;
  margin-right: auto;
}

.editorial-edition-tag {
  display: inline-flex;
  align-items: center;
  padding-left: 1rem;
  border-left: 1px solid var(--band-border);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.75rem;
  color: var(--band-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand-tm {
  font-family: var(--font-sans);
  font-size: 0.5em;
  font-weight: 600;
  line-height: 0;
  vertical-align: 0.85em;
  margin-left: 2px;
  letter-spacing: 0;
  color: inherit;
  opacity: 0.85;
}

.royal-gold-text {
  color: var(--royal-gold);
  font-weight: inherit;
}

.site-header .royal-gold-text {
  color: var(--band-gold);
}

.header-end {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.site-header :focus-visible {
  outline: none;
  box-shadow: var(--band-ring);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
}

.site-menu li {
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--band-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--band-text);
  background: var(--band-hover);
}

.nav-link.is-active {
  color: var(--band-text);
  box-shadow: inset 0 -2px 0 var(--band-gold);
  border-radius: 0;
}

.btn-nav-link {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: inherit;
}

.btn-mobile-nav {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-left: 0.25rem;
  background: transparent;
  border: 1.5px solid var(--band-border);
  border-radius: var(--radius-sm);
  color: var(--band-text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-mobile-nav:hover {
  background: var(--band-hover);
  border-color: var(--band-muted);
}

.control-label-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}




.tools-strip {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.tools-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  column-gap: 0.6rem;
  row-gap: 2px;
  min-height: 28px;
  padding-block: 2px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.4;
}

.tools-strip ~ .app-container {
  padding-top: 1rem;
}

.tools-strip-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tools-strip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: stretch;
  row-gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools-strip-list li {
  display: flex;
  background: var(--bg-card);
}

.tools-strip-list li + li {
  border-left: 1px solid var(--border-subtle);
}

.tools-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 21px;
  padding: 0 9px;
  font-weight: 600;
  line-height: 1;
  color: var(--royal-navy);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.tools-strip-btn:hover {
  background: var(--bg-tint);
}

.tools-strip-btn:focus-visible {
  outline: none;
  background: var(--bg-tint);
  box-shadow: inset 0 0 0 2px var(--border-focus);
}

.tools-strip-icon {
  flex-shrink: 0;
  color: var(--royal-gold);
}

@media (max-width: 480px) {
  .tools-strip-btn {
    gap: 0;
    padding: 0 7px;
    font-size: var(--fs-xs);
  }

  .tools-strip-icon {
    display: none;
  }
}

@media (max-width: 340px) {
  .tools-strip-btn {
    padding: 0 5px;
  }
}


.thinking-dashboard {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.6rem; 
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), padding 0.4s ease;
}

.dash-details {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 1.15rem;
  transition: grid-template-rows 0.4s ease, margin-top 0.4s ease, visibility 0s linear 0s;
}

.dash-details-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.thinking-dashboard.is-collapsed {
  padding-block: 0.95rem;
}

.thinking-dashboard.is-collapsed .dash-details {
  grid-template-rows: 0fr;
  margin-top: 0;
  visibility: hidden; 
  transition: grid-template-rows 0.4s ease, margin-top 0.4s ease, visibility 0s linear 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  .thinking-dashboard,
  .dash-details,
  .thinking-dashboard.is-collapsed .dash-details {
    transition: none;
  }
}

.btn-outline-sm.dash-toggle {
  position: relative;
  width: 30px;
  height: 30px;
  margin-left: 0.4rem;
  padding: 0;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-outline-sm.dash-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.btn-outline-sm.dash-toggle:active {
  transform: none;
}

.dash-toggle-labels {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dash-toggle-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: rotate var(--transition-fast);
}

.dash-toggle[aria-expanded="true"] .dash-toggle-icon {
  rotate: 180deg;
}

.dash-toggle-label {
  grid-area: 1 / 1;
  text-align: center;
}

.dash-toggle[aria-expanded="true"] .dash-toggle-show,
.dash-toggle[aria-expanded="false"] .dash-toggle-hide {
  visibility: hidden;
}

.dashboard-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
}

.dash-title-group {
  display: flex;
  align-items: center;
  gap: 0.95rem; 
  min-width: 0;
  flex-shrink: 1;
}

.dash-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--royal-navy-light);
  border: 1px solid var(--border-blue);
  color: var(--royal-navy);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.thinking-dashboard.is-intro .dash-icon-work,
.thinking-dashboard.is-done .dash-icon-work,
.thinking-dashboard:not(.is-intro):not(.is-done) .dash-icon-calm {
  display: none;
}

.thinking-dashboard.is-generating .dash-icon polyline {
  stroke-dasharray: 100;
  animation: dashTrace 1.6s ease-in-out infinite;
}

@keyframes dashTrace {
  0% { stroke-dashoffset: 100; }
  60%, 100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-dashboard.is-generating .dash-icon polyline {
    animation: none;
  }
}

.dash-title {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--royal-navy);
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-sub-badge-loader {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.dash-sub-badge-loader i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: 0.25;
  animation: viewpointDots 1.4s ease-in-out infinite;
}

.dash-sub-badge-loader i:nth-child(2) { animation-delay: 0.175s; }
.dash-sub-badge-loader i:nth-child(3) { animation-delay: 0.35s; }
.dash-sub-badge-loader i:nth-child(4) { animation-delay: 0.525s; }

@keyframes viewpointDots {
  0%, 55%, 100% { opacity: 0.25; }
  20% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-sub-badge-loader i {
    animation: none;
    opacity: 1;
  }
}

.dash-telemetry {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.thinking-dashboard.is-intro .dash-work-only,
.thinking-dashboard.is-done .dash-work-only,
.thinking-dashboard.is-intro .dash-telemetry,
.thinking-dashboard:not(.is-intro) .dash-intro-only,
.thinking-dashboard:not(.is-intro):not(.is-done) .dash-calm-line,
.thinking-dashboard:not(.is-done) .dash-done-only,
.thinking-dashboard.is-done .dash-work-pill,
.dash-promises li[hidden] {
  display: none;
}

.thinking-dashboard.is-done .dash-receipt {
  margin-left: auto;
}

.thinking-dashboard.is-intro .dashboard-header-bar,
.thinking-dashboard.is-done .dashboard-header-bar {
  flex-wrap: wrap;
  row-gap: 0.6rem;
}

.thinking-dashboard.is-intro .dash-title-group,
.thinking-dashboard.is-done .dash-title-group {
  flex-wrap: nowrap;
}

.thinking-dashboard.is-intro .dash-title,
.thinking-dashboard.is-done .dash-title {
  font-size: var(--fs-2xl);
  white-space: normal;
  flex-shrink: 1;
  min-width: 0;
}

.dash-accent {
  color: var(--royal-gold-dark);
}

.dash-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.dash-promises li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.dash-promises li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-faint2);
  flex-shrink: 0;
}

.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0.95rem;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
}

.telemetry-pill + .telemetry-pill {
  border-left: 1px solid var(--border-medium);
}

.telemetry-pill[hidden] {
  display: none;
}

.thinking-dashboard:not(.is-collapsed) #metric-cores-pill {
  display: none;
}

.telemetry-key {
  color: var(--text-dim);
  font-weight: 600;
  font-size: var(--fs-xs);
}

.telemetry-val {
  color: var(--royal-navy);
  font-weight: 700;
}

#metric-latency {
  display: inline-block;
  min-width: 5ch;
}

.pipeline-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  position: relative;
}

.pipeline-stage {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.05rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  position: relative;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.pipeline-stage:hover {
  border-color: var(--border-medium);
}

.pipeline-stage.active-stage {
  background: var(--royal-gold-light);
  border-color: var(--royal-gold);
  border-left: 3px solid var(--royal-gold);
}

.pipeline-stage.completed-stage {
  background: var(--p4-emerald-bg);
  border-color: var(--p4-emerald-border);
  border-left: 3px solid var(--p4-emerald);
}

.pipeline-stage.active-stage.stage-working {
  background: var(--bg-tint);
  border-color: var(--border-active);
  border-left: 3px solid var(--royal-gold);
  position: relative;
  overflow: hidden;
}

.pipeline-stage.active-stage.stage-working::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--royal-gold);
}


.pipeline-stage.active-stage.stage-working .stage-icon-wrap {
  background: var(--navy-solid);
  color: var(--text-on-solid);
}

.stage-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
}

.active-stage .stage-icon-wrap {
  background: var(--royal-gold);
  color: var(--text-on-solid);
}

.completed-stage .stage-icon-wrap {
  background: var(--p4-emerald);
  color: var(--text-on-solid);
}

.stage-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stage-index {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  font-weight: 600;
}

.stage-name {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-connector {
  position: absolute;
  right: -0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.6rem;
  height: 2px;
  background: var(--border-medium);
  z-index: 2;
  border-radius: 1px;
}

.thinking-stream-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.15rem;
  background: var(--bg-subtle);
  border-bottom: 1.5px solid var(--border-subtle);
}

.terminal-title {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 600;
}

#btn-toggle-terminal {
  display: inline-grid;
}

#btn-toggle-terminal:active {
  transform: none;
}

.autoscroll-label {
  grid-area: 1 / 1;
  text-align: center;
}

#btn-toggle-terminal[aria-pressed="true"] .autoscroll-off,
#btn-toggle-terminal[aria-pressed="false"] .autoscroll-on {
  visibility: hidden;
}

.stream-content {
  padding: 0.85rem 1.15rem;
  font-size: var(--fs-md);
  height: 82px; 
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.6;
  background: var(--bg-card);
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
  mask-image: linear-gradient(to bottom, transparent, currentColor 0.8rem,
    currentColor calc(100% - 0.8rem), transparent);
}

.log-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.log-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-1px);
}

.core-cyan { color: var(--p1-sapphire); }
.core-purple { color: var(--p2-amethyst); }
.core-rose { color: var(--p3-burgundy); }
.core-emerald { color: var(--p4-emerald); }
.core-sys { color: var(--royal-navy); }

.log-msg {
  flex: 1;
  min-width: 0;
  color: var(--text-main);
  font-weight: 500;
}

.dashboard-progress-track {
  width: 100%;
  height: 3px;
  background: var(--border-subtle);
  position: relative;
}

.dashboard-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--royal-gold);
  transition: width 240ms ease;
}

@keyframes spinMini {
  to {
    transform: rotate(360deg);
  }
}




.main-workspace {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 1.6rem;
  align-items: stretch;
}

.left-input-panel {
  display: flex;
  flex-direction: column;
}

.left-input-panel > .panel-card {
  flex: 1 1 auto;
}

.panel-card {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  background: var(--bg-card);
  box-sizing: border-box;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-shrink: 0;
}

.panel-header > div:last-child {
  min-width: 0;
}

.panel-header-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--royal-navy-light);
  border: 1px solid var(--border-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--royal-navy);
  flex-shrink: 0;
}

.panel-header-icon.is-drawing path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ask-icon-draw 1.4s ease-in-out forwards;
}

@keyframes ask-icon-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .panel-header-icon.is-drawing path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.panel-title {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 600;
  color: var(--royal-navy);
  letter-spacing: -0.005em;
}

.panel-subtitle {
  font-size: var(--fs-md);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-chips-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-shrink: 0;
}

.chips-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chips-label {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--royal-gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition-fast);
}

.btn-text-link:hover {
  color: var(--royal-gold-dark);
  text-decoration: underline;
}

.chips-list {
  --chip-h: 28px;
  --chip-gap: 6px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: var(--chip-gap);
  height: calc(2 * var(--chip-h) + var(--chip-gap));
  overflow: hidden;
}

.chip-btn {
  box-sizing: border-box;
  height: var(--chip-h);
  line-height: 16px;
  max-width: 100%;
  background: var(--bg-tint);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 5px 10px;
  color: var(--text-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.chip-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-color: var(--royal-navy);
}

.textarea-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  flex: 1 1 auto;
  min-height: 190px;
}

.textarea-wrapper:focus-within {
  border-color: var(--royal-navy);
  box-shadow: var(--ring-focus);
}

.message-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 0.95rem 1.15rem;
  font-family: inherit;
  font-size: var(--fs-lg);
  line-height: 1.65;
  resize: none;
  flex: 1 1 auto;
  height: 150px;
  min-height: 150px;
  overflow-y: auto;
  box-sizing: border-box;
}

.message-textarea:focus {
  outline: none;
}

.guest-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.6rem;
  min-height: 36px;
  margin-top: -0.25rem;
  padding: 0.4rem 0.75rem 0.4rem 0.9rem;
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  line-height: 1.35;
  color: var(--text-muted);
}

.guest-note[hidden] {
  display: none;
}

.guest-note > * {
  transition: opacity 0.2s ease;
}

.guest-note.is-pending > * {
  visibility: hidden;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .guest-note > * {
    transition: none;
  }
}

.guest-note.is-own {
  border-left: 3px solid var(--royal-gold);
  color: var(--text-main);
}

.guest-note-text {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  min-height: calc(2em * 1.35);
  transition: opacity 0.25s ease;
}

.guest-note-text.is-fading {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .guest-note-text {
    transition: none;
  }
}

.guest-note-actions {
  display: inline-flex;
  flex: none;
  gap: 0.4rem;
  margin-left: auto;
}

.guest-note-actions[hidden] {
  display: none;
}

.guest-note-signin {
  padding: 3px 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--royal-navy);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.guest-note-signin:hover {
  border-color: var(--royal-navy);
}

.guest-note-signin:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.guest-note-action {
  flex: none;
  padding: 3px 9px;
  background: var(--navy-solid);
  border: 1px solid var(--navy-solid);
  border-radius: var(--radius-sm);
  color: var(--text-on-solid);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.guest-note-action:hover {
  background: var(--navy-solid-hover);
}

.guest-note-action:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}


.message-textarea::placeholder {
  color: var(--text-faint);
  font-size: var(--fs-md);
}

.textarea-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px);
  flex-shrink: 0;
}

.char-counter {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
}

.btn-micro {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-micro:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-micro:active {
  transform: scale(0.94);
}

.btn-micro:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}



.framework-selector-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-shrink: 0;
}

.framework-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  height: 28px;
  gap: 8px;
}

.framework-selector-label {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.framework-active-hint {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--royal-navy);
  background: var(--bg-tint);
  border: 1px solid var(--border-medium);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 200px;
  text-align: right;
  flex-shrink: 1;
}

.framework-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-items: stretch;
}

.framework-tile {
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  outline: none;
  min-height: 106px;
  height: 100%;
  box-sizing: border-box;
}

.framework-tile:hover {
  background: var(--bg-primary);
  border-color: var(--text-faint2);
}

.framework-tile:active {
  background: var(--bg-subtle);
}

.framework-tile:focus-visible {
  border-color: var(--border-active);
  box-shadow: var(--ring-focus);
}

.framework-tile.active {
  background: var(--bg-tint);
  border-color: var(--border-active);
  box-shadow: inset 0 0 0 1px var(--royal-navy);
}

.tile-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tile-icon-badge {
  color: var(--royal-navy);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.framework-tile.active .tile-icon-badge {
  background: var(--bg-tint-strong);
  border-color: var(--border-blue);
}

.tile-radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: var(--bg-card);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.framework-tile.active .tile-radio-indicator {
  background: var(--royal-gold);
  border-color: var(--royal-gold-dark);
  color: var(--text-on-gold);
  animation: tile-check-pop 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tile-check-pop {
  0%   { transform: scale(0.55); }
  60%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.check-icon {
  width: 11px;
  height: 11px;
  display: block;
}

.tile-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile-title {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.framework-tile.active .tile-title {
  color: var(--royal-navy);
}

.tile-desc {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-sm);
  color: var(--text-faint);
  font-weight: 500;
  line-height: 1.35;
  min-height: 2.7em;
}

.tile-keyword-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-keyword + .tile-keyword::before {
  content: '\2022';
  margin: 0 5px;
  color: var(--border-medium);
}

.framework-tile.active .tile-desc {
  color: var(--text-body);
  font-weight: 500;
}

.framework-tile.active .tile-keyword + .tile-keyword::before {
  color: var(--royal-gold);
}

@media (prefers-reduced-motion: reduce) {
  .framework-tile.active .tile-radio-indicator {
    animation: none;
  }
}



.intelligence-selector-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.15rem;
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}

.intel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  gap: 8px;
}

.intel-selector-label {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.intel-badge-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--royal-navy);
  background: var(--bg-tint);
  border: 1px solid var(--border-medium);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  font-family: var(--font-sans);
}

.intel-buttons-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  align-items: stretch;
}

.intel-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  outline: none;
  box-sizing: border-box;
}

.intel-btn:hover {
  background: var(--bg-primary);
  border-color: var(--text-faint2);
}

.intel-btn:focus-visible {
  border-color: var(--border-active);
  box-shadow: var(--ring-focus);
}

.intel-btn.active {
  background: var(--bg-tint);
  border-color: var(--border-active);
  border-width: 2px;
}

.intel-btn-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.intel-icon {
  display: inline-flex;
  color: var(--royal-navy);
}

.intel-name {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.intel-btn.active .intel-name {
  color: var(--royal-navy);
}

.intel-sub {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.intel-btn.active .intel-sub {
  color: var(--royal-navy);
  font-weight: 600;
}

.intel-buttons-group--tool {
  grid-template-columns: repeat(2, var(--tool-btn-w, 8rem));
  gap: 0.5rem;
}

.intel-buttons-group--tool .intel-btn {
  height: var(--tool-btn-h, 2.5rem);
  padding: 0 10px;
}

.intel-buttons-group--tool .intel-btn-header {
  margin-bottom: 0;
}

.intel-buttons-group--tool .intel-sub {
  display: none;
}



.action-buttons-wrap {
  margin-top: 0.5rem;
  flex-shrink: 0;
  container-type: inline-size;
}

.cta-promises {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 0.25rem 1rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
}

.cta-promises li {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.cta-promises li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-faint2);
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .cta-promises {
    grid-template-columns: auto;
  }
}

.btn-primary-action {
  position: relative;
  width: 100%;
  padding: 1.05rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--royal-gold);
  background: var(--navy-solid);
  color: var(--text-on-solid);
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--btn-highlight), var(--shadow-card);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary-action:hover {
  background: var(--navy-solid-hover);
  border-color: var(--royal-gold-dark);
  box-shadow: var(--btn-highlight-hover);
}

.btn-primary-action:hover:not(.generating) {
  box-shadow: var(--btn-highlight-hover), var(--shadow-hover);
}

.btn-primary-action:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: var(--btn-press);
}

.btn-primary-action:focus-visible {
  outline: none;
  box-shadow: var(--ring-gold);
}

.btn-primary-action.generating {
  background: var(--navy-solid);
  border-color: var(--royal-gold);
  cursor: wait;
  position: relative;
  overflow: hidden;
}

.btn-primary-action.generating::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: var(--royal-gold);
}

.btn-primary-action.generating .btn-action-icon {
  animation: spinMini 1.2s linear infinite;
}

.btn-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-action-icon {
  width: 20px;
  height: 20px;
}




.decision-compass-bar {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.35rem 1.6rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.compass-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.compass-bar-header-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.compass-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--royal-navy-light);
  border: 1px solid var(--border-blue);
  color: var(--royal-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compass-icon-badge svg {
  width: 17px;
  height: 17px;
}

.compass-bar-title-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 0.7rem;
}

.compass-bar-title-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.compass-bar-title {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--royal-navy);
  letter-spacing: -0.005em;
  margin: 0;
}

.compass-bar-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

.compass-bar-pillars-grid {
  display: none !important;
}

.decision-compass-bar:has(#compass-answer[hidden]) .compass-bar-pillars-grid {
  display: none;
}

.compass-bar-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.compass-bar-pillars-grid .pillar-question {
  display: none;
}

.compass-bar-pillar {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.5rem 0.45rem 0.25rem;
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.compass-bar-pillar:hover {
  background: var(--bg-subtle);
}

.compass-bar-pillar:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.pillar-open {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-dim);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.compass-bar-pillar.pillar-cyan:hover .pillar-open { color: var(--p1-sapphire); border-color: var(--p1-sapphire); }
.compass-bar-pillar.pillar-purple:hover .pillar-open { color: var(--p2-amethyst); border-color: var(--p2-amethyst); }
.compass-bar-pillar.pillar-rose:hover .pillar-open { color: var(--p3-burgundy); border-color: var(--p3-burgundy); }
.compass-bar-pillar.pillar-emerald:hover .pillar-open { color: var(--p4-emerald); border-color: var(--p4-emerald); }

.pillar-indicator {
  width: 4px;
  border-radius: 2px;
  flex-shrink: 0;
}

.compass-bar-pillar.pillar-cyan .pillar-indicator { background: var(--p1-sapphire); }
.compass-bar-pillar.pillar-purple .pillar-indicator { background: var(--p2-amethyst); }
.compass-bar-pillar.pillar-rose .pillar-indicator { background: var(--p3-burgundy); }
.compass-bar-pillar.pillar-emerald .pillar-indicator { background: var(--p4-emerald); }

.compass-bar-pillar.pillar-cyan:hover { border-color: var(--p1-sapphire-border); }
.compass-bar-pillar.pillar-purple:hover { border-color: var(--p2-amethyst-border); }
.compass-bar-pillar.pillar-rose:hover { border-color: var(--p3-burgundy-border); }
.compass-bar-pillar.pillar-emerald:hover { border-color: var(--p4-emerald-border); }

.pillar-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.pillar-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pillar-label {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pillar-question {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.compass-guides-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.5rem auto 0;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  color: var(--text-muted);
}

.compass-guides-line svg {
  flex-shrink: 0;
  color: var(--royal-gold);
}

.compass-bar-note {
  position: relative;
  width: 80%;
  margin: -0.5rem auto 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--fs-xs);
  line-height: 1.6;
  letter-spacing: 0.005em;
  color: var(--text-faint);
}

.compass-bar-note-lead {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0;
}

.compass-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.compass-foot .compass-guides-line,
.compass-foot .compass-bar-note {
  width: auto;
  margin: 0;
  padding: 0;
  line-height: 1.45;
}

.compass-foot .compass-bar-note {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.compass-foot .compass-bar-note::before {
  content: "";
  flex-shrink: 0;
  width: 1px;
  height: 1em;
  background: var(--border-medium);
}

.compass-foot .compass-bar-note-tail {
  display: none;
}

@media (max-width: 1100px) {
  .compass-bar-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .compass-bar-note {
    width: 100%;
    white-space: normal;
    text-wrap: balance;
  }
  .compass-foot {
    flex-direction: column;
    gap: 0.25rem;
  }
  .compass-foot .compass-bar-note::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .compass-bar-pillars-grid {
    grid-template-columns: 1fr;
  }
  .compass-bar-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


.right-outputs-panel {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0; 
  padding: 1.6rem; 
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
}

.answer-brief {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "icon label link" "icon text link";
  align-items: center;
  gap: 2px 0.75rem;
  padding: 0.75rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--royal-gold);
  border-radius: var(--radius-sm);
  animation: cardReveal 300ms ease-out backwards;
}

.answer-brief[hidden] {
  display: none;
}

.answer-brief-icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy-solid);
  color: var(--text-on-solid);
}

.answer-brief-icon svg[hidden] {
  display: none;
}

.answer-brief-actions {
  grid-area: link;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.answer-brief-actions:not(:has(> :not([hidden]))) {
  display: none;
}

.answer-brief-actions [hidden] {
  display: none;
}

.answer-brief-label {
  grid-area: label;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--royal-navy);
}

.answer-brief-text {
  grid-area: text;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-body);
  outline: none; 
}

.answer-brief-link {
  padding: 0.45rem 0.8rem;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  color: var(--royal-navy);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.answer-brief-link:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
}

.answer-brief-link:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

@media (max-width: 640px) {
  .answer-brief {
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon label" "icon text" "link link";
    gap: 4px;
  }

  .answer-brief-actions {
    justify-self: start;
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .answer-brief {
    animation: none;
  }
}

.outputs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.2rem 0.75rem;
  border-bottom: 1px solid var(--border-medium);
  flex-shrink: 0;
}

.outputs-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex: 1 1 0;
  min-width: 0;
}

.outputs-title-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.outputs-heading-icon {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--royal-navy-light);
  border: 1px solid var(--border-blue);
  color: var(--royal-navy);
}

.outputs-heading {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--royal-navy);
  white-space: nowrap;
  flex-shrink: 0;
}

.outputs-caption {
  display: block;
  min-width: 0;
  font-size: var(--fs-md);
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outputs-caption.is-example-answer {
  color: var(--text-main);
  font-weight: 600;
}

.outputs-caption.is-example-answer:has(.example-chip) {
  font-weight: 500;
}

.example-chip {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
  color: var(--royal-navy);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.outputs-caption .example-chip {
  padding: 0 6px;
  line-height: 1.35;
}

.outputs-quick-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.42rem 0.88rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline-sm:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.btn-outline-sm:active {
  transform: scale(0.98);
}

.btn-outline-sm:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.btn-outline-sm:disabled,
.btn-outline-sm:disabled:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-faint);
  cursor: not-allowed;
  transform: none;
}

.btn-swap {
  display: inline-grid;
}

.btn-swap > * {
  grid-area: 1 / 1;
  place-self: center;
}

.btn-reset-stop {
  justify-content: center;
}

.btn-reset-stop .btn-stop-icon,
.btn-reset-stop .btn-stop-label,
.btn-reset-stop[data-mode="stop"] .btn-reset-icon,
.btn-reset-stop[data-mode="stop"] .btn-reset-label {
  visibility: hidden;
}

.btn-reset-stop[data-mode="stop"] .btn-stop-icon,
.btn-reset-stop[data-mode="stop"] .btn-stop-label {
  visibility: visible;
}

.quad-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.quad-grid-container > .perspective-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.quad-grid-container .card-header,
.quad-grid-container .perspective-card.is-drafting::before {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.quad-grid-container .card-footer {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.perspective-card {
  position: relative;
  font-family: var(--font-card-sans);
  background: var(--bg-card);
  border: 0;
  display: flex;
  flex-direction: column;
  min-height: 632px;
  height: 100%;
}

.perspective-card.is-drafting::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--band-width, 4px));
  left: 0;
  right: 0;
  height: var(--band-width, 4px);
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--wave-faint) 22%,
    var(--wave-soft) 38%,
    var(--wave-bright) 50%,
    var(--wave-soft) 62%,
    var(--wave-faint) 78%,
    transparent 100%
  ) no-repeat;
  background-size: 220px 100%;
  background-position: -220px 0;
  animation: calmWhiteWave 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  will-change: background-position;
  pointer-events: none;
  z-index: 5;
}

.perspective-card.box-cyan.is-drafting::before {
  animation-delay: 0s;
}

.perspective-card.box-purple.is-drafting::before {
  animation-delay: 0.3s;
}

.perspective-card.box-rose.is-drafting::before {
  animation-delay: 0.6s;
}

.perspective-card.box-emerald.is-drafting::before {
  animation-delay: 0.9s;
}

@media (prefers-reduced-motion: reduce) {
  .perspective-card.is-drafting::before {
    animation: none;
    background: none;
  }
}

@keyframes calmWhiteWave {
  0% {
    background-position: -220px 0;
  }
  100% {
    background-position: calc(100% + 220px) 0;
  }
}

.perspective-card.box-cyan,
.box-cyan {
  border-top: var(--band-width, 4px) solid var(--p1-sapphire) !important;
}

.perspective-card.box-purple,
.box-purple {
  border-top: var(--band-width, 4px) solid var(--p2-amethyst) !important;
}

.perspective-card.box-rose,
.box-rose {
  border-top: var(--band-width, 4px) solid var(--p3-burgundy) !important;
}

.perspective-card.box-emerald,
.box-emerald {
  border-top: var(--band-width, 4px) solid var(--p4-emerald) !important;
}

.card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "icon title actions"
    "icon sub   sub";
  column-gap: 0.85rem;
  align-items: center;
  align-content: center;
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 105px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.card-header-left,
.card-title-group {
  display: contents;
}

.card-icon-badge { grid-area: icon; }
.perspective-title { grid-area: title; }
.card-actions { grid-area: actions; }
.archetype-label { grid-area: sub; }

.card-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.box-cyan .card-icon-badge { background: var(--p1-sapphire-bg); color: var(--p1-sapphire); border: 1px solid var(--p1-sapphire-border); }
.box-purple .card-icon-badge { background: var(--p2-amethyst-bg); color: var(--p2-amethyst); border: 1px solid var(--p2-amethyst-border); }
.box-rose .card-icon-badge { background: var(--p3-burgundy-bg); color: var(--p3-burgundy); border: 1px solid var(--p3-burgundy-border); }
.box-emerald .card-icon-badge { background: var(--p4-emerald-bg); color: var(--p4-emerald); border: 1px solid var(--p4-emerald-border); }

.card-icon-badge svg {
  width: 20px;
  height: 20px;
}

.card-icon-badge.is-drawing path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: card-icon-draw 1.4s ease-in-out forwards;
}

.card-icon-badge.is-drawing path + path {
  animation-delay: 0.35s;
}

.card-icon-badge.is-drawing circle {
  opacity: 0;
  animation: card-icon-dot 0.3s ease 1.3s forwards;
}

@keyframes card-icon-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes card-icon-dot {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .card-icon-badge.is-drawing path,
  .card-icon-badge.is-drawing circle {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

.perspective-tag {
  font-family: var(--font-card-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  margin-bottom: 3px;
}

.box-cyan .perspective-tag { color: var(--p1-sapphire); }
.box-purple .perspective-tag { color: var(--p2-amethyst); }
.box-rose .perspective-tag { color: var(--p3-burgundy); }
.box-emerald .perspective-tag { color: var(--p4-emerald); }

.card-ready {
  display: none;
}

.quad-grid-container.is-example-hidden .thesis-callout,
.quad-grid-container.is-example-hidden .content-sections {
  display: none;
}

.quad-grid-container.is-example-hidden .card-footer {
  display: none;
}

.quad-grid-container.is-example-hidden .card-ready {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
}

.card-ready-question {
  font-family: var(--font-card-serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  max-width: 22rem;
}

.card-ready-note {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.btn-toggle-example[hidden] {
  display: none;
}

.btn-toggle-example .btn-example-show-icon,
.btn-toggle-example .btn-example-show-label,
.btn-toggle-example[aria-pressed="true"] .btn-example-hide-icon,
.btn-toggle-example[aria-pressed="true"] .btn-example-hide-label {
  visibility: hidden;
}

.btn-toggle-example[aria-pressed="true"] .btn-example-show-icon,
.btn-toggle-example[aria-pressed="true"] .btn-example-show-label {
  visibility: visible;
}

.quad-grid-container.is-example .thesis-text,
.quad-grid-container.is-example .bullet-list li,
.quad-grid-container.is-example .recommendation-text {
  color: var(--text-dim);
}

.perspective-title {
  font-family: var(--font-card-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.archetype-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
  margin-top: 4px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-block: -4px;
}

.card-action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.card-action-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.card-action-btn:disabled,
.card-action-btn:disabled:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-faint);
  cursor: not-allowed;
}

.card-action-btn.is-speaking,
.card-action-btn.is-speaking:hover {
  background: var(--bg-tint);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.btn-tts.is-speaking svg,
.expanded-icon-btn.is-speaking svg {
  display: none !important; 
}

.btn-tts.is-speaking::after,
.expanded-icon-btn.is-speaking::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
}

.card-action-btn:active {
  transform: scale(0.94);
}

.card-action-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.perspective-card {
  container-type: inline-size;
}

.card-action-btn.btn-expand {
  width: auto;
  min-width: 32px;
  padding: 0 9px;
  gap: 6px;
}

.btn-expand-label {
  display: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

@container (min-width: 600px) {
  .btn-expand-label {
    display: inline;
  }
}

.card-fixed-body {
  padding: 1.25rem 1.35rem;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-height: 0;
}

.thesis-callout {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
}

.box-cyan .thesis-callout { border-color: var(--p1-sapphire); background: var(--bg-tint); }
.box-purple .thesis-callout { border-color: var(--p2-amethyst); background: var(--p2-amethyst-bg); }
.box-rose .thesis-callout { border-color: var(--p3-burgundy); background: var(--p3-burgundy-bg); }
.box-emerald .thesis-callout { border-color: var(--p4-emerald); background: var(--p4-emerald-bg); }

.callout-label {
  font-family: var(--font-card-sans);
  font-size: 0.8rem;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.box-cyan .callout-label { color: var(--p1-sapphire); }
.box-purple .callout-label { color: var(--p2-amethyst); }
.box-rose .callout-label { color: var(--p3-burgundy); }
.box-emerald .callout-label { color: var(--p4-emerald); }

.thesis-text {
  font-family: var(--font-card-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
}

.content-sections {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
  justify-content: space-between;
}

.analysis-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-heading {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.perspective-card .section-heading {
  font-family: var(--font-card-sans);
  font-size: 0.8rem;
}

.perspective-card.box-cyan .section-heading { color: var(--p1-sapphire); }
.perspective-card.box-purple .section-heading { color: var(--p2-amethyst); }
.perspective-card.box-rose .section-heading { color: var(--p3-burgundy); }
.perspective-card.box-emerald .section-heading { color: var(--p4-emerald); }

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullet-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.90rem; 
  color: var(--text-body);
  line-height: 1.55;
  font-weight: 450;
  min-height: 45px;
  box-sizing: border-box;
}

.bullet-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 0.65rem;
}

.box-cyan .bullet-list li::before { color: var(--p1-sapphire); }
.box-purple .bullet-list li::before { color: var(--p2-amethyst); }
.box-rose .bullet-list li::before { color: var(--p3-burgundy); }
.box-emerald .bullet-list li::before { color: var(--p4-emerald); }

.recommendation-text {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  border-left: 3.5px solid var(--border-medium);
  font-weight: 500;
  min-height: 56px;
  box-sizing: border-box;
}

.box-cyan .recommendation-text { border-left-color: var(--p1-sapphire); }
.box-purple .recommendation-text { border-left-color: var(--p2-amethyst); }
.box-rose .recommendation-text { border-left-color: var(--p3-burgundy); }
.box-emerald .recommendation-text { border-left-color: var(--p4-emerald); }

.perspective-card.is-writing :is(.thesis-text, .bullet-list li, .recommendation-text) {
  color: transparent;
  user-select: none;
  background-image: linear-gradient(to bottom,
    transparent calc(50% - 0.3rem),
    var(--bg-tint-strong) calc(50% - 0.3rem),
    var(--bg-tint-strong) calc(50% + 0.3rem),
    transparent calc(50% + 0.3rem));
  background-size: 94% 1lh;
  background-repeat: repeat-y;
  background-origin: content-box;
}

.perspective-card.is-writing .bullet-list li:nth-child(2) { background-size: 86% 1lh; }
.perspective-card.is-writing .bullet-list li:nth-child(3) { background-size: 90% 1lh; }
.perspective-card.is-writing .recommendation-text {
  background-image:
    linear-gradient(to bottom,
      transparent calc(50% - 0.3rem),
      var(--bg-tint-strong) calc(50% - 0.3rem),
      var(--bg-tint-strong) calc(50% + 0.3rem),
      transparent calc(50% + 0.3rem)),
    linear-gradient(var(--bg-primary), var(--bg-primary));
  background-size: 88% 1lh, 100% 100%;
  background-repeat: repeat-y, no-repeat;
  background-origin: content-box, padding-box;
  background-clip: content-box, padding-box;
}

.perspective-card.is-writing :is(.thesis-text, .bullet-list li) {
  animation: expandedPlaceholderFade 1.8s ease-in-out infinite;
}

.perspective-card.is-writing .bullet-list li:nth-child(2) { animation-delay: 0.2s; }
.perspective-card.is-writing .bullet-list li:nth-child(3) { animation-delay: 0.4s; }

.perspective-card.is-writing .bullet-list li::before {
  visibility: hidden;
}

#perspective-box-2 { --reveal-card: 80ms; }
#perspective-box-3 { --reveal-card: 160ms; }
#perspective-box-4 { --reveal-card: 240ms; }

.quad-grid-container.is-revealing :is(.thesis-callout, .analysis-section, .card-footer) {
  animation: cardReveal 300ms ease-out backwards;
  animation-delay: calc(var(--reveal-card, 0ms) + var(--reveal-section, 0ms));
}

.quad-grid-container.is-revealing .analysis-section { --reveal-section: 100ms; }
.quad-grid-container.is-revealing .analysis-section + .analysis-section,
.quad-grid-container.is-revealing .card-footer { --reveal-section: 200ms; }

@keyframes cardReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .perspective-card.is-writing :is(.thesis-text, .bullet-list li),
  .quad-grid-container.is-revealing :is(.thesis-callout, .analysis-section, .card-footer) {
    animation: none;
  }
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.85rem 1.35rem;
  background: var(--bg-card); 
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  min-height: 48px;
  gap: 0.75rem;
  flex-shrink: 0;
}




.stance-indicator {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
  line-height: 1.4;
}

.stance-neutral { background: var(--p1-sapphire-bg); color: var(--p1-sapphire); border: 1px solid var(--p1-sapphire-border); }
.stance-bullish { background: var(--p2-amethyst-bg); color: var(--p2-amethyst); border: 1px solid var(--p2-amethyst-border); }
.stance-cautious { background: var(--p3-burgundy-bg); color: var(--p3-burgundy); border: 1px solid var(--p3-burgundy-border); }
.stance-empathic { background: var(--p4-emerald-bg); color: var(--p4-emerald); border: 1px solid var(--p4-emerald-border); }




.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base), display var(--transition-base) allow-discrete;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

@starting-style {
  .modal-backdrop.open {
    opacity: 0;
  }

  .modal-backdrop.open .modal-dialog {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

.modal-dialog {
  width: 100%;
  max-width: 580px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 4.5px solid var(--royal-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: transform var(--transition-base), opacity var(--transition-base);
  overflow: hidden;
}

.modal-backdrop.open .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-backdrop.open.is-filling .modal-dialog {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.modal-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  border: 1px solid var(--royal-gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--royal-gold-dark);
  flex-shrink: 0;
}

.modal-icon svg {
  width: 20px;
  height: 20px;
}

#expand-modal-icon.box-cyan {
  background: var(--p1-sapphire-bg);
  color: var(--p1-sapphire);
  border: 1px solid var(--p1-sapphire-border);
}

#expand-modal-icon.box-purple {
  background: var(--p2-amethyst-bg);
  color: var(--p2-amethyst);
  border: 1px solid var(--p2-amethyst-border);
}

#expand-modal-icon.box-rose {
  background: var(--p3-burgundy-bg);
  color: var(--p3-burgundy);
  border: 1px solid var(--p3-burgundy-border);
}

#expand-modal-icon.box-emerald {
  background: var(--p4-emerald-bg);
  color: var(--p4-emerald);
  border: 1px solid var(--p4-emerald-border);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 600;
  color: var(--royal-navy);
  text-wrap: balance;
}

.modal-desc {
  font-size: var(--fs-md);
  color: var(--text-muted);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-faint);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close-btn {
  flex-shrink: 0;
}

.modal-header > .modal-close-btn {
  align-self: flex-start;
  margin-top: 4px;
}

.modal-close-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.modal-close-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.modal-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-card);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
}

.modal-save-btn {
  width: auto;
  padding: 0.7rem 1.4rem;
  font-size: var(--fs-base);
}

.modal-close-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--royal-navy);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.modal-close-footer:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
}
.modal-close-footer:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.modal-backdrop .btn-primary-action:not(.is-danger):not(:disabled) {
  border-color: var(--navy-solid);
  box-shadow: none;
}
.modal-backdrop .btn-primary-action.is-danger {
  box-shadow: none;
}
.modal-backdrop .btn-primary-action:not(.is-danger):hover:not(.generating):not(:disabled) {
  border-color: var(--navy-solid-hover);
  box-shadow: var(--shadow-card);
}
.modal-backdrop .btn-primary-action:focus-visible:not(.generating):not(:disabled),
.modal-backdrop .btn-primary-action.is-danger:focus-visible {
  box-shadow: var(--ring-gold);
}

.topic-agents-dialog .modal-body {
  gap: 1rem;
}

.topic-agents-dialog .engine-notice-bar--inset {
  padding: 0.75rem 1rem 0.75rem calc(1rem - 2px);
  animation: none;
}

.engine-rows .status-row {
  padding: 0.85rem 1rem;
}

.engine-row-text {
  min-width: 0;
}

.engine-rows .status-row-name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.35;
}

.engine-row-desc {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.engine-rows-foot {
  justify-content: space-between;
}

.engine-rows-caption {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}

#expanded-modal {
  padding: 1rem;
}

.expanded-dialog {
  max-width: var(--dialog-md);
  height: min(var(--expanded-height), calc(100vh - 2rem));
  height: min(var(--expanded-height), calc(100dvh - 2rem));
  display: flex;
  flex-direction: column;
}

.expanded-dialog .modal-header {
  padding: 1.25rem 2rem;
  min-height: 105px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.expanded-dialog .modal-icon {
  width: 38px;
  height: 38px;
}

.expanded-dialog .modal-title {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.expanded-dialog .modal-desc {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 4px;
}

.expanded-dialog .modal-title-wrap,
.expanded-dialog .modal-title-wrap > div {
  min-width: 0;
}

.expanded-dialog .modal-actions-right {
  flex-shrink: 0;
}

.expanded-dialog .expanded-btn-label {
  display: none;
}

.expanded-dialog .expanded-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.expanded-dialog .expanded-icon-btn.is-speaking,
.expanded-dialog .expanded-icon-btn.is-speaking:hover {
  background: var(--bg-tint);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.expanded-dialog .expanded-icon-btn svg {
  width: 15px;
  height: 15px;
}

.expanded-dialog[data-card="p1"] { border-top-color: var(--p1-sapphire); }
.expanded-dialog[data-card="p2"] { border-top-color: var(--p2-amethyst); }
.expanded-dialog[data-card="p3"] { border-top-color: var(--p3-burgundy); }
.expanded-dialog[data-card="p4"] { border-top-color: var(--p4-emerald); }

.expanded-dialog[data-card="p1"] { --expanded-accent: var(--p1-sapphire); }
.expanded-dialog[data-card="p2"] { --expanded-accent: var(--p2-amethyst); }
.expanded-dialog[data-card="p3"] { --expanded-accent: var(--p3-burgundy); }
.expanded-dialog[data-card="p4"] { --expanded-accent: var(--p4-emerald); }

.expanded-dialog.is-drafting {
  border-top-width: 0;
}

.expanded-dialog.is-drafting .modal-header {
  position: relative;
  padding-top: calc(0.8rem + 4.5px);
}

.expanded-dialog.is-drafting .modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4.5px;
  background-color: var(--expanded-accent, var(--royal-gold));
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--wave-faint) 22%,
    var(--wave-soft) 38%,
    var(--wave-bright) 50%,
    var(--wave-soft) 62%,
    var(--wave-faint) 78%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 220px 100%;
  background-position: -220px 0;
  animation: calmWhiteWave 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  will-change: background-position;
  pointer-events: none;
}

.expanded-drafting-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.expanded-dialog .modal-actions-right .btn-outline-sm:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.expanded-placeholder {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.25rem 0;
}

.expanded-placeholder span {
  display: block;
  flex-shrink: 0; 
  height: 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tint-strong);
  animation: expandedPlaceholderFade 1.8s ease-in-out infinite;
}

.expanded-placeholder span:nth-child(3n + 2) { animation-delay: 0.2s; }
.expanded-placeholder span:nth-child(3n) { animation-delay: 0.4s; }

@media (max-width: 640px) {
  .expanded-placeholder span:nth-child(n + 9) {
    display: none;
  }
}

@keyframes expandedPlaceholderFade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .expanded-dialog.is-drafting .modal-header::before,
  .expanded-placeholder span {
    animation: none;
  }

  .expanded-dialog.is-drafting .modal-header::before {
    background-image: none;
  }
}

.expanded-body.box-cyan,
.expanded-body.box-purple,
.expanded-body.box-rose,
.expanded-body.box-emerald {
  border-top: 0 !important;
}

#expand-modal-icon.box-cyan { border-top: 1px solid var(--p1-sapphire-border) !important; }
#expand-modal-icon.box-purple { border-top: 1px solid var(--p2-amethyst-border) !important; }
#expand-modal-icon.box-rose { border-top: 1px solid var(--p3-burgundy-border) !important; }
#expand-modal-icon.box-emerald { border-top: 1px solid var(--p4-emerald-border) !important; }

.expanded-body {
  flex: 1 1 auto;
  font-family: var(--font-card-sans);
  min-height: 0;
  overflow-y: auto;
  --sec-pad-y: 0.5rem;
  --sec-gap: 0.35rem;
  padding: 0.75rem 2rem 0.8rem;
  gap: 0.55rem;
  background: var(--bg-card);
}

.expanded-body > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.expanded-body.is-revealing > * {
  animation: cardReveal 300ms ease-out backwards;
}

.expanded-body.is-revealing > :nth-child(2) { animation-delay: 80ms; }
.expanded-body.is-revealing > :nth-child(3) { animation-delay: 160ms; }
.expanded-body.is-revealing > :nth-child(4) { animation-delay: 240ms; }
.expanded-body.is-revealing > :nth-child(n + 5) { animation-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .expanded-body.is-revealing > * {
    animation: none;
  }
}

.expanded-body.box-cyan { --card-accent: var(--p1-sapphire); }
.expanded-body.box-purple { --card-accent: var(--p2-amethyst); }
.expanded-body.box-rose { --card-accent: var(--p3-burgundy); }
.expanded-body.box-emerald { --card-accent: var(--p4-emerald); }

.expanded-body .thesis-callout,
.expanded-body .detailed-analysis-box,
.expanded-body .analysis-section {
  display: flex;
  flex-direction: column;
  gap: var(--sec-gap);
  min-height: 0;
  margin: 0;
  padding: var(--sec-pad-y) 1.5rem;
  border: 0;
  border-left: 3px solid var(--card-accent);
  border-radius: var(--radius-sm);
}

.expanded-body .detailed-analysis-box,
.expanded-body .analysis-section {
  background: none;
  border-left: 0;
  padding-left: calc(1.5rem + 3px);
  border-radius: 0;
  box-shadow: inset 0 1px 0 var(--border-subtle);
}

.expanded-body .analysis-section.expanded-step {
  background: var(--bg-subtle);
  border-left: 3px solid var(--card-accent);
  padding-left: 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.expanded-body .expanded-step + .analysis-section {
  box-shadow: none;
}

.expanded-body .web-sources-box {
  margin: 0;
}

.expanded-body .callout-label,
.expanded-body .detailed-analysis-title,
.expanded-body .section-heading {
  font-family: var(--font-card-sans);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--card-accent);
  margin: 0;
}

.expanded-body .bullet-list {
  gap: 6px;
}

.expanded-body .bullet-list li {
  font-size: 0.906rem;
  line-height: 1.55;
}

.expanded-body .detailed-analysis-content {
  font-size: 0.875rem;
  line-height: 1.55;
}

.expanded-body .recommendation-text {
  background: none;
  border: 0;
  padding: 0;
}

.expanded-body > * {
  flex-shrink: 0;
}

@media (min-width: 641px) {
  .expanded-body {
    --box-chrome: calc(2 * var(--sec-pad-y) + 0.936rem + var(--sec-gap));
  }

  .expanded-body .thesis-callout {
    height: calc(var(--box-chrome) + 2 * 1rem * 1.55);
  }

  .expanded-body .expanded-reasons {
    height: calc(var(--box-chrome) + 6 * 0.906rem * 1.55 + 12px);
  }

  .expanded-body .expanded-step {
    height: calc(var(--box-chrome) + 2 * 0.92rem * 1.55);
  }

  .expanded-body .expanded-change {
    height: calc(var(--box-chrome) + 2 * 0.97rem * 1.6);
  }

  .expanded-body .detailed-analysis-box {
    flex: 1 1 0;
    min-height: calc(var(--box-chrome) + 3 * 0.875rem * 1.55);
  }

  .expanded-body .thesis-callout,
  .expanded-body .analysis-section,
  .expanded-body .detailed-analysis-box {
    justify-content: flex-start;
    overflow: hidden;
  }

  .expanded-body .expanded-placeholder {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    gap: 0.8rem;
    padding: 0.4rem 0 0;
  }

  .expanded-body .detailed-analysis-content {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
  }

  .expanded-body .thesis-text,
  .expanded-body .bullet-list li,
  .expanded-body .recommendation-text,
  .expanded-body .what-would-change-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
}

.expanded-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.75rem;
  flex-shrink: 0;
}

.expanded-nav-steps {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expanded-nav-btn.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.expanded-nav-btn:hover:not(:disabled) {
  border-color: var(--expanded-accent, var(--royal-navy));
  color: var(--expanded-accent, var(--royal-navy));
}

.expanded-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.expanded-nav-btn[hidden] {
  display: none;
}

.expanded-nav-count {
  grid-column: 2;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.expanded-nav-count-short {
  display: none;
}

.expanded-body .thesis-text {
  font-size: 1rem !important;
  line-height: 1.55 !important;
}

.expanded-body .recommendation-text {
  font-size: 0.92rem !important;
  font-weight: 600;
  color: var(--text-main);
  min-height: auto !important;
  white-space: normal !important;
  line-height: 1.55 !important;
}

.expanded-body .bullet-list li {
  min-height: auto !important;
}

.what-would-change-text {
  font-size: 0.906rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.detailed-analysis-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-left: 3.5px solid var(--p1-sapphire);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detailed-analysis-title {
  font-family: var(--font-card-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--royal-navy);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.detailed-analysis-content {
  font-size: 0.91rem;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
}

.detailed-analysis-content p {
  margin: 0;
}

.detailed-analysis-content p + p {
  margin-top: 0.55em;
}

.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-pdf-export {
  gap: 5px;
}

.gold-icon {
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.about-lead {
  font-size: var(--fs-base);
  color: var(--text-body);
  line-height: 1.55;
  margin: 0;
}

.about-lead strong {
  color: var(--royal-navy);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.about-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.about-grid-card--p1 { border-top-color: var(--p1-sapphire); }
.about-grid-card--p2 { border-top-color: var(--p2-amethyst); }
.about-grid-card--p3 { border-top-color: var(--p3-burgundy); }
.about-grid-card--p4 { border-top-color: var(--p4-emerald); }

.about-card-badge {
  display: flex;
  align-items: center;
  gap: 7px;
}

.about-card-title {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--royal-navy);
}

.about-card-text {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.about-footer-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.85rem 1rem;
  background: var(--bg-tint);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
}

.about-privacy-icon {
  display: flex;
  line-height: 1;
  flex-shrink: 0;
  color: var(--royal-gold-dark);
}

.about-footer-note p {
  font-size: var(--fs-sm);
  color: var(--link-deep);
  line-height: 1.45;
  margin: 0;
}

.blog-articles-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.blog-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.05rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.blog-article-card:hover {
  border-color: var(--royal-navy);
  box-shadow: var(--shadow-card);
}

.blog-article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.blog-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bg-tint);
  color: var(--royal-navy);
  border: 1px solid var(--border-blue);
}

.blog-read-time {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-weight: 500;
}

.blog-article-title {
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--royal-navy);
  margin: 0;
  line-height: 1.35;
}

.blog-article-excerpt {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  padding-top: 5px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 2px;
}

.contact-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.contact-direct {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-muted);
}

.contact-channel-link {
  font-size: inherit;
  font-weight: 600;
  color: var(--royal-navy);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact-channel-link:hover {
  color: var(--royal-gold-dark);
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-form .auth-feedback-banner {
  margin-bottom: 0;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.contact-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-navy);
}

.required-star {
  color: var(--error-text);
  font-weight: 700;
}

.contact-input,
.contact-select,
.contact-textarea {
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  color: var(--text-main);
  background: var(--bg-card);
  transition: all var(--transition-fast);
  width: 100%;
  box-sizing: border-box;
}

.contact-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.1rem;
  background-image:
    linear-gradient(45deg, transparent calc(50% - 0.8px), var(--text-dim) calc(50% - 0.8px), var(--text-dim) calc(50% + 0.8px), transparent calc(50% + 0.8px)),
    linear-gradient(135deg, transparent calc(50% - 0.8px), var(--text-dim) calc(50% - 0.8px), var(--text-dim) calc(50% + 0.8px), transparent calc(50% + 0.8px));
  background-position:
    right calc(0.9rem + 5px) center,
    right 0.9rem center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.contact-select:hover {
  border-color: var(--royal-navy);
}

.contact-input:focus,
.contact-select:focus,
.contact-textarea:focus {
  border-color: var(--royal-navy);
  outline: none;
  box-shadow: var(--ring-focus);
}

.contact-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.contact-privacy-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-sm);
  color: var(--text-faint);
}

.contact-privacy-hint svg {
  flex-shrink: 0;
  color: var(--royal-gold-dark);
}

.btn-send-message {
  width: auto;
  padding: 0.55rem 1.25rem;
  margin-top: 0;
  font-size: var(--fs-md);
}


.clear-answer-dialog .modal-body {
  gap: 0.6rem;
}

.clear-answer-dialog .legal-lead,
.clear-answer-note {
  margin: 0;
  text-wrap: pretty;
}

.clear-answer-note {
  font-size: var(--fs-md);
  color: var(--text-dim);
}

.clear-answer-actions .clear-answer-save {
  margin-right: auto;
}



.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  font-weight: 600;
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  gap: 9px;
  transition: opacity 200ms ease;
}

.toast.success { border-left: 4.5px solid var(--p4-emerald); }
.toast.info { border-left: 4.5px solid var(--royal-navy); }
.toast.error { border-left: 4.5px solid var(--p3-burgundy); }

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.menu-pop {
  position: absolute;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3.5px solid var(--royal-navy);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  text-align: left;
}

.menu-pop[hidden] {
  display: none;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 7px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-main);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--bg-tint);
  color: var(--royal-navy);
}

.menu-item:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--border-focus);
}

.menu-item[aria-current="true"] {
  font-weight: 700;
  color: var(--royal-navy);
}

.menu-item[aria-current="true"]::after {
  content: '';
  width: 4px;
  height: 8px;
  margin: -2px 3px 0 0;
  border-right: 2px solid var(--royal-gold);
  border-bottom: 2px solid var(--royal-gold);
  transform: rotate(45deg);
}

.menu-chevron {
  margin-left: 2px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

[aria-expanded="true"] > .menu-chevron {
  transform: rotate(180deg);
}

input[type="checkbox"] {
  appearance: none;
  flex-shrink: 0;
  display: inline-grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  background: var(--bg-input);
  border: 1.5px solid var(--border-medium);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

input[type="checkbox"]::before {
  content: '';
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border-right: 2px solid var(--text-on-solid);
  border-bottom: 2px solid var(--text-on-solid);
  transform: rotate(45deg);
  opacity: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--royal-navy);
}

input[type="checkbox"]:checked {
  background: var(--navy-solid);
  border-color: var(--navy-solid);
}

input[type="checkbox"]:checked::before {
  opacity: 1;
}

input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

input[type="checkbox"]:disabled {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  cursor: not-allowed;
}



.site-footer {
  --royal-navy: var(--footer-heading);
  --text-body: var(--footer-text);
  --text-dim: var(--footer-dim);
  --text-faint: var(--footer-faint);
  --text-faint2: var(--footer-faint);
  --border-subtle: var(--footer-line);
  --border-medium: var(--footer-line-strong);
  --bg-primary: var(--footer-surface);
  --bg-card: var(--footer-surface);
  --royal-gold-dark: var(--footer-gold-text);
  --p1-sapphire: var(--footer-gold-text);
  --ok-text: var(--footer-ok);
  width: 100%;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-line-strong);
  color: var(--footer-text);
}

.site-footer > .site-bar-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-block: 2.5rem 1.4rem;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 36rem) repeat(3, auto);
  justify-content: space-between;
  gap: 2rem 3rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo-wrapper {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.footer-svg-logo {
  width: 40px;
  height: 40px;
}

.footer-svg-logo rect {
  stroke: var(--footer-dim);
  stroke-width: 1.5;
}

.footer-brand-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--royal-navy);
  display: block;
  line-height: 1.15;
}

.footer-brand-title .royal-gold-text {
  color: var(--footer-gold-text);
}

.footer-edition-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--royal-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.footer-mission-text {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0.85rem 0 1rem;
}

.footer-col-heading {
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--royal-navy);
  margin: 0 0 0.95rem;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--royal-gold);
  width: fit-content;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-link {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--royal-navy);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-link:hover,
.footer-link-btn:hover {
  color: var(--p1-sapphire);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link:focus-visible,
.footer-link-btn:focus-visible {
  outline: 2px solid var(--royal-navy);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-link-btn {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--royal-navy);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  text-align: left;
}

.footer-trust-item {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-dim);
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.footer-trust-item::before {
  content: '✓';
  color: var(--royal-gold);
  font-weight: 700;
  flex-shrink: 0;
}

.footer-bottom-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-tm-note {
  margin: -0.35rem 0 1rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-faint);
}

.footer-tm-note .footer-link {
  display: inline;
  margin-left: 0.35rem;
  font-size: inherit;
  white-space: nowrap;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
}

.footer-bottom-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
}

.footer-bottom-links .footer-link,
.footer-bottom-links .footer-link-btn {
  font-size: inherit;
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.footer-sub-item {
  color: var(--text-faint);
  font-weight: 500;
}

.footer-sub-sep {
  color: var(--border-medium);
}

.footer-operational-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok-text);
  font-weight: 600;
  padding: 0;
  font: inherit;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
}

.footer-operational-indicator:hover #footer-operational-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-operational-indicator:focus-visible {
  outline: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--ring-focus);
}

.operational-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p4-emerald);
}

.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  color: var(--royal-navy);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.footer-back-to-top:hover {
  background: var(--border-subtle);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

@media (max-width: 1100px) {
  .footer-main-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-col-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .site-footer > .site-bar-inner {
    padding-block: 1.75rem 1.25rem;
    gap: 1.25rem;
  }
  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .footer-col-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-sub-sep {
    display: none;
  }
  .footer-bottom-right {
    gap: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .footer-main-grid {
    grid-template-columns: 1fr;
  }
}




.site-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-tour-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.site-tour-spotlight {
  position: fixed;
  z-index: 9992;
  pointer-events: none;
  border-radius: var(--radius-lg);
  box-shadow: 
    0 0 0 3px var(--royal-navy),
    0 0 0 6px var(--royal-gold),
    0 0 0 9999px var(--overlay);
  transition: 
    top 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    left 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    width 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    height 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    border-radius 0.3s ease;
}


.site-tour-card {
  position: fixed;
  z-index: 9998;
  width: min(400px, calc(100vw - 32px));
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 4.5px solid var(--royal-gold);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition: 
    top 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    left 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.25s ease,
    transform 0.25s ease;
}

.site-tour-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tour-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.tour-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tour-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--p1-sapphire-bg);
  color: var(--royal-navy);
  border: 1px solid var(--border-blue);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.tour-step-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--royal-gold);
}

.tour-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--royal-navy);
  line-height: 1.3;
}

.tour-close-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 1.35rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.tour-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.tour-body {
  margin-bottom: 1rem;
}

.tour-text {
  margin: 0 0 0.75rem 0;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 450;
}

.tour-tip-box {
  background: var(--royal-gold-light);
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--royal-gold-dark);
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.tour-tip-icon {
  display: flex;
  line-height: 1;
  flex-shrink: 0;
}

.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--bg-subtle);
}

.tour-dots {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-medium);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tour-dot.is-active {
  width: 20px;
  border-radius: 999px;
  background: var(--navy-solid);
}

.tour-dot:hover:not(.is-active) {
  background: var(--text-faint2);
}

.tour-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.tour-actions button {
  flex-shrink: 0;
  white-space: nowrap;
}

.tour-btn-skip {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-btn-skip:hover {
  color: var(--text-main);
  background: var(--bg-primary);
}

.tour-btn-prev {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-btn-prev:hover {
  border-color: var(--text-faint2);
  color: var(--text-main);
  background: var(--bg-primary);
}

.tour-btn-prev[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.tour-btn-next {
  background: var(--navy-solid);
  border: 1px solid var(--navy-solid);
  color: var(--text-on-solid);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.tour-btn-next:hover {
  background: var(--navy-solid-hover);
  border-color: var(--navy-solid-hover);
}

.tour-btn-next:active {
  transform: translateY(0);
}

.tour-btn-finish {
  border-color: var(--royal-gold);
}

@media (max-width: 640px) {
  .site-tour-card {
    position: fixed;
    bottom: 16px !important;
    top: auto !important;
    left: 16px !important;
    right: 16px !important;
    width: auto;
    max-width: none;
    border-radius: var(--radius-lg);
    padding: 1.1rem;
  }
}



.btn-nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 0.35rem;
  background: transparent;
  color: var(--band-text);
  border: 1.5px solid var(--band-border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.95rem;
  font-weight: 600;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-nav-auth:hover {
  background: var(--band-hover);
  border-color: var(--band-muted);
  color: var(--band-text);
}

.nav-auth-icon {
  color: currentColor;
  flex-shrink: 0;
}

.btn-nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0.35rem;
  background: transparent;
  color: var(--band-text);
  border: 1.5px solid var(--band-border);
  border-radius: var(--radius-lg);
  padding: 3px 12px 3px 5px;
  font-weight: 600;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-nav-user:hover {
  background: var(--band-hover);
  border-color: var(--band-muted);
}

.user-avatar-dot {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy-solid);
  color: var(--text-on-solid);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--royal-gold);
  flex-shrink: 0;
}

.user-avatar-dot.is-pro .avatar-pro-badge {
  right: -5px;
  bottom: -5px;
  padding: 0;
  width: 13px;
  height: 13px;
  border-width: 1.5px;
  font-size: 0.5rem;
  line-height: 10px;
  text-align: center;
  letter-spacing: 0;
}

.nav-user-name {
  font-size: var(--fs-sm);
  color: var(--band-text);
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-tier-pill {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 7px;
  border-radius: var(--radius-md);
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
  border: 1px solid var(--royal-gold-border);
}

.auth-modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.auth-feedback-banner {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}

.auth-feedback-banner.is-error {
  background: var(--p3-burgundy-bg);
  color: var(--error-text);
  border-color: var(--error-border);
}

.auth-feedback-banner.is-success {
  background: var(--p4-emerald-bg);
  color: var(--p4-emerald);
  border-color: var(--p4-emerald-border);
}

.auth-feedback-banner.is-info {
  background: var(--p1-sapphire-bg);
  color: var(--p1-sapphire);
  border-color: var(--border-blue);
}

.auth-demo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  margin-bottom: 1.15rem;
}

.auth-demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--royal-gold);
  flex-shrink: 0;
}

.auth-tab-bar {
  display: flex;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.15rem;
}

.auth-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-faint);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-align: center;
}

.auth-tab:hover {
  color: var(--royal-navy);
}

.auth-tab.is-active {
  background: var(--bg-card);
  color: var(--royal-navy);
  font-weight: 700;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-subtle);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-captcha:empty {
  display: none;
}

.auth-captcha {
  display: grid;
  justify-content: center;
  height: 65px;
  line-height: 0;
}

.auth-captcha > * {
  grid-area: 1 / 1;
  height: 65px;
}

.auth-captcha iframe {
  display: block;
}

.captcha-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  max-width: 100%;
  height: 65px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  font-size: var(--fs-sm);
  line-height: 1.35;
  color: var(--text-muted);
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-body);
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--p1-sapphire);
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.auth-link-btn:hover {
  color: var(--royal-navy);
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--text-faint2);
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 42px;
  padding: 0.5rem 2.6rem 0.5rem 2.45rem;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  color: var(--text-main);
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: var(--royal-navy);
  box-shadow: var(--ring-focus);
}

.auth-input::placeholder {
  color: var(--text-faint);
}

.auth-pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.auth-pw-toggle:hover {
  color: var(--royal-navy);
}

.auth-pw-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-submit-btn {
  width: 100%;
  height: 44px;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--fs-base);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.btn-auth-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--bg-card);
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

.auth-fineprint {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.15rem;
  text-align: center;
}

.auth-fineprint p {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-dim);
}

.auth-fineprint a {
  color: var(--royal-navy);
  font-weight: 600;
  text-decoration: underline;
}

.auth-switch-prompt {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  text-align: center;
  margin: 0.5rem 0 0;
}

.auth-inline-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-navy);
  text-decoration: underline;
  cursor: pointer;
  margin-left: 4px;
}

.auth-inline-link:hover {
  color: var(--royal-gold-dark);
}

.auth-info-box {
  padding: 0.85rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  margin-bottom: 1.15rem;
}

.auth-info-text {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.signup-done-sent {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-headings);
  overflow-wrap: anywhere;
}

.signup-done-sent[hidden] {
  display: none;
}



.profile-modal-body {
  padding: 1.25rem 1.75rem 1.4rem;
  gap: 1rem;
}

.page-dialog.page-dialog--fit.profile-dialog {
  max-height: min(920px, calc(100vh - 2rem));
  max-height: min(920px, calc(100dvh - 2rem));
}

.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.profile-avatar-large {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy-solid);
  color: var(--text-on-solid);
  border: 2px solid var(--border-medium);
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-large.is-pro {
  border-color: var(--royal-gold);
}

.avatar-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-face svg {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar-pro-badge {
  display: none;
  position: absolute;
  right: -6px;
  bottom: -4px;
  padding: 1px 6px;
  border-radius: var(--radius-md);
  background: var(--royal-gold);
  color: var(--text-on-solid);
  border: 2px solid var(--bg-subtle);
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.is-pro > .avatar-pro-badge {
  display: block;
}

.profile-hero-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-hero-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.profile-hero-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text-headings);
  overflow-wrap: anywhere;
}

.profile-hero-email,
.profile-hero-since {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.profile-hero-since {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.profile-tier-badge {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 8px;
  border-radius: var(--radius-md);
  background: var(--royal-navy-light);
  color: var(--royal-navy);
  border: 1px solid var(--border-blue);
}

.profile-tier-badge.is-pro {
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
  border-color: var(--royal-gold-border);
}

.profile-hero-signout {
  margin-left: auto;
  flex-shrink: 0;
  height: 36px;
  padding: 0 0.85rem;
  font-size: var(--fs-sm);
}

#profile-modal .profile-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
  box-shadow: inset 0 -1px 0 var(--border-subtle);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar {
  display: none;
}

.profile-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem 0.65rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.profile-tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

.profile-tab:hover {
  color: var(--royal-navy);
  border-bottom-color: var(--border-medium);
}

.profile-tab[aria-selected="true"] {
  color: var(--royal-navy);
  border-bottom-color: var(--royal-gold);
}

.profile-tab[aria-selected="true"] .profile-tab-icon {
  opacity: 1;
}

.profile-tab:focus-visible {
  outline: 2px solid var(--royal-navy);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.profile-panels {
  display: grid;
}

.profile-panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 160ms ease;
}

.profile-panel.is-active {
  visibility: inherit;
  opacity: 1;
}

.profile-panels .profile-panel:not(.is-active),
.profile-panels .profile-panel:not(.is-active) * {
  transition: none;
}

.profile-panel:focus-visible {
  outline: 2px solid var(--royal-navy);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .profile-panel {
    transition: none;
  }
}

.profile-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.profile-block[hidden] {
  display: none;
}

.profile-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.25rem;
}

.profile-block-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.profile-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.profile-text-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--royal-navy);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--border-medium);
  text-underline-offset: 3px;
  cursor: pointer;
}

.profile-text-link:hover {
  text-decoration-color: currentColor;
}

.profile-billing-alert {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--error-border);
  border-left: 3.5px solid var(--error-text);
  border-radius: var(--radius-sm);
  background: var(--p3-burgundy-bg);
  color: var(--error-text);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.profile-billing-alert[hidden] {
  display: none;
}

.profile-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.profile-plan-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.plan-card[hidden] {
  display: none;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.95rem 1.1rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.plan-current {
  border-color: var(--border-active);
  background: var(--bg-tint);
}

.plan-pro-preview {
  border-color: var(--royal-gold);
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.plan-status-pill {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  padding: 1px 8px;
  border-radius: var(--radius-md);
}

.plan-status-pill[hidden] {
  display: none;
}

.plan-status-pill.is-active {
  background: var(--p4-emerald-bg);
  color: var(--p4-emerald);
  border: 1px solid var(--p4-emerald-border);
}

.plan-status-pill.is-yours {
  background: var(--bg-tint);
  color: var(--royal-navy);
  border: 1px solid var(--border-blue);
}

.plan-status-pill.is-upcoming,
.plan-status-pill.is-warning {
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
  border: 1px solid var(--royal-gold-border);
}

.plan-name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-headings);
}

.plan-price-line {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-headings);
  font-variant-numeric: tabular-nums;
}


.plan-desc {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-dim);
}

.plan-features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 0.75rem;
  font-size: var(--fs-sm);
  color: var(--text-body);
}

.is-single .plan-features-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-plan-features {
  gap: 0.4rem 0.9rem;
  padding-top: 0.15rem;
}

.profile-plan-grid:not(.is-single) .profile-plan-features {
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.profile-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.4;
}

.profile-plan-features li::before {
  content: '';
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.1rem;
  background: var(--royal-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.plan-feature--lead {
  font-weight: 700;
  color: var(--text-headings);
}

.plan-times {
  font-weight: 700;
  color: var(--text-headings);
}

.plan-pro-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.plan-pro-footer[hidden] {
  display: none;
}

.plan-pro-footer .plan-action-btn {
  width: auto;
  margin-bottom: 0;
  padding: 0.6rem 1.15rem;
  font-size: var(--fs-md);
}

.plan-pro-footer .plan-action-btn[hidden] {
  display: none;
}

.plan-pro-footer .plan-action-btn:disabled {
  background: var(--royal-gold-light);
  border-color: var(--royal-gold-border);
  color: var(--royal-gold-dark);
  box-shadow: none;
  opacity: 1;
  cursor: default;
}

.pro-upcoming-note {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.plan-status-pill.is-muted {
  background: var(--bg-subtle);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

.profile-billing-rows .profile-detail-row {
  min-height: 2.6rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.profile-billing-rows .profile-detail-row[hidden] {
  display: none;
}

.profile-billing-rows .profile-detail-row:not([hidden]) ~ .profile-detail-row {
  border-top: 1px solid var(--border-subtle);
}

.profile-billing-rows .profile-detail-row + .profile-detail-row {
  border-top: none;
}

.profile-billing-rows dd {
  font-variant-numeric: tabular-nums;
}

.profile-billing-rows dd.is-ending {
  color: var(--royal-gold-dark);
  font-weight: 600;
}

.profile-billing-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--border-subtle);
}

.profile-billing-foot[hidden],
.profile-billing-foot .profile-action-btn[hidden] {
  display: none;
}

.profile-billing-note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.profile-billing.is-inactive .profile-card {
  background: var(--bg-subtle);
}

.profile-billing.is-inactive .profile-billing-rows {
  opacity: 0.6;
}

.profile-usage {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
}

.usage-meter {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.usage-meter[hidden] {
  display: none;
}

.usage-meter + .usage-meter:not([hidden]) {
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

.usage-meter-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: var(--fs-md);
}

.usage-meter-label {
  color: var(--text-main);
  font-weight: 600;
}

.usage-meter-count {
  color: var(--text-headings);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.usage-meter-track {
  --usage: 0%;
  position: relative;
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-tint-strong);
  overflow: hidden;
}

.usage-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--usage);
  background: var(--navy-solid);
  border-radius: var(--radius-sm);
  transition: width 320ms ease;
}

.usage-meter-track.is-low .usage-meter-fill {
  background: var(--royal-gold);
}

.usage-meter-track.is-full .usage-meter-fill {
  background: var(--error-text);
}

@media (prefers-reduced-motion: reduce) {
  .usage-meter-fill {
    transition: none;
  }
}

.usage-meter-note {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-dim);
}

.usage-meter-note:empty {
  display: none;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.profile-field-hint {
  margin: 0;
  min-height: 1.4em;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.profile-field-hint.is-ok {
  color: var(--p4-emerald);
  font-weight: 600;
}

.profile-field-hint.is-error {
  color: var(--error-text);
  font-weight: 600;
}

.profile-inline-input-row {
  display: flex;
  gap: 0.6rem;
}

.auth-input.profile-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.profile-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 1.1rem;
  font-size: var(--fs-md);
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  width: auto;
}

.profile-save-btn:disabled {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-dim);
  box-shadow: none;
  cursor: default;
}

.profile-details {
  overflow: visible;
}

.profile-detail-row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.6rem 1.1rem;
}

.profile-detail-row + .profile-detail-row {
  border-top: 1px solid var(--border-subtle);
}

.profile-detail-row--name {
  align-items: start;
  padding-top: 0.85rem;
  padding-bottom: 0.45rem;
}

.profile-detail-row--name dt {
  padding-top: 0.6rem;
}

.profile-detail-row dt {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
}

.profile-detail-row dt label {
  cursor: pointer;
}

.profile-detail-row dd {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.profile-id-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}

.profile-id {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text-headings);
}

.profile-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 0.6rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--royal-navy);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.profile-copy-btn:hover {
  border-color: var(--royal-navy);
  background: var(--bg-tint);
}

.profile-id-hint {
  flex-basis: 100%;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.profile-picture-cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.profile-avatar-mini {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-medium);
  overflow: hidden;
}

#btn-avatar-change[aria-busy="true"] {
  opacity: 0.55;
  cursor: progress;
}

.profile-avatar-editor {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 310px;
  max-width: calc(100vw - 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
}

.profile-avatar-editor[hidden] {
  display: none;
}

.avatar-editor-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.avatar-editor-preview {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-medium);
}

.avatar-editor-preview svg {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar-editor-title {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-headings);
}

.avatar-editor-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.avatar-editor-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.avatar-editor-label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
}

.avatar-editor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.avatar-option {
  width: 26px;
  height: 26px;
  padding: 2px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--bg-card);
  box-shadow: 0 0 0 1px var(--border-subtle);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.avatar-editor-options.is-faces .avatar-option {
  width: 34px;
  height: 34px;
  padding: 1px;
}

.avatar-option svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.avatar-option:hover {
  box-shadow: 0 0 0 1px var(--border-medium);
}

.avatar-option[aria-checked="true"] {
  border-color: var(--royal-navy);
  box-shadow: 0 0 0 1px var(--royal-gold);
}

.avatar-option:focus-visible {
  outline: 2px solid var(--royal-navy);
  outline-offset: 2px;
}

.avatar-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.6rem;
}

.avatar-editor-reset {
  margin-right: auto;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.avatar-editor-reset:hover {
  color: var(--royal-navy);
}

.profile-avatar-editor .avatar-editor-btn {
  width: auto;
  height: 32px;
  min-height: 0;
  padding: 0 0.75rem;
  font-size: var(--fs-xs);
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 0.9rem;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--royal-navy);
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profile-action-btn:hover:not(:disabled) {
  background: var(--bg-tint);
  border-color: var(--royal-navy);
}

.profile-action-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.profile-action-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.profile-action-btn--sm {
  height: 34px;
  padding: 0 0.8rem;
  font-size: var(--fs-sm);
}

.profile-setting-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
}

.profile-setting-row[hidden] {
  display: none;
}

.profile-setting-list > .profile-setting-row + .profile-setting-row {
  border-top: 1px solid var(--border-subtle);
}

.profile-setting-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--royal-navy-light);
  border: 1px solid var(--border-blue);
  color: var(--royal-navy);
}

.profile-setting-icon svg {
  width: 18px;
  height: 18px;
}

.profile-setting-icon--danger {
  background: var(--p3-burgundy-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.profile-setting-row .profile-action-btn {
  flex-shrink: 0;
  min-width: 11.5rem;
  height: 38px;
  margin-left: auto;
}

.profile-setting-row .profile-setting-link {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}

label.profile-mfa-title {
  cursor: pointer;
}

.profile-mfa[hidden],
.profile-mfa [hidden] {
  display: none !important;
}

.profile-mfa-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-mfa-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-headings);
}

.profile-mfa-state {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  padding: 0 7px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.profile-mfa-state.is-on {
  background: var(--p4-emerald-bg);
  color: var(--p4-emerald);
  border-color: var(--p4-emerald-border);
}

.profile-mfa-desc {
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-dim);
}

.profile-danger-title {
  color: var(--error-text);
}

.profile-card.profile-danger-zone {
  border-color: var(--error-border);
}

.profile-delete-btn {
  color: var(--error-text);
  border-color: var(--error-border);
}

.profile-delete-btn:hover:not(:disabled) {
  border-color: var(--error-text);
  background: var(--p3-burgundy-bg);
}

.modal-backdrop.delete-account-backdrop,
.modal-backdrop.is-above-account {
  z-index: 1010;
}

.profile-delete-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-delete-error {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--error-text);
}

.profile-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .is-single .plan-features-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-modal-body {
    padding: 1rem 1.1rem 1.2rem;
  }
}

@media (max-width: 560px) {
  .profile-panel:not(.is-active) {
    display: none;
  }

  .profile-plan-grid,
  .plan-features-list,
  .is-single .plan-features-list {
    grid-template-columns: 1fr;
  }

  .profile-hero-card {
    flex-wrap: wrap;
    padding: 0.9rem;
  }

  .profile-avatar-large {
    width: 56px;
    height: 56px;
  }

  .profile-hero-signout {
    margin-left: 0;
    width: 100%;
  }

  .profile-tab {
    padding: 0.55rem 0.6rem 0.6rem;
  }

  .profile-tab-icon {
    display: none;
  }

  .profile-inline-input-row {
    flex-direction: column;
  }

  .profile-detail-row,
  .profile-detail-row--name {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 0.7rem 0.9rem;
  }

  .profile-detail-row--name dt {
    padding-top: 0;
  }

  .profile-setting-row {
    flex-wrap: wrap;
    padding: 0.8rem 0.9rem;
  }

  .profile-mfa-text {
    flex-basis: calc(100% - 3.25rem);
  }

  .profile-setting-row .profile-action-btn {
    width: 100%;
    margin-left: 0;
  }

  .profile-setting-row .profile-setting-link {
    margin-left: 3.15rem;
  }
}

.usage-reset {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.usage-meter-used {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.usage-meter-used:empty {
  display: none;
}

.usage-meter.is-locked .usage-meter-count {
  color: var(--text-dim);
  font-weight: 600;
}

.usage-meter-locked {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
}

.usage-meter-locked[hidden] {
  display: none;
}



.maintenance-dialog .modal-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.contact-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-privacy-hint a,
.about-footer-note a {
  color: inherit;
  text-decoration: underline;
}


.page-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--dialog-md);
  height: min(836px, calc(100vh - 4rem));
  height: min(836px, calc(100dvh - 4rem));
}

.page-dialog .modal-header,
.page-dialog .modal-footer {
  flex-shrink: 0;
}

.page-dialog .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.page-dialog.page-dialog--fit {
  height: auto;
  max-height: min(836px, calc(100vh - 4rem));
  max-height: min(836px, calc(100dvh - 4rem));
}

.page-dialog.page-dialog--sm {
  max-width: var(--dialog-sm);
}

.page-dialog.page-dialog--wide {
  max-width: var(--dialog-wide);
}

@media (max-width: 640px) {
  .page-dialog {
    height: calc(100vh - 2rem);
    height: calc(100dvh - 2rem);
  }

  .page-dialog.page-dialog--fit {
    height: auto;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
  }
}

.legal-content {
  color: var(--text-body);
  font-size: var(--fs-md);
  line-height: 1.6;
}

.legal-content h3 {
  margin: 1.1rem 0 0.35rem;
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--royal-navy);
}

.legal-content h4 {
  margin: 0.85rem 0 0.25rem;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-headings);
}

.legal-content p {
  margin: 0 0 0.65rem;
}

.legal-content ul {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
}

.legal-content li {
  margin-bottom: 0.2rem;
}

.legal-content a {
  color: var(--royal-navy);
  font-weight: 600;
  text-decoration: underline;
}

.legal-content em {
  color: var(--text-dim);
}

.legal-lead {
  margin: 0 0 0.5rem;
  padding: 0.9rem 1rem;
  background: var(--royal-gold-light);
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: var(--fs-base);
  line-height: 1.55;
}

.page-dialog .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page-dialog .modal-footer .btn-outline-sm {
  padding: 0.7rem 1.4rem;
  border-width: 1.5px;
  font-size: var(--fs-base);
  line-height: 1.2;
  text-decoration: none;
}

.page-dialog .page-dialog-footer--top {
  min-height: 3.6rem;
}

.page-dialog-top-btn[hidden] {
  display: none;
}

.consent-dialog [hidden] {
  display: none !important;
}

.consent-dialog .modal-footer {
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .consent-dialog .modal-footer > button {
    flex: 1 1 auto;
  }
}

.consent-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--royal-navy);
  text-decoration: underline;
  cursor: pointer;
}

.consent-link-btn:hover {
  color: var(--royal-navy);
}

.consent-link-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-sm);
}

.consent-refund {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
}

.consent-refund p:last-child {
  margin-bottom: 0;
}

.consent-refund-status:empty {
  display: none;
}

.consent-refund-status {
  color: var(--text-main);
  font-weight: 600;
}

.consent-note {
  color: var(--text-muted);
  font-size: 0.9em;
}



.legal-intro {
  margin: 0 0 0.75rem;
  font-size: var(--fs-base);
  color: var(--text-main);
}

.legal-content .legal-summary {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.legal-summary li {
  position: relative;
  margin: 0;
  padding: 0.7rem 0.8rem 0.7rem 2.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-dim);
}

.legal-summary li::before {
  content: '✓';
  position: absolute;
  left: 0.75rem;
  top: 0.72rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--royal-gold-light);
  border: 1px solid var(--royal-gold-border);
  color: var(--royal-gold-dark);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.05rem;
  text-align: center;
}

.legal-summary li strong {
  display: block;
  margin-bottom: 0.1rem;
  color: var(--text-headings);
}

.legal-section {
  margin-top: 1.1rem;
  padding-top: 0.2rem;
  border-top: 1px solid var(--border-subtle);
}

.legal-section > h3 {
  margin-top: 0.85rem;
}

.legal-content .legal-basis {
  margin: -0.35rem 0 0.9rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-dim);
}

.legal-content .legal-version {
  margin: 1.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.legal-content .legal-note {
  padding: 0.75rem 0.9rem;
  background: var(--bg-tint);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  line-height: 1.6;
}

.legal-content code {
  padding: 1px 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-xs);
  color: var(--royal-navy);
  overflow-wrap: anywhere;
}

.legal-table-wrap {
  margin: 0.4rem 0 0.9rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.legal-table th {
  padding: 0.55rem 0.75rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--royal-navy);
  text-align: left;
}

.legal-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-body);
}

.legal-table tbody tr:last-child td {
  border-bottom: none;
}

.legal-table td:first-child {
  width: 34%;
}

.legal-table--two td:first-child {
  width: 38%;
  font-weight: 600;
  color: var(--text-headings);
}

.legal-table--cookies {
  table-layout: fixed;
}

.legal-table--cookies th:first-child,
.legal-table--cookies td:first-child {
  width: 32%;
}

.legal-table--cookies th:last-child,
.legal-table--cookies td:last-child {
  width: 22%;
}

.legal-table--cookies code {
  font-size: var(--fs-xs);
  overflow-wrap: anywhere;
}

.legal-tag {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .legal-content .legal-summary {
    grid-template-columns: 1fr;
  }

  .legal-table thead {
    display: none;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table tr {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .legal-table tbody tr:last-child {
    border-bottom: none;
  }

  .legal-table td,
  .legal-table td:first-child,
  .legal-table td:last-child,
  .legal-table--two td:first-child {
    width: 100%;
    padding: 0.15rem 0;
    border-bottom: none;
    white-space: normal;
  }

  .legal-table td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-dim);
  }
}


.about-section-title {
  margin: 0.35rem 0 -0.35rem;
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--royal-navy);
}

.about-guides-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--royal-gold);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-main);
}

.about-guides-line svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--royal-gold);
}

.about-steps {
  list-style: none;
  counter-reset: about-step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.about-steps li {
  counter-increment: about-step;
  position: relative;
  padding: 0.1rem 0 0 2.3rem;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-muted);
}

.about-steps li::before {
  content: counter(about-step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--navy-solid);
  border: 1.5px solid var(--royal-gold);
  color: var(--text-on-solid);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4rem;
  text-align: center;
}

.about-steps li strong {
  color: var(--text-headings);
}

.about-compare {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.about-compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border-subtle);
}

.about-compare-row:last-child {
  border-bottom: none;
}

.about-compare-row > span {
  padding: 0.55rem 0.8rem;
}

.about-compare-row > span:first-child {
  color: var(--text-faint);
  background: var(--bg-primary);
}

.about-compare-row > span:last-child {
  position: relative;
  padding-left: 1.85rem;
  color: var(--text-headings);
  font-weight: 600;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
}

.about-compare-row > span:last-child::before {
  content: '✓';
  position: absolute;
  left: 0.7rem;
  color: var(--royal-gold);
  font-weight: 800;
}

.about-compare-head > span {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.about-compare-head > span:first-child {
  color: var(--text-faint);
}

.about-compare-head > span:last-child {
  color: var(--royal-navy);
  background: var(--bg-tint);
}

.about-compare-head > span:last-child::before {
  content: none;
}

.about-compare-head > span:last-child {
  padding-left: 0.8rem;
}



.footer-operational-indicator.is-inactive .operational-dot {
  background: var(--p3-burgundy);
  box-shadow: 0 0 0 2px var(--p3-burgundy-border);
}

.footer-operational-indicator.is-unknown .operational-dot {
  background: var(--border-medium);
}

.engine-notice-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "icon label link" "icon text link";
  align-items: center;
  gap: 2px 0.95rem;
  padding: 0.75rem 1.6rem 0.75rem calc(1.6rem - 2px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--p3-burgundy);
  border-radius: var(--radius-sm);
  overflow: hidden;
  animation: engine-notice-drop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.engine-notice-bar[hidden] {
  display: none;
}

.engine-notice-icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--p3-burgundy-bg);
  border: 1px solid var(--p3-burgundy-border);
  color: var(--p3-burgundy);
}

.engine-notice-icon svg {
  width: 17px;
  height: 17px;
}

.engine-notice-label {
  grid-area: label;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--p3-burgundy);
}

.engine-notice-text {
  grid-area: text;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-body);
}

.engine-notice-link {
  grid-area: link;
  padding: 0.45rem 0.8rem;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  color: var(--royal-navy);
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.engine-notice-link:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
}

.engine-notice-link:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

@media (max-width: 640px) {
  .engine-notice-bar {
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon label" "icon text" "link link";
    gap: 4px;
  }

  .engine-notice-link {
    justify-self: start;
    margin-top: 6px;
  }
}

@keyframes engine-notice-drop {
  from {
    opacity: 0;
    max-height: 0;
    margin-top: -1.5rem;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    border-bottom-width: 0;
  }
  to {
    opacity: 1;
    max-height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .engine-notice-bar { animation: none; }
}



.pro-lock {
  display: none;
  align-items: center;
  color: var(--royal-gold);
  line-height: 1;
}

.is-locked .pro-lock {
  display: inline-flex;
}

.pro-lock svg {
  width: 11px;
  height: 11px;
}

.intel-btn.is-locked {
  background: var(--bg-primary);
}

.intel-btn.is-locked .intel-name {
  color: var(--text-dim);
}

.intel-btn.is-locked:hover {
  border-color: var(--royal-gold-border);
}

.plan-action-btn {
  padding: 0.6rem 1rem;
  font-size: var(--fs-md);
  margin-bottom: 0.45rem;
}

.plan-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.plan-pro-footer .pro-upcoming-note {
  display: block;
}



a.insights-card-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.insights-card-link:focus-visible {
  outline: none;
  border-color: var(--royal-navy);
  box-shadow: var(--ring-focus);
}

.insights-state {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-md);
  line-height: 1.5;
}

.insights-follow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.1rem 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.insights-follow a {
  color: var(--royal-navy);
  font-weight: 600;
  text-decoration: none;
}

.insights-follow a:hover,
.insights-follow a:focus-visible {
  text-decoration: underline;
}

.insights-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.95rem;
}

.insights-search {
  height: 36px;
  padding: 0 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.insights-search {
  flex: 0 1 15rem;
  min-width: 0;
}

.insights-search::placeholder {
  color: var(--text-faint);
}

.insights-search:hover {
  background: var(--bg-subtle);
}

.insights-search.is-active {
  background: var(--bg-tint-strong);
  color: var(--royal-navy);
}

.insights-search:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.insights-sort {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.insights-sort-btn {
  height: 34px;
  padding: 0 0.8rem;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.insights-sort-btn:first-child {
  border-left: 0;
}

.insights-sort-btn:hover {
  background: var(--bg-subtle);
  color: var(--royal-navy);
}

.insights-sort-btn.is-active {
  background: var(--bg-tint-strong);
  color: var(--royal-navy);
}

.insights-sort-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus-inset);
}
.blog-articles-list > [hidden] {
  display: none;
}

@media (max-width: 600px) {
  .insights-search {
    flex-basis: 100%;
  }
  .insights-sort {
    flex: 1 1 auto;
    margin-left: 0;
  }
  .insights-sort-btn {
    flex: 1 1 0;
    padding: 0 0.5rem;
  }
}


.insights-article {
  color: var(--text-body);
  font-size: var(--fs-base);
  line-height: 1.7;
}

.insights-back {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-navy);
  text-decoration: none;
}

.insights-back:hover,
.insights-back:focus-visible {
  text-decoration: underline;
}

.insights-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.insights-pager[hidden],
.insights-pager-link[hidden] {
  display: none;
}

.insights-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.75rem 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.insights-pager-next {
  grid-column: 2;
  text-align: right;
}

.insights-pager-link:hover,
.insights-pager-link:focus-visible {
  border-color: var(--royal-navy);
  background: var(--bg-subtle);
  outline: none;
}

.insights-pager-link:focus-visible {
  box-shadow: var(--ring-focus);
}

.insights-pager-dir {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
}

.insights-pager-title {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.4;
  color: var(--royal-navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .insights-pager {
    grid-template-columns: 1fr;
  }

  .insights-pager-next {
    grid-column: auto;
  }
}

.insights-article-title {
  margin: 0.6rem 0 0.35rem;
  font-family: var(--font-sans);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.3;
  color: var(--royal-navy);
}

.insights-article-meta {
  margin: 0 0 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.insights-article h2 {
  margin: 1.5rem 0 0.45rem;
  font-family: var(--font-sans);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--royal-navy);
}

.insights-article p {
  margin: 0 0 0.9rem;
}

.insights-article ul,
.insights-article ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.insights-article li {
  margin-bottom: 0.4rem;
}

.insights-article li::marker {
  color: var(--royal-gold);
  font-weight: 700;
}

.insights-article blockquote {
  margin: 1.1rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--royal-navy);
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--royal-navy);
}

.insights-article .insights-callout {
  margin: 1.1rem 0;
  padding: 0.85rem 1rem;
  background: var(--royal-gold-light);
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  color: var(--text-main);
}

.insights-table,
.insights-figure {
  margin: 1.1rem 0;
}

.insights-table figcaption,
.insights-figure figcaption {
  margin: 0.4rem 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
}

.insights-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.insights-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-md);
  line-height: 1.45;
}

.insights-table th,
.insights-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

.insights-table th {
  background: var(--bg-subtle);
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--royal-navy);
}

.insights-table tr:last-child td {
  border-bottom: none;
}

.insights-figure img.is-loading {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
}

.insights-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.insights-try {
  margin: 1.5rem 0 0.25rem;
  padding: 1rem 1.1rem;
  background: var(--royal-navy-light);
  border: 1px solid var(--p1-sapphire-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.insights-article .insights-try p {
  margin: 0;
  font-weight: 400;
  color: var(--text-main);
}

.insights-try .btn-primary-action {
  display: inline-block;
  flex-shrink: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .insights-article-title {
    font-size: var(--fs-2xl);
  }

  .insights-try {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}



.insights-article .dg,
.insights-article .ins-method,
.insights-article .insights-table,
.insights-article .insights-figure,
.insights-article .insights-try,
.insights-article .insights-pager {
  clear: both;
}

.ins-art {
  fill: none;
  stroke: var(--royal-navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ins-art .f { fill: var(--ill-fill); }
.ins-art .a { stroke: var(--royal-gold); }
.ins-art .af { stroke: var(--royal-gold); fill: var(--ill-gold-fill); }
.ins-art .g { fill: var(--royal-gold); stroke: none; }
.ins-art .n { fill: var(--royal-navy); stroke: none; }
.ins-art .b { fill: var(--bg-tint); }
.ins-art .d { stroke-dasharray: 3 4; }
.ins-art .w { stroke-width: 4.5; }

.insights-article .ins-ill {
  float: right;
  width: 9rem;
  margin: 0.3rem 0 0.9rem 1.5rem;
}

.ins-ill svg {
  display: block;
  width: 100%;
  height: auto;
  padding: 0.7rem;
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.ins-ill figcaption {
  margin-top: 0.4rem;
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-align: center;
  color: var(--text-dim);
}

.blog-article-card.has-ill {
  position: relative;
  padding-right: 5.9rem;
}

.insights-card-ill {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  width: 3.6rem;
  height: 3.6rem;
  margin-top: -1.8rem;
  padding: 0.35rem;
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.insights-article .ins-method {
  margin: 1.4rem 0;
  padding: 0.95rem 1.1rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--royal-gold-border);
  border-left: 4px solid var(--royal-gold);
  border-radius: var(--radius-md);
}

.ins-method-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.7rem;
  margin-bottom: 0.6rem;
}

.ins-method-kicker {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--royal-gold-dark);
}

.insights-article .ins-method h3 {
  flex: 1 1 14rem;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.4;
  color: var(--royal-navy);
}

.ins-method-time {
  padding: 1px 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.insights-article .ins-method-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ins-step;
}

.insights-article .ins-method-steps li {
  position: relative;
  margin: 0 0 0.55rem;
  padding-left: 2.1rem;
  counter-increment: ins-step;
}

.insights-article .ins-method-steps li::before {
  content: counter(ins-step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  color: var(--text-on-solid);
  background: var(--navy-solid);
  border-radius: 50%;
}

.insights-article .dg {
  margin: 1.4rem 0;
  padding: 0.95rem 1.1rem 1.1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.insights-article .dg :where(ol, ul, dl) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.insights-article .dg :where(li, p) {
  margin: 0;
}

.dg-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.4;
  color: var(--royal-navy);
}

.dg-title::before {
  content: '';
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.5rem;
  background: var(--royal-gold);
  border-radius: 2px;
}

.dg strong {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.35;
  color: var(--royal-navy);
}

.dg strong + span {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-body);
}

.dg-cell,
.dg-steps li,
.dg-side {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.dg-num {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  color: var(--text-on-solid);
  background: var(--navy-solid);
  border-radius: 50%;
}

.insights-article .dg-caption {
  margin-top: 0.8rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-dim);
}

.insights-article .dg-legend {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
}

.insights-article .dg-legend {
  grid-template-columns: fit-content(40%) 1fr;
  column-gap: 1.25rem;
}

.dg-legend div {
  display: contents;
}

.dg-legend dt {
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.45;
  color: var(--royal-navy);
}

.dg-legend dd {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.dg-matrix {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 0.45rem;
}

.dg-axis {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dg-axis span::after {
  content: ' \2192';
  color: var(--royal-gold);
}

.dg-axis--up {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dg-axis--up span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.dg-axis--across {
  grid-column: 2;
  grid-row: 2;
  text-align: center;
}

.dg-cells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0 0 0.45rem 0.45rem;
  border-left: 2px solid var(--royal-navy);
  border-bottom: 2px solid var(--royal-navy);
}

.dg-cell {
  padding: 0.65rem 0.75rem;
  border-top-width: 3px;
}

.dg-cell--1 { border-top-color: var(--p1-sapphire); }
.dg-cell--2 { border-top-color: var(--p2-amethyst); }
.dg-cell--3 { border-top-color: var(--p3-burgundy); }
.dg-cell--4 { border-top-color: var(--p4-emerald); }

.insights-article .dg-steps {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 1.5rem;
}

.insights-article .dg-steps li {
  position: relative;
  padding: 0.7rem 0.75rem;
}

.dg-steps .dg-num {
  margin-bottom: 0.4rem;
}

.dg-steps li:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  top: 50%;
  right: -1.22rem;
  margin-top: -0.75em;
  font-weight: 700;
  color: var(--royal-gold);
}

.insights-article .dg-steps--rail {
  grid-template-columns: 1fr;
  gap: 0;
}

.insights-article .dg-steps--rail li {
  padding: 0 0 0.85rem 2.3rem;
  background: none;
  border: 0;
}

.insights-article .dg-steps--rail li:last-child {
  padding-bottom: 0;
}

.dg-steps--rail .dg-num {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
}

.dg-steps--rail li:not(:last-child)::after {
  content: '';
  top: 1.65rem;
  right: auto;
  bottom: 0.25rem;
  left: 0.64rem;
  width: 2px;
  margin: 0;
  background: var(--royal-gold-border);
}

.dg-cycle {
  position: relative;
  width: min(100%, 20rem);
  aspect-ratio: 1;
  margin: 0 auto;
}

.dg-cycle svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--border-medium);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dg-cycle .dg-head {
  stroke: var(--royal-gold);
  stroke-width: 1.6;
}

.insights-article .dg-node {
  position: absolute;
  max-width: 40%;
  translate: -50% -50%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
  color: var(--royal-navy);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.dg-centre {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 34%;
  translate: -50% -50%;
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-style: italic;
  line-height: 1.3;
  text-align: center;
  color: var(--text-dim);
}

.insights-article .dg-key {
  display: none;
}

.dg-key li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.dg-cyclewrap--key {
  display: grid;
  grid-template-columns: minmax(0, 14rem) 1fr;
  gap: 1.25rem;
  align-items: center;
}

.dg-cyclewrap--key .dg-node-label {
  display: none;
}

.insights-article .dg-cyclewrap--key .dg-node {
  padding: 0;
  background: none;
  border: 0;
}

.dg-cyclewrap--key .dg-node .dg-num {
  display: inline-grid;
  width: 1.7rem;
  height: 1.7rem;
  font-size: var(--fs-sm);
}

.dg-cyclewrap--key .dg-centre {
  font-size: var(--fs-xs);
}

.insights-article .dg-cyclewrap--key .dg-key {
  display: grid;
  gap: 0.6rem;
}

.dg-cyclewrap--key + .dg-cycle-legend {
  display: none;
}

.dg-beam {
  display: block;
  width: min(100%, 15rem);
  margin: 0 auto 0.6rem;
  fill: none;
  stroke: var(--royal-navy);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dg-beam circle { fill: var(--royal-navy); stroke: none; }
.dg-beam .dg-pan { fill: var(--ill-fill); }
.dg-beam .dg-pan--b { fill: var(--ill-gold-fill); stroke: var(--royal-gold); }

.dg-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.dg-side {
  padding: 0.7rem 0.8rem;
  border-top-width: 3px;
}

.dg-side--1 { border-top-color: var(--royal-navy); }
.dg-side--2 { border-top-color: var(--royal-gold); }

.insights-article .dg-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 0.6rem;
}

.dg-line::before {
  content: '';
  position: absolute;
  top: 0.55rem;
  left: calc(50% / var(--n));
  right: calc(50% / var(--n));
  height: 2px;
  background: var(--royal-navy);
}

.dg--timeline .dg-line::before {
  background: var(--royal-gold);
}

.insights-article .dg-line li {
  position: relative;
  padding-top: 1.7rem;
  text-align: center;
}

.dg-line li::before {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 50%;
  width: 0.8rem;
  height: 0.8rem;
  margin-left: -0.4rem;
  background: var(--bg-card);
  border: 2px solid var(--royal-navy);
  border-radius: 50%;
}

.dg--spectrum .dg-line li:first-child::before,
.dg--spectrum .dg-line li:last-child::before,
.dg--timeline .dg-line li::before {
  background: var(--royal-gold);
  border-color: var(--royal-gold);
}

.dg-ifs {
  display: grid;
  gap: 0.55rem;
}

.dg-if {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.6rem;
}

.dg-when,
.dg-then {
  padding: 0.6rem 0.75rem;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.dg-when {
  background: var(--royal-navy-light);
  border: 1px solid var(--border-blue);
}

.dg-then {
  background: var(--royal-gold-light);
  border: 1px solid var(--royal-gold-border);
}

.dg-when span,
.dg-then span {
  display: block;
  margin-bottom: 0.15rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dg-then span {
  color: var(--royal-gold-dark);
}

.dg-arrow {
  align-self: center;
  font-weight: 700;
  color: var(--royal-gold);
}

.dg-arrow::before {
  content: '\2192';
}

.dg-overlap {
  position: relative;
  width: min(100%, 25rem);
  margin: 0 auto;
}

.dg-overlap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke-width: 0.7;
}

.dg-ring { fill-opacity: 0.75; }
.dg-ring--1 { fill: var(--p1-sapphire-bg); stroke: var(--p1-sapphire); }
.dg-ring--2 { fill: var(--ill-gold-fill); stroke: var(--royal-gold); }
.dg-ring--3 { fill: var(--p4-emerald-bg); stroke: var(--p4-emerald); }

.insights-article .dg-spot {
  position: absolute;
  max-width: 30%;
  translate: -50% -50%;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--royal-navy);
}

.dg-spot .dg-num {
  display: none;
}

.insights-article .dg-overlap--3 .dg-spot {
  max-width: 21%;
}

.insights-article .dg-spot--centre {
  max-width: 24%;
  padding: 0.2rem 0.45rem;
  font-size: var(--fs-xs);
  background: var(--bg-card);
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-sm);
}

@media (max-width: 600px) {
  .insights-article .ins-ill {
    float: none;
    width: auto;
    margin: 1.1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
  }

  .ins-ill svg {
    width: 6rem;
    flex-shrink: 0;
  }

  .ins-ill figcaption {
    margin: 0;
    text-align: left;
  }

  .blog-article-card.has-ill {
    padding-right: 4.4rem;
  }

  .insights-card-ill {
    right: 0.8rem;
    width: 2.8rem;
    height: 2.8rem;
    margin-top: -1.4rem;
    padding: 0.25rem;
  }

  .insights-article .dg {
    padding: 0.85rem 0.8rem 0.95rem;
  }

  .dg-sides,
  .dg-if {
    grid-template-columns: 1fr;
  }

  .dg-arrow::before {
    content: '\2193';
  }

  .insights-article .dg-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .insights-article .dg-steps li {
    padding: 0 0 0.85rem 2.3rem;
    background: none;
    border: 0;
  }

  .insights-article .dg-steps li:last-child {
    padding-bottom: 0;
  }

  .dg-steps .dg-num {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
  }

  .dg-steps li:not(:last-child)::after {
    content: '';
    top: 1.65rem;
    right: auto;
    bottom: 0.25rem;
    left: 0.64rem;
    width: 2px;
    margin: 0;
    background: var(--royal-gold-border);
  }

  .dg-cyclewrap {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.9rem;
  }

  .dg-cyclewrap .dg-node-label {
    display: none;
  }

  .insights-article .dg-cyclewrap .dg-node {
    padding: 0;
    background: none;
    border: 0;
  }

  .dg-cyclewrap .dg-node .dg-num {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
    font-size: var(--fs-sm);
  }

  .dg-cyclewrap .dg-centre {
    font-size: var(--fs-xs);
  }

  .insights-article .dg-cyclewrap .dg-key {
    display: grid;
    gap: 0.6rem;
  }

  .dg-cyclewrap + .dg-cycle-legend {
    display: none;
  }

  .dg-overlapwrap .dg-spot-label {
    display: none;
  }

  .dg-overlapwrap .dg-spot .dg-num {
    display: inline-grid;
  }

  .insights-article .dg-overlapwrap .dg-key {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.9rem;
  }

  .dg-overlapwrap + .dg-overlap-legend {
    display: none;
  }

  .insights-article .dg-spot--centre {
    max-width: 30%;
    font-size: var(--fs-xs);
  }

  .dg-cyclewrap .dg-cycle {
    width: min(100%, 13rem);
  }

  .insights-article .dg-cyclewrap .dg-key {
    justify-self: stretch;
  }

  .dg-arrow {
    justify-self: center;
    line-height: 1;
  }

  .insights-article .dg-line {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .dg-line::before {
    top: 0.6rem;
    bottom: 0.6rem;
    left: 0.39rem;
    right: auto;
    width: 2px;
    height: auto;
  }

  .insights-article .dg-line li {
    padding: 0 0 0 1.6rem;
    text-align: left;
  }

  .dg-line li::before {
    top: 0.25rem;
    left: 0;
    margin-left: 0;
  }

  .insights-article .dg-spot {
    font-size: var(--fs-xs);
  }

  .insights-article .dg-legend {
    grid-template-columns: 1fr;
    row-gap: 0.55rem;
  }

  .dg-legend div {
    display: block;
  }

  .dg-legend dd {
    margin-top: 0.1rem;
  }
}



#blog-modal[data-view="article"] #insights-admin-view {
  display: none;
}

.insights-admin {
  margin-bottom: 1.25rem;
  padding: 0.95rem 1rem 1rem;
  background: var(--royal-gold-light);
  border: 1px dashed var(--royal-gold-border);
  border-radius: var(--radius-md);
}

.insights-admin-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.insights-admin-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--royal-navy);
}

.insights-admin-count {
  display: inline-block;
  min-width: 1.5rem;
  margin-left: 0.25rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--navy-solid);
  color: var(--text-on-solid);
  font-size: var(--fs-xs);
  text-align: center;
}

.insights-admin-note {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--royal-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.insights-draft-card {
  background: var(--bg-card);
}

.insights-status-badge {
  margin-right: auto;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--royal-gold-border);
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.insights-admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.insights-admin-bar.is-draft {
  background: var(--royal-gold-light);
  border-color: var(--royal-gold-border);
}

.insights-admin-bar.is-published {
  background: var(--p4-emerald-bg);
  border-color: var(--p4-emerald-border);
}

.insights-admin-bar.is-rejected {
  background: var(--p3-burgundy-bg);
  border-color: var(--p3-burgundy-border);
}

.insights-article .insights-admin-bar p {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-main);
}

.insights-admin-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.insights-admin-secondary {
  padding: 0.7rem 1.1rem;
  border: 1.5px solid var(--p3-burgundy-border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--p3-burgundy);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.insights-admin-secondary:hover {
  background: var(--p3-burgundy-bg);
  border-color: var(--p3-burgundy);
}

.insights-admin-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 600px) {
  .insights-admin-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .insights-admin-actions button {
    flex: 1;
  }
}



.modal-backdrop.mfa-backdrop {
  z-index: 1010;
}

.mfa-modal-body {
  gap: 1.1rem;
}

.mfa-modal-body [hidden] {
  display: none !important;
}

.mfa-setup {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mfa-qr {
  flex-shrink: 0;
  width: 168px;
  height: 168px;
  padding: 8px;
  background: var(--qr-bg);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
}

.mfa-steps {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-body);
}

.mfa-steps li::marker {
  font-weight: 700;
  color: var(--royal-gold-dark);
}

.mfa-key {
  display: block;
  margin-top: 0.3rem;
  padding: 4px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--royal-navy);
  overflow-wrap: anywhere;
  user-select: all;
}

.mfa-disable-text {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text-body);
}

.mfa-code-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.mfa-code-row {
  display: flex;
  gap: 0.6rem;
}

.auth-input.mfa-code-input {
  flex: 1;
  min-width: 0;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  font-size: var(--fs-lg);
  letter-spacing: 0.25em;
}

.mfa-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  height: 42px;
  padding: 0 1.3rem;
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: nowrap;
}

.mfa-submit-btn.is-danger,
.mfa-submit-btn.is-danger:hover {
  background: var(--p3-burgundy);
  border-color: var(--p3-burgundy);
}

.mfa-cancel-link {
  align-self: center;
  margin-top: 0.25rem;
}

@media (max-width: 560px) {
  .mfa-setup {
    flex-direction: column;
  }

  .mfa-code-row {
    flex-direction: column;
  }

  .mfa-submit-btn {
    width: 100%;
  }
}



.share-modal-body {
  gap: 1.1rem;
}

.share-modal-body [hidden] {
  display: none !important;
}

.share-lead {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-body);
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.share-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 78px;
  padding: 0.7rem 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--royal-navy);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.share-tile svg {
  flex-shrink: 0;
  color: var(--share-icon, var(--royal-gold));
}

.share-tile[data-network="whatsapp"] { --share-icon: var(--share-whatsapp); }
.share-tile[data-network="facebook"] { --share-icon: var(--share-facebook); }
.share-tile[data-network="x"] { --share-icon: var(--share-x); }
.share-tile[data-network="linkedin"] { --share-icon: var(--share-linkedin); }
.share-tile[data-network="telegram"] { --share-icon: var(--share-telegram); }
.share-tile[data-network="reddit"] { --share-icon: var(--share-reddit); }

.share-tile:hover {
  background: var(--bg-tint);
  border-color: var(--royal-navy);
}

.share-tile:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.share-email-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.share-email-title {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--royal-navy);
}

.share-email-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.auth-input.share-input {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.share-optional {
  font-weight: 500;
  color: var(--text-muted);
}

.share-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.share-email-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.share-privacy {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-muted);
}

.share-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  width: auto;
  height: 42px;
  padding: 0 1.3rem;
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .share-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .share-email-row {
    grid-template-columns: 1fr;
  }

  .share-email-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .share-send-btn {
    width: 100%;
  }
}



.support-chat {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.support-chat > * {
  pointer-events: auto;
}

.support-chat [hidden] {
  display: none !important;
}

body.has-support-chat .site-footer > .site-bar-inner {
  padding-bottom: calc(1.5rem + 60px + 1rem);
}

body.has-support-chat .toast-container {
  bottom: calc(1.5rem + 76px);
}


.support-avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.support-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.support-avatar--lg {
  width: 52px;
  height: 52px;
}

.support-avatar--md {
  width: 40px;
  height: 40px;
}

.support-status-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-faint2);
  border: 2px solid var(--bg-card);
}

.support-avatar--md .support-status-dot {
  width: 11px;
  height: 11px;
}

.support-chat.is-online .support-status-dot {
  background: var(--p4-emerald);
}


.pearl-eye,
.pearl-eyes,
.pearl-shine,
.pearl-mouth {
  transform-box: fill-box;
  transform-origin: center;
}

.support-chat.pearl-blink .support-launcher .pearl-eye {
  animation: pearl-blink 0.4s ease-in-out;
}

.support-chat.pearl-double-blink .support-launcher .pearl-eye {
  animation: pearl-double-blink 0.9s ease-in-out;
}

.support-chat.pearl-glance .support-launcher .pearl-eyes {
  animation: pearl-glance 2.6s ease-in-out;
}

.support-chat.pearl-glance .support-launcher .pearl-shine {
  animation: pearl-glance-shine 2.6s ease-in-out;
}

.support-chat.pearl-look-up .support-launcher .pearl-eyes {
  animation: pearl-look-up 1.8s ease-in-out;
}

.support-chat.pearl-smile .support-launcher .pearl-mouth {
  animation: pearl-smile 2.2s ease-in-out;
}

.support-chat.pearl-smile .support-launcher .pearl-eye {
  animation: pearl-squint 2.2s ease-in-out;
}

@keyframes pearl-blink {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.1); }
}

@keyframes pearl-double-blink {
  0%, 30%, 55%, 85%, 100% { transform: scaleY(1); }
  15%, 70% { transform: scaleY(0.1); }
}

@keyframes pearl-glance {
  0%, 100% { transform: translateX(0); }
  15%, 40% { transform: translateX(-1.5px); }
  55%, 80% { transform: translateX(1.5px); }
}

@keyframes pearl-glance-shine {
  0%, 100% { transform: translateX(0); }
  15%, 40% { transform: translateX(-0.6px); }
  55%, 80% { transform: translateX(0.6px); }
}

@keyframes pearl-look-up {
  0%, 100% { transform: translate(0, 0); }
  20%, 75% { transform: translate(0.6px, -1.2px); }
}

@keyframes pearl-smile {
  0%, 100% { transform: scale(1); }
  20%, 75% { transform: scale(1.15, 1.35); }
}

@keyframes pearl-squint {
  0%, 100% { transform: scaleY(1); }
  20%, 75% { transform: scaleY(0.7); }
}

@media (prefers-reduced-motion: reduce) {
  .support-chat .support-launcher .pearl-eye,
  .support-chat .support-launcher .pearl-eyes,
  .support-chat .support-launcher .pearl-shine,
  .support-chat .support-launcher .pearl-mouth {
    animation: none !important;
  }
}


.support-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: 50%;
  box-shadow: var(--shadow-hover);
  cursor: pointer;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.support-launcher:hover,
.support-launcher[aria-expanded="true"] {
  border-color: var(--royal-navy);
  box-shadow: var(--shadow-hover);
}

.support-launcher:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus), var(--shadow-hover);
}


.support-panel {
  display: flex;
  flex-direction: column;
  width: 360px;
  height: min(560px, calc(100vh - 7.5rem));
  height: min(560px, calc(100dvh - 7.5rem));
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 4.5px solid var(--royal-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.support-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.support-header-text {
  flex: 1 1 auto;
  min-width: 0;
}

.support-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.2;
  color: var(--royal-navy);
}

.support-subtitle {
  margin: 0.1rem 0 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
}

.support-status-label {
  color: var(--text-dim);
}

.support-chat.is-online .support-status-label {
  color: var(--p4-emerald);
}

.support-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.support-close:hover {
  color: var(--royal-navy);
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
}

.support-close:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}


.support-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
  background: var(--bg-card);
}

.support-log:has(+ .support-suggestions:not([hidden])) {
  flex: 0 1 auto;
}

.support-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  max-width: 88%;
}

.support-msg.is-user {
  align-self: flex-end;
  align-items: flex-end;
}

.support-bubble {
  margin: 0;
  padding: 0.6rem 0.8rem;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  border-top-left-radius: 4px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.support-msg.is-user .support-bubble {
  color: var(--text-on-solid);
  background: var(--navy-solid);
  border-color: var(--royal-navy);
  border-radius: var(--radius-md);
  border-top-right-radius: 4px;
}

.support-msg.is-error .support-bubble {
  border-left: 3px solid var(--p3-burgundy);
}

.support-msg.is-typing .support-bubble {
  color: var(--text-dim);
  font-style: italic;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.support-link-btn,
.support-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.7rem;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  color: var(--text-body);
  background: var(--bg-tint);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.support-link-btn {
  border-color: var(--border-blue);
}

.support-link-btn:hover,
.support-chip:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.support-link-btn:focus-visible,
.support-chip:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-color: var(--royal-navy);
}

.support-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1 1 auto;
  align-content: flex-start;
  align-items: flex-start;
  padding: 0 0.9rem 0.8rem;
  background: var(--bg-card);
}


.support-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem 0.4rem;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.support-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  max-height: 110px;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.4;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.support-input:focus {
  border-color: var(--royal-navy);
  box-shadow: var(--ring-focus);
}

.support-input:disabled {
  background: var(--bg-subtle);
  cursor: not-allowed;
}

.support-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-on-solid);
  background: var(--navy-solid);
  border: 1.5px solid var(--navy-solid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition-fast), box-shadow var(--transition-fast);
}

.support-send:hover {
  opacity: 0.88;
}

.support-send:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.support-send:disabled {
  color: var(--text-faint);
  background: var(--bg-subtle);
  border-color: var(--border-medium);
  cursor: not-allowed;
  box-shadow: none;
}

.support-note {
  margin: 0;
  padding: 0.25rem 0.9rem 0.9rem;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--text-dim);
  flex-shrink: 0;
}

.support-note span {
  display: block;
}


@media (max-width: 560px) {
  .support-chat {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .support-panel {
    width: 100%;
    height: calc(100vh - 6.5rem);
    height: calc(100dvh - 6.5rem);
  }

  .support-launcher {
    width: 54px;
    height: 54px;
  }

  .support-avatar--lg {
    width: 46px;
    height: 46px;
  }

  body.has-support-chat .toast-container {
    bottom: calc(16px + 68px);
  }

  body.has-support-chat .site-footer > .site-bar-inner {
    padding-bottom: calc(16px + 54px + 1rem);
  }
}

@media print {
  .support-chat {
    display: none !important;
  }
}



.status-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}


.status-hero {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1rem 1rem 1.1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.status-hero[data-state="ok"] { background: var(--p4-emerald-bg); border-color: var(--p4-emerald-border); }
.status-hero[data-state="partial"] { background: var(--royal-gold-light); border-color: var(--royal-gold-border); }
.status-hero[data-state="down"] { background: var(--p3-burgundy-bg); border-color: var(--p3-burgundy-border); }

.status-hero-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
}

.status-hero[data-state="ok"] .status-hero-icon { border-color: var(--p4-emerald-border); color: var(--p4-emerald); }
.status-hero[data-state="partial"] .status-hero-icon { border-color: var(--royal-gold-border); color: var(--royal-gold-dark); }
.status-hero[data-state="down"] .status-hero-icon { border-color: var(--p3-burgundy-border); color: var(--p3-burgundy); }

.status-hero-svg {
  display: none;
  width: 17px;
  height: 17px;
}

.status-hero[data-state="ok"] .status-hero-svg--ok,
.status-hero[data-state="partial"] .status-hero-svg--partial,
.status-hero[data-state="unknown"] .status-hero-svg--partial,
.status-hero[data-state="down"] .status-hero-svg--down { display: block; }

.status-hero-text {
  flex: 1 1 auto;
  min-width: 0;
}

.status-hero-title {
  margin: 0;
  color: var(--text-main);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.35;
}

.status-hero-sub {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: var(--fs-md);
  line-height: 1.45;
}

.status-hero-sub:empty { display: none; }

.status-refresh {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--royal-navy);
  cursor: pointer;
}

.status-refresh:hover:not(:disabled) { border-color: var(--royal-navy); }
.status-refresh:focus-visible { outline: 2px solid var(--royal-navy); outline-offset: 2px; }
.status-refresh:disabled { opacity: 0.55; cursor: default; }


.status-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-section[hidden] { display: none; }

.status-heading {
  margin: 0;
  color: var(--text-dim);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


.status-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  font-size: var(--fs-base);
}

.status-row + .status-row { border-top: 1px solid var(--border-subtle); }

.status-row-name {
  min-width: 0;
  color: var(--text-main);
  font-weight: 600;
}

.status-row-state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.status-row-state::before,
.status-uptime-name::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-medium);
}

.status-row[data-state="ready"] .status-row-state { color: var(--p4-emerald); }
.status-row[data-state="ready"] .status-row-state::before { background: var(--p4-emerald); }
.status-row[data-state="partial"] .status-row-state { color: var(--royal-gold-dark); }
.status-row[data-state="partial"] .status-row-state::before { background: var(--royal-gold); }
.status-row[data-state="paused"] .status-row-state { color: var(--p3-burgundy); }
.status-row[data-state="paused"] .status-row-state::before { background: var(--p3-burgundy); }


.status-uptime-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.status-uptime {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-md);
}

.status-uptime th,
.status-uptime td {
  padding: 0.6rem 1rem;
  text-align: right;
  vertical-align: middle;
}

.status-uptime th:first-child { text-align: left; }

.status-uptime thead th {
  background: var(--bg-subtle);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.status-uptime tbody tr + tr > * { border-top: 1px solid var(--border-subtle); }

.status-uptime-name {
  color: var(--text-main);
  font-weight: 600;
}

.status-uptime-name::before { margin-right: 0.55rem; vertical-align: 0.1em; }

.status-uptime tr[data-state="up"] .status-uptime-name::before { background: var(--p4-emerald); }
.status-uptime tr[data-state="down"] .status-uptime-name::before { background: var(--p3-burgundy); }

.status-uptime td {
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.status-incidents {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.status-incident {
  position: relative;
  padding-left: 1.05rem;
  color: var(--text-body);
  font-size: var(--fs-md);
  line-height: 1.5;
}

.status-incident::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p3-burgundy);
}

.status-incident--none::before { background: var(--p4-emerald); }

.status-note {
  margin: 0;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  line-height: 1.5;
}


.status-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

.status-trust {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.status-trust[hidden] { display: none; }
.status-trust svg { flex-shrink: 0; margin-top: 0.15em; color: var(--p4-emerald); }

.status-checked {
  margin-left: auto;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

#status-modal.modal-backdrop {
  align-items: flex-start;
  overflow-y: auto;
}

.page-dialog.page-dialog--fit.status-dialog {
  height: auto;
  max-height: none;
  margin: auto;
}

.page-dialog.status-dialog .modal-body.status-body {
  overflow: visible;
  padding: 1.25rem 1.75rem 1.4rem;
}

@media (max-width: 640px) {
  .page-dialog.status-dialog .modal-body.status-body { padding: 1rem 1.1rem 1.2rem; }
}

@media (max-width: 560px) {
  .status-hero { padding: 0.85rem; gap: 0.75rem; }
  .status-row { padding: 0.65rem 0.85rem; font-size: var(--fs-md); }
  .status-uptime th,
  .status-uptime td { padding: 0.55rem 0.5rem; }
  .status-uptime th:first-child { padding-left: 0.8rem; }
  .status-uptime td { font-size: var(--fs-xs); }
  .status-uptime-name { white-space: nowrap; }
  .status-uptime-name::before { margin-right: 0.4rem; }
  .status-uptime tr > :nth-child(3) { display: none; }
}



.textarea-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.textarea-footer:has(.web-check-toggle) {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.textarea-footer:has(.textarea-actions) {
  flex-wrap: wrap;
  row-gap: 4px;
  column-gap: 12px;
}

.web-check-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 0;
  background: none;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.web-check-toggle:hover {
  color: var(--text-main);
}

.web-check-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.web-check-switch {
  position: relative;
  flex-shrink: 0;
  width: 26px;
  height: 15px;
  border-radius: 999px;
  background: var(--border-medium);
  transition: background-color var(--transition-fast);
}

.web-check-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--shadow-knob);
  transition: left var(--transition-fast);
}

.web-check-toggle:hover .web-check-switch {
  background: var(--text-faint2);
}

.web-check-toggle[aria-checked="true"] {
  color: var(--royal-navy);
}

.web-check-toggle[aria-checked="true"] .web-check-switch {
  background: var(--navy-solid);
}

.web-check-toggle[aria-checked="true"] .web-check-knob {
  left: 13px;
}

.web-check-toggle .pro-lock {
  margin-left: -2px;
}

.web-check-toggle.is-locked .web-check-switch {
  background: var(--border-subtle);
}

.web-sources-box {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
}

.web-sources-list {
  margin: 0.4rem 0 0.5rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-md);
  line-height: 1.45;
}

.web-sources-list a {
  color: var(--royal-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.web-sources-site {
  color: var(--text-dim);
}

.web-sources-note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
}

.web-sources-gap {
  height: 0.6rem;
}



.feedback-card {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 950;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(340px, calc(100vw - 32px));
  padding: 0.8rem 0.9rem 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-left: 4.5px solid var(--royal-gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  color: var(--text-main);
}

.feedback-card[hidden] {
  display: none;
}

body.has-support-chat .feedback-card {
  right: 1.5rem;
  bottom: calc(1.5rem + 76px);
}

body.has-feedback-card .toast-container {
  transform: translateY(calc(-1 * var(--feedback-card-space, 0px)));
}

.feedback-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.feedback-card-title {
  margin: 0;
  color: var(--text-dim);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.feedback-card-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.feedback-card-close:hover {
  border-color: var(--border-medium);
  color: var(--text-main);
}

.feedback-card-question {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.45;
}

.feedback-card-question:focus {
  outline: none;
}

.feedback-card-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.feedback-card-options:empty {
  display: none;
}

.feedback-card-option {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0.2rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--royal-navy);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.feedback-card-option:hover,
.feedback-card-option:focus-visible {
  border-color: var(--royal-navy);
  background: var(--bg-tint);
}

.feedback-card-option:focus-visible,
.feedback-card-close:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

@media (max-width: 560px) {
  .feedback-card,
  body.has-support-chat .feedback-card {
    right: 16px;
    left: 16px;
    width: auto;
  }

  .feedback-card {
    bottom: 16px;
  }

  body.has-support-chat .feedback-card {
    bottom: calc(16px + 68px);
  }

  .feedback-card-option {
    min-height: 40px;
    padding: 0.3rem 1rem;
  }
}

@media print {
  .feedback-card {
    display: none !important;
  }
}



.admin-tabs {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: 0.15rem;
  padding: 0 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--border-subtle);
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.admin-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

.admin-tab:hover {
  color: var(--royal-navy);
}

.admin-tab[aria-selected="true"] {
  border-bottom-color: var(--royal-navy);
  color: var(--royal-navy);
}

.admin-tab[aria-selected="true"] svg {
  color: var(--royal-gold);
  opacity: 1;
}

.admin-tab:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: -2px;
}

.admin-crumbs {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  box-shadow: inset 0 -1px 0 var(--border-subtle);
  font-size: var(--fs-sm);
}

.admin-crumbs[hidden] {
  display: none;
}

.admin-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--royal-navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.admin-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.admin-back:hover {
  border-color: var(--border-subtle);
  background: var(--bg-tint);
}

.admin-back:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: 1px;
}

.admin-crumbs-sep {
  color: var(--border-medium);
}

.admin-crumbs-current {
  font-weight: 700;
  color: var(--text-headings);
}

.admin-home {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-home[hidden] {
  display: none;
}

.admin-home-label {
  margin: 0 0 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-home-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.admin-home-tile:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-card);
}

.admin-home-tile:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: 2px;
}

.admin-home-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
}

.admin-home-icon svg {
  width: 18px;
  height: 18px;
}

.admin-home-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.admin-home-name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-headings);
}

.admin-home-desc {
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--text-dim);
}

.admin-modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--bg-subtle);
}

.admin-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.admin-view-heading {
  min-width: 0;
  flex: 1 1 260px;
}

.admin-view-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-headings);
}

.admin-view-desc {
  margin: 0.2rem 0 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-dim);
}

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

.admin-view-stamp {
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.admin-view-body,
.admin-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.admin-loading {
  margin: 0;
  padding: 1.25rem 0;
  font-size: var(--fs-md);
  color: var(--text-dim);
}

.admin-lead {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.admin-help {
  margin: 0;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-dim);
}

.admin-muted {
  color: var(--text-dim);
}

.admin-strong {
  font-weight: 600;
}

.admin-code {
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: var(--fs-xs);
  overflow-wrap: anywhere;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--royal-navy);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.admin-btn:hover:not(:disabled) {
  border-color: var(--royal-navy);
  background: var(--bg-tint);
}

.admin-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.admin-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.admin-btn[aria-busy="true"] {
  cursor: progress;
}

.admin-btn--primary {
  border-color: var(--navy-solid);
  background: var(--navy-solid);
  color: var(--text-on-solid);
}

.admin-btn--primary:hover:not(:disabled) {
  border-color: var(--navy-solid-hover);
  background: var(--navy-solid-hover);
}

.admin-btn--danger {
  border-color: var(--p3-burgundy-border);
  color: var(--p3-burgundy);
}

.admin-btn--danger:hover:not(:disabled) {
  border-color: var(--p3-burgundy);
  background: var(--p3-burgundy-bg);
}

.admin-icon {
  display: inline-flex;
}

.admin-icon svg {
  width: 14px;
  height: 14px;
}

.admin-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link-deep);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

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

.admin-link:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 0.75rem;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.8rem 1rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--royal-navy);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.admin-stat.is-gold { border-top-color: var(--royal-gold); }
.admin-stat.is-ok { border-top-color: var(--p4-emerald); }
.admin-stat.is-warn { border-top-color: var(--warn-text); }
.admin-stat.is-bad { border-top-color: var(--p3-burgundy); }

.admin-stat-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
}

.admin-stat-value {
  font-size: var(--fs-3xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: var(--text-headings);
  overflow-wrap: anywhere;
}

.admin-stat-hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.admin-card {
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.admin-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-card-title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-headings);
}

.admin-card-count {
  min-width: 1.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tint-strong);
  color: var(--text-main);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.admin-card-hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.admin-card-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.admin-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
}

.admin-card--flush .admin-card-body {
  padding: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.admin-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.admin-table-box {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

.admin-table th,
.admin-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

.admin-table th:first-child,
.admin-table td:first-child {
  padding-left: 1rem;
}

.admin-table th:last-child,
.admin-table td:last-child {
  padding-right: 1rem;
}

.admin-table th {
  background: var(--bg-subtle);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.admin-table td:first-child {
  color: var(--text-headings);
  font-weight: 500;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover td {
  background: var(--bg-subtle);
}

.admin-table .is-num {
  text-align: right;
  white-space: nowrap;
}

.admin-table .is-nowrap {
  white-space: nowrap;
}

.admin-table .admin-table-empty {
  padding: 1.1rem 1rem;
  color: var(--text-dim);
  font-weight: 400;
  text-align: center;
}

.admin-th-groups th {
  padding-top: 0.45rem;
  padding-bottom: 0.1rem;
  border-bottom: 0;
}

.admin-th-groups th.is-group {
  color: var(--text-main);
  text-align: center;
  box-shadow: inset 1px 0 0 var(--border-subtle);
}

.admin-table--dense th,
.admin-table--dense td {
  padding: 0.45rem 0.55rem;
}

.admin-table--dense td:first-child {
  white-space: nowrap;
}

.admin-table--meters td {
  width: 40%;
}

.admin-table--meters td:first-child {
  width: 20%;
  white-space: nowrap;
}

.admin-table--bars td:first-child {
  width: 7.5rem;
  white-space: nowrap;
}

.admin-meter {
  display: grid;
  gap: 0.3rem;
  min-width: 120px;
}

.admin-meter-text {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.admin-meter-text strong {
  color: var(--text-main);
  font-weight: 700;
}

.admin-meter-bar,
.admin-inline-bar-track {
  display: block;
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-tint-strong);
  overflow: hidden;
}

.admin-meter-bar span,
.admin-inline-bar-track span {
  display: block;
  height: 100%;
  background: var(--p1-sapphire);
}

.admin-meter.is-warn .admin-meter-bar span { background: var(--royal-gold); }
.admin-meter.is-full .admin-meter-bar span { background: var(--p3-burgundy); }

.admin-inline-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-inline-bar-track {
  flex: 1 1 auto;
  max-width: 240px;
}

.admin-inline-bar-n {
  min-width: 2ch;
  font-weight: 600;
  text-align: right;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.admin-pill-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}

.admin-pill.is-ok { border-color: var(--p4-emerald-border); background: var(--p4-emerald-bg); color: var(--p4-emerald); }
.admin-pill.is-warn { border-color: var(--royal-gold-border); background: var(--royal-gold-light); color: var(--royal-gold-dark); }
.admin-pill.is-bad { border-color: var(--p3-burgundy-border); background: var(--p3-burgundy-bg); color: var(--p3-burgundy); }
.admin-pill.is-info { border-color: var(--p1-sapphire-border); background: var(--p1-sapphire-bg); color: var(--p1-sapphire); }

.admin-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.admin-kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  font-size: var(--fs-sm);
}

.admin-kv--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
}

.admin-kv-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-kv dt {
  color: var(--text-dim);
}

.admin-kv dd {
  margin: 0;
  color: var(--text-main);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.admin-callout {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--p1-sapphire-border);
  border-left-width: 3px;
  border-left-color: var(--p1-sapphire);
  border-radius: var(--radius-sm);
  background: var(--p1-sapphire-bg);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-main);
}

.admin-callout.is-warn { border-color: var(--warn-border); border-left-color: var(--royal-gold); background: var(--warn-bg); }
.admin-callout.is-error { border-color: var(--p3-burgundy-border); border-left-color: var(--p3-burgundy); background: var(--p3-burgundy-bg); }
.admin-callout.is-ok { border-color: var(--p4-emerald-border); border-left-color: var(--p4-emerald); background: var(--p4-emerald-bg); }

.admin-explain {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.admin-explain summary {
  padding: 0.65rem 1rem;
  color: var(--royal-navy);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.admin-explain summary:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: -2px;
  border-radius: var(--radius-lg);
}

.admin-explain[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

.admin-explain-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.9rem;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-muted);
}

.admin-explain-body p {
  margin: 0;
}

.admin-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.admin-seg button {
  padding: 0.3rem 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.admin-seg button:hover {
  color: var(--royal-navy);
}

.admin-seg button[aria-pressed="true"] {
  border-color: var(--border-subtle);
  background: var(--bg-card);
  color: var(--royal-navy);
  box-shadow: var(--shadow-sm);
}

.admin-seg button:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: 1px;
}

.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-search .contact-select {
  flex: 0 0 auto;
  width: auto;
}

.admin-search .contact-input {
  flex: 1 1 260px;
  min-width: 0;
}

.admin-search .admin-btn {
  height: auto;
  min-height: 38px;
  padding: 0 1.1rem;
}

.admin-account .admin-card-title {
  font-size: var(--fs-base);
  overflow-wrap: anywhere;
}

.admin-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0.25rem;
}

.admin-subsection {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.admin-subsection-title {
  margin: 0;
  color: var(--text-headings);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.admin-data-step {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-subtle);
}

.admin-data-step-title {
  margin: 0;
  color: var(--text-main);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.admin-data-step .contact-textarea {
  width: 100%;
  resize: vertical;
}

.admin-data-step .admin-help:empty {
  display: none;
}

@media (max-width: 720px) {
  .admin-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid,
  .admin-subgrid,
  .admin-kv--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .admin-tabs {
    padding: 0 0.5rem;
  }

  .admin-tab {
    padding: 0.7rem 0.55rem;
  }

  .admin-crumbs {
    padding: 0.4rem 0.5rem;
  }

  .admin-modal-body {
    padding: 1rem;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-view-actions {
    width: 100%;
  }

  .admin-view-stamp {
    margin-right: auto;
  }
}



.writer-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  margin-bottom: 0.75rem;
}

.writer-field-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-navy);
}

.writer-field-hint {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.writer-count {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.writer-count.is-over {
  color: var(--error-text);
  font-weight: 700;
}

.writer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.75rem;
}

.writer-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.writer-checks {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.writer-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-md);
  color: var(--text-main);
}

.writer-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.6rem;
}

.writer-edit-actions .writer-field {
  flex: 1 1 260px;
  margin-bottom: 0;
}

.writer-subtitle {
  margin: 1.1rem 0 0.6rem;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-headings);
}

.writer-note {
  margin: 0 0 0.85rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-muted);
}

.writer-warn-text {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--warn-text);
}

.writer-mini-btn {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--royal-navy);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}

.writer-mini-btn:hover {
  border-color: var(--royal-navy);
  background: var(--bg-tint);
}

.writer-mini-btn:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: 1px;
}

.writer-alert {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-main);
}

.writer-alert ul {
  margin: 0.35rem 0 0.25rem;
  padding-left: 1.2rem;
}

.writer-alert p {
  margin: 0.35rem 0;
}

.writer-alert.is-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}

.writer-alert.is-error {
  background: var(--p3-burgundy-bg);
  border-color: var(--p3-burgundy-border);
}

.writer-status .admin-help {
  margin-left: 0.25rem;
}

.writer-request .admin-card-body {
  padding-top: 0.75rem;
}

.writer-pane-intro {
  margin-bottom: 0.85rem;
}

.writer-pane .writer-edit-actions {
  padding-top: 0.25rem;
}

.writer-jobs-empty {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.writer-jobs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.writer-job {
  padding: 0.7rem 0.9rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.writer-job.is-done {
  border-left-color: var(--p4-emerald);
}

.writer-job.is-failed,
.writer-job.is-cancelled {
  border-left-color: var(--p3-burgundy);
}

.writer-job.is-awaiting_outline {
  border-left-color: var(--royal-gold);
}

.writer-job-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.writer-job-head .writer-job-actions {
  flex-shrink: 0;
  margin: 0 0 0 auto;
}

.writer-job-head .insights-status-badge {
  margin-right: 0;
  flex-shrink: 0;
}

.writer-job-title {
  font-size: var(--fs-md);
  color: var(--text-headings);
  overflow-wrap: anywhere;
}

.writer-job-meta {
  margin: 0.35rem 0 0;
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.writer-job-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.writer-progress {
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-tint-strong);
  overflow: hidden;
}

.writer-progress span {
  display: block;
  height: 100%;
  background: var(--navy-solid);
  transition: width var(--transition-base);
}

.writer-progress-wrap.is-done .writer-progress span {
  background: var(--p4-emerald);
}

.writer-progress-wrap.is-failed .writer-progress span,
.writer-progress-wrap.is-cancelled .writer-progress span {
  background: var(--p3-burgundy);
}

.writer-progress-wrap.is-awaiting_outline .writer-progress span {
  background: var(--royal-gold);
}

.writer-step {
  margin: 0.35rem 0 0;
  font-size: var(--fs-sm);
  color: var(--text-main);
}

.writer-progress-wrap.is-failed .writer-step {
  color: var(--error-text);
}

.writer-log {
  margin-top: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.writer-log summary {
  cursor: pointer;
  font-weight: 600;
}

.writer-log ol {
  max-height: 12rem;
  margin: 0.4rem 0 0;
  padding-left: 1.4rem;
  overflow-y: auto;
}

.writer-outline,
.writer-ideas li {
  margin-top: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  font-size: var(--fs-sm);
  color: var(--text-main);
}

.writer-outline ol {
  margin: 0.4rem 0 0.6rem;
  padding-left: 1.3rem;
}

.writer-ideas {
  margin: 0;
  padding: 0;
  list-style: none;
}

.writer-ideas li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.writer-review-sub {
  font-size: var(--fs-sm);
}

.writer-review-alerts {
  flex-shrink: 0;
  padding: 0 1.75rem;
}

.writer-review-alerts:not(:empty) {
  padding-top: 0.75rem;
}

.writer-review-body {
  padding: 1.1rem 1.75rem 1.4rem;
}

.writer-review-footer {
  flex-wrap: wrap;
}

.writer-review-dirty {
  margin-right: auto;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--warn-text);
}

.writer-review-preview {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.writer-meta {
  padding-bottom: 0.25rem;
}

.writer-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.writer-block {
  margin: 0;
  padding: 0.6rem 0.85rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border-blue-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.writer-block.is-heading {
  border-left-color: var(--royal-navy);
}

.writer-block.is-try,
.writer-block.is-callout {
  border-left-color: var(--royal-gold);
}

.writer-block legend {
  padding: 0 0.3rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}

.writer-block-tools {
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem;
  margin: -0.2rem 0 0.35rem;
}

.writer-block .writer-field {
  margin-bottom: 0.5rem;
}

.writer-block-add {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.writer-block-add select {
  width: auto;
  padding: 0.25rem 1.9rem 0.25rem 0.5rem;
  font-size: var(--fs-xs);
}

.writer-notes-text {
  white-space: pre-line;
  font-size: var(--fs-md);
  color: var(--text-main);
}

.writer-sources {
  margin: 0;
  padding-left: 1.3rem;
  font-size: var(--fs-md);
}

.writer-sources li {
  margin-bottom: 0.5rem;
}

.writer-sources a {
  color: var(--link-deep);
  overflow-wrap: anywhere;
}

.writer-source-meta,
.writer-source-note {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.writer-plain-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: var(--fs-md);
  color: var(--text-main);
}

.writer-audit {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.writer-versions td:last-child {
  white-space: nowrap;
}

.writer-versions .writer-mini-btn + .writer-mini-btn {
  margin-left: 0.3rem;
}

@media (max-width: 640px) {
  .writer-row,
  .writer-row--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .writer-review-alerts,
  .writer-review-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .writer-review-footer > button {
    flex: 1 1 auto;
  }
}


.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.pricing-card {
  gap: 0.35rem;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
}

.pricing-card {
  position: relative;
}

.pricing-card.plan-current {
  border-color: var(--border-active);
  background: var(--bg-tint);
}

.pricing-badge {
  position: absolute;
  top: -0.6rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--royal-gold-border);
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-card.plan-current .pricing-badge {
  display: none;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.15rem 0 0;
}

.pricing-number {
  font-family: var(--font-sans);
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-headings);
}

.pricing-number--soon {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--royal-gold-dark);
}

.pricing-period {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
}

.plan-features-list.pricing-features {
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '';
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.12rem;
  background: var(--royal-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pricing-feature--lead {
  font-weight: 700;
  color: var(--text-headings);
}

.pricing-card-footer {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-subtle);
}

.pricing-card-footer .pricing-action {
  width: 100%;
  justify-content: center;
  margin-bottom: 0;
  text-decoration: none;
}

.pricing-card-footer .plan-action-btn:disabled {
  background: none;
  border-color: transparent;
  color: var(--text-dim);
  font-weight: 600;
  box-shadow: none;
  opacity: 1;
  cursor: default;
  display: block;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pricing-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
}

.pricing-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pricing-trust-item svg {
  flex-shrink: 0;
  color: var(--royal-gold);
}

.pricing-trust a {
  color: var(--royal-navy);
  font-weight: 700;
}

.pricing-dialog .modal-body {
  flex: 0 0 auto;
  overflow: visible;
}

.pricing-extra {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 0.7rem 1.75rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.pricing-extra[open] {
  padding-bottom: 1.2rem;
}

.pricing-extra-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pricing-extra-title::-webkit-details-marker {
  display: none;
}

.pricing-extra-title::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  margin: 0 0.2rem 0.2rem 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.pricing-extra[open] > .pricing-extra-title::after {
  margin-bottom: -0.2rem;
  transform: rotate(-135deg);
}

.pricing-extra-title:hover {
  color: var(--text-headings);
}

.pricing-extra-title:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-sm);
}

.pricing-details-grid {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.pricing-detail {
  padding: 0.55rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.pricing-detail-title {
  display: block;
  margin-bottom: 0.1rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-headings);
}

.pricing-detail p {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--text-dim);
}

.pricing-dialog .modal-body {
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

@media (max-width: 560px) {
  .pricing-grid,
  .pricing-details-grid {
    grid-template-columns: 1fr;
  }

  .page-dialog.pricing-dialog {
    overflow-y: auto;
  }

  .pricing-dialog .modal-body,
  .pricing-extra {
    flex: 0 0 auto;
    overflow: visible;
  }
}



.quota-wrap {
  position: relative;
  display: inline-flex;
}

.quota-wrap[hidden] {
  display: none;
}

.quota-wrap.is-pending {
  visibility: hidden;
}

.quota-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.quota-pill:hover {
  border-color: var(--border-medium);
  color: var(--text-main);
}

.quota-pill:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.quota-pill.is-low {
  border-color: var(--royal-gold-border);
  color: var(--royal-gold-dark);
}

.quota-pill.is-empty {
  border-color: var(--p3-burgundy-border);
  background: var(--p3-burgundy-bg);
  color: var(--p3-burgundy);
}

.quota-popover {
  box-sizing: border-box;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: 250px;
  max-width: calc(100vw - 2.5rem);
  padding: 0.75rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3.5px solid var(--royal-navy);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-body);
  white-space: normal;
}

.quota-popover[hidden] {
  display: none;
}

.quota-popover p {
  margin: 0 0 0.35rem;
}

.quota-popover-title {
  font-weight: 700;
  color: var(--royal-navy);
}

.quota-popover-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-main);
}

.quota-popover-reset,
.quota-popover-note {
  color: var(--text-dim);
}

.quota-popover-alert {
  padding: 0.4rem 0.5rem;
  background: var(--p3-burgundy-bg);
  border: 1px solid var(--p3-burgundy-border);
  border-radius: var(--radius-md);
  color: var(--p3-burgundy);
}

.quota-popover-alert[hidden] {
  display: none;
}

.quota-plans {
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-subtle);
}

.quota-plans li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.quota-plans li.is-current {
  background: var(--bg-tint);
  font-weight: 600;
  color: var(--royal-navy);
}

.quota-action {
  margin-top: 0.25rem;
  width: 100%;
}

.profile-quota-line {
  margin: 0;
  min-height: 1.5em;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-dim);
}

.profile-quota-line[hidden] {
  display: block;
  visibility: hidden;
}



.pillar-lean {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-main);
}

.pillar-cyan .pillar-lean { color: var(--p1-sapphire); }
.pillar-purple .pillar-lean { color: var(--p2-amethyst); }
.pillar-rose .pillar-lean { color: var(--p3-burgundy); }
.pillar-emerald .pillar-lean { color: var(--p4-emerald); }

.compass-answer[hidden],
.compass-summary[hidden],
.action-plan[hidden],
.action-plan-actions[hidden],
.rerun-box[hidden],
.answer-switch[hidden],
.pillar-lean[hidden],
.action-plan-personal[hidden] {
  display: none;
}

.compass-ready {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compass-answer:not([hidden]) ~ .compass-ready {
  display: none;
}

.compass-ready-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
}

.compass-ready-box--summary {
  min-height: 16rem;
}

.compass-ready-box--plan {
  min-height: 14rem;
}

.compass-ready-question {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.compass-ready-note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.compass-answer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compass-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.75rem;
  padding: 1.15rem 1.35rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.compass-shared-lean {
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 0.8rem;
  border-left: 3px solid var(--royal-navy);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-main);
}

.compass-shared-lean[hidden],
.compass-leans[hidden] {
  display: none;
}

.compass-leans {
  grid-column: 1 / -1;
}

.compass-leans-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compass-leans-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.55rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--lean-color, var(--border-medium));
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  line-height: 1.4;
}

.compass-leans-item.lean-p1 { --lean-color: var(--p1-sapphire); }
.compass-leans-item.lean-p2 { --lean-color: var(--p2-amethyst); }
.compass-leans-item.lean-p3 { --lean-color: var(--p3-burgundy); }
.compass-leans-item.lean-p4 { --lean-color: var(--p4-emerald); }

.compass-leans-item b {
  font-weight: 600;
  color: var(--text-headings);
}

.compass-leans-option {
  font-weight: 600;
  color: var(--lean-color);
}

.compass-leans-option.is-none {
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
}

@media (max-width: 1200px) {
  .compass-leans-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .compass-leans-list { grid-template-columns: 1fr; }
}

.compass-shared-lean-label {
  font-weight: 700;
  color: var(--text-muted);
}

.compass-shared-lean strong {
  font-weight: 700;
  color: var(--royal-navy);
}

.compass-summary-row {
  padding-left: 0.8rem;
  border-left: 3px solid var(--border-medium);
}

.compass-summary-row--deciding {
  border-left-color: var(--royal-gold);
}

.compass-summary-label {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
}

.compass-summary-text {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text-main);
}

.compass-summary-row--deciding .compass-summary-text {
  font-family: var(--font-serif);
  font-weight: 600;
}

.compass-summary-row--deciding {
  grid-column: 1 / -1;
  order: -2;
}

.compass-summary-row--deciding .compass-summary-text {
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--text-headings);
}

.compass-shared-lean,
.compass-leans {
  order: -1;
}

.action-plan {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-plan-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 0.75rem;
}

.action-plan-title,
.rerun-label {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text-headings);
}

.action-plan-sub {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.action-plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.6rem 0.6rem 0.9rem;
  background: var(--bg-subtle);
  border-left: 3px solid var(--border-medium);
  border-radius: var(--radius-sm);
}

.action-plan-item.plan-p1 { border-left-color: var(--p1-sapphire); }
.action-plan-item.plan-p2 { border-left-color: var(--p2-amethyst); }
.action-plan-item.plan-p3 { border-left-color: var(--p3-burgundy); }
.action-plan-item.plan-p4 { border-left-color: var(--p4-emerald); }

.action-plan-item.is-muted {
  opacity: 0.6;
}

.action-plan-check {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.action-plan-check input {
  align-self: center;
}

.action-plan-step {
  flex: 1 1 260px;
  min-width: 0;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.45;
}

.action-plan-item.is-done .action-plan-step {
  text-decoration: line-through;
  color: var(--text-dim);
}

.action-plan-from {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.plan-weight {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.plan-weight-btn {
  padding: 3px 8px;
  background: var(--bg-card);
  border: none;
  border-left: 1px solid var(--border-subtle);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.plan-weight-btn:first-child {
  border-left: none;
}

.plan-weight-btn:not(:disabled):hover {
  background: var(--bg-tint);
  color: var(--text-main);
}

.plan-weight-btn[aria-checked="true"] {
  background: var(--navy-solid);
  color: var(--text-on-solid);
}

.plan-weight-btn:focus-visible,
.answer-switch-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.action-plan-personal {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--royal-gold-dark);
}

.action-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rerun-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  padding: 1.1rem 0 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.rerun-box .answer-switch {
  flex-basis: 100%;
  margin-top: 0.5rem;
}

.rerun-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rerun-label {
  margin-right: 4px;
}

.rerun-or {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.rerun-angles {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-outline-sm.btn-strong-sm {
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.btn-outline-sm.rerun-angle {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-body);
  font-weight: 500;
}

.btn-outline-sm.rerun-angle:hover {
  background: var(--bg-tint);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.rerun-note {
  flex-basis: 100%;
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.answer-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.answer-switch-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
}

.answer-switch-btn {
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.answer-switch-btn:hover {
  border-color: var(--royal-navy);
}

.answer-switch-btn[aria-pressed="true"] {
  background: var(--bg-tint);
  border-color: var(--border-active);
  color: var(--royal-navy);
}

.question-helpers {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.templates-wrap {
  position: relative;
}

.templates-menu {
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
}

.ask-guide {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.ask-guide-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
}

.ask-guide-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ask-guide-item {
  display: flex;
  align-items: center;
}

.ask-guide .detail-hint {
  padding: 0.22rem 0.6rem;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.detail-hint[hidden],
.ask-guide-done {
  display: none;
}

.detail-hint[hidden] + .ask-guide-done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.22rem 0.2rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-gold-dark);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .compass-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .action-plan-item {
    flex-direction: column;
    align-items: stretch;
  }
  .plan-weight {
    align-self: flex-start;
  }
}

.compass-summary,
.compass-answer {
  scroll-margin-top: 1.5rem;
}



.card-qa-open {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  border-color: var(--expanded-accent, var(--royal-navy));
  color: var(--expanded-accent, var(--royal-navy));
}

.card-qa-open:hover {
  border-color: var(--expanded-accent, var(--royal-navy));
  color: var(--expanded-accent, var(--royal-navy));
  background: var(--bg-tint);
}

.card-qa-open[hidden] {
  display: none;
}

.card-qa-open:disabled,
.card-qa-open:disabled:hover {
  opacity: 0.45;
  background: transparent;
  cursor: default;
}

.card-qa-open svg {
  flex-shrink: 0;
}

.expanded-dialog[data-card="p1"] { --expanded-tint: var(--p1-sapphire-bg); }
.expanded-dialog[data-card="p2"] { --expanded-tint: var(--p2-amethyst-bg); }
.expanded-dialog[data-card="p3"] { --expanded-tint: var(--p3-burgundy-bg); }
.expanded-dialog[data-card="p4"] { --expanded-tint: var(--p4-emerald-bg); }

.card-qa-open[aria-expanded="true"],
.card-qa-open[aria-expanded="true"]:hover {
  background: var(--expanded-tint, var(--bg-tint));
  border-color: var(--expanded-accent, var(--royal-navy));
  box-shadow: inset 0 0 0 1px var(--expanded-accent, var(--royal-navy));
  color: var(--expanded-accent, var(--royal-navy));
}

.card-qa-panel { --qa-accent: var(--royal-navy); --qa-bg: var(--bg-tint); --qa-border: var(--border-subtle); }
.card-qa-panel[data-card="p1"] { --qa-accent: var(--p1-sapphire); --qa-bg: var(--p1-sapphire-bg); --qa-border: var(--p1-sapphire-border); }
.card-qa-panel[data-card="p2"] { --qa-accent: var(--p2-amethyst); --qa-bg: var(--p2-amethyst-bg); --qa-border: var(--p2-amethyst-border); }
.card-qa-panel[data-card="p3"] { --qa-accent: var(--p3-burgundy); --qa-bg: var(--p3-burgundy-bg); --qa-border: var(--p3-burgundy-border); }
.card-qa-panel[data-card="p4"] { --qa-accent: var(--p4-emerald); --qa-bg: var(--p4-emerald-bg); --qa-border: var(--p4-emerald-border); }

.card-qa-panel {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: min(380px, calc(100vw - 16px));
  height: min(520px, calc(100vh - 16px));
  height: min(520px, calc(100dvh - 16px));
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--qa-border);
  border-top: 4px solid var(--qa-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.card-qa-panel[style*="left"] {
  right: auto;
}

.card-qa-panel[hidden] {
  display: none;
}

.card-qa-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem calc(0.95rem - 4px) 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  cursor: grab;
  touch-action: none;
  user-select: none;
  flex-shrink: 0;
}

.card-qa-panel.is-dragging .card-qa-head {
  cursor: grabbing;
}

.card-qa-panel.is-dragging {
  box-shadow: var(--shadow-hover), var(--shadow-pop);
}

.card-qa-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  cursor: inherit;
  flex-shrink: 0;
}

.card-qa-grip:hover {
  color: var(--qa-accent);
}

.card-qa-grip:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.card-qa-titles {
  flex: 1;
  min-width: 0;
}

.card-qa-titles .perspective-tag {
  display: block;
  color: var(--qa-accent);
}

.card-qa-subtitle {
  margin: 0.15rem 0 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-qa-title {
  margin: 0.1rem 0 0;
  font-size: var(--fs-lg);
  line-height: 1.3;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-qa-close {
  cursor: pointer;
}

.card-qa-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.85rem 0.95rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.card-qa-lead {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-muted);
}

.card-qa-empty {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  font-size: var(--fs-sm);
  line-height: 1.45;
  text-align: center;
  color: var(--text-muted);
}

.card-qa-empty svg {
  flex-shrink: 0;
  color: var(--qa-accent);
}

.card-qa-body:not(:has(> .card-qa-thread:empty)) > .card-qa-empty {
  display: none;
}

.card-qa-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card-qa-starters[hidden] {
  display: none;
}

.card-qa-chip {
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  background: var(--bg-tint);
  color: var(--text-body);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.card-qa-chip:hover {
  background: var(--bg-subtle);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.card-qa-chip:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-color: var(--royal-navy);
}

.card-qa-thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-qa-thread:empty {
  display: none;
}

.card-qa-msg {
  max-width: 92%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: var(--fs-md);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.card-qa-msg--user {
  align-self: flex-end;
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.card-qa-msg--reply {
  align-self: flex-start;
  background: var(--qa-bg);
  border: 1px solid var(--qa-border);
  border-left: 3px solid var(--qa-accent);
  color: var(--text-body);
}

.card-qa-msg--note {
  align-self: stretch;
  max-width: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--fs-md);
}

.card-qa-msg--typing {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 70%;
  background: var(--qa-bg);
  border: 1px solid var(--qa-border);
  border-left: 3px solid var(--qa-accent);
  color: var(--text-muted);
  font-style: italic;
  font-size: var(--fs-md);
}

.card-qa-wave {
  display: block;
  height: 3px;
  border-radius: var(--radius-sm);
  background-color: var(--qa-border);
  background-image: linear-gradient(90deg, transparent 0%, var(--qa-accent) 50%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 120px 100%;
  animation: calmWhiteWave 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .card-qa-wave {
    animation: none;
    background-image: none;
  }
}

.card-qa-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  white-space: normal;
}

.card-qa-end {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-md);
  background: var(--royal-gold-light);
}

.card-qa-end[hidden] {
  display: none;
}

.card-qa-end-text {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-main);
}

.card-qa-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem 0.8rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  flex-shrink: 0;
}

.card-qa-form[hidden] {
  display: none;
}

.card-qa-input {
  width: 100%;
  resize: none;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--fs-md);
  line-height: 1.45;
}

.card-qa-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

.card-qa-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-qa-form-row .card-qa-send {
  flex-shrink: 0;
  justify-content: center;
}

.card-qa-left:empty {
  display: none;
}

.card-qa-note {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-qa-left {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
}

.card-qa-send.btn-outline-sm,
.card-qa-send.btn-outline-sm:hover {
  padding-inline: 1.1rem;
  background: var(--qa-accent);
  border-color: var(--qa-accent);
  color: var(--text-on-solid);
}

.card-qa-send.btn-outline-sm:hover:not(:disabled) {
  opacity: 0.88;
}

.card-qa-send.btn-outline-sm:disabled,
.card-qa-send.btn-outline-sm:disabled:hover {
  background: var(--bg-subtle);
  border-color: var(--border-medium);
  color: var(--text-faint);
  opacity: 1;
  cursor: not-allowed;
}

@media (min-width: 1200px) {
  #expanded-modal {
    gap: 12px;
  }

  #expanded-modal > .card-qa-panel {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 360px;
    width: 360px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
  }

  #expanded-modal:has(> .card-qa-panel:not([hidden])) .expanded-dialog {
    min-height: min(480px, calc(100dvh - 3rem));
  }

  .card-qa-head {
    cursor: default;
    padding-left: 0.95rem;
  }

  .card-qa-grip {
    display: none;
  }
}

@media (max-width: 640px) {
  .card-qa-panel,
  .card-qa-panel[style*="left"] {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: 62vh;
    height: 62dvh;
  }

  .card-qa-head {
    cursor: default;
  }

  .card-qa-grip {
    display: none;
  }
}



.page-dialog.page-dialog--fit.planner-dialog {
  max-height: min(920px, calc(100vh - 2rem));
  max-height: min(920px, calc(100dvh - 2rem));
}

.planner-body {
  --planner-pad-b: 1.5rem;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--planner-pad-b);
}

.planner-step[hidden] {
  display: none;
}

.planner-intro {
  margin-top: 0.55rem;
  padding: 0.1rem 0 0.1rem 0.75rem;
  border-left: 2px solid var(--royal-gold-border);
}

.planner-line {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-faint);
}

.planner-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
}

.planner-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.planner-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.planner-count,
.planner-hint,
.planner-optional {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-faint);
}

.planner-count.is-near {
  color: var(--warn-text);
}

.planner-textarea {
  resize: none;
  height: 6.5rem;
  line-height: 1.5;
  background: var(--bg-input);
}

.planner-textarea--short {
  height: 3.75rem;
}

.planner-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.85rem 2.5rem;
}

.planner-field--words {
  max-width: 22rem;
}

.planner-words {
  max-width: 10rem;
  background: var(--bg-input);
}

.planner-choice {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.planner-choice legend {
  padding: 0;
  margin-bottom: 6px;
}

.planner-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.planner-pill {
  position: relative;
  cursor: pointer;
}

.planner-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.planner-pill span {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.3rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-body);
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.planner-pill:hover span {
  border-color: var(--royal-navy);
}

.planner-pill input:checked + span {
  border-color: var(--border-active);
  background: var(--bg-tint);
  color: var(--royal-navy);
}

.planner-pill input:checked + span::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: calc(50% - 0.4rem);
  width: 0.3rem;
  height: 0.6rem;
  border: solid var(--royal-gold);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}

.planner-pill input:focus-visible + span {
  box-shadow: var(--ring-focus);
}

.planner-form .auth-feedback-banner {
  margin-bottom: 0;
}

.planner-form .auth-feedback-banner[hidden] {
  display: none;
}

.planner-form-footer {
  --tool-btn-w: 7.5rem;
  --tool-btn-h: 2.5rem;
  --tool-frame-pad: 0.6rem;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0;
  padding-top: 0.85rem;
}

.planner-footer-start {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}

.planner-footer-group {
  margin: 0;
  padding: 0.3rem var(--tool-frame-pad) var(--tool-frame-pad);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 0;
}

.planner-footer-label {
  padding: 0 0.35rem;
  margin-left: -0.35rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-dim);
}

.planner-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.planner-example {
  height: var(--tool-btn-h);
  padding: 0 0.65rem;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.planner-example:hover {
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.planner-left {
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-faint);
  white-space: nowrap;
  min-height: 1.45em;
}

.planner-account {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-left: 0.6rem;
  vertical-align: baseline;
}

.planner-safety {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
}

.planner-submit {
  width: var(--tool-btn-w);
  height: var(--tool-btn-h);
  padding: 0 0.5rem;
  font-size: var(--fs-md);
  white-space: nowrap;
  margin-bottom: calc(var(--tool-frame-pad) + 1px);
}

.planner-submit[disabled] {
  cursor: wait;
}

.planner-footer-end {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.tool-wait {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tool-wait[hidden] {
  display: none;
}

.tool-wait-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.tool-wait-text {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.tool-wait-time {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-navy);
  font-variant-numeric: tabular-nums;
}

.tool-wait-bar {
  height: 4px;
  background: var(--border-subtle);
  overflow: hidden;
}

.tool-wait-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--royal-gold);
  transition: width 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .tool-wait-fill {
    transition: none;
  }
}

.planner-plan-title {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  color: var(--text-headings);
}

.planner-plan-title:focus {
  outline: none;
}

.planner-note {
  display: flex;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--royal-gold);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-main);
}

.planner-note--care {
  border-left-color: var(--royal-navy);
  background: var(--bg-tint);
}

.planner-note--example {
  flex-wrap: wrap;
  align-items: baseline;
  border-left-color: var(--royal-navy);
  background: var(--bg-tint);
}

.planner-note--example .planner-account {
  margin-left: 0;
}

.planner-section {
  margin: 0 0 1.4rem;
}

.planner-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  color: var(--royal-navy);
}

.planner-section-num {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: var(--radius-sm);
  background: var(--navy-solid);
  color: var(--text-on-solid);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.4rem;
}

.planner-block {
  min-width: 0;
}

.planner-sub {
  margin: 0 0 0.3rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.planner-text {
  margin: 0;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text-body);
}

.planner-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.25rem;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-body);
}

.planner-list li::marker {
  color: var(--royal-gold);
}

.planner-words-list {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.planner-words-list dt {
  font-weight: 700;
  color: var(--royal-navy);
  font-size: var(--fs-base);
}

.planner-words-list dd {
  margin: 0 0 0.2rem;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-body);
}

.planner-none {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-faint);
}

.planner-reading {
  display: grid;
  gap: 0.6rem;
}

.planner-reading-part {
  margin: 0 0 0.2rem;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-main);
}

.planner-budgets {
  width: 100%;
  margin: 0 0 0.4rem;
  border-collapse: collapse;
  font-size: var(--fs-base);
}

.planner-budgets th,
.planner-budgets td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  color: var(--text-body);
}

.planner-budgets th {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.planner-budgets td:last-child,
.planner-budgets th:last-child {
  text-align: right;
  white-space: nowrap;
}

.planner-budgets tfoot td {
  font-weight: 700;
  border-bottom: 0;
}

.planner-budget-note {
  margin: 0 0 1rem;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.planner-parts {
  display: grid;
  gap: 0.9rem;
}

.planner-part {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.planner-part-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.planner-part-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-headings);
}

.planner-part-role {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--royal-gold-dark);
}

.planner-budget {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.planner-part .planner-grid {
  margin-top: 0.7rem;
}

.planner-block--terms {
  margin-top: 0.7rem;
}

.planner-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.planner-terms li {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  background: var(--royal-navy-light);
  font-size: var(--fs-sm);
  color: var(--royal-navy);
}

.planner-done {
  display: flex;
  gap: 0.5rem;
  margin: 0.8rem 0 0;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-body);
}

.planner-done::before {
  content: '';
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.2rem;
  border: 1.5px solid var(--royal-navy);
  border-radius: 4px;
}

.planner-starter {
  margin: 0.8rem 0 0;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--royal-navy);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-style: italic;
  line-height: 1.5;
  color: var(--text-main);
}

.planner-starter-label {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.planner-plan-actions {
  position: sticky;
  bottom: calc(-1 * var(--planner-pad-b));
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  margin: 1.2rem -1.75rem calc(-1 * var(--planner-pad-b));
  padding: 0.75rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.planner-top {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.planner-top.is-shown {
  display: inline-flex;
}

.planner-plan-actions .planner-pdf {
  width: auto;
  margin-right: auto;
  padding: 0.42rem 0.88rem;
  font-size: var(--fs-sm);
}

@media (max-height: 820px) {
  .planner-body {
    --planner-pad-b: 1rem;
    padding-top: 1rem;
  }

  .planner-form {
    gap: 0.7rem;
  }

  .planner-textarea {
    height: 5rem;
  }

  .planner-textarea--short {
    height: 3rem;
  }
}

@media (max-width: 720px) {
  .planner-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .planner-form {
    padding: 0.9rem;
  }

  .planner-part-head {
    flex-direction: column;
    gap: 0.4rem;
  }

  .planner-form-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .planner-submit {
    width: 100%;
    margin-bottom: 0;
  }

  .planner-left {
    white-space: normal;
  }

  .planner-footer-end {
    --tool-btn-w: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .planner-footer-end .intel-buttons-group--tool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planner-plan-actions {
    justify-content: stretch;
  }

  .planner-plan-actions .btn-outline-sm,
  .planner-plan-actions .planner-pdf {
    flex: 1 1 auto;
    justify-content: center;
  }

  .planner-plan-actions .planner-top {
    flex: 0 0 auto;
  }

  .planner-plan-actions .planner-pdf {
    flex-basis: 100%;
    margin-right: 0;
  }
}



.taskplanner-chips .planner-pill span {
  padding: 0.38rem 1.05rem;
  font-size: var(--fs-sm);
}

.taskplanner-chips .planner-pill input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.taskplanner-chips .planner-pill:has(input:disabled):hover span {
  border-color: var(--border-medium);
}

.taskplanner-dialog legend .planner-hint {
  margin-left: 0.35rem;
}

.taskplanner-to-assignment {
  align-self: flex-start;
}

.taskplanner-to-assignment[hidden] {
  display: none;
}

.taskplanner-top > :nth-child(3) {
  grid-column: 1 / -1;
}

.taskplanner-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.4rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.taskplanner-task {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-headings);
}

.taskplanner-first {
  margin: 0 0 1.4rem;
  padding: 0.75rem 0.95rem;
  border-left: 3px solid var(--royal-gold);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--text-main);
}

.taskplanner-sections {
  display: grid;
  gap: 0.9rem;
}

.taskplanner-section {
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.taskplanner-section.is-heavy {
  border-color: var(--royal-gold-border);
  box-shadow: inset 3px 0 0 var(--royal-gold);
}

.taskplanner-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.taskplanner-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-headings);
}

.taskplanner-effort {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.taskplanner-marks {
  display: inline-flex;
  gap: 3px;
}

.taskplanner-marks i {
  width: 0.6rem;
  height: 0.6rem;
  border: 1.5px solid var(--royal-navy);
  border-radius: 2px;
}

.taskplanner-marks i.is-on {
  background: var(--navy-solid);
  border-color: var(--navy-solid);
}

.taskplanner-why {
  margin: 0.35rem 0 0;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-dim);
}

.taskplanner-heavy-note {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-gold-dark);
}

.taskplanner-steps {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.taskplanner-step {
  display: flex;
  gap: 0.6rem;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-body);
}

.taskplanner-box {
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.2rem;
  border: 1.5px solid var(--royal-navy);
  border-radius: 4px;
}

.taskplanner-step-text {
  min-width: 0;
}

.taskplanner-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: 0.4rem;
  vertical-align: 1px;
}

.taskplanner-tag {
  padding: 0.05rem 0.45rem;
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  background: var(--royal-navy-light);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--royal-navy);
}

.taskplanner-tag--money {
  border-color: var(--royal-gold-border);
  background: var(--royal-gold-light);
  color: var(--royal-gold-dark);
}

.taskplanner-choice {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--fs-sm);
  color: var(--royal-navy);
}

.taskplanner-section-done {
  display: flex;
  gap: 0.6rem;
  margin: 0.8rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-subtle);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
}

.taskplanner-section-done .taskplanner-box {
  margin-top: 0.1rem;
}

.taskplanner-plan-part {
  margin: 1.4rem 0 0;
}

.taskplanner-needs {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taskplanner-needs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: var(--fs-base);
  line-height: 1.45;
  color: var(--text-body);
}

.taskplanner-when {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.taskplanner-ifthen {
  margin: 0 0 0.45rem;
  padding: 0.55rem 0.8rem;
  border-left: 3px solid var(--royal-navy);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-main);
}

.taskplanner-ifthen strong {
  color: var(--royal-navy);
}

.taskplanner-finish {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.5rem;
  margin: 1.4rem 0 0;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-main);
}

.taskplanner-line {
  display: inline-block;
  width: 9rem;
  margin-left: 0.4rem;
  border-bottom: 1.5px solid var(--border-medium);
}

@media (max-width: 720px) {
  .taskplanner-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .taskplanner-section-head {
    flex-direction: column;
    gap: 0.35rem;
  }
}



.conversation-pills {
  gap: 0.4rem;
}

.conversation-pills .planner-pill span {
  padding: 0.36rem 1.05rem;
  font-size: var(--fs-sm);
}

.conversation-fears .planner-pill input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.conversation-fears .planner-pill:has(input:disabled):hover span {
  border-color: var(--border-medium);
}

.conversation-dialog legend .planner-hint {
  margin-left: 0.35rem;
}

.conversation-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.4rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.conversation-talk {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-headings);
}

.conversation-choice {
  display: inline-block;
  margin: -0.3rem 0 1rem;
  font-size: var(--fs-sm);
  color: var(--royal-navy);
}

.conversation-part {
  margin: 0 0 1.4rem;
}

.conversation-part > .planner-block + .planner-block,
.conversation-part > .planner-block + .conversation-ifthens,
.conversation-part > .planner-starter + .planner-block {
  margin-top: 0.8rem;
}

.conversation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.conversation-channel {
  color: var(--royal-navy);
}

.conversation-stages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.conversation-stage {
  min-width: 0;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.conversation-stage.is-hot {
  border-color: var(--royal-gold-border);
  box-shadow: inset 3px 0 0 var(--royal-gold);
}

.conversation-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.conversation-stage-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-headings);
}

.conversation-heat {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.conversation-marks {
  display: inline-flex;
  gap: 3px;
}

.conversation-marks i {
  width: 0.6rem;
  height: 0.6rem;
  border: 1.5px solid var(--royal-navy);
  border-radius: 2px;
}

.conversation-marks i.is-on {
  background: var(--navy-solid);
  border-color: var(--navy-solid);
}

.conversation-hot-note {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--royal-gold-border);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--royal-gold-dark);
}

.conversation-opener {
  margin-top: 0.7rem;
}

.conversation-notes {
  margin-top: 0.7rem;
  color: var(--text-body);
}

.conversation-ifthens {
  margin-top: 0.8rem;
}

.conversation-ifthen {
  margin: 0 0 0.45rem;
  padding: 0.55rem 0.8rem;
  border-left: 3px solid var(--royal-navy);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-main);
}

.conversation-ifthen strong {
  color: var(--royal-navy);
}

.conversation-pause {
  margin: 0.8rem 0 0;
}

.conversation-pocket {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conversation-pocket li {
  padding: 0.5rem 0.8rem;
  border-left: 3px solid var(--royal-gold);
  border-radius: var(--radius-sm);
  background: var(--royal-gold-light);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-main);
}

.conversation-finish {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.5rem;
  margin: 1.4rem 0 0;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-main);
}

.conversation-line {
  display: inline-block;
  width: 9rem;
  margin-left: 0.4rem;
  border-bottom: 1.5px solid var(--border-medium);
}

@media (max-width: 720px) {
  .conversation-top,
  .conversation-grid,
  .conversation-stages {
    grid-template-columns: minmax(0, 1fr);
  }

  .conversation-stage-head {
    flex-direction: column;
    gap: 0.35rem;
  }
}



.left-input-panel .panel-header,
.decision-compass-bar .compass-bar-header {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.right-outputs-panel .outputs-toolbar {
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.right-outputs-panel .outputs-head .answer-brief {
  margin-top: 1.1rem;
  padding: 0.65rem 1rem;
  background: var(--bg-tint);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
}

.left-input-panel .panel-header-icon,
.decision-compass-bar .compass-icon-badge,
.right-outputs-panel .outputs-heading-icon,
.thinking-dashboard .dash-icon {
  width: 22px;
  height: 22px;
  background: none;
  border: 0;
  border-radius: 0;
}

.left-input-panel .panel-header-icon svg,
.decision-compass-bar .compass-icon-badge svg,
.right-outputs-panel .outputs-heading-icon svg,
.thinking-dashboard .dash-icon svg {
  width: 22px;
  height: 22px;
}

.app-container .btn-outline-sm:not(.btn-strong-sm),
.app-container .card-action-btn:not(.is-speaking),
.app-container .btn-micro {
  background: var(--bg-subtle);
  border-color: transparent;
}

.app-container .btn-outline-sm:not(.btn-strong-sm):not(:disabled):hover,
.app-container .card-action-btn:not(.is-speaking):not(:disabled):hover,
.app-container .btn-micro:hover {
  background: var(--bg-tint);
  border-color: var(--royal-navy);
  color: var(--royal-navy);
}

.left-input-panel .panel-title,
.decision-compass-bar .compass-bar-title,
.right-outputs-panel .outputs-heading {
  font-size: var(--fs-2xl);
}

.left-input-panel .panel-header > div:last-child {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 0.7rem;
}

.left-input-panel .panel-subtitle,
.decision-compass-bar .compass-bar-subtitle {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-muted);
}




@keyframes dl-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.app-container > * {
  animation: dl-rise 480ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.app-container > :nth-child(2) { animation-delay: 60ms; }
.app-container > :nth-child(3) { animation-delay: 120ms; }
.app-container > :nth-child(4) { animation-delay: 180ms; }

html,
.card-qa-body,
.message-textarea {
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}
:where(.modal-backdrop) * {
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

::selection {
  background: var(--bg-tint-strong);
  color: var(--text-main);
}

h1, h2, h3 {
  text-wrap: balance;
}

:where(a, button, [role="button"], [role="switch"], summary):focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .app-container > * {
    animation: none;
  }
  .modal-dialog,
  .modal-backdrop.open .modal-dialog {
    transform: none;
  }
}


@media (max-width: 1360px) {
  .editorial-edition-tag {
    display: none;
  }
}

@media (max-width: 1200px) {
  .main-workspace {
    grid-template-columns: 380px 1fr;
  }
}

@media (max-width: 1024px) {
  :root {
    --page-gutter: 1rem;
  }

  .app-container {
    padding: 1rem var(--page-gutter) 2rem;
  }
  
  .dashboard-header-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .main-workspace {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .main-workspace > * {
    min-width: 0;
  }

  .left-input-panel {
    height: auto;
  }

  .panel-card {
    height: auto;
  }

  .textarea-wrapper {
    flex: none;
    min-height: auto;
    max-height: none;
  }

  .message-textarea {
    flex: none;
    height: 145px;
    min-height: 145px;
    max-height: none;
  }

  .right-outputs-panel {
    height: auto;
    padding: 1rem;
  }

  .quad-grid-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    flex: none;
    height: auto;
    gap: 0.75rem;
  }

  .perspective-card {
    min-height: 540px;
    height: auto;
  }

  .pipeline-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage-connector {
    display: none;
  }
}

@media (max-width: 1200px) {
  .header-row {
    flex-wrap: wrap;
  }

  .header-end,
  .btn-mobile-nav {
    display: inline-flex;
  }

  .site-nav {
    order: 1;
    display: none;
    width: 100%;
    padding: 0.75rem 0 0.35rem;
    border-left: 0;
    border-top: 1px solid var(--band-border);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.4rem;
  }

  .nav-link {
    width: 100%;
    padding: 0.65rem 0.95rem;
  }

  .nav-link.is-active {
    background: var(--band-hover);
    box-shadow: inset 3px 0 0 var(--band-gold);
  }

  .btn-nav-auth,
  .btn-nav-user {
    margin-left: 0;
  }
}

@media (max-width: 920px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-title {
    font-size: 1.4rem;
  }

  .dash-telemetry {
    display: none;
  }

  .thinking-dashboard {
    padding: 0.9rem 1rem;
  }

  .dashboard-header-bar,
  .dash-title-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .dash-title,
  .thinking-dashboard.is-intro .dash-title,
  .thinking-dashboard.is-done .dash-title {
    white-space: normal;
    font-size: var(--fs-lg);
  }

  .pipeline-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .pipeline-stage {
    justify-content: center;
    padding: 0.5rem;
  }

  .pipeline-stage .stage-info,
  .pipeline-stage .stage-connector {
    display: none;
  }

  .thinking-stream-panel .terminal-bar,
  .thinking-stream-panel .stream-content {
    display: none;
  }

  .thinking-stream-panel {
    border: none;
    background: transparent;
    margin-top: 0.5rem;
  }

  .outputs-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .outputs-title-wrap {
    flex: none;
    width: 100%;
  }

  .outputs-heading {
    white-space: nowrap;
  }

  .card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "sub   actions";
    column-gap: 0.75rem;
    align-items: center;
    min-height: 0;
  }

  .card-header-left,
  .card-title-group {
    display: contents;
  }

  .card-icon-badge {
    display: none;
  }

  .perspective-title { grid-area: title; }
  .card-actions { grid-area: actions; }

  .archetype-label {
    grid-area: sub;
    margin-top: 0.35rem;
  }

  .card-actions {
    margin-top: 0.35rem;
  }

  .outputs-quick-actions {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .outputs-quick-actions .btn-outline-sm {
    width: 40px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }

  .outputs-quick-actions .btn-outline-sm > span:not([aria-hidden="true"]) {
    display: none;
  }

  .outputs-quick-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  #expanded-modal {
    padding: 0.75rem;
  }

  .expanded-dialog .modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, auto);
    grid-template-rows: auto auto;
    column-gap: 0.35rem;
    align-items: start;
    padding: 1rem;
    min-height: 0;
  }

  .expanded-dialog .modal-title-wrap,
  .expanded-dialog .modal-title-wrap > div:not(.modal-icon),
  .expanded-dialog .modal-actions-right {
    display: contents;
  }

  .expanded-dialog .modal-icon {
    display: none;
  }

  .expanded-dialog .modal-title {
    grid-column: 1 / 4;
    grid-row: 1;
  }

  .expanded-dialog .modal-close-btn {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    margin-top: -2px;
  }

  .expanded-dialog .modal-desc {
    grid-column: 1;
    grid-row: 2;
  }

  .expanded-dialog .modal-actions-right .expanded-icon-btn {
    grid-row: 2;
    align-self: end;
  }

  .expanded-body {
    padding: 1.1rem 1.1rem 1.25rem;
    gap: 1.1rem;
  }

  .expanded-nav {
    gap: 0.5rem;
    padding: 0.65rem 1rem;
  }

  .expanded-nav-btn > span,
  .expanded-nav-count-long,
  .card-qa-open-more {
    display: none;
  }

  .expanded-nav-count-short {
    display: inline;
  }

  .expanded-nav-btn.btn-outline-sm {
    width: 38px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }

  .left-input-panel .panel-header-icon,
  .decision-compass-bar .compass-icon-badge,
  .right-outputs-panel .outputs-heading-icon,
  .thinking-dashboard .dash-icon {
    display: none;
  }

  .panel-subtitle {
    white-space: normal;
  }

  .chips-label,
  .chips-list,
  .ask-guide {
    display: none;
  }

  .message-textarea {
    height: 175px;
    min-height: 175px;
    scrollbar-width: none;
  }

  .message-textarea::-webkit-scrollbar {
    display: none;
  }

  .cta-promises {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    padding-inline: 0.25rem;
  }

  .cta-promises li {
    align-items: flex-start;
    white-space: normal;
  }

  .cta-promises li::before {
    margin-top: 0.4em;
  }

  .cta-promises li:nth-child(even) {
    display: none;
  }
  .contact-form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-footer {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tile-title {
    white-space: normal;
  }

  .tile-keyword-line {
    white-space: normal;
  }

  .tile-keyword-line + .tile-keyword-line {
    display: none;
  }

  .framework-selector-header,
  .intel-header-row {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .framework-selector-header {
    height: auto;
  }
}


