/* ============================================================================
   Demand Forecast — app layer on the ListeningMind design tokens.
   Motion: transform and opacity only, short durations, reduced-motion honoured.
   Colour: violet-tinted neutrals, coral as punctuation; the calendar heatmap is
   the one place a sequential violet ramp is used, because it is data.
   ========================================================================== */

:root {
  --df-ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --df-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --df-d-press: 160ms;
  --df-d-fast:  180ms;
  --df-d-ui:    220ms;
  --df-d-sheet: 300ms;
  /* sequential ramp for the calendar (violet family, low to high) */
  --df-heat-0: #FBFAFB;
  --df-heat-1: #EDEAF6;
  --df-heat-2: #D9D3EE;
  --df-heat-3: #BFB6E3;
  --df-heat-4: #9F92D5;
  --df-heat-5: #786EBE;
  --df-heat-6: #574CA0;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--lm-white); color: var(--lm-ink);
  font-family: var(--lm-font); font-size: var(--lm-fs-base); line-height: var(--lm-lh-base);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; }
button { font-family: inherit; }
.df-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ------------------------------------------------------------------ market select (inside the shell GNB) */
.df-select {
  height: 36px; padding: 0 28px 0 12px; max-width: 100%;
  border: 1px solid var(--lm-line); border-radius: var(--lm-r-pill);
  background: var(--lm-white) no-repeat right 8px center;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237F7A8D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  font-size: var(--lm-fs-sm); color: var(--lm-ink-2); appearance: none; cursor: pointer;
}
.df-select:focus-visible { outline: 2px solid var(--lm-violet); outline-offset: 1px; }

/* ------------------------------------------------------------------ layout */
.df-main { flex: 1; width: 100%; }
.df-view { max-width: var(--lm-container); margin: 0 auto; padding: 0 var(--lm-gutter) 72px; }
body[data-view="run"] .lm-hero, body[data-view="runs"] .lm-hero { display: none; }
body[data-view="run"] .df-view, body[data-view="runs"] .df-view { padding-top: var(--lm-space-8); }
.df-hero { margin-bottom: var(--lm-space-8); }
.df-hero .lm-eyebrow, .df-rhead__title .lm-eyebrow, .df-sheet__head .lm-eyebrow { margin: 0 0 4px; }
.df-hero__h { margin: 0; font-size: var(--lm-fs-xxl); line-height: var(--lm-lh-xxl);
  font-weight: var(--lm-fw-bold); letter-spacing: var(--lm-tracking-tight); word-break: keep-all; }
.df-methodnote { max-width: var(--lm-container); margin: 0 auto; padding: 0 var(--lm-gutter) var(--lm-space-8);
  font-size: var(--lm-fs-xs); line-height: var(--lm-lh-xs); color: var(--lm-ink-3); }

/* ---------------------------------------------------------------- composer */
.df-composer { border: 1px solid var(--lm-line); border-radius: var(--lm-r-md);
  background: var(--lm-white); box-shadow: var(--lm-shadow); }
.df-fieldset { padding: var(--lm-space-6) var(--lm-space-8); border-bottom: 1px solid var(--lm-line-soft); }
.df-fieldset:last-of-type { border-bottom: 0; }
.df-legend { display: block; font-size: var(--lm-fs-xs); line-height: var(--lm-lh-xs);
  font-weight: var(--lm-fw-bold);
  color: var(--lm-red-deep); margin-bottom: var(--lm-space-3); }
.df-hint { font-size: var(--lm-fs-xs); line-height: var(--lm-lh-xs); color: var(--lm-muted); margin: -6px 0 10px; }
.df-row { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); align-items: center; }
.df-row + .df-row { margin-top: var(--lm-space-3); }
.df-row__label { font-size: var(--lm-fs-sm); color: var(--lm-ink-3); min-width: 60px; }
.df-inputrow { display: flex; gap: var(--lm-space-2); align-items: stretch; }
.df-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--lm-line);
  border-radius: var(--lm-r-sm); font-size: var(--lm-fs-base); color: var(--lm-ink);
  background: var(--lm-white); font-family: inherit; transition: border-color var(--df-d-fast) var(--df-ease-out); }
.df-input::placeholder { color: var(--lm-muted); }
.df-input:focus { outline: none; border-color: var(--lm-violet); }
textarea.df-input { height: auto; min-height: 96px; padding: 10px 14px; line-height: 22px; resize: vertical; }
input.df-input--num { width: 120px; flex: none; }
.df-chip {
  height: 34px; padding: 0 14px; border-radius: var(--lm-r-pill); border: 1px solid var(--lm-line);
  background: var(--lm-white); font-size: var(--lm-fs-sm); color: var(--lm-ink-2); cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--df-d-fast) var(--df-ease-out), border-color var(--df-d-fast) var(--df-ease-out),
              color var(--df-d-fast) var(--df-ease-out), transform var(--df-d-press) var(--df-ease-out);
}
.df-chip:active { transform: scale(0.97); }
.df-chip[aria-pressed="true"] { background: var(--lm-violet); border-color: var(--lm-violet); color: var(--lm-white);
  font-weight: var(--lm-fw-medium); }
