/* File map: shared visual tokens, layout, and component styles. */

:root {
  --ink: #172b28;
  --muted: #71807b;
  --paper: #f5f4ef;
  --card: #fffefa;
  --line: #e8e8df;
  --green: #176b52;
  --lime: #d9f36b;
  --orange: #e39a61;
  --blue: #709b9d;
  --shadow: 0 12px 34px rgba(27, 48, 41, 0.07);
}
.goal-eyebrow {
  color: #b9cbc2;
}
.sample-runs-button {
  margin-top: 0;
}
.app-load-error {
  padding: 12px 16px;
  border: 1px solid #efc8c1;
  border-radius: 12px;
  background: #fff1ed;
  color: #8c3427;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.shell {
  max-width: 1220px;
  margin: auto;
  padding: 24px 28px 56px;
}
body.is-booting .layout {
  visibility: hidden;
  pointer-events: none;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-chip {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.account-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 11px;
}
.account-signin svg {
  width: 14px;
  height: 14px;
}
#bootError {
  margin-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.04em;
}
.tagline {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0;
  color: var(--muted);
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--green);
  display: grid;
  place-items: center;
  color: var(--lime);
  font-size: 20px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 10px;
  color: var(--muted);
  font-weight: 750;
}
.date {
  font-size: 12px;
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  grid-template-areas:
    "goal history"
    "charts history";
  gap: 18px;
  align-items: start;
}
.goal {
  grid-area: goal;
}
.chart-card {
  grid-area: charts;
}
.history-card {
  grid-area: history;
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 21px 22px;
  box-shadow: var(--shadow);
}
.goal {
  background: var(--green);
  color: #f5f5ed;
  border: 0;
  position: relative;
  overflow: hidden;
  padding: 23px 25px;
}
.goal:after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  right: -65px;
  top: -100px;
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, 0.035),
    0 0 0 57px rgba(255, 255, 255, 0.03);
}
.goalhead {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.goal-actions {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: end;
  gap: 8px;
}
.goal-edit {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5ed;
  padding: 6px 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.goal-edit:hover {
  background: rgba(255, 255, 255, 0.16);
}
.goal h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
  margin: 5px 0 0;
}
.tag {
  font-size: 11px;
  color: #d9f36b;
  border: 1px solid rgba(217, 243, 107, 0.38);
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.goaldetail {
  display: flex;
  gap: 38px;
  margin: 21px 0 18px;
  position: relative;
  z-index: 1;
}
.big {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.05em;
  line-height: 1;
}
.big span {
  display: block;
  font-size: 11px;
  letter-spacing: 0;
  color: #b9cbc2;
  font-weight: 500;
  margin-top: 7px;
}
.progressrow {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #d0ddd4;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.bar {
  height: 7px;
  background: rgba(255, 255, 255, 0.17);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.bar > i {
  display: block;
  height: 100%;
  width: 62%;
  background: var(--lime);
  border-radius: 99px;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.sectionhead h2 {
  font-size: 16px;
  letter-spacing: -0.025em;
  margin: 0;
}
.subtle {
  font-size: 11px;
  color: var(--muted);
}
.chartwrap {
  height: 205px;
  position: relative;
}
.chartwrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.chartwrap.is-dash canvas {
  display: none;
}
.chart-dash {
  display: none;
  height: 100%;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.chartwrap.is-dash .chart-dash {
  display: grid;
}
.chart-dash-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 10px 20px;
}
.chart-dash-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.chart-dash-item:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}
.chart-dash-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.chart-dash-value {
  color: #17352c;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin: 5px 0 3px;
}
.chart-dash-note {
  color: var(--muted);
  font-size: 11px;
}
.legend {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
}
.legend:empty {
  display: none;
}
.legend span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.key {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.key.orange {
  background: var(--orange);
}
.key.teal {
  background: #709b9d;
}
.insight {
  background: #edf3e8;
  border: 1px solid #dfe9db;
}
.insighttop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pill {
  font-size: 10px;
  background: #dcebd7;
  color: #37634b;
  padding: 5px 8px;
  border-radius: 999px;
}
.insight h2 {
  font-size: 17px;
  letter-spacing: -0.03em;
  margin: 0 0 7px;
}
.insight p {
  font-size: 13px;
  color: #52645d;
  margin: 0 0 13px;
}
.evidence {
  border-top: 1px solid #dbe5d8;
  padding-top: 11px;
  display: flex;
  gap: 8px;
  align-items: start;
  color: #52645d;
  font-size: 11px;
}
.spark {
  font-weight: 800;
  color: var(--green);
}
.chart-reading {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 2px;
}
.chart-reading strong {
  font-size: 12px;
}
.chart-reading p {
  font-size: 12px;
  line-height: 1.55;
  color: #52645d;
  margin: 4px 0 0;
}
.chart-reading p:empty {
  display: none;
}
.benchmark-reading {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #dce8d9;
  border-radius: 12px;
  background: #f4f7f0;
}
.benchmark-reading[hidden] {
  display: none;
}
.benchmark-reading strong {
  display: block;
  font-size: 11px;
}
.benchmark-reading p {
  margin: 4px 0;
  font-size: 11px;
  line-height: 1.5;
  color: #52645d;
}
.benchmark-reading small,
.benchmark-reading a {
  font-size: 9px;
  color: var(--muted);
}
.benchmark-reading a {
  color: var(--green);
  text-decoration: underline;
}
.carousel-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  padding-bottom: 12px;
}
.carousel-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-tabs::-webkit-scrollbar {
  display: none;
}
.carousel-tab {
  flex: none;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #dce3dc;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition:
    color 0.2s,
    background-color 0.2s,
    border-color 0.2s;
}
.carousel-tab[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: white;
}
.carousel-tab:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.chartwrap {
  touch-action: pan-y;
}
.chart-card .sectionhead {
  align-items: center;
}
.chart-card .chartwrap canvas,
.chart-card .chartwrap .chart-dash {
  transition: opacity 0.18s ease;
}
.chart-card .chartwrap.fading canvas,
.chart-card .chartwrap.fading .chart-dash {
  opacity: 0.25;
}
.analysis-list {
  display: grid;
  gap: 0;
}
.analysis-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.analysis-row:first-child {
  border-top: 0;
  padding-top: 2px;
}
.analysis-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e4f0df;
  color: var(--green);
  font-weight: 800;
}
.analysis-icon.orange {
  background: #f6e9dd;
  color: #b46a36;
}
.analysis-icon.yellow {
  background: #f3f0d9;
  color: #8b792f;
}
.analysis-row strong {
  font-size: 12px;
}
.analysis-row p {
  font-size: 12px;
  color: #52645d;
  margin: 4px 0;
}
.analysis-row small {
  font-size: 10px;
  color: var(--muted);
}
.run-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.csv-dialog {
  width: min(820px, 100%);
  max-height: 90vh;
  overflow: auto;
}
.csv-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
}
.csv-file-row span {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.csv-help {
  font-size: 11px;
  color: #65756d;
  background: #f0f2eb;
  padding: 10px 12px;
  border-radius: 11px;
  margin-bottom: 12px;
}
.csvmapping {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.csvmapping select,
.csvunits select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fffefa;
  color: var(--ink);
}
.csvunits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.csv-summary {
  font-size: 11px;
  color: #52645d;
  padding: 10px 0;
}
.csv-preview {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 220px;
}
.csv-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  white-space: nowrap;
}
.csv-preview th,
.csv-preview td {
  text-align: left;
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
}
.csv-preview th {
  background: #f5f5ef;
  color: #52645d;
  position: sticky;
  top: 0;
}
.csv-preview tr:last-child td {
  border-bottom: 0;
}
.csv-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}
.csv-foot .actions {
  margin: 0;
}
.csv-foot .textbtn {
  white-space: nowrap;
}
@media (max-width: 600px) {
  .run-actions {
    gap: 5px;
  }
  .run-actions .btn {
    padding: 8px 9px;
    font-size: 10px;
  }
  .csvmapping {
    grid-template-columns: 1fr 1fr;
  }
  .csvunits {
    grid-template-columns: 1fr 1fr;
  }
  .csv-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .csv-foot .actions {
    width: 100%;
    justify-content: flex-end;
  }
}
.profilegrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.profilegrid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fffefa;
  color: var(--ink);
  outline-color: #9db683;
}
.profilefoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.profilefoot span {
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 430px) {
  .profilefoot {
    align-items: flex-start;
    flex-direction: column;
  }
}
.history-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 12px;
}
.runs {
  display: grid;
  gap: 0;
  flex: 1;
  min-height: 220px;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 16px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.runs:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.run {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.run:first-child {
  border-top: 0;
  padding-top: 0;
}
.runname {
  font-size: 13px;
  font-weight: 700;
}
.runmeta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.runpace {
  text-align: right;
  font-weight: 700;
  font-size: 13px;
}
.runpace small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.btn {
  border: 0;
  background: var(--lime);
  color: #223328;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 750;
}
.btn:hover {
  filter: brightness(0.97);
}
.btn.secondary {
  background: #edf1e9;
  color: #3c5b4c;
}
.textbtn {
  background: none;
  border: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 0;
}
.footnote {
  font-size: 10px;
  color: var(--muted);
  margin-top: 13px;
}
.footnote.compact {
  padding: 8px;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 34, 28, 0.44);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 5;
}
.modal.open {
  display: flex !important;
}
.modal.elevated {
  z-index: 6;
}
.modal.onboarding-modal {
  z-index: 8;
  background: rgba(16, 34, 28, 0.5);
  backdrop-filter: blur(6px);
}
#accountForm .field {
  margin-top: 12px;
}
#cancelAccount {
  margin-top: 14px;
}
.dialog {
  background: var(--card);
  border-radius: 20px;
  padding: 23px;
  width: min(490px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.dialog h2 {
  font-size: 20px;
  margin: 0;
}
.close {
  border: 0;
  background: #eef0e9;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 19px;
}
.run-optional {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.run-optional summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
}
.run-optional[open] summary {
  margin-bottom: 12px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.field {
  display: grid;
  gap: 5px;
}
.goal-time-fields,
.goal-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 12px;
}
.goal-form-actions {
  margin-top: 18px;
}
.goal-form-actions .btn {
  width: 100%;
}
.field.full {
  grid-column: 1/-1;
}
.field-hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}
.field label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fffefa;
  color: var(--ink);
  outline-color: #9db683;
}
.field textarea {
  height: 72px;
  resize: vertical;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 15px;
}
.dialog.onboarding-dialog {
  padding: 28px 24px 24px;
  text-align: center;
  animation: dialog-in 0.25s ease-out;
}
.onboarding-dialog h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
  margin: 0;
}
.onboarding-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.onboarding-actions .btn {
  padding: 13px 14px;
  font-size: 14px;
}
.onboarding-actions .textbtn {
  justify-self: center;
  padding: 6px 10px;
  font-size: 12px;
}
.step-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.onboarding-dialog .step-dots,
.is-first-run .step-dots {
  display: flex;
}
.step-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}
.step-dots i.on {
  width: 18px;
  background: var(--green);
}
.modal.is-first-run .dialog {
  animation: dialog-in 0.25s ease-out;
}
.is-first-run .close,
.is-first-run #cancelGoal {
  display: none;
}
.is-first-run .goal-form-actions {
  grid-template-columns: 1fr;
}
.is-first-run .goal-form-actions .btn {
  padding: 13px 14px;
  font-size: 14px;
}
.goal-presets {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.is-first-run .goal-presets {
  display: flex;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--green);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}
