:root {
  color-scheme: dark;
  font: 16px/1.5 system-ui, sans-serif;
  color: #f6f7fb;
  background: #101114;
  --line: #34363e;
  --muted: #b4b6c0;
  --blue: #207ae3;
  --green: #45db8d;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #8fc4ff; }
.shell { width: min(1040px, calc(100% - 2rem)); margin-inline: auto; }
.bar { background: #17181c; border-bottom: 1px solid var(--line); }
.header, .dashboard-heading, .chart-heading, .section-heading, .actions {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.header { min-height: 68px; }
.brand { display: flex; gap: .45rem; align-items: center; text-decoration: none; color: inherit; font-weight: 800; white-space: nowrap; }
.brand strong { color: #8fc4ff; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; background: #1d6dd0; color: #fff; margin-right: .2rem; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
nav a { text-decoration: none; color: var(--muted); font-size: .9rem; }
nav a:hover { color: #fff; }
section { margin-bottom: 2rem; scroll-margin-top: 1rem; }
.dashboard {
  margin-top: 1.5rem; padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line);
  border-radius: 1.25rem; background: #1b1c20;
}
h1, h2, h3, dd { margin: 0; }
h1 { font-size: clamp(1.4rem, 4.5vw, 2.35rem); line-height: 1.2; }
h2 { font-size: clamp(1.13rem, 3vw, 1.4rem); }
.dashboard-heading p, .section-heading p { color: var(--muted); margin: .4rem 0 0; }
.dashboard-metrics {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.6rem, 2vw, 1rem);
  margin: 1.4rem 0 1.7rem;
}
.dashboard-metrics > div, .metrics > div, .card {
  background: #24252a; border: 1px solid #383a42; border-radius: .9rem; padding: clamp(.7rem, 2.6vw, 1.2rem);
}
dt { color: var(--muted); font-size: .9rem; }
dd { font-weight: 750; font-size: clamp(1.16rem, 4.3vw, 2.15rem); margin-top: .22rem; font-variant-numeric: tabular-nums; }
.positive { color: var(--green); }
.caution { color: #ffb878; }
.chart-heading span { color: var(--muted); font-size: .85rem; }
.campaign-chart {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end;
  gap: clamp(.4rem, 2vw, 1.5rem); height: clamp(235px, 34vw, 310px); padding: 0 .25rem; margin: .75rem 0 0;
  background: repeating-linear-gradient(to top, #41434b 0 1px, transparent 1px 25%);
  background-size: 100% calc(100% - 3.6rem); background-repeat: no-repeat;
}
.chart-campaign {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch;
  background: transparent; height: 100%; padding: 0; min-width: 0; border-radius: .5rem;
}
.chart-bar { display: block; position: relative; margin-inline: 8%; background: var(--blue); border-radius: .62rem .62rem .24rem .24rem; }
.chart-campaign[aria-pressed="true"] .chart-bar { background: #4397fa; }
.chart-campaign:hover .chart-bar { background: #62a9fc; }
.chart-value { position: absolute; inset: auto 0 calc(100% + .2rem); color: #fff; font-size: .9rem; }
.chart-label {
  display: block; color: var(--muted); height: 3.6rem; padding: .4rem .05rem;
  font-size: clamp(.7rem, 1.7vw, .9rem); font-weight: 550; overflow-wrap: anywhere; overflow: hidden;
}
.campaign-detail { margin: .6rem 0 1.2rem; color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.dashboard-recommendations { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.dashboard-recommendations h2 span { color: var(--green); margin-right: .25rem; }
.dashboard-recommendations ul { padding: 0; margin: .8rem 0 0; list-style: none; display: grid; gap: .65rem; }
.dashboard-recommendations li { border-radius: .6rem; background: #24252a; border-left: 3px solid currentColor; padding: .65rem .9rem; }
.dashboard-recommendations p { color: var(--muted); margin: .12rem 0; }
.section-heading { margin-bottom: .9rem; }
.metrics, .workspace { display: grid; gap: 1rem; margin: 0; }
.metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metrics dd { font-size: clamp(1rem, 2.4vw, 1.65rem); }
.workspace { grid-template-columns: 1fr 1fr; align-items: start; }
.card { min-width: 0; }
.card h3 { margin-bottom: 1rem; }
label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .85rem; }
label small { font-weight: 500; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; border: 1px solid #555963; border-radius: .5rem;
  background: #18191e; color: inherit; font: inherit; font-weight: 400; padding: .55rem .65rem;
}
textarea { resize: vertical; }
.section-heading label { margin: 0; }
button, .button {
  display: inline-block; border: 0; border-radius: .55rem; background: #1762bc; color: white; padding: .66rem .95rem;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
}
button:disabled { opacity: .5; cursor: default; }
.secondary { background: #2a303d; color: #dce9ff; font-size: .9rem; white-space: nowrap; }
.chart-campaign { display: flex; background: transparent; padding: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: #18191e; padding: 1rem; border-radius: .5rem; }
.output p, #form-status { color: var(--muted); }
#form-status:empty, #advisor-status:empty { display: none; }
.actions { justify-content: flex-start; flex-wrap: wrap; }
.check { display: flex; align-items: flex-start; gap: .6rem; }
.check input { width: 1rem; margin: .25rem 0 0; flex-shrink: 0; }
.output dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.output dl dd { font-size: 1rem; margin: 0; text-align: right; }
.output ol { padding-left: 1.25rem; }
.output li { margin: .65rem 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8fc4ff; outline-offset: 3px; }
@media (max-width: 780px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .header { flex-wrap: wrap; padding: .75rem 0; gap: .6rem; }
  .dashboard-heading, .section-heading { align-items: flex-start; }
  .dashboard-heading p { font-size: .875rem; }
}
.level-1 { height: 4%; }
.level-2 { height: 8%; }
.level-3 { height: 12%; }
.level-4 { height: 16%; }
.level-5 { height: 20%; }
.level-6 { height: 24%; }
.level-7 { height: 28%; }
.level-8 { height: 32%; }
.level-9 { height: 36%; }
.level-10 { height: 40%; }
.level-11 { height: 44%; }
.level-12 { height: 48%; }
.level-13 { height: 52%; }
.level-14 { height: 56%; }
.level-15 { height: 60%; }
.level-16 { height: 64%; }
.level-17 { height: 68%; }
.level-18 { height: 72%; }
.level-19 { height: 76%; }
.level-20 { height: 80%; }
#decision-actions { margin-top: .8rem; }
#decision-status { color: var(--muted); font-size: .9rem; margin: .55rem 0 0; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.login-panel { width: min(100%, 420px); background: #1b1c20; border: 1px solid var(--line); border-radius: 1.2rem; padding: clamp(1.25rem, 6vw, 2rem); }
.login-panel h1 { margin-top: 1.4rem; }
.login-panel p { margin: .45rem 0 1.2rem; color: var(--muted); }
.login-panel .login-error { color: #ffb878; }
.login-panel button { width: 100%; }
.month-picker { min-width: 9rem; margin: 0; }
.logout { margin: 0; }
.logout button { padding: .35rem .6rem; font-size: .85rem; }
