/* ════════════════════════════════════════════════════════════════
   GOALS — in-app goal tracking surface. Quartet v6 design system.
   Namespace: .gl-*   Root scope: .gl-page
   ════════════════════════════════════════════════════════════════ */

/* ── Variable bridge ────────────────────────────────────────────
   The design handover references short-form variables from styles-v6.css
   (--bg, --surface, --cyan, --ink, etc.). The production codebase uses
   --bg-deep / --surface-deep / --quartet-cyan / --ink-deep / etc.
   We define local aliases on .gl-page so the rest of the file can use
   the short names verbatim from the handover.
   ─────────────────────────────────────────────────────────────── */
.gl-page {
  /* Surfaces */
  --bg:         var(--bg-deep);
  --bg-2:       var(--surface-deep);
  --surface:    var(--surface-deep);
  --surface-2:  var(--surface-deep-2);
  --surface-hi: var(--surface-deep-hi);

  /* Lines / borders */
  --line:       var(--line-deep);
  --line-2:     var(--line-deep-2);

  /* Text */
  --ink:        var(--ink-deep);
  --ink-2:      var(--ink-deep-2);
  --muted:      var(--muted-deep);
  --muted-2:    var(--muted-deep-2);
  --faint:      var(--faint-deep);

  /* Accent: cyan */
  --cyan:       var(--quartet-cyan);
  --cyan-2:     var(--quartet-cyan-2);
  --cyan-dim:   var(--quartet-cyan-dim);

  /* Accent helpers (shared by segmented buttons, link-cards, empty state) */
  --accent-fill:   var(--quartet-cyan-fill);
  --accent-border: var(--quartet-cyan-border);

  /* Chromatic accents */
  --indigo:     var(--quartet-indigo);
  --violet:     var(--quartet-violet);
  --amber:      var(--quartet-amber);
  --coral:      var(--quartet-coral);

  /* Semantic */
  --pos:        var(--quartet-pos);
  --pos-2:      var(--quartet-pos-2, #8de4b6);
  --pos-fill:   var(--quartet-pos-fill);
  --pos-border: var(--quartet-pos-border);
  --neg:        var(--quartet-neg);
  --neg-border: var(--quartet-neg-border, rgba(255,138,138,.30));
  --warn:       var(--quartet-amber);
  --warn-2:     color-mix(in srgb, var(--quartet-amber), white 18%);

  /* Typography */
  --font-mono:  var(--font-quartet-mono);

  /* Page layout */
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 32px 96px;
  font-family: var(--font-quartet);
  color: var(--ink);
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes capital-pulse {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: .45; transform: scale(1.6); }
  100% { opacity: 1; transform: scale(1); }
}

/* Per-hue accent mapping (set on cards / chips via data-ghue) */
[data-ghue="cyan"]   { --g: var(--cyan);   --g-2: var(--cyan-2);  --g-fill: rgba(109,212,220,.10); --g-border: rgba(109,212,220,.34); --g-soft: rgba(109,212,220,.16); }
[data-ghue="indigo"] { --g: var(--indigo); --g-2: #aab8ff;        --g-fill: rgba(138,159,255,.10); --g-border: rgba(138,159,255,.36); --g-soft: rgba(138,159,255,.16); }
[data-ghue="violet"] { --g: var(--violet); --g-2: #ccb0ff;        --g-fill: rgba(184,141,255,.10); --g-border: rgba(184,141,255,.36); --g-soft: rgba(184,141,255,.16); }
[data-ghue="amber"]  { --g: var(--amber);  --g-2: var(--warn-2);  --g-fill: rgba(255,198,109,.10); --g-border: rgba(255,198,109,.36); --g-soft: rgba(255,198,109,.16); }
[data-ghue="coral"]  { --g: var(--coral);  --g-2: #ffb79c;        --g-fill: rgba(255,155,122,.10); --g-border: rgba(255,155,122,.36); --g-soft: rgba(255,155,122,.16); }
[data-ghue="pos"]    { --g: var(--pos);    --g-2: var(--pos-2);   --g-fill: rgba(109,212,158,.10); --g-border: rgba(109,212,158,.34); --g-soft: rgba(109,212,158,.16); }

/* Single-accent ("utilitarian") override: collapse all hues to cyan */
.gl-page.is-mono [data-ghue] { --g: var(--cyan); --g-2: var(--cyan-2); --g-fill: rgba(109,212,220,.10); --g-border: rgba(109,212,220,.34); --g-soft: rgba(109,212,220,.16); }

/* ════════════════ HEADER ═══════════════════════════════════════ */
.gl-head { margin-bottom: 24px; }
.gl-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 10.5px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.20em; margin-bottom: 14px;
}
.gl-eyebrow .sep { color: var(--faint); }
.gl-eyebrow .pulse { width: 6px; height: 6px; border-radius: 999px; background: var(--cyan); animation: capital-pulse 2.4s ease-out infinite; }
.gl-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.gl-title { margin: 0; font-size: 38px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; }
.gl-title-sub { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); max-width: 56ch; line-height: 1.5; }

/* primary add button */
.gl-add-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 7px; border: 0; cursor: pointer;
  background: var(--cyan); color: #04141a; font-family: inherit;
  font-size: 13px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.gl-add-btn:hover { background: var(--cyan-2); transform: translateY(-1px); }
.gl-add-btn svg { width: 16px; height: 16px; }
.gl-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 7px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--ink);
  font-family: inherit; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.gl-btn-ghost:hover { border-color: var(--cyan); background: var(--surface); }
.gl-btn-ghost svg { width: 15px; height: 15px; }

/* ════════════════ SUMMARY STAT STRIP ══════════════════════════ */
.gl-summary {
  display: grid; grid-template-columns: 1.3fr 1px repeat(3, 1fr);
  align-items: center; gap: 0 24px;
  padding: 22px 26px; margin-bottom: 28px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
}
.gl-summary .divider { align-self: stretch; background: var(--line-2); width: 1px; }
.gl-sum-total { display: flex; flex-direction: column; gap: 12px; }
.gl-sum-total .lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; }
.gl-sum-total .figs { display: flex; align-items: baseline; gap: 10px; }
.gl-sum-total .cur { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.04em; color: var(--ink); }
.gl-sum-total .of { font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); }
.gl-sum-total .meter { position: relative; height: 6px; border-radius: 999px; background: var(--surface-hi); overflow: hidden; }
.gl-sum-total .meter .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--indigo)); }
.gl-stat { text-align: center; }
.gl-stat .v { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.gl-stat .v.on  { color: var(--pos); }
.gl-stat .v.beh { color: var(--warn); }
.gl-stat .v.done { color: var(--violet); }
.gl-stat .k { display: block; margin-top: 9px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }

/* ════════════════ SECTION LABEL ═══════════════════════════════ */
.gl-section-label {
  display: flex; align-items: baseline; gap: 12px;
  margin: 38px 0 16px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-2);
}
.gl-section-label .ct { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); letter-spacing: 0.04em; }
.gl-section-label.first { margin-top: 0; }

