/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --canvas: #f8f0e3;
  --surface: #fffaf1;
  --surface-soft: #f1e5d3;
  --ink: #20231f;
  --ink-soft: #62655d;
  --line: #e8d9c4;
  --line-strong: #c8b49a;
  --oxblood: #7a2e35;
  --sage: #7f8a72;
  --brass: #b89b5e;
  --sun: #d7824a;
  --signal-blue: #607d94;
  --danger: #a43d35;
  --active-accent: #d7824a;
  --arc-start: #06b6d4;
  --arc-end: #f97316;
  --radius: 16px;
  --rail-width: 72px;
  --glass-bg: rgba(255, 253, 248, 0.52);
  --glass-border: rgba(255, 255, 255, 0.62);
  --glass-shadow: 0 4px 24px rgba(91, 63, 36, 0.06), 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  --glass-blur: blur(22px) saturate(1.6);
}

:root[data-theme="golden"] {
  --canvas: #f8e8f4;
  --surface: #fff5fa;
  --surface-soft: #f0d8eb;
  --ink: #1a0d1e;
  --ink-soft: #7a5080;
  --line: #e8c0de;
  --line-strong: #d0a0c8;
  --oxblood: #b03070;
  --sage: #9060a0;
  --brass: #c080b0;
  --sun: #e8609a;
  --signal-blue: #8a7fc0;
  --active-accent: #e0609a;
  --arc-start: #ff8eb5;
  --arc-end: #b03070;
  --glass-bg: rgba(255, 240, 252, 0.6);
  --glass-border: rgba(255, 220, 240, 0.65);
}

:root[data-theme="dark"] {
  --canvas: #16121e;
  --surface: #1e1828;
  --surface-soft: #2a2238;
  --ink: #e8e2f4;
  --ink-soft: #9088a8;
  --line: #2a2240;
  --line-strong: #3a2e54;
  --oxblood: #c084e0;
  --sage: #7878b8;
  --brass: #a090c0;
  --sun: #a855f7;
  --signal-blue: #8a7fc0;
  --danger: #e05c8c;
  --active-accent: #a855f7;
  --arc-start: #a855f7;
  --arc-end: #e8609a;
  --glass-bg: rgba(30, 24, 40, 0.62);
  --glass-border: rgba(168, 85, 247, 0.18);
  --glass-shadow: 0 18px 60px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(168, 85, 247, 0.08) inset;
}

* {
  box-sizing: border-box;
}

html {
  transition: background 300ms ease, color 300ms ease;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 20% 8%, rgba(255, 215, 145, 0.28), transparent 35%),
    radial-gradient(ellipse at 80% 18%, rgba(215, 130, 74, 0.1), transparent 28%),
    linear-gradient(145deg, #fdf9f4 0%, var(--canvas) 55%, var(--surface-soft) 100%);
}

/* Golden hour: 5–8 PM — pink-to-lavender twilight with magenta blush rising from below */
:root[data-theme="golden"] body {
  background:
    radial-gradient(ellipse at 25% 12%, rgba(255, 140, 180, 0.45), transparent 42%),
    radial-gradient(ellipse at 72% 30%, rgba(170, 90, 220, 0.32), transparent 38%),
    radial-gradient(ellipse at 50% 110%, rgba(240, 100, 160, 0.28), transparent 50%),
    linear-gradient(145deg, #fef0f8 0%, #f8e0f4 48%, #ede0f8 100%);
}

/* Dark: deep violet night sky */
:root[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 20% 25%, rgba(80, 40, 110, 0.45), transparent 42%),
    radial-gradient(ellipse at 78% 60%, rgba(50, 30, 80, 0.50), transparent 38%),
    linear-gradient(145deg, #16121e 0%, #110e18 55%, #0c0a12 100%);
}

/* Dawn: pre-sunrise blush, 5–7 AM */
[data-time="dawn"] body {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 178, 128, 0.46), transparent 44%),
    radial-gradient(ellipse at 72% 20%, rgba(215, 130, 74, 0.18), transparent 32%),
    linear-gradient(145deg, #fef3eb 0%, #f9e6d6 55%, #f3d9c4 100%);
}

/* Dusk: 8–10 PM — golden hour fading, deeper violet bleeding in */
[data-time="dusk"] body {
  background:
    radial-gradient(ellipse at 30% 18%, rgba(170, 90, 200, 0.40), transparent 44%),
    radial-gradient(ellipse at 75% 55%, rgba(70, 40, 110, 0.46), transparent 40%),
    radial-gradient(ellipse at 50% 105%, rgba(200, 80, 140, 0.20), transparent 48%),
    linear-gradient(145deg, #1e1828 0%, #18142a 55%, #14101e 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(720px, 1fr);
  min-height: 100vh;
}

.extension-rail {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 18px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 253, 248, 0.45);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

:root[data-theme="dark"] .extension-rail {
  background: rgba(20, 20, 18, 0.55);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--oxblood);
  background: var(--surface);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
}

.extension-nav {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.extension-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-soft);
}

.extension-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.extension-button:hover,
.extension-button.active {
  border-color: rgba(215, 130, 74, 0.4);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(91, 63, 36, 0.1), inset 3px 0 0 var(--active-accent);
}

.workspace {
  min-width: 0;
  padding: 22px 28px 32px;
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  align-content: start;
}

.workspace > * {
  min-width: 0;
}

.morning-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  padding: 0 0 4px;
}

.eyebrow,
.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--oxblood);
  text-transform: uppercase;
}

.mono {
  color: var(--ink-soft);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 700;
}

h2 {
  font-size: clamp(20px, 1.9vw, 28px);
}

h3 {
  font-size: 17px;
  font-weight: 600;
}

h4,
p {
  margin: 0;
}

h4 {
  font-size: 15px;
}