.chip:hover {
  border-color: var(--green);
}
.chip:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.empty {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 9px;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: 0.2s;
  background: #183a30;
  color: white;
  padding: 10px 15px;
  border-radius: 999px;
  font-size: 12px;
  z-index: 10;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 800px) {
  .top {
    align-items: flex-start;
  }
  .shell {
    padding: 18px 15px 40px;
  }
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "goal"
      "history"
      "charts";
  }
  .history-card {
    align-self: start;
  }
  .runs {
    max-height: min(50vh, 420px);
  }
  .goal {
    padding: 21px;
  }
}
@media (max-width: 430px) {
  .card {
    padding: 18px;
  }
  .goal h2 {
    font-size: 20px;
  }
  .goaldetail {
    gap: 22px;
  }
  .big {
    font-size: 24px;
  }
  .chartwrap {
    height: 180px;
  }
  .chart-dash-item {
    padding: 6px 12px;
  }
  .chart-dash-value {
    font-size: 22px;
  }
  .chart-dash-note {
    font-size: 10px;
  }
}

.goal.has-reading::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -48px;
  height: 130px;
  background: radial-gradient(
    ellipse at center,
    rgba(217, 243, 107, 0.22),
    transparent 72%
  );
  pointer-events: none;
  z-index: 0;
}
.goal-ai {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid transparent;
  padding-top: 0;
  transition:
    padding-top 0.4s ease,
    border-color 0.4s ease,
    margin-top 0.4s ease,
    gap 0.4s ease;
}
.goal.has-reading .goal-ai,
.goal.is-busy .goal-ai {
  margin-top: 20px;
  padding-top: 18px;
  gap: 16px;
  border-top-color: rgba(245, 245, 237, 0.16);
}
.goal-ai-reading {
  display: none;
}
.goal.has-reading .goal-ai-reading,
.goal.is-busy .goal-ai-reading {
  display: block;
}
.goal.has-reading .goal-ai-copy,
.goal.is-busy .goal-ai-copy {
  animation: goal-ai-in 0.45s ease;
}
.goal-ai .ai-badge {
  display: inline-flex;
  margin-bottom: 10px;
}
.ai-badge {
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: #d9f36b;
}
.ai-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9f36b;
  box-shadow: 0 0 10px 2px rgba(217, 243, 107, 0.55);
  animation: ai-pulse 2.2s ease-in-out infinite;
}
.goal-ai p {
  font-size: 16.5px;
  line-height: 1.75;
  color: #f3f6ea;
  margin: 0;
  white-space: pre-line;
  letter-spacing: -0.018em;
  max-width: 44em;
}
.goal-ai p[hidden] {
  display: none;
}
.goal-ai p.ai-placeholder {
  color: #b9cbc2;
  font-size: 14px;
  line-height: 1.5;
}
.ai-action {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #10221d;
  background: linear-gradient(135deg, #f3ff9a 0%, #d9f36b 46%, #8eecc4 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.38) inset,
    0 10px 28px rgba(140, 230, 170, 0.32),
    0 0 36px rgba(217, 243, 107, 0.28);
}
.goal.has-reading .ai-action {
  width: auto;
  align-self: start;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 12px;
}
@media (max-width: 800px) {
  .goal.has-reading .ai-action {
    width: 100%;
    align-self: stretch;
  }
}
.ai-action-spark {
  width: 15px;
  height: 15px;
  flex: none;
}
.ai-action-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 72%
  );
  transform: translateX(-130%);
  animation: ai-sheen 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.ai-action-label,