/* ════════════════ GOAL CARD ═══════════════════════════════════ */
.gl-list { display: flex; flex-direction: column; gap: 16px; }
.gl-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 22px 24px 20px;
  transition: border-color .18s, transform .18s;
}
.gl-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--g); opacity: .9;
}
.gl-card.clickable { cursor: pointer; }
.gl-card.clickable:hover { border-color: var(--g-border); transform: translateY(-2px); }

/* header */
.gl-card-head { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 14px; align-items: start; }
.gl-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--g-fill); border: 1px solid var(--g-border); color: var(--g);
}
.gl-card-icon svg { width: 20px; height: 20px; }
.gl-card-titles { min-width: 0; padding-top: 1px; }
.gl-card-name { font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.gl-card-tag { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.gl-card-actions { display: flex; align-items: center; gap: 8px; }

/* status pill */
.gl-status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
  border: 1px solid;
}
.gl-status .d { width: 6px; height: 6px; border-radius: 999px; }
.gl-status.on  { color: var(--pos); border-color: var(--pos-border); background: var(--pos-fill); }
.gl-status.on .d { background: var(--pos); }
.gl-status.beh { color: var(--warn); border-color: rgba(255,198,109,.3); background: rgba(255,198,109,.10); }
.gl-status.beh .d { background: var(--warn); }
.gl-status.done { color: var(--violet); border-color: rgba(184,141,255,.32); background: rgba(184,141,255,.10); }
.gl-status.done svg { width: 13px; height: 13px; }
.gl-kebab {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer;
  transition: all .15s;
}
.gl-kebab:hover { color: var(--ink); background: var(--bg-2); }
.gl-kebab svg { width: 16px; height: 16px; }

/* hero figures */
.gl-card-hero { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 18px 0 12px; }
.gl-card-figs { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.gl-card-cur { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.045em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.gl-card-of { font-family: var(--font-mono); font-size: 14px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.gl-card-of .sub { color: var(--muted); }
.gl-card-pct { font-family: var(--font-mono); font-size: 26px; font-weight: 500; letter-spacing: -0.03em; color: var(--g-2); font-variant-numeric: tabular-nums; line-height: 1; flex-shrink: 0; }
.gl-card.is-done .gl-card-cur, .gl-card.is-done .gl-card-pct { color: var(--pos); }

/* progress bar + milestone ticks */
.gl-track { position: relative; height: 9px; border-radius: 999px; background: var(--surface-hi); overflow: hidden; }
.gl-track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--g), var(--g-2)); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.gl-card.is-done .gl-track .fill { background: linear-gradient(90deg, var(--pos), var(--pos-2)); }
.gl-ticks { position: relative; height: 16px; margin-top: 7px; }
.gl-tick { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0; }
.gl-tick .lbl { font-size: 9.5px; font-family: var(--font-mono); color: var(--muted-2); white-space: nowrap; letter-spacing: -0.01em; }
.gl-tick.done .lbl { color: var(--g-2); }
.gl-tick.next .lbl { color: var(--ink); font-weight: 600; }
.gl-tick .pin { display: none; }

/* meta strip: pace / timeline / forecast */
.gl-meta { display: grid; grid-template-columns: 1.1fr 1px 1fr 1px 1.3fr; align-items: stretch; gap: 0 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.gl-meta .vdiv { width: 1px; background: var(--line); align-self: stretch; }
.gl-meta-cell { min-width: 0; }
.gl-meta-cell .ml { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; margin-bottom: 9px; }
.gl-meta-cell .mv { font-family: var(--font-mono); font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.gl-meta-cell .mv .u { font-size: 11px; color: var(--muted-2); }
.gl-meta-cell .msub { font-size: 11px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.gl-meta-cell .msub b { font-family: var(--font-mono); font-weight: 500; }
.gl-meta-cell .msub.pos b { color: var(--pos); }
.gl-meta-cell .msub.neg b { color: var(--warn); }

/* pace dual-bar */
.gl-pace { margin-top: 9px; }
.gl-pace .bar { position: relative; height: 5px; border-radius: 999px; background: var(--surface-hi); overflow: hidden; }
.gl-pace .bar .need { position: absolute; top: 50%; width: 2px; height: 11px; background: var(--ink-2); transform: translate(-50%,-50%); border-radius: 2px; z-index: 2; }
.gl-pace .bar .have { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--g); opacity: .8; }
.gl-pace .bar.behind .have { background: var(--warn); }

/* forecast sparkline */
.gl-forecast { width: 100%; }
.gl-forecast svg { width: 100%; height: 46px; display: block; overflow: visible; }
.gl-forecast .fc-hist { fill: none; stroke: var(--g); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gl-forecast .fc-proj { fill: none; stroke: var(--g-2); stroke-width: 1.6; stroke-dasharray: 3 3; opacity: .85; }
.gl-forecast .fc-area { fill: var(--g); opacity: .11; }
.gl-forecast .fc-target { stroke: var(--muted-2); stroke-width: 1; stroke-dasharray: 2 3; }
.gl-forecast .fc-now { fill: var(--g); }
.gl-forecast .fc-hit { fill: var(--bg); stroke: var(--g-2); stroke-width: 1.6; }

/* footer: linked accounts */
.gl-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.gl-linkbadge { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.gl-linkbadge svg { width: 13px; height: 13px; color: var(--g); }
.gl-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 10px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  font-size: 11px; color: var(--ink-2); font-weight: 500;
}
.gl-chip .ic { width: 5px; height: 5px; border-radius: 999px; background: var(--g); }
.gl-card-foot .spacer { flex: 1; }
.gl-card-foot .updated { font-size: 10.5px; color: var(--muted-2); font-family: var(--font-mono); }
.gl-card-foot .detail-link { font-size: 11.5px; color: var(--g-2); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.gl-card-foot .detail-link svg { width: 13px; height: 13px; transition: transform .2s; }
.gl-card.clickable:hover .detail-link svg { transform: translateX(3px); }

/* completed card — slimmer */
.gl-card.is-done { padding-bottom: 18px; }
.gl-card.is-done .gl-card-hero { margin-bottom: 10px; }

/* ════════════════ EMPTY STATE ═════════════════════════════════ */
.gl-empty { max-width: 880px; margin: 0 auto; padding: 24px 0 0; text-align: center; }
.gl-empty-mark {
  width: 64px; height: 64px; border-radius: 16px; margin: 14px auto 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-fill); border: 1px solid var(--accent-border); color: var(--cyan);
}
.gl-empty-mark svg { width: 30px; height: 30px; }
.gl-empty h2 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.025em; }
.gl-empty p { margin: 12px auto 0; font-size: 15px; color: var(--muted); max-width: 52ch; line-height: 1.55; }
.gl-empty-cta { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }
.gl-empty-or { margin: 44px 0 18px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; }

/* templates */
.gl-templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; }
.gl-template {
  display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 13px; align-items: center;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px;
  cursor: pointer; transition: border-color .15s, background .15s, transform .15s; text-align: left;
}
.gl-template:hover { border-color: var(--g-border); background: var(--surface-2); transform: translateY(-2px); }
.gl-template .tic {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--g-fill); border: 1px solid var(--g-border); color: var(--g);
}
.gl-template .tic svg { width: 19px; height: 19px; }
.gl-template .tt { min-width: 0; }
.gl-template .tt .nm { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.gl-template .tt .ds { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }

/* compact template strip used in overview add-row */
.gl-quickrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.gl-quick {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.gl-quick:hover { border-color: var(--g-border); background: var(--surface-2); }
.gl-quick .qi { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--g-fill); border: 1px solid var(--g-border); color: var(--g); flex-shrink: 0; }
.gl-quick .qi svg { width: 16px; height: 16px; }
.gl-quick .qn { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.gl-quick .qd { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ════════════════ CREATE / EDIT OVERLAY ═══════════════════════ */
.gl-ovl-backdrop { position: absolute; inset: 0; filter: blur(7px) brightness(.5); opacity: .5; pointer-events: none; }
.gl-ovl-backdrop .bd-row { margin: 16px 32px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); height: 110px; }
.gl-ovl-backdrop .bd-row.tall { height: 200px; }
.gl-scrim {
  position: fixed; inset: 0; z-index: 1100; display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 24px 40px; overflow-y: auto;
  background: radial-gradient(circle at 50% 30%, rgba(12,16,26,.74), rgba(6,8,13,.93));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.gl-modal {
  position: relative; width: 100%; max-width: 920px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05);
  display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,0.95fr);
  overflow: hidden;
}
.gl-modal-form { padding: 28px 30px 24px; max-height: 82vh; overflow-y: auto; overflow-x: hidden; }
.gl-modal-form::-webkit-scrollbar { width: 8px; }
.gl-modal-form::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.gl-modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.gl-modal-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.gl-modal-head p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.gl-modal-x {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; transition: all .15s;
}
.gl-modal-x:hover { color: var(--ink); background: var(--bg-2); }
.gl-modal-x svg { width: 15px; height: 15px; }

/* form sections */
.gl-fieldset { margin-bottom: 22px; }
.gl-fieldset > .leg { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; margin-bottom: 11px; display: flex; align-items: center; gap: 8px; }
.gl-fieldset > .leg .opt { color: var(--muted-2); letter-spacing: 0.04em; text-transform: none; font-weight: 500; }

/* type cards (segmented) */
.gl-typegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.gl-typecard {
  display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center;
  padding: 16px 10px 13px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2);
  transition: border-color .15s, background .15s;
}
.gl-typecard:hover { border-color: var(--g-border); }
.gl-typecard.sel { border-color: var(--g); background: var(--g-fill); box-shadow: inset 0 0 0 1px var(--g); }
.gl-typecard .tci { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--g-fill); border: 1px solid var(--g-border); color: var(--g); }
.gl-typecard.sel .tci { background: var(--g-soft); }
.gl-typecard .tci svg { width: 18px; height: 18px; }
.gl-typecard .tcn { font-size: 12.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; }
.gl-adv-toggle { margin-top: 11px; background: transparent; border: 0; color: var(--cyan); font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px; }
.gl-adv-toggle:hover { color: var(--cyan-2); }
.gl-adv-toggle svg { width: 13px; height: 13px; transition: transform .2s; }
.gl-adv-toggle.open svg { transform: rotate(90deg); }

/* inputs */
.gl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gl-row2 .gl-field { justify-content: flex-end; }
.gl-field { display: flex; flex-direction: column; }
.gl-field .fl { font-size: 11.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 7px; }
.gl-field .fl .hint { color: var(--muted-2); font-weight: 400; }
.gl-input-wrap { position: relative; display: flex; align-items: center; }
.gl-input-wrap .pre { position: absolute; left: 13px; font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); pointer-events: none; }
.gl-input {
  width: 100%; padding: 9px 13px; border-radius: 8px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
  font-family: inherit; font-size: 13px; outline: none; transition: border-color .15s, background .15s;
  height: 40px;
}
textarea.gl-input { height: auto; }
.gl-input.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.gl-input.has-pre { padding-left: 46px; }
.gl-input::placeholder { color: var(--muted-2); }
.gl-input:focus { border-color: var(--cyan); background: var(--surface-2); }
textarea.gl-input { resize: vertical; min-height: 64px; line-height: 1.5; }
.gl-field .fhelp { font-size: 11px; color: var(--muted-2); margin-top: 7px; line-height: 1.4; }

