/* ============================================================
   Mythox - Journaling OS  (5.5-H1 · ground-up rebuild, 2026-06-11)
   Brand-new CSS. Zero reuse of the old journaling.css (v=p3).
   100% token-driven (global brand.css tokens) → follows all 3 themes
   + light mode with no shadow palette block. Semantic accent hues
   (mood/energy/section/category) are theme-neutral and only tint
   borders / labels / ring strokes / dots - never body text or surfaces.
   ============================================================ */

.j-root {
  /* semantic accents (theme-neutral; chrome stays on global tokens) */
  --s-mood:#60a5fa; --s-energy:#f1b542; --s-self:#ec6fae;
  --s-lesson:#a78bfa; --s-problem:#34d399; --s-bridge:#2dd4bf;
  position:relative; display:flex; flex-direction:column; gap:22px;
}

/* ---------------- HERO ---------------- */
.j-hero {
  position:relative; overflow:hidden; isolation:isolate;
  padding:30px 30px 28px; border-radius:var(--radius-lg);
  border:1px solid var(--line);
  background:
    radial-gradient(120% 140% at 92% -20%, var(--gold-soft), transparent 55%),
    linear-gradient(180deg, var(--surface), var(--surface-grad-2));
}
.j-hero-in { position:relative; z-index:1; }
.j-hero h1 { font-size:clamp(26px,3.6vw,38px); margin:10px 0 8px; }
.j-hero .sub { color:var(--muted); max-width:60ch; font-size:14.5px; }
.jn-path { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.jn-chip {
  display:inline-flex; align-items:center; gap:8px; min-height:34px;
  padding:8px 12px; border-radius:999px; border:1px solid var(--line-2);
  background:var(--surface); color:var(--ivory); font-size:12.5px; font-weight:700;
  cursor:pointer; transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.jn-chip .num { font-family:var(--mono); font-size:10px; color:var(--gold); }
.jn-chip:hover { border-color:var(--gold-line); transform:translateY(-1px); box-shadow:0 6px 18px -12px var(--gold-glow); }
.j-hero-controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:20px; }
.j-date { display:inline-flex; align-items:center; gap:8px; padding:7px 12px; border-radius:10px;
  background:var(--ink-2); border:1px solid var(--line-2); color:var(--muted); font-size:13px; }
.j-date input { border:none; background:transparent; padding:0; color:var(--ivory); width:140px; box-shadow:none; }
.j-date input:focus { box-shadow:none; }
.j-save { display:inline-flex; align-items:center; gap:7px; font-family:var(--mono); font-size:11.5px;
  color:var(--muted); letter-spacing:.04em; margin-left:auto; }
.j-save-dot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 8px var(--green); }
.j-save.saving .j-save-dot { background:var(--gold); box-shadow:0 0 8px var(--gold-glow); animation:jpulse 1s infinite; }
.j-save.error .j-save-dot { background:var(--red); box-shadow:0 0 8px var(--red); }
@keyframes jpulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.j-help-drawer {
  border:1px solid var(--line); border-radius:var(--radius-lg);
  background:var(--surface); overflow:hidden;
}
.j-help-drawer > summary {
  list-style:none; cursor:pointer; padding:14px 18px;
  display:flex; align-items:center; gap:12px; color:var(--muted);
}
.j-help-drawer > summary::-webkit-details-marker { display:none; }
.j-help-drawer > summary span { color:var(--ivory); font-weight:800; font-size:13px; }
.j-help-drawer > summary small { flex:1; font-size:12px; line-height:1.4; }
.j-help-drawer > summary b { color:var(--gold); transition:transform .2s ease; }
.j-help-drawer[open] > summary b { transform:rotate(45deg); }
.j-help-body { padding:0 18px 16px; color:var(--muted); font-size:13px; line-height:1.6; max-width:76ch; }
.j-help-body p { margin:0; }