p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.morning-note {
  max-width: 690px;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.break-title {
  overflow-wrap: anywhere;
}

.day-orbit {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.1fr) minmax(260px, 0.78fr);
  grid-gap: 18px;
  gap: 18px;
  align-items: center;
  min-height: var(--day-canvas-stage-height, 360px);
  height: var(--day-canvas-stage-height, 360px);
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 65% 49%, rgba(255, 234, 185, 0.9), transparent 28%),
    radial-gradient(circle at 69% 47%, rgba(215, 130, 74, 0.22), transparent 45%),
    linear-gradient(135deg, rgba(255, 250, 241, 0.92), rgba(239, 225, 207, 0.78));
  box-shadow: 0 16px 60px rgba(91, 63, 36, 0.1);
  overflow: hidden;
}

:root[data-theme="dark"] .day-orbit {
  background:
    radial-gradient(circle at 62% 48%, rgba(120, 60, 180, 0.45), transparent 32%),
    radial-gradient(circle at 65% 45%, rgba(80, 40, 140, 0.30), transparent 50%),
    linear-gradient(135deg, rgba(30, 22, 45, 0.96), rgba(22, 16, 36, 0.92));
  border-color: #2e2248;
}

:root[data-theme="golden"] .day-orbit {
  background:
    radial-gradient(circle at 62% 48%, rgba(255, 180, 210, 0.85), transparent 30%),
    radial-gradient(circle at 66% 46%, rgba(180, 80, 200, 0.20), transparent 48%),
    linear-gradient(135deg, rgba(255, 240, 252, 0.94), rgba(230, 200, 248, 0.82));
  border-color: #e8c8e0;
}

/* kept for any other references — now replaced by .grade-gauge in the UI */
.orbit-diag-score {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 18px;
  padding: 10px 14px 12px;
  border-left: 4px solid var(--grade-color, #d7824a);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--grade-color, #d7824a) 6%, transparent);
}

.orbit-diag-score__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft, #7a6a58);
  opacity: 0.7;
  margin-bottom: 2px;
}

.orbit-diag-score__grade {
  font-family: "IBM Plex Mono", monospace;
  font-size: 88px;
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.orbit-diag-score__sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft, #7a6a58);
  line-height: 1;
}

/* ── Grade Gauge ─────────────────────────────────────────────────────────── */

.grade-gauge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 18px;
}

.grade-gauge__eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* inherits from page context — adapts to dark/light/golden themes */
  color: var(--ink-soft, #7a6a58);
  opacity: 0.7;
  margin-bottom: 4px;
}

.grade-gauge__svg {
  width: 90%;
  max-width: 90%;
  height: auto;
  overflow: visible;
  display: block;
}

/* Dim track — uses currentColor so it inherits whatever the page sets */
.grade-gauge__track {
  fill: none;
  stroke: currentColor;
  stroke-width: 11;
  stroke-linecap: round;
  opacity: 0.1;
}

/* Active segment */
.grade-gauge__active {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke 0.4s ease;
}

/* Grade letter inside arc bowl */
.grade-gauge__letter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 32px;
  font-weight: 800;
  dominant-baseline: auto;
  transition: fill 0.4s ease;
}

/* Small grade ticks (F D C B A) along the arc */
.grade-gauge__tick {
  font-family: "IBM Plex Mono", monospace;
  font-size: 7.5px;
  font-weight: 400;
  fill: currentColor;
  opacity: 0.35;
}

.grade-gauge__tick--active {
  opacity: 1;
  font-weight: 700;
}

/* Avg stage text inside the arc bowl */
.grade-gauge__avg-inner {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  opacity: 0.6;
}

.grade-gauge__status {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  margin-top: 3px;
  transition: color 0.4s ease;
}


.orbit-copy h2 {
  margin-bottom: 18px;
  max-width: 520px;
}

.orbit-copy p:not(.eyebrow) {
  max-width: 500px;
  font-size: 16px;
}