/* timeline toggle */
.gl-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.gl-segbtn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
  font-family: inherit; font-size: 13px; font-weight: 500; transition: all .15s;
}
.gl-segbtn:hover { border-color: var(--line-2); color: var(--ink); }
.gl-segbtn svg { width: 16px; height: 16px; color: var(--muted); }
.gl-segbtn.sel { border-color: var(--cyan); background: var(--accent-fill); color: var(--cyan); }
.gl-segbtn.sel svg { color: var(--cyan); }

/* account-link card */
.gl-linkcard { border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.gl-linkcard-head { display: flex; align-items: flex-start; gap: 11px; padding: 15px 16px; background: var(--accent-fill); border-bottom: 1px solid transparent; }
.gl-linkcard.on .gl-linkcard-head { border-bottom-color: var(--line-2); }
.gl-linkcard-head .lk { color: var(--cyan); margin-top: 1px; }
.gl-linkcard-head .lk svg { width: 18px; height: 18px; }
.gl-linkcard-head .lt { flex: 1; min-width: 0; }
.gl-linkcard-head .lt .h { font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.gl-linkcard-head .lt .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
/* toggle switch */
.gl-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-hi); border: 1px solid var(--line-2); cursor: pointer; flex-shrink: 0; transition: background .18s, border-color .18s; }
.gl-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .18s, background .18s; }
.gl-switch.on { background: var(--accent-fill); border-color: var(--cyan); }
.gl-switch.on::after { transform: translateX(16px); background: var(--cyan); }