.df-chip:focus-visible { outline: 2px solid var(--lm-violet); outline-offset: 2px; }
.df-chip--dash { border-style: dashed; border-color: var(--lm-line-strong); }
.df-chip--dash:hover { border-color: var(--lm-ink-3); color: var(--lm-ink); }
.df-topics { margin-top: var(--lm-space-4); }
.df-topics__group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.df-topics__name { font-size: var(--lm-fs-xs); color: var(--lm-ink-3); min-width: 56px; }
.df-topics .df-chip { height: 28px; padding: 0 10px; font-size: var(--lm-fs-xs); }
.df-sugbox:not(:empty) { margin-top: var(--lm-space-4); }
.df-sughead { font-size: var(--lm-fs-sm); color: var(--lm-ink-3); margin-bottom: 8px; }
.df-sughead strong { color: var(--lm-ink); }
.df-sugchip { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; padding: 8px 14px;
  border-radius: var(--lm-r-pill); border: 1px dashed var(--lm-line-strong); background: var(--lm-white);
  cursor: pointer; text-align: left; font-family: inherit; }
.df-sugchip:hover { border-color: var(--lm-ink-3); }
.df-sugchip b { font-size: var(--lm-fs-sm); color: var(--lm-ink); font-weight: var(--lm-fw-medium); }
.df-sugchip small { font-size: var(--lm-fs-xs); color: var(--lm-muted); }
.df-sugchips { display: flex; flex-wrap: wrap; gap: 8px; }
.df-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 0 18px; border-radius: var(--lm-r-pill); border: 1px solid transparent; cursor: pointer;
  font-size: var(--lm-fs-sm); font-weight: var(--lm-fw-medium); font-family: inherit;
  transition: opacity var(--df-d-fast) var(--df-ease-out), transform var(--df-d-press) var(--df-ease-out),
              background-color var(--df-d-fast) var(--df-ease-out); }
.df-btn:active { transform: scale(0.98); }
.df-btn--primary { background: var(--lm-grad-cta); color: var(--lm-white); min-height: 48px; padding: 0 28px;
  font-size: var(--lm-fs-base); }
.df-btn--primary:hover { opacity: .9; }
.df-btn--primary[disabled] { opacity: .45; cursor: not-allowed; }
.df-btn--outline { background: var(--lm-white); color: var(--lm-ink); border-color: var(--lm-line-strong); }
.df-btn--outline:hover { background: var(--lm-surface); }
.df-btn--outline[disabled] { opacity: .45; cursor: not-allowed; }
.df-btn--danger { background: var(--lm-white); color: var(--lm-red-deep); border-color: var(--lm-line); }
.df-btn--sm { min-height: 32px; padding: 0 12px; font-size: var(--lm-fs-xs); }
.df-composer__foot { display: flex; align-items: center; gap: var(--lm-space-4); flex-wrap: wrap;
  padding: var(--lm-space-6) var(--lm-space-8); background: var(--lm-surface);
  border-radius: 0 0 var(--lm-r-md) var(--lm-r-md); }
.df-est { font-size: var(--lm-fs-sm); color: var(--lm-ink-2); }
.df-est b { color: var(--lm-ink); }
.df-est small { color: var(--lm-muted); }
.df-note { font-size: var(--lm-fs-sm); line-height: 21px; color: var(--lm-ink-3); background: var(--lm-surface);
  border: 1px solid var(--lm-line-soft); border-radius: var(--lm-r-sm); padding: 10px 12px; margin-bottom: var(--lm-space-3); }
.df-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--lm-fs-sm); color: var(--lm-ink-2); cursor: pointer; }
.df-check input { accent-color: var(--lm-violet); width: 16px; height: 16px; }
.df-radio { display: flex; flex-direction: column; gap: 6px; }
.df-radio label { display: flex; align-items: center; gap: 8px; font-size: var(--lm-fs-sm); color: var(--lm-ink-2); cursor: pointer; }
.df-radio input { accent-color: var(--lm-violet); }

/* ---------------------------------------------------------------- progress */
.df-progress { max-width: 720px; margin: 0 auto; border: 1px solid var(--lm-line); border-radius: var(--lm-r-md);
  background: var(--lm-white); box-shadow: var(--lm-shadow); padding: var(--lm-space-8); }
.df-progress h2 { margin: 0 0 4px; font-size: var(--lm-fs-h4); line-height: var(--lm-lh-h4); }
.df-progress__meta { font-size: var(--lm-fs-sm); color: var(--lm-ink-3); margin-bottom: var(--lm-space-5); }
.df-bar { height: 6px; background: var(--lm-line-soft); border-radius: 3px; overflow: hidden; margin-bottom: var(--lm-space-5); }
.df-bar > i { display: block; height: 100%; width: 0; background: var(--lm-violet); border-radius: 3px;
  transition: width 600ms var(--df-ease-out); }
