/* Shared primitives. Opt the real dashboard in with data-juno-theme;
   these tokens do not replace existing portfolio/research data. */
.juno, .juno-theme, [data-juno-theme] {
  --juno-ink: #14201d;
  --juno-muted: #68736e;
  --juno-forest: #173c30;
  --juno-forest-deep: #102923;
  --juno-sage: #e8f0e7;
  --juno-paper: #f8faf6;
  --juno-surface: #ffffff;
  --juno-line: #dce5dd;
  --juno-blue: #387cba;
  --juno-gold: #aa772f;
  --juno-radius: 22px;
  --juno-shadow: 0 24px 70px -24px rgb(32 63 44 / 24%), 0 2px 6px rgb(32 63 44 / 4%);
  --juno-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Arial, sans-serif;
}

@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans.ttf') format('truetype'); font-style: normal; font-weight: 100 1000; font-display: swap; }

/* Scope your whole application to .juno-theme. No global color overrides. */
.juno-theme {
  --juno-accent: #3d624c;
  --juno-teal: #276f69;
  --juno-heading-tracking: -.025em;
  --juno-primary: var(--juno-forest);
  --juno-on-primary: #ffffff;
  --juno-subtle: #657365;
  --juno-border: var(--juno-line);
  --juno-input-border: #cbd4c6;
  --juno-success: #315d43;
  --juno-danger: #9c3d35;
  --juno-warning: #855f25;
  --juno-hover: #edf1e7;
  --juno-selection: var(--juno-sage);
  --juno-chart-1: #315c46;
  --juno-chart-2: #8aa585;
  --juno-chart-3: #b8c6a6;
  --juno-chart-4: #bbab82;
  --juno-chart-5: #718f89;
  --juno-chart-6: #8c9279;
  --juno-radius-card: 16px;
  --juno-radius-input: 9px;
  --juno-radius-button: 28px;
  position: relative;
  isolation: isolate;
  color-scheme: light;
  background: var(--juno-paper);
  color: var(--juno-ink);
  font-family: var(--juno-font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.juno-theme *, .juno-theme *::before, .juno-theme *::after { box-sizing: border-box; }
.juno-theme [hidden] { display: none !important; }
.juno-theme :where(button, input, textarea, select) { font: inherit; }
.juno-theme :where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--juno-accent); outline-offset: 3px; }
.juno-theme :where(button, a) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.juno-theme button { cursor: pointer; }
.juno-theme button:disabled { cursor: not-allowed; opacity: .5; }
.juno-theme ::selection { background: #d6e3cd; color: var(--juno-ink); }
.juno-theme .juno-atmosphere {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 12% 62%, #b4c6a721, transparent 47%), radial-gradient(ellipse at 92% 30%, #9abcaa21, transparent 45%);
}
.juno-theme .juno-atmosphere[data-variant="app"] { bottom: auto; height: min(100%, 900px); }
.juno-theme .juno-atmosphere__canvas { display: block; width: 100%; height: 100%; }
.juno-theme .juno-wordmark { color: var(--juno-ink); font-size: 36px; font-weight: 800; letter-spacing: -2.5px; line-height: 1; text-decoration: none; }
.juno-theme .juno-muted { color: var(--juno-muted); }
.juno-theme .juno-eyebrow { color: #536a58; font-size: 11px; line-height: 1.5; text-transform: uppercase; letter-spacing: 1.7px; font-weight: 500; }
.juno-theme .juno-heading { margin: 0; font-size: clamp(28px, 3vw, 38px); font-weight: 700; line-height: 1.15; letter-spacing: -.045em; }
.juno-theme .juno-subtitle { color: var(--juno-muted); max-width: 64ch; margin: 12px 0 0; }
.juno-theme .juno-number { font-variant-numeric: tabular-nums; }
.juno-theme .juno-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 44px; border: 1px solid var(--juno-border); border-radius: var(--juno-radius-button);
  padding: 11px 19px; background: var(--juno-surface); color: var(--juno-ink);
  font-size: 13px; font-weight: 500; line-height: 1.4; text-decoration: none;
  transition: background-color .16s, transform .16s;
}
.juno-theme .juno-button:hover { background: var(--juno-hover); }
.juno-theme .juno-button--primary { background: var(--juno-primary); border-color: var(--juno-primary); color: var(--juno-on-primary); box-shadow: 0 4px 10px #27412d16; }
.juno-theme .juno-button--primary:hover { background: #2e5740; }
.juno-theme .juno-button--ghost { background: transparent; border-color: transparent; box-shadow: none; }
.juno-theme .juno-button--danger { color: var(--juno-danger); }
.juno-theme .juno-link { color: var(--juno-primary); text-underline-offset: 3px; }
.juno-theme .juno-field { display: grid; gap: 7px; min-width: 0; font-size: 13px; font-weight: 500; }
.juno-theme .juno-input {
  width: 100%; min-width: 0; min-height: 44px; padding: 11px 13px;
  border: 1px solid var(--juno-input-border); border-radius: var(--juno-radius-input);
  background: var(--juno-surface); color: var(--juno-ink); font-size: 14px; font-weight: 400;
}
.juno-theme textarea.juno-input { resize: vertical; min-height: 110px; }
.juno-theme .juno-input::placeholder { color: #727c70; opacity: 1; }
.juno-theme .juno-input[aria-invalid="true"] { border-color: var(--juno-danger); }
.juno-theme .juno-help { color: var(--juno-muted); font-size: 12px; font-weight: 400; }
.juno-theme .juno-error { color: var(--juno-danger); font-size: 13px; }
.juno-theme .juno-card { background: var(--juno-surface); border: 1px solid var(--juno-border); border-radius: var(--juno-radius-card); padding: 24px; min-width: 0; }
.juno-theme .juno-card--featured { background: #f0f3e9; border-color: #d5dfcc; }
.juno-theme .juno-card h2 { color: var(--juno-ink); font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.juno-theme .juno-card h3 { color: var(--juno-ink); font-size: 15px; line-height: 1.4; font-weight: 600; margin: 0; }
.juno-theme .juno-card p { margin: 10px 0 0; }
.juno-theme .juno-card__header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.juno-theme .juno-badge { display: inline-flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; padding: 5px 10px; border: 1px solid var(--juno-border); border-radius: 20px; font-size: 11px; font-weight: 500; background: #eff2e9; color: var(--juno-accent); }
.juno-theme .juno-badge--warning { background: #faf2e2; color: var(--juno-warning); border-color: #e9dbc2; }
.juno-theme .juno-badge--error { background: #f9ebe6; color: var(--juno-danger); border-color: #ecd5cc; }
.juno-theme .juno-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.juno-theme .juno-stack { display: grid; gap: 20px; min-width: 0; }
.juno-theme .juno-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.juno-theme .juno-grid--metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.juno-theme .juno-metric { display: block; font-variant-numeric: tabular-nums; font-size: 30px; line-height: 1.2; letter-spacing: -.04em; font-weight: 600; margin-top: 12px; }
.juno-theme .juno-table-wrap { overflow-x: auto; max-width: 100%; }
.juno-theme .juno-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.juno-theme .juno-table th { text-align: left; color: var(--juno-muted); font-size: 12px; font-weight: 500; padding: 12px 14px; }
.juno-theme .juno-table td { padding: 16px 14px; border-top: 1px solid var(--juno-border); color: var(--juno-ink); }
.juno-theme .juno-table :is(th,td)[data-numeric] { text-align: right; font-variant-numeric: tabular-nums; }
.juno-theme .juno-table small { display: block; color: var(--juno-muted); font-size: 12px; }
.juno-theme .juno-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.juno-theme .juno-tab { color: var(--juno-muted); border: 0; background: transparent; padding: 11px 16px; min-height: 44px; border-radius: 24px; font-weight: 500; }
.juno-theme .juno-tab[aria-selected="true"] { background: var(--juno-primary); color: var(--juno-on-primary); }
.juno-theme .juno-alert { padding: 14px 18px; background: #eef3e8; color: #31503b; border: 1px solid var(--juno-border); border-radius: 12px; }
.juno-theme .juno-alert--error { background: #fbefeb; color: var(--juno-danger); border-color: #ecd5cc; }
.juno-theme .juno-empty { text-align: center; padding: 36px 24px; }
.juno-theme .juno-empty .juno-row { justify-content: center; margin-top: 22px; }
.juno-theme .juno-message { max-width: 70ch; padding: 17px 20px; border: 1px solid var(--juno-border); border-radius: 16px; background: var(--juno-surface); }
.juno-theme .juno-message--user { margin-left: auto; background: #eaf0e3; }
.juno-theme .juno-dialog { max-width: min(540px,calc(100% - 32px)); border: 1px solid var(--juno-border); border-radius: 20px; padding: 28px; background: var(--juno-surface); color: var(--juno-ink); box-shadow: var(--juno-shadow); }
.juno-theme .juno-dialog::backdrop { background: #19271e40; }
.juno-theme .juno-shell { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: 100svh; }
.juno-theme .juno-sidebar { position: sticky; top: 0; align-self: start; height: 100svh; display: flex; flex-direction: column; padding: 30px 20px; border-right: 1px solid var(--juno-border); background: #f6f5efed; }
.juno-theme .juno-nav { display: grid; gap: 5px; margin-top: 36px; }
.juno-theme .juno-nav__item { display: flex; align-items: center; gap: 11px; text-decoration: none; text-align: left; border: 0; background: transparent; color: var(--juno-muted); border-radius: 12px; padding: 12px 14px; min-height: 44px; font-size: 13px; font-weight: 500; }
.juno-theme .juno-nav__item:hover { background: #eef0e6; color: var(--juno-ink); }
.juno-theme .juno-nav__item[aria-current="page"] { background: var(--juno-selection); color: var(--juno-primary); }
.juno-theme .juno-sidebar__footer { margin-top: auto; padding: 24px 14px 0; color: var(--juno-muted); font-size: 12px; }
.juno-theme .juno-workspace { min-width: 0; padding: 0 36px 48px; }
.juno-theme .juno-topbar { min-height: 86px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--juno-border); color: var(--juno-muted); font-size: 12px; }
.juno-theme .juno-page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 38px 0 28px; }
.juno-theme .juno-page-content { max-width: 1280px; margin-inline: auto; }
@media(max-width: 1050px) {
  .juno-theme .juno-shell { grid-template-columns: 190px minmax(0,1fr); }
  .juno-theme .juno-workspace { padding-inline: 24px; }
  .juno-theme .juno-grid--metrics { grid-template-columns: 1fr; }
}
@media(max-width: 760px) {
  .juno-theme .juno-shell { display: block; }
  .juno-theme .juno-sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--juno-border); padding: 22px 20px 16px; }
  .juno-theme .juno-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 20px; }
  .juno-theme .juno-nav__item { padding: 10px 12px; }
  .juno-theme .juno-sidebar__footer { display: none; }
  .juno-theme .juno-workspace { padding: 0 20px 36px; }
  .juno-theme .juno-topbar { min-height: 70px; }
  .juno-theme .juno-page-header { padding: 28px 0 22px; }
  .juno-theme .juno-grid { grid-template-columns: 1fr; }
  .juno-theme .juno-card { padding: 20px; }
  .juno-theme .juno-input { font-size: 16px; }
}
@media(prefers-reduced-motion: reduce) {
  .juno-theme *, .juno-theme *::before, .juno-theme *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