.gl-linkbody { padding: 4px 16px 14px; }
.gl-linkbody-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 10px; }
.gl-linkbody-top .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }
.gl-rec-toggle { background: transparent; border: 0; color: var(--cyan); font-family: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer; padding: 0; }
.gl-rec-toggle:hover { color: var(--cyan-2); }
.gl-acct-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
.gl-acct-list::-webkit-scrollbar { width: 7px; }
.gl-acct-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 7px; }
.gl-acct-group-label { font-size: 9.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; margin: 8px 2px 2px; }
.gl-acct {
  display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: 11px; align-items: center;
  padding: 10px 12px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); transition: border-color .15s, background .15s;
}
.gl-acct:hover { border-color: var(--line-2); background: var(--surface-2); }
.gl-acct.sel { border-color: var(--cyan); background: var(--accent-fill); }
.gl-acct.covered { opacity: .55; pointer-events: none; }
.gl-acct.rec { box-shadow: inset 2px 0 0 var(--cyan); }
.gl-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .15s; }
.gl-acct.sel .gl-check { background: var(--cyan); border-color: var(--cyan); color: #04141a; }
.gl-check svg { width: 12px; height: 12px; }
.gl-acct .an { min-width: 0; }
.gl-acct .an .nm { font-size: 13px; font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.gl-acct .an .nm .rectag { font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--accent-border); border-radius: 4px; padding: 1px 5px; }
.gl-acct .an .ds { font-size: 11px; color: var(--muted); margin-top: 1px; }
.gl-acct .av { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.gl-acct .av.neg { color: var(--neg); }

/* form footer */
.gl-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.gl-modal-foot .ftnote { font-size: 11px; color: var(--muted-2); display: inline-flex; align-items: center; gap: 7px; }
.gl-modal-foot .ftnote svg { width: 13px; height: 13px; color: var(--muted); }
.gl-modal-foot .acts { display: flex; gap: 10px; }
.gl-cancel { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); padding: 10px 18px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; }
.gl-cancel:hover { border-color: var(--line-2); color: var(--ink); background: var(--bg-2); }
.gl-save { background: var(--cyan); color: #04141a; border: 0; padding: 10px 20px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; }
.gl-save:hover { background: var(--cyan-2); }

/* live preview pane */
.gl-preview { background: var(--bg); border-left: 1px solid var(--line-2); padding: 28px 26px; display: flex; flex-direction: column; }
.gl-preview-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; margin-bottom: 16px; }
.gl-preview-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 13px; padding: 20px; position: relative; overflow: hidden; }
.gl-preview-card .pv-head { display: flex; align-items: center; gap: 11px; }
.gl-preview-card .pv-ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--g-fill); border: 1px solid var(--g-border); color: var(--g); }
.gl-preview-card .pv-ic svg { width: 17px; height: 17px; }
.gl-preview-card .pv-nm { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.gl-preview-card .pv-figs { display: flex; align-items: baseline; gap: 9px; margin: 16px 0 9px; }
.gl-preview-card .pv-cur { font-family: var(--font-mono); font-size: 22px; font-weight: 500; letter-spacing: -0.04em; color: var(--ink); }
.gl-preview-card .pv-of { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); }
.gl-preview-card .pv-track { height: 7px; border-radius: 999px; background: var(--surface-hi); overflow: hidden; position: relative; }
.gl-preview-card .pv-track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--g), var(--g-2)); transition: width .4s; }
.gl-preview-calc { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.gl-preview-calc .pc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gl-preview-calc .pc-row .l { font-size: 12px; color: var(--muted); }
.gl-preview-calc .pc-row .v { font-family: var(--font-mono); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.gl-preview-calc .pc-row .v.accent { color: var(--g-2); }
.gl-preview-note { margin-top: auto; padding-top: 18px; font-size: 11px; color: var(--muted-2); line-height: 1.5; display: flex; gap: 8px; }
.gl-preview-note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--muted); }