.df-steps { list-style: none; margin: 0; padding: 0; }
.df-steps li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--lm-line-soft);
  font-size: var(--lm-fs-sm); color: var(--lm-ink-3); }
.df-steps li:last-child { border-bottom: 0; }
.df-steps li[data-now="true"] { color: var(--lm-ink); font-weight: var(--lm-fw-medium); }
.df-steps li[data-now="true"] .df-dot { background: var(--lm-coral); }
.df-steps li[data-done="true"] .df-dot { background: var(--lm-violet); }
.df-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lm-line-strong); flex: none; }
.df-steps small { color: var(--lm-muted); margin-left: auto; }
.df-error { border: 1px solid var(--lm-line); border-left: 4px solid var(--lm-red-deep); border-radius: var(--lm-r-sm);
  padding: var(--lm-space-4) var(--lm-space-5); background: var(--lm-white); color: var(--lm-ink-2); }

/* ------------------------------------------------------------------ result */
.df-rhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--lm-space-4); margin-bottom: var(--lm-space-6); }
.df-rhead__title { flex: 1 1 360px; min-width: 0; }
.df-rhead__h { margin: 0; font-size: var(--lm-fs-h2); line-height: var(--lm-lh-h2); font-weight: var(--lm-fw-bold); word-break: keep-all; }
.df-rhead__meta { font-size: var(--lm-fs-sm); color: var(--lm-ink-3); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.df-rhead__tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.df-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--lm-space-3); margin-bottom: var(--lm-space-6); }
.df-kpi { border: 1px solid var(--lm-line-soft); border-radius: var(--lm-r-md); padding: 12px 16px; background: var(--lm-white); }
.df-kpi__l { font-size: var(--lm-fs-xs); color: var(--lm-ink-3); line-height: 16px; }
.df-kpi__v { font-size: var(--lm-fs-h4); line-height: 28px; font-weight: var(--lm-fw-bold); margin-top: 2px; }
.df-kpi__s { font-size: var(--lm-fs-xs); color: var(--lm-muted); }
.df-src { display: inline-block; font-size: 10px; line-height: 14px; padding: 0 5px; border-radius: 4px;
  border: 1px solid var(--lm-line); color: var(--lm-ink-3); vertical-align: middle; margin-left: 4px; white-space: nowrap; }
.df-src--rule { border-color: var(--lm-cat-gold); color: var(--lm-cat-gold); }
.df-src--llm { border-color: var(--lm-cat-peri); color: var(--lm-violet); }
.df-up { color: var(--lm-cat-green); } .df-down { color: var(--lm-red-deep); }
.df-pos { color: var(--lm-cat-green); } .df-neg { color: var(--lm-red-deep); }

.df-menu { position: relative; }
.df-menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px;
  background: var(--lm-white); border: 1px solid var(--lm-line); border-radius: var(--lm-r-md); box-shadow: var(--lm-shadow);
  padding: 6px; display: none; }
.df-menu[data-open="true"] .df-menu__list { display: block; }
.df-menu__list a, .df-menu__list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--lm-r-sm);
  font-size: var(--lm-fs-sm); color: var(--lm-ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; }
.df-menu__list a:hover, .df-menu__list button:hover { background: var(--lm-surface); color: var(--lm-ink); }

/* tabs */
.df-tabs { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--lm-line); margin-bottom: var(--lm-space-6); overflow-x: auto; }
.df-tab { position: relative; padding: 10px 14px; border: 0; background: none; font-size: var(--lm-fs-sm); color: var(--lm-ink-3);
  cursor: pointer; white-space: nowrap; font-family: inherit; transition: color var(--df-d-fast) var(--df-ease-out); }
.df-tab[aria-selected="true"] { color: var(--lm-ink); font-weight: var(--lm-fw-bold); }
.df-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--lm-violet); }
.df-panel { animation: df-fade var(--df-d-ui) var(--df-ease-out); }
@keyframes df-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.df-sec { margin-bottom: var(--lm-space-8); }
.df-sec__h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: var(--lm-space-3); }
.df-sec__h h2 { margin: 0; font-size: var(--lm-fs-h4); line-height: var(--lm-lh-h4); }
.df-sec__h p { margin: 0; font-size: var(--lm-fs-xs); color: var(--lm-muted); }
.df-info { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 6px;
  border-radius: var(--lm-r-pill); border: 1px solid var(--lm-line); background: var(--lm-white); font-size: var(--lm-fs-xs);
  color: var(--lm-ink-2); cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: border-color var(--df-d-fast) var(--df-ease-out), color var(--df-d-fast) var(--df-ease-out), transform var(--df-d-press) var(--df-ease-out); }