/* ---------------- TAB STRIP ---------------- */
.j-tabs {
  position:sticky; top:0; z-index:20; display:flex; gap:4px; padding:8px;
  overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch;
  background:var(--topbar-bg); backdrop-filter:blur(14px);
  border:1px solid var(--line); border-radius:14px;
}
.j-tabs::-webkit-scrollbar { display:none; }
.j-tab {
  flex:0 0 auto; display:inline-flex; align-items:center; gap:7px;
  padding:9px 15px; border-radius:9px; font-size:13.5px; font-weight:600;
  color:var(--muted); text-decoration:none; white-space:nowrap;
  border:1px solid transparent; transition:color .15s, background .15s, border-color .15s;
}
.j-tab:hover { color:var(--ivory); background:var(--surface-2); }
.j-tab.active { color:var(--ivory); background:var(--surface-2); border-color:var(--gold-line); }
.j-tab-dot { width:6px; height:6px; border-radius:50%; background:transparent; transition:background .2s; }
.j-tab-dot.on { background:var(--gold); box-shadow:0 0 6px var(--gold-glow); }
.j-tab.active .j-tab-dot.on { background:var(--gold-2); }

/* ---------------- PANEL ---------------- */
.j-panel { display:flex; flex-direction:column; gap:16px; animation:jfade .3s var(--ease); }
@keyframes jfade { from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:translateY(0)} }
.j-section-intro { color:var(--muted); font-size:14px; max-width:64ch; margin:2px 0 4px; }

/* shared form rhythm (brand.css styles label.field>span + inputs already) */
.j-panel .field { display:block; margin:0 0 2px; }
.j-panel textarea { min-height:92px; resize:vertical; line-height:1.6; }
.j-grid1 { display:block; }
.j-grid2, .j-grid3 { display:grid; gap:14px; }
.j-grid2 { grid-template-columns:1fr 1fr; }
.j-grid3 { grid-template-columns:repeat(3,1fr); }

.j-blocktitle { font-family:var(--mono); font-size:11.5px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--gold); margin:14px 0 4px; }
.j-block { padding:20px; border-radius:var(--radius-lg); border:1px solid var(--line);
  background:linear-gradient(180deg, var(--surface), var(--surface-grad-2)); display:flex; flex-direction:column; gap:2px; }
.j-note { padding:14px 16px; border-radius:12px; font-size:13px; color:var(--muted); line-height:1.65;
  border:1px solid var(--line); border-left:3px solid var(--fa,var(--gold));
  background:color-mix(in srgb, var(--fa,var(--gold)) 7%, var(--surface)); }
.j-note b { color:var(--fa,var(--gold)); font-weight:700; margin-right:6px; }

/* ---------------- SLIDERS ---------------- */
.j-slider { padding:16px 18px; border-radius:14px; border:1px solid var(--line);
  background:linear-gradient(180deg, var(--surface), var(--surface-grad-2)); }
.j-slider-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.j-slider-label { font-size:13px; color:var(--muted); font-family:var(--mono); letter-spacing:.04em; }
.j-slider-label em { font-style:normal; font-size:17px; margin-left:4px; }
.j-slider-val { font-family:var(--serif); font-size:26px; font-weight:700; color:var(--fa,var(--gold)); line-height:1; }
.j-slider input[type=range] { width:100%; accent-color:var(--fa,var(--gold)); }
.j-slider-hint { font-size:11px; color:var(--dim); margin-top:8px; }