/* ════════════════ GOAL DETAIL ═════════════════════════════════ */
.gl-detail { max-width: 1080px; margin: 0 auto; }
.gl-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font-size: 12.5px; margin-bottom: 22px; background: transparent; border: 0; font-family: inherit; cursor: pointer; transition: color .15s; }
.gl-back:hover { color: var(--ink); }
.gl-back svg { width: 15px; height: 15px; }

.gl-dhero { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid var(--line-2); }
.gl-dhero-l { min-width: 0; }
.gl-dhead { display: flex; align-items: center; gap: 14px; }
.gl-dhead .di { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--g-fill); border: 1px solid var(--g-border); color: var(--g); }
.gl-dhead .di svg { width: 24px; height: 24px; }
.gl-dhead h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.025em; }
.gl-dhead .dtag { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.gl-dfigs { display: flex; align-items: baseline; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.gl-dfigs .big { font-family: var(--font-mono); font-size: 60px; font-weight: 500; letter-spacing: -0.05em; color: var(--ink); line-height: 0.9; font-variant-numeric: tabular-nums; }
.gl-dfigs .of { font-family: var(--font-mono); font-size: 16px; color: var(--muted-2); }
.gl-dfigs .pctbig { font-family: var(--font-mono); font-size: 30px; font-weight: 500; color: var(--g-2); letter-spacing: -0.03em; }
.gl-dhero-r { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.gl-dactions { display: flex; gap: 9px; }

.gl-dtrack { margin-top: 24px; }
.gl-dtrack .gl-track { height: 11px; }
.gl-dtrack .gl-ticks { height: 18px; margin-top: 9px; }

.gl-dgrid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 16px; margin-top: 30px; }
.gl-panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: 13px; padding: 22px 24px; }
.gl-panel h3 { margin: 0 0 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--cyan); }
.gl-panel.full { grid-column: 1 / -1; }