.df-info:hover { border-color: var(--lm-ink-3); color: var(--lm-ink); }
.df-info:active { transform: scale(0.97); }
.df-info__i { width: 16px; height: 16px; border-radius: 50%; background: var(--lm-violet); color: var(--lm-white); font-size: 10px; font-weight: var(--lm-fw-bold);
  display: inline-flex; align-items: center; justify-content: center; }
.df-info__logic p { margin: 0 0 10px; font-size: var(--lm-fs-sm); line-height: 21px; color: var(--lm-ink-2); word-break: keep-all; }
.df-info__logic p:last-child { margin-bottom: 0; }
.df-info__fc { font-size: 10px; line-height: 14px; white-space: nowrap; text-align: left; }
.df-info__band { color: var(--lm-muted); }
.df-sheet--wide { width: min(760px, 100%); }
.df-sheet__body h4 + .df-fctable, .df-sheet__body h4 + .df-info__scroll { margin-top: 2px; }
.df-info__frow td { background: var(--lm-violet-soft, #EFEDF8); }
.df-info__scroll { overflow-x: auto; }
.df-info__foot { border-top: 1px solid var(--lm-line-soft); padding-top: 12px; display: grid; gap: 8px; justify-items: start; }
.df-info__foot p { margin: 0; }

/* calendar heatmap */
.df-calwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--lm-line); border-radius: var(--lm-r-md); background: var(--lm-white); }
.df-cal { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: var(--lm-fs-xs); }
.df-cal th { position: sticky; top: 0; background: var(--lm-surface); color: var(--lm-ink-3); font-weight: var(--lm-fw-medium);
  padding: 8px 6px; border-bottom: 1px solid var(--lm-line); text-align: center; white-space: nowrap; }
.df-cal th.df-cal__f { color: var(--lm-violet); }
.df-cal th:first-child, .df-cal td:first-child { position: sticky; left: 0; background: var(--lm-white); text-align: left;
  min-width: 180px; max-width: 240px; padding-left: 12px; border-right: 1px solid var(--lm-line-soft); z-index: 2; }