.ai-action-spark {
  position: relative;
  z-index: 1;
}
.ai-action:hover {
  filter: brightness(1.05);
}
.ai-action:disabled,
.ai-action.is-busy {
  opacity: 0.78;
  cursor: wait;
}
@keyframes goal-ai-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ai-sheen {
  0%,
  42% {
    transform: translateX(-130%);
  }
  70%,
  100% {
    transform: translateX(130%);
  }
}
@keyframes ai-pulse {
  0%,
  100% {
    opacity: 0.55;
    box-shadow: 0 0 8px 1px rgba(217, 243, 107, 0.35);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 12px 3px rgba(217, 243, 107, 0.7);
  }
}
@media (prefers-reduced-motion: reduce) {
  .goal-ai,
  .goal-ai-copy,
  .ai-badge::before,
  .ai-action-sheen,
  .dialog.onboarding-dialog,
  .modal.is-first-run .dialog {
    animation: none;
    transition: none;
  }
}

.chart-sectionhead {
  align-items: center;
  margin-bottom: 10px;
}
.chart-range {
  position: relative;
  flex: none;
}
.chart-range-toggle {
  min-height: 28px;
  padding: 5px 10px 5px 11px;
  border: 1px solid #dce3dc;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chart-range-toggle:after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}
.chart-range.is-open .chart-range-toggle:after {
  transform: rotate(225deg) translateY(-1px);
}
.chart-range-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.chart-range-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 124px;
  padding: 4px;
  border: 1px solid #dce3dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 34, 28, 0.12);
  z-index: 6;
}
.chart-range-menu[hidden] {
  display: none;
}
.chart-range-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #31423c;
  font: inherit;
  font-size: 12px;
  text-align: left;
  padding: 8px 10px;
}
.chart-range-option:hover {
  background: #f4f6f1;
}
.chart-range-option[aria-selected="true"] {
  background: #eef4ea;
  color: var(--green);
  font-weight: 700;
}
.chart-range-option:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
@media (max-width: 600px) {
  .chart-sectionhead {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