/* big forecast chart */
.gl-bigchart { width: 100%; height: 220px; }
.gl-bigchart svg { width: 100%; height: 100%; overflow: visible; display: block; }
.gl-bigchart .axis-lbl { fill: var(--muted-2); font-size: 10px; font-family: var(--font-mono); }
.gl-bigchart .grid-line { stroke: var(--line); stroke-width: 1; }
.gl-chart-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.gl-chart-legend .it { display: inline-flex; align-items: center; gap: 7px; }
.gl-chart-legend .sw { width: 14px; height: 0; border-top: 2px solid var(--g); }
.gl-chart-legend .sw.dash { border-top-style: dashed; border-color: var(--g-2); }
.gl-chart-legend .sw.tgt { border-color: var(--muted-2); border-top-style: dashed; }

/* detail stats list */
.gl-dstat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.gl-dstat:first-of-type { border-top: 0; padding-top: 0; }
.gl-dstat .k { font-size: 12.5px; color: var(--muted); }
.gl-dstat .v { font-family: var(--font-mono); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.gl-dstat .v.pos { color: var(--pos); }
.gl-dstat .v.warn { color: var(--warn); }

/* milestones timeline (detail) */
.gl-mstones { display: flex; flex-direction: column; gap: 0; }
.gl-mstone { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 11px 0; position: relative; }
.gl-mstone::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 1.5px; background: var(--line-2); }
.gl-mstone:first-child::before { top: 50%; }
.gl-mstone:last-child::before { bottom: 50%; }
.gl-mstone .node { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1.5px solid var(--line-2); color: var(--muted-2); z-index: 1; }
.gl-mstone .node svg { width: 13px; height: 13px; }
.gl-mstone.done .node { background: var(--g-fill); border-color: var(--g); color: var(--g); }
.gl-mstone.next .node { background: var(--g); border-color: var(--g); color: var(--bg); box-shadow: 0 0 0 4px var(--g-fill); }
.gl-mstone .mname { font-size: 13px; color: var(--ink-2); }
.gl-mstone.done .mname { color: var(--ink); }
.gl-mstone.next .mname { color: var(--ink); font-weight: 600; }
.gl-mstone .mval { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* linked accounts panel rows */
.gl-larow { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.gl-larow:first-of-type { border-top: 0; padding-top: 0; }
.gl-larow .laic { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--muted); }
.gl-larow .laic svg { width: 14px; height: 14px; }
.gl-larow .lan { font-size: 13px; color: var(--ink); font-weight: 500; }
.gl-larow .lak { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 1px; }
.gl-larow .lav { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gl-note-box { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ════════════════ COMPLETION CELEBRATION ══════════════════════ */
.gl-celebrate { position: relative; overflow: hidden; }
.gl-celebrate .burst { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, var(--pos-fill), transparent 60%); pointer-events: none; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .gl-modal { grid-template-columns: 1fr; }
  .gl-preview { border-left: 0; border-top: 1px solid var(--line-2); }
  .gl-dgrid { grid-template-columns: 1fr; }
  .gl-dhero { grid-template-columns: 1fr; }
  .gl-dhero-r { align-items: flex-start; }
}
@media (max-width: 760px) {
  .gl-summary { grid-template-columns: 1fr 1fr; gap: 20px; }
  .gl-summary .divider { display: none; }
  .gl-sum-total { grid-column: 1 / -1; }
  .gl-meta { grid-template-columns: 1fr; gap: 16px; }
  .gl-meta .vdiv { display: none; }
  .gl-meta .gl-meta-cell { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .gl-meta .gl-meta-cell:last-child { padding-bottom: 0; border-bottom: 0; }
  .gl-templates, .gl-quickrow { grid-template-columns: 1fr; }
  .gl-typegrid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .gl-page { padding: 22px 16px 72px; }
  .gl-title { font-size: 30px; }
  .gl-dfigs .big { font-size: 44px; }
  .gl-row2 { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   HORIZON — the time-first redesign (default layout)
═══════════════════════════════════════════════════════════════════ */

/* editorial plan summary line */
.gl-plan-line {
  font-size: 22px; line-height: 1.55; letter-spacing: -0.012em;
  color: var(--muted); max-width: 64ch; margin: 6px 0 30px; font-weight: 400; text-wrap: pretty;
}
.gl-plan-line b { color: var(--ink); font-weight: 600; }
.gl-plan-line .m { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.gl-plan-line .on { color: var(--pos); } .gl-plan-line .beh { color: var(--warn); }

.gl-hz {
  --rail: 264px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden;
}
.gl-hz-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 22px; flex-wrap: wrap; }
.gl-hz-head .h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--cyan); display: flex; align-items: center; gap: 10px; }
.gl-hz-head .h .sub { color: var(--muted-2); letter-spacing: 0.04em; text-transform: none; font-weight: 500; font-size: 10.5px; }
.gl-hz-head .legend { display: flex; gap: 18px; font-size: 10.5px; color: var(--muted); }
.gl-hz-head .legend .it { display: inline-flex; align-items: center; gap: 7px; }
.gl-hz-head .legend .dmk { width: 9px; height: 9px; background: var(--ink-2); transform: rotate(45deg); }
.gl-hz-head .legend .tmk { width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid var(--muted-2); }

/* year axis */
.gl-hz-axis { position: relative; height: 28px; margin-left: var(--rail); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.gl-hz-axis .yr { position: absolute; top: 8px; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); white-space: nowrap; letter-spacing: 0.02em; }
.gl-hz-axis .yr.now { left: 10px; transform: none; color: var(--cyan); font-weight: 600; }

/* lanes + gridline overlay */
.gl-hz-body { position: relative; }
.gl-hz-lines { position: absolute; left: var(--rail); right: 0; top: 0; bottom: 0; pointer-events: none; z-index: 0; }
.gl-hz-lines .vl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.gl-hz-lines .vl.now { width: 2px; background: linear-gradient(var(--cyan), color-mix(in oklab, var(--cyan) 8%, transparent)); opacity: .5; }

.gl-hz-lane { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail) 1fr; border-top: 1px solid var(--line); min-height: 108px; cursor: pointer; transition: background .15s; }
.gl-hz-lane:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.gl-hz-rail { padding: 18px 22px; border-right: 1px solid var(--line); min-width: 0; }
.gl-hz-rail .r-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.gl-hz-rail .r-ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--g-fill); border: 1px solid var(--g-border); color: var(--g); flex-shrink: 0; }
.gl-hz-rail .r-ic svg { width: 17px; height: 17px; }
.gl-hz-rail .r-nm { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-hz-rail .r-dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; margin-left: auto; }
.gl-hz-rail .r-dot.on { background: var(--pos); } .gl-hz-rail .r-dot.beh { background: var(--warn); } .gl-hz-rail .r-dot.neu { background: var(--muted-2); }
.gl-hz-rail .r-fig { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.gl-hz-rail .r-pct { font-family: var(--font-mono); font-size: 27px; font-weight: 500; letter-spacing: -0.04em; color: var(--g-2); line-height: 1; }
.gl-hz-rail .r-amt { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.gl-hz-rail .r-meter { height: 4px; border-radius: 999px; background: var(--surface-hi); overflow: hidden; margin-top: 12px; }
.gl-hz-rail .r-meter .f { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--g), var(--g-2)); }