.df-cal th:first-child { z-index: 3; background: var(--lm-surface); }
.df-cal tr.df-cal__row { cursor: pointer; }
.df-cal tr.df-cal__row:hover td:first-child { color: var(--lm-violet); }
.df-cal tr.df-cal__total td { font-weight: var(--lm-fw-bold); }
.df-cal tr.df-cal__total td:first-child { background: var(--lm-surface); }
.df-cal td { padding: 0; border-bottom: 1px solid var(--lm-line-soft); height: 40px; }
.df-cal__name { font-size: var(--lm-fs-sm); color: var(--lm-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-cal__sub { font-size: 10px; color: var(--lm-muted); line-height: 12px; white-space: nowrap; }
.df-cell { position: relative; height: 40px; margin: 2px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  color: var(--lm-ink); font-variant-numeric: tabular-nums; }
.df-cell[data-l="4"], .df-cell[data-l="5"], .df-cell[data-l="6"] { color: var(--lm-white); }
.df-cell[data-l="0"] { background: var(--df-heat-0); } .df-cell[data-l="1"] { background: var(--df-heat-1); }
.df-cell[data-l="2"] { background: var(--df-heat-2); } .df-cell[data-l="3"] { background: var(--df-heat-3); }
.df-cell[data-l="4"] { background: var(--df-heat-4); } .df-cell[data-l="5"] { background: var(--df-heat-5); }
.df-cell[data-l="6"] { background: var(--df-heat-6); }
.df-cell[data-f="true"] { outline: 1.5px dashed var(--lm-violet); outline-offset: -2px; }
.df-cell__m { position: absolute; top: 1px; right: 4px; font-size: 10px; line-height: 12px; color: var(--lm-coral); letter-spacing: -1px; }
.df-cell[data-l="5"] .df-cell__m, .df-cell[data-l="6"] .df-cell__m, .df-cell[data-l="4"] .df-cell__m { color: var(--lm-coral-soft, #FFEEEF); }
.df-legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--lm-fs-xs); color: var(--lm-ink-3); margin-top: 8px; align-items: center; }
.df-legend-row i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -3px; margin-right: 4px; }
.df-legend-row .df-mk { color: var(--lm-coral); font-weight: var(--lm-fw-bold); }

/* profile strip (seasonal index) */
.df-profile { display: grid; grid-template-columns: 180px repeat(12, 1fr); gap: 2px; align-items: end; min-width: 700px; }
.df-profile__n { font-size: var(--lm-fs-sm); align-self: center; padding-left: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-profile__c { height: 64px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.df-profile__b { width: 70%; background: var(--lm-heat-3, #BFB6E3); border-radius: 3px 3px 0 0; min-height: 2px; background: var(--df-heat-3); }
.df-profile__b[data-peak="true"] { background: var(--lm-coral); }
.df-profile__v { font-size: 10px; color: var(--lm-muted); line-height: 12px; }

/* segment cards */
.df-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--lm-space-5); }
.df-card { border: 1px solid var(--lm-line); border-radius: var(--lm-r-md); background: var(--lm-white); box-shadow: var(--lm-shadow);
  padding: var(--lm-space-5) var(--lm-space-6); display: flex; flex-direction: column; gap: 12px; cursor: pointer;
  animation: df-fade 300ms var(--df-ease-out) both; transition: border-color var(--df-d-fast) var(--df-ease-out); }
.df-card:hover { border-color: var(--lm-line-strong); }
.df-card__top { display: flex; align-items: flex-start; gap: 10px; }
.df-card__rank { width: 26px; height: 26px; border-radius: 50%; background: var(--lm-ink); color: var(--lm-white); font-size: var(--lm-fs-xs);
  display: flex; align-items: center; justify-content: center; flex: none; font-weight: var(--lm-fw-bold); }
.df-card__rank[data-other="true"] { background: var(--lm-line-strong); }
.df-card__title { font-size: var(--lm-fs-lg); line-height: 24px; font-weight: var(--lm-fw-bold); word-break: keep-all; }
.df-card__desc { font-size: var(--lm-fs-xs); color: var(--lm-ink-3); line-height: 16px; margin-top: 2px; }
.df-card__score { margin-left: auto; text-align: right; flex: none; }
.df-card__score b { font-size: var(--lm-fs-h4); line-height: 24px; }
.df-card__score small { display: block; font-size: 10px; color: var(--lm-muted); }
.df-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.df-badge { font-size: 10px; line-height: 16px; padding: 0 7px; border-radius: 8px; background: var(--lm-line-soft); color: var(--lm-ink-2); white-space: nowrap; }
.df-badge--warn { background: var(--lm-line-soft); color: var(--lm-cat-gold); }
.df-badge--bad { background: var(--lm-coral-soft, #FFEEEF); color: var(--lm-red-deep); }
.df-badge--type { background: var(--lm-violet-soft, #EFEDF8); color: var(--lm-violet); }
.df-spark { width: 100%; height: 72px; display: block; }
.df-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.df-metric__l { font-size: 10px; color: var(--lm-ink-3); line-height: 12px; }
.df-metric__v { font-size: var(--lm-fs-sm); font-weight: var(--lm-fw-medium); line-height: 18px; font-variant-numeric: tabular-nums; }
.df-card__rec { font-size: var(--lm-fs-xs); line-height: 17px; color: var(--lm-ink-2); border-top: 1px solid var(--lm-line-soft); padding-top: 10px; }
.df-card__rec b { color: var(--lm-ink); }
.df-kwlist { font-size: var(--lm-fs-xs); color: var(--lm-ink-3); line-height: 17px; }

/* timing plan */
.df-brief { border: 1px solid var(--lm-line); border-left: 4px solid var(--lm-coral); border-radius: var(--lm-r-md); background: var(--lm-white);
  padding: var(--lm-space-5) var(--lm-space-6); margin-bottom: var(--lm-space-6); }
.df-brief p { margin: 0; }
.df-gantt-wrap { overflow-x: auto; border: 1px solid var(--lm-line); border-radius: var(--lm-r-md); background: var(--lm-white); }
.df-gantt { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 820px; font-size: var(--lm-fs-xs); }
.df-gantt th { background: var(--lm-surface); color: var(--lm-ink-3); font-weight: var(--lm-fw-medium); padding: 8px 6px; border-bottom: 1px solid var(--lm-line); text-align: center; white-space: nowrap; }
.df-gantt th:first-child, .df-gantt td:first-child { text-align: left; padding-left: 12px; min-width: 200px; position: sticky; left: 0; background: var(--lm-white); border-right: 1px solid var(--lm-line-soft); z-index: 2; }
.df-gantt th:first-child { background: var(--lm-surface); }
.df-gantt td { border-bottom: 1px solid var(--lm-line-soft); padding: 0; height: 44px; position: relative; }
.df-gantt th.df-g__now, .df-gantt td.df-g__now { box-shadow: inset 2px 0 0 var(--lm-coral); }
.df-g { position: absolute; top: 9px; height: 26px; left: 2px; right: 2px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 12px; white-space: nowrap; overflow: hidden; }
.df-g--prep { background: var(--lm-violet-soft, #EFEDF8); color: var(--lm-violet); }
.df-g--launch { background: var(--df-heat-2); color: var(--lm-violet-hover); }
.df-g--camp { background: var(--lm-violet); color: var(--lm-white); }
.df-g--peak { background: var(--lm-coral); color: var(--lm-white); }
.df-g--end { background: var(--lm-line-soft); color: var(--lm-ink-3); }
.df-g--past { opacity: .45; }
.df-gantt__name { font-size: var(--lm-fs-sm); color: var(--lm-ink); }
.df-gantt__one { font-size: 10px; color: var(--lm-ink-3); line-height: 13px; white-space: normal; max-width: 260px; }
.df-plan-list { list-style: none; margin: var(--lm-space-5) 0 0; padding: 0; display: grid; gap: 8px; }
.df-plan-list li { border: 1px solid var(--lm-line-soft); border-radius: var(--lm-r-sm); padding: 10px 14px; font-size: var(--lm-fs-sm); background: var(--lm-white); }
.df-plan-list b { color: var(--lm-ink); }
.df-plan-list span { color: var(--lm-ink-3); }
.df-wins { display: flex; gap: 4px; flex-wrap: wrap; }
.df-win { font-size: 10px; padding: 2px 8px; border-radius: 8px; background: var(--lm-surface); color: var(--lm-ink-3); border: 1px solid var(--lm-line-soft); }
.df-win--high { background: var(--lm-coral-soft, #FFEEEF); color: var(--lm-red-deep); border-color: transparent; }
.df-win--low { background: var(--lm-line-soft); color: var(--lm-muted); border-color: transparent; }

/* keywords table */
.df-tablewrap { overflow-x: auto; border: 1px solid var(--lm-line); border-radius: var(--lm-r-md); background: var(--lm-white); }
.df-table { border-collapse: collapse; width: 100%; min-width: 900px; font-size: var(--lm-fs-sm); }
.df-table th { background: var(--lm-surface); color: var(--lm-ink-3); font-weight: var(--lm-fw-medium); padding: 8px 10px; text-align: left;
  border-bottom: 1px solid var(--lm-line); white-space: nowrap; cursor: pointer; user-select: none; font-size: var(--lm-fs-xs); }
.df-table th[data-sorted="asc"]::after { content: " ↑"; } .df-table th[data-sorted="desc"]::after { content: " ↓"; }
.df-table td { padding: 7px 10px; border-bottom: 1px solid var(--lm-line-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.df-table td.df-td--kw { white-space: normal; min-width: 180px; }
.df-table td.df-td--num { text-align: right; }
.df-table th.df-td--num { text-align: right; }
.df-table tr:hover td { background: var(--lm-surface); }
.df-mini { width: 96px; height: 22px; display: block; }
.df-ktools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.df-ktools .df-input { height: 36px; max-width: 280px; font-size: var(--lm-fs-sm); }
.df-ktools .df-select { height: 36px; }

/* evidence */
.df-ev { display: grid; gap: var(--lm-space-6); }
.df-ev table { border-collapse: collapse; width: 100%; font-size: var(--lm-fs-xs); }
.df-ev th { text-align: left; color: var(--lm-ink-3); font-weight: var(--lm-fw-medium); padding: 6px 8px; border-bottom: 1px solid var(--lm-line); background: var(--lm-surface); }
.df-ev td { padding: 6px 8px; border-bottom: 1px solid var(--lm-line-soft); font-variant-numeric: tabular-nums; }
.df-ev td.df-best { color: var(--lm-violet); font-weight: var(--lm-fw-bold); }
.df-ev pre { font-size: 11px; line-height: 15px; background: var(--lm-surface); padding: 10px; border-radius: var(--lm-r-sm); overflow-x: auto; margin: 0; }
.df-excl { display: flex; flex-wrap: wrap; gap: 6px; }
.df-excl span { font-size: var(--lm-fs-xs); padding: 3px 9px; border-radius: 10px; background: var(--lm-surface); border: 1px solid var(--lm-line-soft); color: var(--lm-ink-3); }
.df-excl span small { color: var(--lm-muted); }

/* runs list */
.df-runs { display: grid; gap: 10px; }
.df-run { border: 1px solid var(--lm-line); border-radius: var(--lm-r-md); background: var(--lm-white); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.df-run__main { flex: 1 1 320px; min-width: 0; }
.df-run__title { font-size: var(--lm-fs-base); font-weight: var(--lm-fw-bold); word-break: keep-all; }
.df-run__meta { font-size: var(--lm-fs-xs); color: var(--lm-ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.df-run__tools { display: flex; gap: 6px; }
.df-status { font-size: 10px; padding: 1px 8px; border-radius: 8px; background: var(--lm-line-soft); color: var(--lm-ink-2); }
.df-status--done { background: var(--lm-line-soft); color: var(--lm-cat-green); } .df-status--error { background: var(--lm-coral-soft, #FFEEEF); color: var(--lm-red-deep); }
.df-status--running { background: var(--lm-violet-soft, #EFEDF8); color: var(--lm-violet); }

/* sheet */
.df-scrim { position: fixed; inset: 0; background: rgba(35,33,40,.35); z-index: 50; opacity: 0; pointer-events: none;
  transition: opacity var(--df-d-sheet) var(--df-ease-drawer); }
.df-scrim[data-open="true"] { opacity: 1; pointer-events: auto; }
.df-sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); z-index: 60; background: var(--lm-white);
  box-shadow: var(--lm-shadow); transform: translateX(100%); transition: transform var(--df-d-sheet) var(--df-ease-drawer);
  display: flex; flex-direction: column; }
.df-sheet[data-open="true"] { transform: none; }
.df-sheet__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--lm-line); }
.df-sheet__title { font-size: var(--lm-fs-h4); line-height: 28px; font-weight: var(--lm-fw-bold); word-break: keep-all; }
.df-close { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--lm-line); background: var(--lm-white); cursor: pointer; color: var(--lm-ink-2); }
.df-sheet__body { padding: 20px 24px 40px; overflow-y: auto; display: grid; gap: 18px; }
.df-sheet__body h4 { margin: 0 0 6px; font-size: var(--lm-fs-sm); color: var(--lm-ink-3); font-weight: var(--lm-fw-bold); }
.df-demo { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 6px; }
.df-demo div { text-align: center; background: var(--lm-surface); border-radius: var(--lm-r-sm); padding: 6px 2px; }
.df-demo b { display: block; font-size: var(--lm-fs-sm); }
.df-demo small { font-size: 10px; color: var(--lm-muted); }
.df-fctable { width: 100%; border-collapse: collapse; font-size: var(--lm-fs-xs); }
.df-fctable th, .df-fctable td { padding: 5px 8px; border-bottom: 1px solid var(--lm-line-soft); text-align: right; font-variant-numeric: tabular-nums; }
.df-fctable th:first-child, .df-fctable td:first-child { text-align: left; }
.df-fctable th { color: var(--lm-ink-3); font-weight: var(--lm-fw-medium); background: var(--lm-surface); white-space: nowrap; }
.df-fctable td.df-best { color: var(--lm-violet); font-weight: var(--lm-fw-bold); }

/* toast */
.df-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); z-index: 70; background: var(--lm-charcoal); color: var(--lm-white);
  padding: 10px 16px; border-radius: var(--lm-r-pill); font-size: var(--lm-fs-sm); opacity: 0; pointer-events: none;
  transition: opacity var(--df-d-ui) var(--df-ease-out), transform var(--df-d-ui) var(--df-ease-out); }
.df-toast[data-open="true"] { opacity: 1; transform: translate(-50%, 0); }

/* responsive */
@media (max-width: 760px) {
  .df-view { padding: 0 var(--lm-space-4) 56px; }
  .df-fieldset { padding: var(--lm-space-5) var(--lm-space-4); }
  .df-composer__foot { padding: var(--lm-space-5) var(--lm-space-4); }
  .df-hero__h { font-size: 24px; line-height: 33.6px; }
  .df-cards { grid-template-columns: 1fr; }
  .df-cal th:first-child, .df-cal td:first-child { min-width: 130px; }
  .df-progress { padding: var(--lm-space-5); }
  .df-sheet { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------- regimes and isolation */
.df-lb { color: var(--lm-muted); font-weight: var(--lm-fw-medium); font-size: var(--lm-fs-xs); }
.df-cal__iso td { opacity: .62; }
.df-cal__iso .df-cal__name { font-weight: var(--lm-fw-regular); font-style: normal; color: var(--lm-ink-3); }
.df-card--iso { border-style: dashed; opacity: .82; }
.df-note { margin: -12px 0 16px; padding: 8px 12px; border-left: 3px solid var(--lm-cat-gold); background: var(--lm-surface); border-radius: 0 var(--lm-r-sm) var(--lm-r-sm) 0; }


/* ---------------------------------------------------- hero signature card body (inside the family .lm-sigcard frame) */
.df-ex__body { padding: 20px 24px 16px; }
.df-ex__eyebrow { font-size: 12px; line-height: 16.8px; font-weight: var(--lm-fw-bold); color: var(--lm-red-deep); margin-bottom: 4px; }
.df-ex__title { font-size: var(--lm-fs-h4); line-height: var(--lm-lh-h4); font-weight: var(--lm-fw-bold); color: var(--lm-ink); margin-bottom: 14px; word-break: keep-all; }
.df-ex__kpis { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--lm-surface); border: 1px solid var(--lm-line-soft); border-radius: var(--lm-r-sm); margin-bottom: 14px; }
.df-ex__kpis > div { padding: 10px 12px; border-left: 1px solid var(--lm-line-soft); min-width: 0; }
.df-ex__kpis > div:first-child { border-left: 0; }
.df-ex__kpis small { display: block; font-size: 12px; line-height: 16px; color: var(--lm-ink-3); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-ex__kpis b { display: block; font-size: var(--lm-fs-h4); line-height: 28px; font-weight: var(--lm-fw-bold); color: var(--lm-ink); }
.df-ex__kpis b.df-pos { color: var(--lm-cat-green); } .df-ex__kpis b.df-neg { color: var(--lm-red-deep); }
.df-ex__kpis b.df-lb { font-size: var(--lm-fs-sm); line-height: 28px; }
.df-ex__kv { display: grid; grid-template-columns: 104px 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: var(--lm-fs-sm); line-height: 21px; }
.df-ex__kv dt { color: var(--lm-ink-3); } .df-ex__kv dd { margin: 0; color: var(--lm-ink); }
.df-ex__action { background: var(--lm-violet-soft, #EFEDF8); border-radius: var(--lm-r-sm); padding: 12px 14px; font-size: var(--lm-fs-sm); line-height: 21px; color: var(--lm-ink); margin-bottom: 14px; word-break: keep-all; }
.df-ex__action b { color: var(--lm-red-deep); margin-right: 6px; }
.df-ex__striplabel { font-size: 12px; line-height: 16px; color: var(--lm-ink-3); margin-bottom: 8px; }
.df-ex__strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.df-ex__cell { position: relative; border-radius: 4px; padding: 6px 0 5px; text-align: center; background: var(--df-heat-0); color: var(--lm-ink); }
.df-ex__cell i { display: block; font-style: normal; font-size: 9px; line-height: 12px; color: var(--lm-ink-3); }
.df-ex__cell b { display: block; font-size: 11px; line-height: 14px; font-weight: var(--lm-fw-medium); }
.df-ex__cell s { position: absolute; top: -8px; right: 2px; text-decoration: none; font-size: 9px; color: var(--lm-coral); }
.df-ex__cell[data-f="true"] { outline: 1.5px dashed var(--lm-violet); outline-offset: -2px; }
.df-ex__cell[data-l="1"] { background: var(--df-heat-1); } .df-ex__cell[data-l="2"] { background: var(--df-heat-2); }
.df-ex__cell[data-l="3"] { background: var(--df-heat-3); } .df-ex__cell[data-l="4"] { background: var(--df-heat-4); color: #fff; }
.df-ex__cell[data-l="4"] i { color: rgba(255,255,255,.8); }
.df-ex__cell[data-l="5"], .df-ex__cell[data-l="6"] { background: var(--df-heat-5); color: #fff; }
.df-ex__cell[data-l="5"] i, .df-ex__cell[data-l="6"] i { color: rgba(255,255,255,.8); }
.df-ex__cell[data-l="6"] { background: var(--df-heat-6); }
.df-ex__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 11px; color: var(--lm-ink-3); }
.df-ex__legend span { display: inline-flex; align-items: center; gap: 5px; }
.df-ex__legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.df-ex__link { font-size: var(--lm-fs-sm); }

/* composer under the hero */
.df-composer-wrap { padding-top: 0; scroll-margin-top: 72px; }
.df-composer-wrap .df-sec__h h2 { font-size: var(--lm-fs-h3); line-height: var(--lm-lh-h3); }

@media (max-width: 599px) {
  /* the GNB right group (language + market) needs the room the lockup name takes on phones; the tile keeps the identity */
  .lm-gnb .lm-lockup__name, .lm-gnb .lm-ver { display: none; }
  .lm-gnb .df-select { padding-left: 10px; }
  .df-ex__body { padding: 16px; }
  .df-ex__kv { grid-template-columns: 92px 1fr; }
  .df-ex__cell i { display: none; }
}

/* ---------------------------------------------------- Japanese: no word-break restriction (keep-all is for Korean) */
html[lang="ja"] .lm-app, html[lang="ja"] .lm-app * { word-break: normal; }
html[lang="ja"] .lm-h1, html[lang="ja"] .df-ex__title, html[lang="ja"] .df-card__title, html[lang="ja"] .df-rhead__h { word-break: auto-phrase; }
html[lang="ja"] .df-ex__kv { grid-template-columns: 128px 1fr; }
.df-ex__cell i { white-space: nowrap; }
html[lang="ja"] .df-ex__kv { grid-template-columns: 140px 1fr; }
html[lang="ja"] .df-ex__kv dt { white-space: nowrap; }
/* home: tighten the gap between the hero and the composer */
.lm-hero { padding-bottom: 16px; }
.df-composer-wrap { padding-top: 8px; }

/* ---------------------------------------------------- hero left column: recent results or example seeds */
.df-recent { margin-top: 28px; max-width: 560px; }
.df-recent:empty { display: none; }
.df-recent__t { font-size: var(--lm-fs-xs); line-height: var(--lm-lh-xs); font-weight: var(--lm-fw-bold); color: var(--lm-ink-3); margin-bottom: 6px; }
.df-recent__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lm-line-soft); }
.df-recent__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--lm-line-soft);
  text-decoration: none; color: var(--lm-ink); transition: background-color var(--df-d-fast) var(--df-ease-out); }
.df-recent__row:hover { background: var(--lm-surface); }
.df-recent__row b { font-size: var(--lm-fs-sm); font-weight: var(--lm-fw-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.df-recent__row small { font-size: var(--lm-fs-xs); color: var(--lm-muted); white-space: nowrap; flex: none; }
.df-recent__chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* results list: staff-only switch between own and everyone's runs */
.df-runs__all { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 13px; color: var(--lm-ink-3); cursor: pointer; }
.df-runs__all input { margin: 0; }

/* keywords tab: the model behind a flat forecast line */
.df-kw__model { display: block; font-size: 10px; line-height: 1.2; color: var(--lm-ink-3); white-space: nowrap; }