.radar-slot {
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.radar-container {
  position: relative;
  display: grid;
  justify-items: center;
  grid-gap: 10px;
  gap: 10px;
  min-width: 0;
  margin: 0 auto;
  width: 100%;
}

.orbit-visual {
  position: relative;
  width: min(330px, 100%);
  min-height: 228px;
}

.day-arc {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  margin-top: 2px;
}

.arc-track,
.arc-progress,
.arc-outer-glow,
.energy-intensity {
  fill: none;
  stroke-linecap: round;
}

.arc-track,
.arc-progress {
  stroke-width: 19;
}

.arc-track {
  stroke: rgba(191, 169, 143, 0.52);
}

.arc-outer-glow {
  stroke: color-mix(in srgb, var(--arc-start) 26%, transparent);
  stroke-width: 30;
  opacity: 0.42;
  filter: blur(5px);
}

.arc-progress {
  stroke: url("#timeGradient");
  filter:
    drop-shadow(0 8px 16px color-mix(in srgb, var(--arc-start) 24%, transparent))
    drop-shadow(0 -2px 1px rgba(255, 255, 255, 0.24));
}

.energy-intensity {
  stroke: color-mix(in srgb, var(--arc-end) 52%, transparent);
  stroke-dasharray: 4 14;
  stroke-width: 5;
  opacity: 0.64;
  animation: intensity-drift 12s linear infinite;
}

.arc-label {
  text-anchor: middle;
}

.arc-label {
  fill: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.orbit-score {
  position: absolute;
  top: 222px;
  left: calc(50% - 34px);
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.orbit-score strong {
  color: var(--oxblood);
  font-size: 0.82rem;
  font-weight: 800;
}

.activity-card {
  position: relative;
  z-index: 1;
  width: min(350px, 100%);
  display: grid;
  grid-template-columns: 5px 1fr;
  grid-gap: 11px;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 253, 248, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 16px rgba(91, 63, 36, 0.05), 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.activity-accent {
  width: 5px;
  height: 48px;
  border-radius: 999px;
  background: var(--active-accent);
}

.activity-content {
  min-width: 0;
}

.activity-content h3 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.activity-content p {
  font-size: 13px;
  line-height: 1.35;
}

.time-context {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.clock-controls {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.clock-chip {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 253, 248, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  text-align: left;
}

.clock-chip span {
  width: 10px;
  height: 30px;
  border-radius: 999px;
}

.clock-chip strong {
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-chip small {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.clock-chip em {
  grid-column: 2 / 4;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-chip.active {
  border-color: rgba(215, 130, 74, 0.45);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 24px rgba(91, 63, 36, 0.1), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.daily-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
}

/* ── Stage Gauge Grid ──────────────────────────────────────────────────────── */

.sgauge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 8px 10px;
  gap: 8px 10px;
  width: 100%;
  padding: 4px 0;
}

.sgauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.sgauge-svg {
  width: 100%;
  max-width: 88px;
  height: auto;
  overflow: visible;
  display: block;
}

/* Dim track — all 4 arc slots, always shown */
.sgauge-track {
  fill: none;
  stroke: rgba(191, 169, 143, 0.18);
  stroke-width: 9;
  stroke-linecap: round;
}

/* Lit segment — only the active stage */
.sgauge-active {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.sgauge-center-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  dominant-baseline: auto;
}

.sgauge-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-soft, #7a6a58);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}

.sgauge-name--main {
  color: var(--sun, #d7824a);
  font-weight: 700;
}

.sgauge-stage-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  font-weight: 400;
  color: var(--ink-soft, #7a6a58);
  opacity: 0.75;
}

:root[data-theme="dark"] .sgauge-track {
  stroke: rgba(120, 100, 160, 0.20);
}

/* ── Diagnostic Radar ──────────────────────────────────────────────────────── */

.diagnostic-radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* Wrapper that gives the tooltip its positioning context */
.radar-svg-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.diagnostic-radar {
  display: block;
  width: 100%;
  max-width: 580px;
  height: auto;
  overflow: visible;
}

.radar-ring {
  fill: none;
  stroke: rgba(191, 169, 143, 0.5);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(191, 169, 143, 0.3);
  stroke-width: 1;
}

.radar-axis--main {
  stroke: rgba(215, 130, 74, 0.55);
  stroke-width: 1.5;
}

.radar-score-poly {
  fill: rgba(215, 130, 74, 0.13);
  stroke: #d7824a;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.radar-label {
  fill: var(--ink-soft, #7a6a58);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
}

.radar-label--main {
  fill: #d7824a;
  font-weight: 600;
}

.radar-grade-bg {
  fill: var(--surface, #fffaf1);
  stroke: var(--line, rgba(191, 169, 143, 0.4));
  stroke-width: 1;
}

.radar-grade-letter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 17px;
  font-weight: 700;
}

.radar-avg {
  fill: var(--ink-soft, #7a6a58);
  font-family: "IBM Plex Mono", monospace;
  font-size: 7px;
  dominant-baseline: middle;
  text-anchor: middle;
}

.radar-empty-hint {
  fill: var(--ink-soft, #7a6a58);
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  opacity: 0.55;
}

/* ── Hover tooltip ── */
.radar-vertex-dot {
  cursor: pointer;
  transition: r 0.1s ease;
}

.radar-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: var(--surface, #fffaf1);
  border: 1px solid rgba(191, 169, 143, 0.45);
  border-radius: 6px;
  padding: 8px 10px;
  max-width: 172px;
  min-width: 120px;
  box-shadow: 0 4px 16px rgba(58, 46, 36, 0.14);
}

.radar-tooltip__domain {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink, #3a2e24);
  text-transform: uppercase;
  margin-bottom: 3px;
  line-height: 1.3;
}

.radar-tooltip__stage {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}

.radar-tooltip__summary {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  color: var(--ink-soft, #7a6a58);
  line-height: 1.45;
}

.radar-tooltip__summary--empty {
  opacity: 0.6;
  font-style: italic;
}

/* ── Prominent quest + score section ── */
.radar-quest-section {
  width: 100%;
  max-width: 440px;
  padding: 10px 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.radar-quest-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft, #7a6a58);
  margin: 0;
  opacity: 0.75;
}

.radar-quest-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: #d7824a;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.radar-quest-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.radar-quest-grade {
  font-family: "IBM Plex Mono", monospace;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.radar-quest-avg {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft, #7a6a58);
  line-height: 1;
}

.radar-quest-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  color: var(--ink-soft, #7a6a58);
  margin: 2px 0 0;
  opacity: 0.65;
}

/* empty state */
.radar-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--ink-soft, #7a6a58);
  text-align: center;
  margin: 8px 0 0;
  padding: 0 8px;
  line-height: 1.4;
}

.radar-meta--empty {
  opacity: 0.7;
}

.radar-meta code {
  font-family: "IBM Plex Mono", monospace;
  background: rgba(215, 130, 74, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

:root[data-theme="dark"] .radar-ring {
  stroke: rgba(120, 100, 160, 0.35);
}

:root[data-theme="dark"] .radar-axis {
  stroke: rgba(120, 100, 160, 0.22);
}

:root[data-theme="dark"] .radar-axis--main {
  stroke: rgba(180, 120, 220, 0.5);
}

:root[data-theme="dark"] .radar-score-poly {
  fill: rgba(160, 100, 200, 0.14);
  stroke: #a67bc8;
}

:root[data-theme="dark"] .radar-label {
  fill: rgba(200, 180, 230, 0.7);
}

:root[data-theme="dark"] .radar-label--main {
  fill: #c49ae0;
}

:root[data-theme="dark"] .radar-tooltip {
  background: #1e1720;
  border-color: rgba(120, 100, 160, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .radar-tooltip__domain {
  color: rgba(200, 180, 230, 0.9);
}

:root[data-theme="dark"] .radar-tooltip__summary {
  color: rgba(200, 180, 230, 0.6);
}

:root[data-theme="dark"] .radar-quest-name {
  color: #c49ae0;
}

:root[data-theme="dark"] .radar-quest-grade {
  /* color set inline via GRADE_COLORS — stays as-is */
}

/* ──────────────────────────────────────────────────────────────────────────── */

.quest-score,
.quest-log,
.score-board,
.customer-states,
.decision-queue,
.agent-board,
.planning-panel,
.operations-tabs,
.yesterday-strip,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.88);
}

:root[data-theme="dark"] .quest-score,
:root[data-theme="dark"] .quest-log,
:root[data-theme="dark"] .score-board,
:root[data-theme="dark"] .customer-states,
:root[data-theme="dark"] .decision-queue,
:root[data-theme="dark"] .agent-board,
:root[data-theme="dark"] .planning-panel,
:root[data-theme="dark"] .operations-tabs,
:root[data-theme="dark"] .yesterday-strip,
:root[data-theme="dark"] .panel {
  background: rgba(26, 20, 40, 0.9);
  border-color: #2a2240;
}

:root[data-theme="dark"] .quest-item,
:root[data-theme="dark"] .score-card,
:root[data-theme="dark"] .state-panel,
:root[data-theme="dark"] .entity-row,
:root[data-theme="dark"] .timeline-item,
:root[data-theme="dark"] .planning-row {
  background: rgba(32, 24, 50, 0.85);
  border-color: #302448;
}

:root[data-theme="dark"] .activity-card {
  background: rgba(30, 22, 48, 0.72);
  border-color: rgba(80, 60, 120, 0.5);
}

:root[data-theme="dark"] .clock-chip {
  background: rgba(32, 24, 52, 0.6);
  border-color: rgba(100, 80, 140, 0.45);
}

:root[data-theme="dark"] .clock-chip.active {
  background: rgba(50, 36, 74, 0.9);
  border-color: rgba(168, 85, 247, 0.5);
}

:root[data-theme="dark"] .quest-drawer {
  background: rgba(26, 20, 40, 0.98);
  border-color: #302448;
}

:root[data-theme="dark"] .quest-drawer-topbar {
  background: rgba(26, 20, 40, 0.94);
  border-color: #302448;
}

:root[data-theme="dark"] .drawer-close,
:root[data-theme="dark"] .quest-description-card,
:root[data-theme="dark"] .quest-metrics-panel,
:root[data-theme="dark"] .quest-comment-composer {
  background: rgba(32, 24, 50, 0.85);
  border-color: #302448;
}

:root[data-theme="dark"] .quest-item-button:hover,
:root[data-theme="dark"] .quest-item-button:focus-visible {
  background: rgba(44, 32, 66, 0.95);
}

:root[data-theme="dark"] .extension-rail {
  background: rgba(18, 14, 28, 0.7);
}

:root[data-theme="dark"] .brand-mark {
  border-color: #3a2e54;
  background: #1e1828;
  color: #c084e0;
}

/* Golden hour card overrides — pink/lavender */
:root[data-theme="golden"] .quest-score,
:root[data-theme="golden"] .quest-log,
:root[data-theme="golden"] .score-board,
:root[data-theme="golden"] .customer-states,
:root[data-theme="golden"] .decision-queue,
:root[data-theme="golden"] .agent-board,
:root[data-theme="golden"] .planning-panel,
:root[data-theme="golden"] .operations-tabs,
:root[data-theme="golden"] .yesterday-strip,
:root[data-theme="golden"] .panel {
  background: rgba(255, 240, 252, 0.9);
  border-color: #e8c8e0;
}

:root[data-theme="golden"] .quest-item,
:root[data-theme="golden"] .score-card,
:root[data-theme="golden"] .state-panel,
:root[data-theme="golden"] .entity-row,
:root[data-theme="golden"] .timeline-item,
:root[data-theme="golden"] .planning-row {
  background: rgba(255, 240, 252, 0.7);
  border-color: #e8c8e0;
}

  :root[data-theme="golden"] .extension-rail {
  background: rgba(254, 240, 252, 0.5);
  border-color: rgba(220, 180, 210, 0.4);
}

.quest-score {
  min-height: 150px;
  display: grid;
  align-content: end;
  grid-gap: 4px;
  gap: 4px;
  padding: 14px;
}

.quest-score strong {
  color: var(--oxblood);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 44px;
  font-weight: 800;
  line-height: 0.9;
}

.quest-score span {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.quest-log,
.score-board,
.customer-states,
.decision-queue,
.agent-board,
.planning-panel,
.operations-tabs,
.panel {
  padding: 14px 16px;
}

.panel-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(241, 229, 211, 0.7);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.status-pill.sun {
  color: #7a3a1c;
  border-color: rgba(215, 130, 74, 0.45);
  background: rgba(215, 130, 74, 0.13);
}

.status-pill.open {
  color: #3d5743;
  border-color: rgba(127, 138, 114, 0.45);
  background: rgba(127, 138, 114, 0.14);
}

.status-pill.urgent,
.status-pill.danger {
  color: #8c271f;
  border-color: rgba(164, 74, 63, 0.45);
  background: rgba(164, 74, 63, 0.12);
}

.operations-tabs {
  padding-top: 0;
}

.operations-tab-list {
  display: flex;
  align-items: flex-end;
  gap: 34px;
  min-height: 46px;
  margin: 0 -16px 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.operations-tab-list button {
  position: relative;
  min-height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  white-space: nowrap;
}

.operations-tab-list button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.operations-tab-list button.active {
  color: var(--ink);
  font-weight: 700;
}

.operations-tab-list button.active::after {
  background: var(--ink);
}

.operations-tab-panel {
  min-height: 260px;
}

.quest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.quest-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: rgba(255, 250, 241, 0.7);
}

.quest-item-button {
  width: 100%;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.quest-item-button:hover,
.quest-item-button:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 250, 241, 0.95);
}

.quest-item-button h4 {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-item-button p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.quest-item-button p.mono {
  margin-top: 6px;
  font-size: 0.68rem;
  opacity: 0.65;
}

.quest-item-button .mono {
  display: inline-block;
  margin-bottom: 2px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-item-detail {
  display: block;
}

.quest-item-detail summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  cursor: pointer;
  list-style: none;
}

.quest-item-detail summary::-webkit-details-marker {
  display: none;
}

.quest-item-detail h4 {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-item-detail p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.quest-item-detail summary .mono {
  display: inline-block;
  margin-bottom: 2px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-item-detail summary p.mono {
  margin-top: 6px;
  font-size: 0.68rem;
  opacity: 0.65;
}

.quest-detail-body {
  margin-top: 18px;
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.quest-detail-link {
  justify-self: start;
  color: var(--oxblood);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.quest-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(37, 28, 21, 0.24);
}

.quest-drawer {
  width: min(520px, calc(100vw - 24px));
  height: 100%;
  overflow-y: auto;
  padding: 0;
  border-left: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.98);
  box-shadow: -18px 0 60px rgba(91, 63, 36, 0.18);
}

.quest-drawer-topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.96);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.quest-drawer-header {
  padding: 18px 20px 0;
}

.quest-drawer-header h3 {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.drawer-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  border-color: rgba(122, 46, 53, 0.45);
  color: var(--oxblood);
}

.quest-detail-body {
  padding: 0 20px 44px;
}

.quest-meta-list {
  display: grid;
  grid-gap: 0;
  gap: 0;
  padding-bottom: 4px;
}

.quest-meta-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-gap: 18px;
  gap: 18px;
  align-items: center;
  min-height: 36px;
  padding: 6px 0;
}

.quest-meta-row > span {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.quest-meta-row > strong {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 650;
}

.quest-meta-row .status-pill,
.priority-pill,
.xp-pill {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  font-style: normal;
}

.priority-pill,
.xp-pill {
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.priority-pill.high {
  background: rgba(122, 46, 53, 0.12);
  color: var(--oxblood);
}

.priority-pill.medium {
  background: rgba(203, 167, 92, 0.18);
  color: var(--ink);
}

.priority-pill.low {
  background: rgba(96, 126, 112, 0.16);
  color: var(--sage);
}

.quest-description-card {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.quest-description-card > .mono {
  color: var(--ink-soft);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.quest-description-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.quest-metrics-panel {
  display: grid;
  grid-gap: 9px;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
}

.quest-metrics-panel > .mono {
  color: var(--ink-soft);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.quest-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.quest-metrics-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
}

.quest-metrics-row i {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(122, 46, 53, 0.22);
  border-radius: 999px;
  background: rgba(203, 167, 92, 0.16);
  color: var(--oxblood);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  flex: 0 0 auto;
}

.xp-pill {
  border: 1px solid rgba(203, 167, 92, 0.32);
  background: rgba(203, 167, 92, 0.18);
  color: var(--oxblood);
}

.info-tooltip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: help;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  flex: 0 0 auto;
}

.info-tooltip::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  width: min(260px, 70vw);
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.98);
  box-shadow: 0 12px 28px rgba(91, 63, 36, 0.16);
  color: var(--ink);
  content: attr(aria-label);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.info-tooltip:hover,
.info-tooltip:focus-visible {
  border-color: rgba(122, 46, 53, 0.38);
  color: var(--oxblood);
  outline: none;
}

.info-tooltip:hover::after,
.info-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.quest-drawer-section {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
}

.quest-drawer-section > .mono {
  color: var(--ink-soft);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.quest-drawer-section p {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.quest-complete-button,
.quest-comment-composer button {
  min-height: 32px;
  border: 1px solid rgba(122, 46, 53, 0.32);
  border-radius: 999px;
  background: var(--oxblood);
  color: #fffaf1;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.quest-complete-button {
  padding: 0 12px;
  white-space: nowrap;
}

.quest-complete-button.ghost {
  background: rgba(255, 255, 255, 0.52);
  color: var(--oxblood);
}

.quest-complete-button.completed {
  border-color: rgba(96, 126, 112, 0.34);
  background: rgba(96, 126, 112, 0.16);
  color: var(--sage);
}

.quest-complete-button:disabled,
.quest-comment-composer button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.quest-comments-session {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  padding: 14px 0 12px;
  border-top: 1px solid var(--line);
}

.quest-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quest-comments-header button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
}

.quest-comments-tools {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--oxblood);
  font-size: 0.9rem;
}

.quest-follow-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.quest-follow-row p {
  margin: 0;
}

.comment-info {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
}

.comment-avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fffaf1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.comment-avatar.founder {
  background: var(--sage);
}

.comment-avatar.system {
  background: var(--oxblood);
}

.quest-comment-form {
  display: block;
}

.quest-comment-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-gap: 9px;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.composer-spark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--sage);
  font-size: 1rem;
}

.quest-comment-composer textarea {
  width: 100%;
  min-height: 22px;
  max-height: 96px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.45;
}

.quest-comment-composer textarea::placeholder {
  color: var(--ink-soft);
}

.quest-comment-composer button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.64rem;
}

.quest-comments-list {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  padding-top: 4px;
}

.quest-comment-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-gap: 10px;
  gap: 10px;
  align-items: start;
}

.comment-item-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
}

.comment-item-meta strong {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.quest-comment-item p {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.45;
}

.comment-item-meta time,
.quest-empty-activity,
.quest-activity-error {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.quest-item strong {
  color: var(--oxblood);
  font-size: 12px;
  white-space: nowrap;
}

.quest-item.active {
  box-shadow: inset 3px 0 0 var(--sun);
}

.quest-item.watch {
  box-shadow: inset 3px 0 0 var(--signal-blue);
}

.quest-item.decision {
  box-shadow: inset 3px 0 0 var(--oxblood);
}

.quest-item.open {
  box-shadow: inset 3px 0 0 var(--sage);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(320px, 0.9fr);
  grid-gap: 18px;
  gap: 18px;
  align-items: start;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.score-card {
  min-height: 146px;
  display: grid;
  place-items: center;
  grid-gap: 10px;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: rgba(255, 250, 241, 0.7);
  color: var(--ink);
  text-align: center;
}

.score-card.active {
  border-color: var(--active-accent);
  box-shadow: inset 0 -4px 0 var(--active-accent);
}

.score-card small {
  min-height: 34px;
  color: var(--ink-soft);
  font-weight: 700;
}

.score-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 253, 248, 0.92) 0 55%, transparent 56%),
    conic-gradient(var(--ring, var(--sage)) 0 var(--score), rgba(216, 202, 179, 0.5) var(--score) 360deg);
}

.score-card.yellow .score-ring {
  --ring: var(--brass);
}

.score-card.red .score-ring {
  --ring: var(--danger);
}

.score-ring strong {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── Score card compact state ─────────────────────────────────────────────── */

.score-card--compact {
  overflow: hidden;
}

.score-card__obj-hint {
  font-size: 0.68rem;
  opacity: 0.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  display: block;
}

.score-card__obj-hint--empty {
  opacity: 0.35;
}

.score-card__kpi-wrap {
  width: 100%;
}

.score-card__cta {
  font-size: 0.65rem;
  opacity: 0;
  color: var(--ink-soft);
  transition: opacity 0.15s;
  letter-spacing: 0.02em;
}

.score-card--compact:hover .score-card__cta {
  opacity: 0.55;
}

/* ── Domain modal ─────────────────────────────────────────────────────────── */

.domain-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(34, 22, 14, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-fade-in 0.18s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.domain-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--parchment, #fffaf1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow:
    0 32px 80px rgba(34, 22, 14, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
  padding: 28px 28px 28px;
  animation: modal-slide-up 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.domain-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.domain-modal__close:hover {
  background: rgba(122, 46, 53, 0.08);
  border-color: var(--oxblood);
  color: var(--oxblood);
}

.domain-modal__header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding-right: 32px;
}

.domain-modal__ring {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 253, 248, 0.95) 0 55%, transparent 56%),
    conic-gradient(var(--modal-ring, var(--sage)) 0 var(--modal-score), rgba(216, 202, 179, 0.4) var(--modal-score) 360deg);
}

.domain-modal__ring strong {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.domain-modal__eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 2px;
}

.domain-modal__title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.domain-modal__objectives {
  margin-bottom: 14px;
}

.domain-modal__objective {
  font-size: 0.83rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 6px;
  padding-left: 10px;
  border-left: 2px solid var(--brass);
}

.domain-modal__empty {
  font-size: 0.82rem;
  color: var(--ink-soft);
  opacity: 0.55;
  margin-bottom: 14px;
}

.domain-modal__empty code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.domain-modal__score-explainer {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  margin-bottom: 16px;
  background: rgba(184, 155, 94, 0.08);
  border: 1px solid rgba(184, 155, 94, 0.2);
  border-radius: calc(var(--radius) - 4px);
}

.domain-modal__explainer-icon {
  flex-shrink: 0;
  color: var(--brass);
  font-size: 0.8rem;
  margin-top: 1px;
}

.domain-modal__score-explainer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.domain-modal__kpi-strip {
  margin-bottom: 16px;
}

.domain-modal__section-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.6;
  margin: 0 0 10px;
}

.domain-modal__kr-list {
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.domain-modal__kr {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.domain-modal__kr:last-child {
  border-bottom: 1px solid var(--line);
}

.domain-modal__kr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.domain-modal__kr-title {
  font-size: 0.82rem;
  color: var(--ink);
  flex: 1 1;
  min-width: 0;
  line-height: 1.4;
  font-weight: 600;
}

.domain-modal__kr-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.domain-modal__kr-prob {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
}

.domain-modal__kr-prob--null {
  opacity: 0.3;
  color: var(--ink-soft);
}

.domain-modal__kr-status {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.7;
}

.domain-modal__kr-status--on-track  { color: var(--sage); }
.domain-modal__kr-status--at-risk   { color: var(--brass); }
.domain-modal__kr-status--off-track { color: var(--danger); }
.domain-modal__kr-status--complete  { color: var(--sage); opacity: 0.5; }

.domain-modal__kr-bar-track {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  margin-bottom: 6px;
  overflow: hidden;
}

.domain-modal__kr-bar-fill {
  height: 3px;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.domain-modal__kr-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.domain-modal__kr-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: var(--ink-soft);
  opacity: 0.55;
}

.domain-modal__kr-why {
  font-size: 0.75rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 8px;
  font-style: italic;
}

.domain-modal__kr-rec {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: calc(var(--radius) - 6px);
  font-size: 0.77rem;
  line-height: 1.45;
}

.domain-modal__kr-rec-icon {
  flex-shrink: 0;
  font-style: normal;
  margin-top: 1px;
  font-size: 0.72rem;
}

.domain-modal__kr-rec--critical {
  background: rgba(122, 46, 53, 0.07);
  border: 1px solid rgba(122, 46, 53, 0.18);
  color: var(--oxblood);
}

.domain-modal__kr-rec--warning {
  background: rgba(184, 155, 94, 0.08);
  border: 1px solid rgba(184, 155, 94, 0.22);
  color: color-mix(in srgb, var(--brass) 70%, var(--ink));
}

.domain-modal__kr-rec--ok {
  background: rgba(127, 138, 114, 0.08);
  border: 1px solid rgba(127, 138, 114, 0.2);
  color: color-mix(in srgb, var(--sage) 70%, var(--ink));
}

.domain-modal__kr-rec--none {
  background: rgba(191, 169, 143, 0.06);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

/* Dark theme overrides */
:root[data-theme="dark"] .domain-modal {
  background: #1e1712;
  border-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .domain-modal__close {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
}

:root[data-theme="dark"] .domain-modal__close:hover {
  background: rgba(215, 130, 74, 0.12);
  border-color: var(--sun);
  color: var(--sun);
}

.state-stack,
.entity-list,
.violation-list,
.planning-content {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.state-panel,
.entity-row,
.timeline-item,
.violation-card,
.planning-row {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 250, 241, 0.68);
}

.state-panel {
  padding: 13px;
}

.metric-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.state-bar {
  height: 64px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.state-segment {
  min-width: 32px;
  display: grid;
  align-content: center;
  justify-items: center;
  color: white;
  text-shadow: 0 1px 8px rgba(31, 36, 33, 0.35);
}

.state-segment span {
  font-size: 10px;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-segment strong {
  font-size: 13px;
}

.legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px 12px;
  gap: 8px 12px;
  margin-top: 12px;
}

.legend-row,
.entity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.entity-row {
  padding: 14px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.entity-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.entity-main {
  min-width: 0;
}

.entity-id {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.planning-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-gap: 12px;
  gap: 12px;
  padding: 11px;
}

.three-zone {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(420px, 1.4fr) minmax(280px, 0.85fr);
  grid-gap: 18px;
  gap: 18px;
  align-items: start;
}

.timeline {
  position: relative;
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  padding: 14px;
}

.timeline-stage {
  grid-column: span 2;
}

.timeline-node {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--oxblood);
  z-index: 1;
}

.violation-card {
  display: block;
  padding: 18px;
  border-color: rgba(164, 61, 53, 0.4);
  background:
    linear-gradient(135deg, rgba(164, 61, 53, 0.14), transparent),
    rgba(255, 250, 241, 0.78);
}

.violation-card.critical {
  box-shadow: inset 4px 0 0 var(--danger), 0 10px 30px rgba(164, 61, 53, 0.08);
}

.sla-stage {
  max-width: 1120px;
}

.timeline-reason,
.violation-copy,
.violation-meta {
  margin-top: 8px;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
  text-align: center;
}

@keyframes intensity-drift {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -72;
  }
}

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
  }

  .day-orbit,
  .dashboard-grid,
  .three-zone {
    grid-template-columns: 1fr;
  }

  .day-orbit,
  .day-canvas__schedule {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .extension-rail {
    position: static;
    height: auto;
    min-height: 70px;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .extension-nav {
    display: flex;
    overflow-x: auto;
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    padding: 20px;
    overflow: hidden;
  }

  .morning-header {
    display: grid;
    grid-template-columns: 1fr;
    padding-right: 0;
    width: 100%;
    overflow: hidden;
  }

  .morning-header > *,
  .morning-note,
  .orbit-copy {
    min-width: 0;
    max-width: 100%;
  }

  h1 {
    font-size: 31px;
  }

  .daily-grid,
  .score-grid,
  .quest-list,
  .planning-row {
    grid-template-columns: 1fr;
  }

  .day-orbit {
    padding: 24px 16px;
    min-height: 0;
    overflow: hidden;
  }

  .orbit-visual {
    width: min(320px, 100%);
    min-height: 224px;
  }

  .activity-card {
    width: 100%;
  }

  .panel-heading,
  .section-heading,
  .metric-line,
  .entity-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .workspace {
    max-width: 390px;
  }

  .morning-note,
  .orbit-copy p:not(.eyebrow) {
    font-size: 14px;
  }

  h1 {
    font-size: 29px;
  }
}

/* ──────────────────────────────────────────────────────────────────────
   Chat FAB + Panel
   ────────────────────────────────────────────────────────────────────── */

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--active-accent);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--glass-shadow), 0 10px 28px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
  z-index: 80;
}

.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow), 0 14px 32px rgba(0, 0, 0, 0.22);
}

.chat-fab:focus-visible {
  outline: 2px solid var(--active-accent);
  outline-offset: 3px;
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 92px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), 0 24px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  z-index: 79;
  overflow: hidden;
  font-family: "DM Sans", system-ui, sans-serif;
  animation: chatPanelIn 180ms ease;
}

@keyframes chatPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-panel__header {
  display: flex;
  flex-direction: column;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, var(--surface) 0%, transparent 100%);
}

.chat-panel__title {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.chat-panel__sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.chat-panel__goal {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: "DM Sans", system-ui, sans-serif;
}

.chat-panel__goal-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
}

.chat-panel__goal-icon {
  display: inline-block;
  width: 14px;
  flex-shrink: 0;
  color: var(--active-accent);
  font-size: 14px;
  line-height: 1;
}

.chat-panel__goal-title {
  flex: 1 1;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-panel__goal-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 2px;
}

.chat-panel__goal-target {
  font-weight: 500;
  color: var(--ink-soft);
}

.chat-panel__goal-badge {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--active-accent);
  font-family: "IBM Plex Mono", monospace;
  white-space: nowrap;
}

.chat-panel__goal-metric {
  margin-left: 22px;
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.4;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.01em;
}

.chat-panel__goal-metric-name {
  font-weight: 500;
}

.chat-panel__goal-metric-move {
  font-weight: 600;
  color: var(--ink);
}

.chat-panel__goal-focus {
  margin-left: 22px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
  font-style: italic;
}

.chat-panel__goal--empty {
  flex-direction: row;
  align-items: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.chat-panel__goal--empty code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  background: var(--surface-soft);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--active-accent);
}

.chat-panel__scroll {
  flex: 1 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-panel__empty {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  padding: 32px 12px;
  margin: 0;
  line-height: 1.55;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 86%;
}

.chat-msg--user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg--alex,
.chat-msg--system {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-msg__bubble {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.chat-msg--user .chat-msg__bubble {
  background: var(--active-accent);
  color: var(--surface);
  border-bottom-right-radius: 4px;
}

.chat-msg--alex .chat-msg__bubble {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.chat-msg--system .chat-msg__bubble {
  background: transparent;
  color: var(--danger);
  border: 1px dashed var(--danger);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

/* ─── DayCanvas: container + toggle ─── */
.day-canvas {
  position: relative;
  --day-canvas-stage-height: 470px;
}

.day-canvas__toggle {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--oxblood);
  z-index: 5;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
}

.day-canvas__toggle:hover {
  border-color: var(--line-strong);
  color: var(--sun);
  box-shadow: 0 2px 12px rgba(215, 130, 74, 0.18);
}

.day-canvas__toggle.is-active {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}

.day-canvas__toggle.is-active:hover {
  color: var(--surface);
}

/* ─── Schedule mode (when toggled) ─── */
.day-canvas__schedule {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-gap: 22px;
  gap: 22px;
  align-items: stretch;
  min-height: var(--day-canvas-stage-height, 360px);
  height: var(--day-canvas-stage-height, 360px);
  padding: 24px 70px 24px 24px;  /* right padding accounts for the toggle */
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 234, 185, 0.5), transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(215, 130, 74, 0.12), transparent 50%),
    rgba(255, 253, 248, 0.65);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

@media (max-width: 720px) {
  .day-canvas__schedule {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .day-canvas__item-button {
    align-items: flex-start;
    flex-direction: column;
  }

  .day-canvas__item-pills {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }
}

/* ─── Vertical tabs (Rent/Buy style, stacked) ─── */
.day-canvas__tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.06);
  align-self: start;
  width: 100%;
}

.day-canvas__tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-soft);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.day-canvas__tab:hover {
  color: var(--ink);
}

.day-canvas__tab.is-active {
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.day-canvas__tab-label {
  font-weight: 600;
}

.day-canvas__tab-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  opacity: 0.75;
}

/* ─── Panel (the list area) ─── */
.day-canvas__panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: auto;
  padding-right: 2px;
}

.day-canvas__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-canvas__item {
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-left: 3px solid var(--brass);
  font-size: 14px;
  line-height: 1.35;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.day-canvas__item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 10px rgba(91, 63, 36, 0.06);
  background: rgba(255, 255, 255, 0.78);
}

.day-canvas__item-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.day-canvas__item-button:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
  border-radius: 10px;
}

.day-canvas__item--done {
  border-left-color: var(--sage);
}

.day-canvas__item--done .day-canvas__item-button {
  opacity: 0.68;
}

.day-canvas__item--done .day-canvas__item-title {
  text-decoration: line-through;
}

.day-canvas__item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1;
}

.day-canvas__item-date {
  font-size: 11px;
  color: var(--oxblood);
  letter-spacing: 0.02em;
}

.day-canvas__item-title {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-canvas__item-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 210px;
}

.day-canvas__item-pills .status-pill,
.day-canvas__item-pills .priority-pill,
.day-canvas__item-pills .xp-pill {
  min-height: 22px;
  white-space: nowrap;
}

.day-canvas__empty {
  color: var(--ink-soft);
  font-size: 13px;
  font-style: italic;
  padding: 18px 4px;
}

.chat-msg--task-toast {
  align-self: stretch;
  align-items: stretch;
  width: 100%;
}

.chat-task-toast {
  background: rgba(184, 155, 94, 0.06);
  border: 1px solid rgba(184, 155, 94, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
}

.chat-task-toast__header {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.chat-task-toast__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-task-toast__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
}

.chat-task-toast__item--auto_today {
  border-left-color: var(--active-accent, #d7824a);
}

.chat-task-toast__item--ask_user {
  border-left-color: #b89b5e;
}

.chat-task-toast__item--review_queue {
  border-left-color: rgba(127, 138, 114, 0.6);
}

.chat-task-toast__title {
  font-weight: 500;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.chat-task-toast__meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.02em;
}

.chat-msg__bubble--pending {
  font-style: italic;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


.chat-pending__verb {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  animation: chatVerbFade 320ms ease;
}

@keyframes chatVerbFade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-pending__dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 2px;
}

.chat-pending__dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-soft);
  animation: chatDot 1.2s infinite ease-in-out;
}

.chat-pending__dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.chat-pending__dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes chatDot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.chat-msg__tools {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
}

.chat-msg__tools li {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.chat-msg__tools li.is-error {
  color: var(--danger);
  border-color: var(--danger);
}

.chat-msg__actions {
  display: flex;
  gap: 2px;
  margin-top: 4px;
  margin-left: -4px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.chat-msg--alex:hover .chat-msg__actions,
.chat-msg__actions:focus-within {
  opacity: 1;
}

.chat-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 6px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.chat-action:hover {
  background: var(--surface);
  color: var(--ink);
}

.chat-action:focus-visible {
  outline: 1.5px solid var(--active-accent);
  outline-offset: 1px;
}

.chat-action.is-active {
  color: var(--sage);
}

.chat-action.is-active.is-down {
  color: var(--danger);
}

.chat-panel__commands {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  max-height: 200px;
  overflow-y: auto;
}

.chat-panel__command {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  grid-column-gap: 10px;
  column-gap: 10px;
  grid-row-gap: 2px;
  row-gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  font-family: inherit;
}

.chat-panel__command:hover {
  border-color: var(--active-accent);
  background: var(--surface);
}

.chat-panel__command-name {
  grid-column: 1;
  grid-row: 1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--active-accent);
}

.chat-panel__command-desc {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  color: var(--ink);
}

.chat-panel__command-hint {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 11px;
  color: var(--ink-soft);
  font-style: italic;
}

.chat-msg__badge {
  align-self: flex-start;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--sage);
  color: var(--surface);
  font-weight: 600;
  margin-bottom: 2px;
}

.chat-msg__badge--warn {
  background: var(--brass);
}

.chat-msg__bubble--locked {
  border-color: var(--sage) !important;
  border-width: 1.5px !important;
}

.chat-msg__bubble--override {
  border-color: var(--brass) !important;
  border-width: 1.5px !important;
}

.chat-panel__composer {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.chat-panel__input {
  flex: 1 1;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--canvas);
  outline: none;
  transition: border-color 120ms ease;
}

.chat-panel__input:focus {
  border-color: var(--active-accent);
}

.chat-panel__input:disabled {
  opacity: 0.6;
}

.chat-panel__send {
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: var(--active-accent);
  color: var(--surface);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.chat-panel__send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 84px;
  }

  .chat-fab {
    right: 16px;
    bottom: 16px;
  }
}

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

.auth-page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 18px 50px rgba(19, 28, 36, 0.08);
}

.auth-panel__header {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  margin-bottom: 20px;
}

.auth-panel__eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 4px;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  margin-bottom: 20px;
}

.auth-switch button,
.auth-submit {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-switch button {
  color: var(--muted);
  background: transparent;
}

.auth-switch button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(19, 28, 36, 0.1);
}

.auth-form {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.auth-form label {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--canvas);
  font: inherit;
}

.auth-form input:focus {
  outline: 2px solid color-mix(in srgb, var(--active-accent) 28%, transparent);
  border-color: var(--active-accent);
}

.auth-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.auth-submit {
  color: var(--surface);
  background: var(--active-accent);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