.gl-hz-track { position: relative; min-width: 0; }
.gl-hz-track .baseline { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.gl-hz-track .runway { position: absolute; top: 50%; transform: translateY(-50%); left: 0; height: 6px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in oklab, var(--g) 50%, transparent), var(--g)); }
.gl-hz-track.behind .runway { background: linear-gradient(90deg, color-mix(in oklab, var(--warn) 45%, transparent), var(--warn)); }
.gl-hz-track .runway.noplan { background: none; border-top: 1.5px dashed var(--line-2); height: 0; border-radius: 0; }
.gl-hz-track .slip { position: absolute; top: 50%; transform: translateY(-50%); height: 6px; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--warn), var(--warn) 2.5px, transparent 2.5px, transparent 6px); opacity: .9; }
.gl-hz-track .pmark { position: absolute; top: 50%; transform: translate(-50%, -50%) rotate(45deg); width: 12px; height: 12px; background: var(--g); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--g); }
.gl-hz-track.behind .pmark { background: var(--warn); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--warn); }
.gl-hz-track .ttick { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 13px; height: 13px; border-radius: 50%; border: 1.6px solid var(--muted-2); background: var(--bg); }
.gl-hz-track .toplbl { position: absolute; top: calc(50% - 30px); transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; color: var(--g-2); white-space: nowrap; }
.gl-hz-track.behind .toplbl { color: var(--warn); }
.gl-hz-track .cap { position: absolute; top: calc(50% + 15px); left: 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.gl-hz-track .cap b { font-weight: 600; }
.gl-hz-track .cap.on b { color: var(--pos); } .gl-hz-track .cap.beh b { color: var(--warn); }
.gl-hz-track .cap .need { color: var(--warn); }

/* reached (completed) strip */
.gl-reached { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--surface); }
.gl-reached-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto; gap: 16px; align-items: center; padding: 15px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.gl-reached-row:first-child { border-top: 0; }
.gl-reached-row:hover { background: var(--bg-2); }
.gl-reached-row .ri { width: 34px; height: 34px; border-radius: 9px; background: var(--pos-fill); border: 1px solid var(--pos-border); color: var(--pos); display: flex; align-items: center; justify-content: center; }
.gl-reached-row .ri svg { width: 17px; height: 17px; }
.gl-reached-row .rn { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.gl-reached-row .rs { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.gl-reached-row .rv { font-family: var(--font-mono); font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gl-reached-row .rd { font-size: 11px; color: var(--pos); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.gl-reached-row .rd svg { width: 13px; height: 13px; }

/* add-goal zone */
.gl-addzone { margin-top: 16px; }

/* horizon range control */
.gl-hz-headr { display: flex; align-items: center; gap: 20px; }
.gl-hz-range { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.gl-hz-range button { padding: 6px 12px; background: transparent; border: 0; border-right: 1px solid var(--line-2); color: var(--muted); font-family: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: color .15s, background .15s; }
.gl-hz-range button:last-child { border-right: 0; }
.gl-hz-range button:hover { color: var(--ink); }
.gl-hz-range button.active { background: var(--accent-fill); color: var(--cyan); }

/* milestones editor (create overlay) */
.gl-ms-empty { font-size: 11.5px; color: var(--muted-2); line-height: 1.45; margin-bottom: 10px; max-width: 52ch; }
.gl-ms-edit { display: flex; flex-direction: column; gap: 8px; }
.gl-ms-row { display: grid; grid-template-columns: 1fr 150px 36px; gap: 9px; align-items: center; }
.gl-ms-x { width: 36px; height: 40px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; color: var(--muted-2); cursor: pointer; font-size: 17px; line-height: 1; transition: color .15s, border-color .15s; }
.gl-ms-x:hover { color: var(--neg); border-color: var(--neg-border); }
.gl-ms-actions { display: flex; gap: 16px; margin-top: 4px; }
.gl-ms-add, .gl-ms-auto { background: transparent; border: 0; color: var(--cyan); font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; padding: 0; }
.gl-ms-add:hover, .gl-ms-auto:hover { color: var(--cyan-2); }
.gl-ms-tasktag { display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 1px dashed var(--line-2); border-radius: 8px; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.gl-ms-tasktag svg { width: 13px; height: 13px; color: var(--pos); }
.gl-ms-tasktag.done { background: var(--pos-fill); border-color: var(--pos-border); border-style: solid; color: var(--pos); }
.gl-mstone.task { cursor: pointer; }
.gl-mstone.task .node { border-radius: 6px; }
.gl-mstone.task:hover .node { border-color: var(--g); color: var(--g); }
.gl-mstone.task.done .node { background: var(--g-fill); border-color: var(--g); color: var(--g); }
.gl-snapnote svg { width: 13px; height: 13px; flex-shrink: 0; }

/* honest projection chart (detail) */
.gl-projchart { width: 100%; }
.gl-projchart svg { width: 100%; height: 230px; display: block; overflow: visible; }
.gl-projchart text { font-family: var(--font-mono); }

@media (max-width: 880px) {
  .gl-hz { --rail: 0px; }
  .gl-hz-axis { display: none; }
  .gl-hz-lines { display: none; }
  .gl-hz-lane { grid-template-columns: 1fr; min-height: 0; }
  .gl-hz-rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .gl-hz-track { padding: 22px; min-height: 64px; }
  .gl-hz-track .toplbl { display: none; }
  .gl-hz-track .cap { position: static; margin-top: 30px; white-space: normal; }
  .gl-plan-line { font-size: 18px; }
}