/* ---------------- DASHBOARD ---------------- */
.j-dash-hero { display:flex; align-items:center; gap:26px; padding:24px 28px; }
.j-dash-ringbig { flex:0 0 auto; width:132px; height:132px; display:grid; place-items:center; }
.j-dash-hero-meta h2 { font-size:clamp(19px,2.4vw,26px); margin:6px 0 6px; }
.j-dash-hero-meta .muted { font-size:13.5px; }
.j-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(168px,1fr)); gap:14px; }
.j-kpi { display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding:20px 14px; }
.j-kpi-ring { width:80px; height:80px; display:grid; place-items:center; }
.j-kpi-meta { display:flex; flex-direction:column; gap:2px; }
.j-kpi-label { font-size:13px; font-weight:700; color:var(--ivory); }
.j-kpi-sub { font-size:11px; color:var(--dim); }
.j-kpi-num { justify-content:center; }
.j-kpi-val { font-family:var(--serif); font-size:42px; font-weight:700; color:var(--gold); line-height:1; }
.j-insights { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.j-insight { padding:16px 18px; border-left:3px solid var(--fa,var(--gold)); }
.j-insight-label { font-family:var(--mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.j-insight-val { font-size:13.5px; color:var(--ivory); margin-top:7px; min-height:34px; font-style:italic; line-height:1.55; }
.j-start { padding:20px; border-left:3px solid var(--gold); display:flex; flex-direction:column; gap:12px; }
.j-start-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.j-start-head h3 { margin:4px 0 0; font-size:20px; }
.j-start-box { width:100%; min-height:150px; line-height:1.7; font-size:14.5px; }
.j-start-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.j-start-foot span, .j-free-top span { font-size:11px; color:var(--dim); font-family:var(--mono); }
.j-free-head { margin-bottom:7px; }
.j-panel .field .cx-fh, .j-free-head .cx-fh, .j-guided-field .cx-fh { margin-bottom:7px; }
.j-entrypoints { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
.j-entry { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:16px;
  border-left:3px solid var(--fa,var(--gold)); }
.j-entry b { display:block; color:var(--ivory); font-size:14px; margin-bottom:4px; }
.j-entry span { display:block; color:var(--muted); font-size:12px; line-height:1.45; }
.j-entry-actions { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.j-entry-actions .btn { padding:7px 10px; font-size:12px; }

/* ---------------- DEEP TOOLS ---------------- */
.j-deep-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; }
.j-deep-card { display:flex; flex-direction:column; gap:12px; padding:18px;
  border-left:3px solid var(--fa,var(--gold)); }
.j-deep-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.j-deep-top b { display:block; color:var(--ivory); font-size:16px; }
.j-deep-count { flex:0 0 auto; font-family:var(--mono); font-size:11px; padding:5px 8px; border-radius:7px;
  color:var(--fa,var(--gold)); background:color-mix(in srgb,var(--fa,var(--gold)) 10%,transparent);
  border:1px solid color-mix(in srgb,var(--fa,var(--gold)) 26%,transparent); }
.j-deep-sub { margin:0; color:var(--muted); font-size:12.5px; line-height:1.5; }
.j-deep-meta { display:flex; flex-wrap:wrap; gap:8px; }
.j-deep-meta span { font-family:var(--mono); font-size:10.5px; color:var(--dim); padding:4px 8px; border-radius:7px;
  background:var(--surface-2); border:1px solid var(--line); }
.j-deep-preview { display:flex; flex-direction:column; gap:6px; padding-top:2px; }
.j-deep-preview p { margin:0; color:var(--ivory); font-size:12.5px; line-height:1.55; word-break:break-word; }
.j-deep-actions { margin-top:auto; display:flex; gap:8px; flex-wrap:wrap; }
.j-deep-guided-in { min-height:145px; }

/* ---------------- GUIDED + ARCHIVE ---------------- */
.j-tab-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px;
  border-left:3px solid var(--fa,var(--gold)); }
.j-tool-k { display:block; font-family:var(--mono); font-size:10.5px; text-transform:uppercase; color:var(--dim); margin-bottom:4px; }
.j-tab-tools b { display:block; color:var(--ivory); font-size:16px; }
.j-tab-tools p { margin:4px 0 0; color:var(--muted); font-size:12.5px; line-height:1.45; }
.j-tool-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.j-guided-field { display:flex; flex-direction:column; gap:8px; }
.j-guided-in { width:100%; }
.j-guided-range { width:100%; accent-color:var(--gold); }
.j-guided-range-val { align-self:flex-start; font-family:var(--serif); font-size:26px; font-weight:700; color:var(--gold); }
.j-archive-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px; }
.j-archive-head h3 { margin:4px 0 4px; font-size:21px; }
.j-archive-score { min-width:86px; text-align:center; padding:10px 12px; border-radius:12px; border:1px solid var(--line);
  background:var(--surface-2); }
.j-archive-score b { display:block; font-family:var(--serif); font-size:28px; color:var(--gold); line-height:1; }
.j-archive-score span { display:block; margin-top:3px; font-size:11px; color:var(--dim); }
.j-archive-grid { display:grid; grid-template-columns:minmax(190px,260px) 1fr; gap:14px; align-items:start; }
.j-archive-list { padding:14px; display:flex; flex-direction:column; gap:8px; }
.j-archive-list .j-blocktitle { margin:0 0 4px; }
.j-archive-day { width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:9px 10px; border-radius:9px; border:1px solid var(--line); background:transparent; color:var(--muted);
  cursor:pointer; text-align:left; }
.j-archive-day:hover, .j-archive-day.active { color:var(--ivory); border-color:var(--gold-line); background:var(--surface-2); }
.j-archive-day span { font-family:var(--mono); font-size:12px; }
.j-archive-day b { color:var(--gold); font-size:12px; }
.j-archive-read { display:grid; grid-template-columns:1fr; gap:12px; }
.j-archive-block { padding:16px 18px; }
.j-archive-block .j-blocktitle { margin-top:0; }
.j-archive-line { padding:10px 0; border-top:1px solid var(--line); }
.j-archive-line:first-of-type { border-top:none; padding-top:0; }
.j-archive-line span { display:block; font-family:var(--mono); font-size:10.5px; text-transform:uppercase; color:var(--dim); margin-bottom:4px; }
.j-archive-line p { margin:0; color:var(--ivory); font-size:13.5px; line-height:1.6; white-space:pre-wrap; word-break:break-word; }

/* ---------------- GOALS ---------------- */
.j-goals-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; }
.j-goals { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:14px; }
.j-empty { grid-column:1/-1; text-align:center; padding:40px 20px; color:var(--muted);
  border:1px dashed var(--line-2); border-radius:var(--radius-lg); }
.j-empty-ic { font-size:30px; opacity:.5; margin-bottom:8px; }
.j-goal { display:flex; gap:16px; padding:18px; border-radius:var(--radius-lg); border:1px solid var(--line);
  background:linear-gradient(180deg, var(--surface), var(--surface-grad-2));
  border-top:2px solid var(--cat,var(--gold)); align-items:flex-start; }
.j-goal.cat-youtube{--cat:var(--red)} .j-goal.cat-community{--cat:var(--warn)} .j-goal.cat-fitness{--cat:var(--green)}
.j-goal.cat-income{--cat:var(--gold)} .j-goal.cat-identity{--cat:#a78bfa} .j-goal.cat-other{--cat:var(--muted)}
/* light mode: category accents are tuned for dark; darken so the badge text reads on cream */
html[data-mode="light"] .j-goal.cat-youtube{--cat:#991b1b} html[data-mode="light"] .j-goal.cat-community{--cat:#78350f} html[data-mode="light"] .j-goal.cat-fitness{--cat:#166534}
html[data-mode="light"] .j-goal.cat-identity{--cat:#6d28d9} html[data-mode="light"] .j-goal.cat-other{--cat:#4b5563}
.j-goal-ring { flex:0 0 auto; width:72px; height:72px; display:grid; place-items:center; }
.j-goal-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:8px; }
.j-goal-row1 { display:flex; align-items:center; gap:8px; }
.j-goal-badge { font-family:var(--mono); font-size:10px; text-transform:uppercase; letter-spacing:.06em;
  padding:3px 8px; border-radius:6px; color:var(--cat,var(--gold));
  background:color-mix(in srgb, var(--cat,var(--gold)) 14%, transparent); border:1px solid color-mix(in srgb, var(--cat,var(--gold)) 30%, transparent); }
.j-goal-status { font-size:10.5px; font-weight:700; padding:3px 8px; border-radius:6px; }
.j-goal-status.on-track{color:var(--green); background:color-mix(in srgb,var(--green) 14%,transparent)}
.j-goal-status.complete{color:var(--blue); background:color-mix(in srgb,var(--blue) 14%,transparent)}
.j-goal-status.behind{color:var(--red); background:color-mix(in srgb,var(--red) 14%,transparent)}
.j-goal-status.needs-sys{color:var(--gold); background:var(--gold-soft)}
.j-goal-x { margin-left:auto; width:24px; height:24px; border-radius:6px; border:1px solid var(--line-2);
  background:transparent; color:var(--dim); cursor:pointer; font-size:16px; line-height:1; }
.j-goal-x:hover { color:var(--red); border-color:var(--red); }
.j-goal-name { width:100%; font-size:15px; font-weight:600; padding:8px 10px; }
.j-goal-vals { display:flex; align-items:center; gap:6px; }
.j-goal-vals input { width:72px; padding:7px 9px; text-align:center; }
.j-goal-vals input.j-goal-unit { width:64px; }
.j-goal-vals span { color:var(--dim); }
.j-goal-toggle { align-self:flex-start; background:transparent; border:none; color:var(--gold);
  font-size:12px; font-weight:600; cursor:pointer; padding:2px 0; font-family:var(--mono); letter-spacing:.04em; }
.j-goal-detail { display:flex; flex-direction:column; gap:10px; margin-top:6px; padding-top:12px; border-top:1px dashed var(--line-2); }
.j-goal-detail .field { margin:0; }
.j-goal-meta { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:4px; }
.j-goal-health { font-family:var(--mono); font-size:11px; padding:4px 9px; border-radius:6px; border:1px solid var(--line-2); }
.j-goal-health.good{color:var(--green)} .j-goal-health.ok{color:var(--gold)} .j-goal-health.bad{color:var(--red)}
.j-goal-align { flex:1; min-width:160px; font-size:11px; color:var(--muted); display:flex; flex-direction:column; gap:4px; }
.j-goal-align input { width:100%; accent-color:var(--gold); }
.j-align { display:flex; align-items:center; gap:16px; margin-top:14px; padding-top:14px; border-top:1px dashed var(--line-2); }
.j-align-ring { flex:0 0 auto; width:72px; height:72px; display:grid; place-items:center; }
.j-align-body { flex:1; display:flex; flex-direction:column; gap:8px; }
.j-align-body span { font-size:12px; color:var(--muted); }
.j-align-body input { width:100%; accent-color:var(--gold); }

/* ---------------- FIVE WHYS + SWOT ---------------- */
.j-whys { display:flex; flex-direction:column; align-items:stretch; gap:0; }
.j-why { padding:14px 16px; border-radius:12px; border:1px solid var(--line); background:var(--surface);
  border-left:3px solid var(--s-problem); }
.j-why-n { font-family:var(--mono); font-size:11px; letter-spacing:.04em; color:var(--s-problem); margin-bottom:8px; }
.j-why textarea { min-height:60px; }
.j-why-arrow { text-align:center; color:var(--dim); font-size:16px; padding:5px 0; }
.j-why-root { padding:16px; border-radius:12px; border:1px solid var(--gold-line); background:var(--gold-soft); }
.j-why-root .j-why-n { color:var(--gold); }
.j-swot { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.j-swot-cell { padding:14px 16px; border-radius:12px; border:1px solid var(--line);
  border-top:2px solid var(--fa,var(--gold)); background:var(--surface); }
.j-swot-cell > span { display:block; font-size:12px; font-weight:700; color:var(--fa,var(--gold)); margin-bottom:8px; }
.j-swot-cell textarea { background:transparent; border:none; box-shadow:none; padding:0; min-height:60px; }
.j-swot-cell textarea:focus { box-shadow:none; }

/* ---------------- DECISION MATRIX ---------------- */
.j-matrix-actions { display:flex; gap:8px; flex-wrap:wrap; }
.j-matrix-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:14px; }
.j-matrix { width:100%; border-collapse:collapse; min-width:480px; }
.j-matrix th, .j-matrix td { padding:9px 10px; border-bottom:1px solid var(--line); text-align:center; vertical-align:middle; }
.j-matrix thead th { background:var(--surface-2); font-weight:600; font-size:12px; color:var(--muted); }
.j-mhead { text-align:left !important; min-width:170px; }
.j-mopt { display:flex; align-items:center; gap:6px; }
.j-mopt input, .j-mhead input { font-size:13px; padding:7px 9px; }
.j-mweight { display:flex; align-items:center; gap:6px; margin-top:6px; font-size:11px; color:var(--dim); }
.j-mweight input { width:54px; padding:5px 7px; }
.j-matrix td input[type=number] { width:64px; padding:7px; text-align:center; }
.j-mx { width:22px; height:22px; border-radius:6px; border:1px solid var(--line-2); background:transparent; color:var(--dim); cursor:pointer; }
.j-mx:hover { color:var(--red); border-color:var(--red); }
.j-mwin { background:var(--gold-soft); }
.j-mtotal td { background:var(--surface-2); font-size:16px; }
.j-mtotal b { color:var(--ivory); }
.j-mtotal .j-mwin b { color:var(--gold); }
.j-mbadge { font-family:var(--mono); font-size:9px; letter-spacing:.1em; color:var(--gold); margin-top:2px; }
.j-mresult { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px;
  padding:16px 20px; border-radius:14px; border:1px solid var(--gold-line); background:var(--gold-soft); }
.j-mresult span { display:block; font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--dim); }
.j-mresult b { font-family:var(--serif); font-size:20px; color:var(--gold); }
.j-mscore { font-size:13px; color:var(--muted); }

/* ---------------- SIX HATS ---------------- */
.j-hats { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; }
.j-hat { padding:16px; border-radius:14px; border:1px solid var(--line); border-top:2px solid var(--fa,var(--gold));
  background:linear-gradient(180deg, var(--surface), var(--surface-grad-2)); }
.j-hat-top { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.j-hat-ic { font-size:20px; }
.j-hat-top b { display:block; font-size:14px; color:var(--ivory); }
.j-hat-top span { font-size:11px; color:var(--dim); }
.j-hat textarea { min-height:90px; }

/* ---------------- SYSTEM CARD ---------------- */
.j-syscard { margin-top:14px; padding:20px; border-radius:var(--radius-lg); border:1px solid var(--s-bridge);
  background:color-mix(in srgb, var(--s-bridge) 8%, var(--surface)); display:flex; flex-direction:column; gap:12px; }
.j-syscard-t { font-family:var(--serif); font-size:17px; color:var(--s-bridge); }
.j-syscard-tags { display:flex; gap:8px; flex-wrap:wrap; }
.j-syscard-tags span { font-family:var(--mono); font-size:11px; padding:4px 10px; border-radius:7px;
  background:var(--surface-2); color:var(--muted); border:1px solid var(--line); }
.j-syscard-sec span { font-family:var(--mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--dim); }
.j-syscard-sec p { margin:4px 0 0; font-size:13.5px; color:var(--ivory); line-height:1.55; }

/* ---------------- FREEFORM ---------------- */
.j-free-top { display:flex; justify-content:flex-end; }
.j-free-top span { font-size:11px; color:var(--dim); font-family:var(--mono); }
.j-free { width:100%; min-height:46vh; line-height:1.8; font-size:15px; }

/* Freeform hero (item 8.1 - "Start here" prominent header on the Freeform tab) */
.j-freeform-hero {
  display:flex; align-items:flex-start; justify-content:space-between; gap:20px;
  padding:22px 24px; border-radius:var(--radius-lg);
  border:1px solid var(--gold-line);
  background:linear-gradient(135deg, color-mix(in srgb, var(--gold) 8%, var(--surface)), var(--surface));
  border-left:4px solid var(--gold);
}
.j-freeform-hero-text .kicker { margin-bottom:4px; }
.j-freeform-hero-text h2 { font-size:clamp(18px,2.4vw,26px); }
.j-freeform-hero-actions { display:flex; flex-direction:column; gap:8px; align-items:flex-end; flex:0 0 auto; }

/* ---------------- EXPORT ---------------- */
.j-export-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.j-prev-wrap { display:flex; flex-direction:column; gap:6px; }
.j-prev-t { font-family:var(--mono); font-size:11px; letter-spacing:.06em; color:var(--muted); }
.j-prev { margin:0; padding:14px; height:150px; overflow:auto; border-radius:12px; border:1px solid var(--line);
  background:var(--ink-2); color:var(--muted); font-size:11px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.j-export-group { display:flex; flex-direction:column; gap:8px; }
.j-btns { display:flex; flex-wrap:wrap; gap:8px; }
.j-btn-warn { border-color:color-mix(in srgb,var(--gold) 40%,var(--line-2)) !important; color:var(--gold) !important; }
.j-btn-danger { border-color:color-mix(in srgb,var(--red) 45%,var(--line-2)) !important; color:var(--red) !important; }
.j-btn-danger:hover { background:color-mix(in srgb,var(--red) 12%,var(--surface-2)) !important; }
.j-storage { margin-top:12px; }
.j-storage-top { display:flex; justify-content:space-between; font-size:10.5px; color:var(--dim); margin-bottom:5px; }

.j-action-select-wrap { display:flex; align-items:flex-end; gap:8px; flex-wrap:wrap; }
.j-action-select-native {
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0;
}
.j-action-select {
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden;
  opacity:0; pointer-events:none; clip:rect(0 0 0 0); clip-path:inset(50%); border:0;
}
.j-action-dd { position:relative; display:inline-flex; align-items:center; }
.j-action-dd-trigger {
  display:inline-flex; align-items:center; justify-content:space-between; gap:10px; min-width:190px;
  font-family:inherit; font-size:12.5px; font-weight:700; color:var(--ivory);
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  padding:8px 10px 8px 12px; cursor:pointer; transition:border-color .15s, background .15s, color .15s;
}
.j-action-dd-trigger:hover,
.j-action-dd.is-open .j-action-dd-trigger { border-color:var(--gold-line); background:var(--surface-2); color:var(--gold); }
.j-action-dd-trigger:focus-visible { outline:none; border-color:var(--gold-line); box-shadow:0 0 0 3px var(--gold-soft); }
.j-action-dd-value { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.j-action-dd-tic { color:var(--muted); font-size:12px; transition:transform .18s; }
.j-action-dd.is-open .j-action-dd-tic { transform:rotate(180deg); color:var(--gold); }
.j-action-dd-menu {
  position:absolute; top:calc(100% + 6px); left:0; z-index:40; min-width:max(100%, 220px); max-width:min(320px, 86vw);
  display:flex; flex-direction:column; gap:3px; padding:6px; border:1px solid var(--line);
  border-radius:12px; background:var(--surface); box-shadow:0 18px 44px rgba(0,0,0,.36);
}
.j-action-dd-menu[hidden] { display:none; }
.j-action-dd-opt {
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left;
  font-family:inherit; font-size:12.5px; font-weight:650; color:var(--muted);
  background:transparent; border:0; border-radius:8px; padding:8px 9px; cursor:pointer;
  transition:background .15s, color .15s;
}
.j-action-dd-opt:hover,
.j-action-dd-opt.is-on { color:var(--ivory); background:var(--surface-2); }
.j-original-actions { display:none !important; }

/* ---------------- TOAST (fallback if shell toast absent) ---------------- */
.j-toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(16px);
  padding:11px 18px; border-radius:10px; font-size:13.5px; font-weight:600; color:var(--ivory);
  background:var(--surface-3); border:1px solid var(--gold-line); box-shadow:0 16px 40px rgba(0,0,0,.5);
  opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:200; }
.j-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.j-toast.error { border-color:var(--red); }

/* Dashboard start-section header actions (item 8.1) */
.j-start-head-actions { display:flex; gap:8px; flex-wrap:wrap; }
.j-start-foot-actions { display:flex; gap:7px; flex-wrap:wrap; }

/* Search box (item 8.6 - manual keyword search, dashboard) */
.j-search-box {
  padding:16px 20px; display:flex; flex-direction:column; gap:10px;
  border:1px solid var(--line);
}
.j-search-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.j-search-row-2 { gap:12px; }
.j-search-in {
  flex:1; min-width:180px; padding:9px 12px; border-radius:10px;
  border:1px solid var(--line-2); background:var(--ink-2); color:var(--ivory);
  font-size:13.5px;
}
.j-search-in:focus { border-color:var(--gold-line); box-shadow:0 0 0 3px var(--gold-soft); }
.j-search-hint { font-size:12px; color:var(--dim); line-height:1.45; }
/* Results list inside the search box (item 8.6) */
#j-search-results { margin-top:6px; display:flex; flex-direction:column; gap:8px; }
.j-search-header {
  font-family:var(--mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted); padding-bottom:4px; border-bottom:1px solid var(--line);
}
.j-search-empty { font-size:13px; color:var(--dim); padding:8px 0; }
.j-search-item {
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  border-radius:10px; border:1px solid var(--line);
  background:var(--surface); flex-wrap:wrap;
}
.j-search-date {
  font-family:var(--mono); font-size:12px; color:var(--gold);
  flex:0 0 auto; min-width:100px;
}
.j-search-snippet {
  flex:1; margin:0; font-size:13px; color:var(--muted);
  line-height:1.5; white-space:pre-wrap; word-break:break-word;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width:760px) {
  .j-hero { padding:22px 18px; }
  .j-grid2, .j-grid3, .j-swot { grid-template-columns:1fr; }
  .j-insights { grid-template-columns:1fr; }
  .j-goals { grid-template-columns:1fr; }
  .j-dash-hero { flex-direction:column; text-align:center; gap:14px; }
  .j-start-head, .j-entry, .j-tab-tools, .j-archive-head, .j-deep-top { flex-direction:column; align-items:stretch; }
  .j-entry-actions, .j-tool-actions, .j-deep-actions { justify-content:flex-start; }
  .j-archive-grid { grid-template-columns:1fr; }
  .j-hero-controls { gap:8px; }
  .j-save { margin-left:0; order:5; width:100%; }
  /* Freeform hero stacks on mobile */
  .j-freeform-hero { flex-direction:column; }
  .j-freeform-hero-actions { align-items:stretch; flex-direction:row; flex-wrap:wrap; }
  .j-action-dd, .j-action-dd-trigger { width:100%; min-width:0; }
  .j-action-dd-menu { width:100%; max-width:none; }
  /* Search row stacks nicely */
  .j-search-row { flex-direction:column; align-items:stretch; }
}
