/* ---- Overview ------------------------------------------------------------ */

.ov-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 22px; }
.ov-col { display: grid; gap: 20px; }

.bar { display: inline-flex; gap: 3px; }
.bar__cell { width: 12px; height: 6px; border-radius: 2px; background: var(--chip); }
.bar__cell--ready { background: var(--blue); }
.bar__cell--work { background: #f0b46a; }

.follow { margin: 0; padding: 6px 8px 8px; list-style: none; }
.follow button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; }
.follow button:hover { background: var(--blue-50); }
.follow__org { color: var(--navy); font-size: 13.5px; font-weight: 500; }
.follow__step { grid-row: 2; color: var(--text-2); font-size: 12.5px; }
.follow__due { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.follow__due.is-overdue { color: var(--work); }

/* ---- Launch plan ---------------------------------------------------------- */

.steps { margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: 136px minmax(0, 1fr) 28px; gap: 16px; align-items: start; padding: 13px 18px; border-top: 1px solid var(--line); }
.steps > .step:first-child { border-top: 0; }
.steps--compact .step { grid-template-columns: 136px minmax(0, 1fr); }
.step__body { min-width: 0; padding-top: 4px; }
.step__text { color: var(--text); font-size: 13.5px; line-height: 1.55; }
.step--done .step__text { color: var(--text-3); }
.step__meta { margin-top: 3px; color: var(--text-3); font-size: 12px; }
.step__note { margin-top: 8px; }
.step__note textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13px; line-height: 1.5; resize: vertical; }
.step__note textarea:focus { border-color: var(--blue); background: var(--surface); box-shadow: var(--ring); }
.step__add-note { color: #a3adc2; }
.step:hover .step__add-note { color: var(--text-2); }
.refs { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 4px; vertical-align: 1px; }
.ref { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px solid var(--blue-200); border-radius: 6px; background: var(--blue-50); color: var(--blue-ink); font-size: 12px; font-weight: 500; line-height: 1; text-decoration: none; transition: background 0.15s, border-color 0.15s; }
.ref:hover { border-color: var(--blue-300); background: var(--blue-100); }
.ref__meta { color: var(--text-3); font-weight: 400; }

.plan { display: grid; gap: 14px; }
.phase { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); scroll-margin-top: 20px; }
.phase__head { display: flex; align-items: center; gap: 14px; padding: 16px 18px 12px; }
.phase__num { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--chip); color: var(--navy); font-size: 14px; font-weight: 600; }
.phase.is-done .phase__num { background: var(--blue-100); color: var(--blue-ink); }
.phase__title { flex: 1; min-width: 0; }
.phase__title h2 { color: var(--navy); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.phase__title p { margin-top: 1px; color: var(--text-3); font-size: 12.5px; }
.phase__done, .phase__note { margin: 0 18px 12px 64px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.phase__done span { margin-right: 8px; color: var(--navy); font-weight: 600; }
.phase__note { padding: 9px 12px; border-radius: 8px; background: var(--blue-50); }
.phase__note strong { color: var(--navy); }
.phase .steps { border-top: 1px solid var(--line); }
.phase__empty { padding: 12px 18px 16px 64px; color: var(--text-3); font-size: 13px; }

/* ---- Cases --------------------------------------------------------------- */

.case-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.case-list__head, .case-row { display: grid; grid-template-columns: 24px 92px minmax(0, 1fr) 104px 168px 64px 112px; gap: 14px; align-items: center; padding: 0 18px; }
.case-list__head { height: 40px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 500; }
.case-row { min-height: 86px; padding-top: 10px; padding-bottom: 10px; border-top: 1px solid var(--line); text-decoration: none; transition: background 0.15s; }
.case-list__head + .case-row { border-top: 0; }
.case-row:hover { background: var(--blue-50); }
.case-row:hover .desk > .thumb { transform: scale(1.04); }
.case-row__num { color: var(--text-3); font-family: var(--mono); font-size: 11.5px; }
.case-row__main { display: grid; gap: 2px; min-width: 0; }
.case-row__title { color: var(--navy); font-size: 14.5px; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
.case-row__label { overflow: hidden; color: var(--text-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.case-row__type { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.case-row__ready { display: grid; gap: 6px; color: var(--text-3); font-size: 12px; }
.case-row__decks { display: flex; gap: 4px; }

.tabs { display: flex; gap: 2px; margin-bottom: 26px; overflow-x: auto; overflow-y: hidden; box-shadow: inset 0 -1px 0 var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__item { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; color: var(--text-2); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color 0.15s; }
.tabs__item:hover { color: var(--navy); }
.tabs__item.is-active { color: var(--navy); }
.tabs__item.is-active::after { content: ""; position: absolute; right: 10px; bottom: 0; left: 10px; height: 2px; border-radius: 2px 2px 0 0; background: var(--blue); }
.tabs__count { padding: 0 6px; border-radius: 9px; background: var(--chip); color: var(--text-3); font-size: 11px; line-height: 18px; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 36px; align-items: start; }
.editor__side { position: sticky; top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.side-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.side-card h3 { margin-bottom: 12px; color: var(--navy); font-size: 13px; font-weight: 600; }
.side-card .select { height: 34px; }
.side-card__hint { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.side-card__hint.ok { color: var(--blue-ink); font-weight: 500; }
.issues { display: grid; gap: 2px; margin: 10px 0 0; padding: 0; list-style: none; }
.issue a { display: flex; gap: 9px; margin: 0 -8px; padding: 7px 8px; border-radius: 7px; color: var(--text); font-size: 12.5px; line-height: 1.45; text-decoration: none; transition: background 0.15s; }
.issue a:hover { background: var(--surface-2); }
.issue .i { flex: none; margin-top: 2px; }
.issue--error .i { color: var(--work); }
.issue--warn .i { color: var(--text-3); }
.issue--warn a { color: var(--text-2); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.mini-stats div { display: grid; gap: 1px; }
.mini-stats dt { color: var(--text-3); font-size: 11.5px; }
.mini-stats dd { margin: 0; color: var(--navy); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.side-links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.side-links a { display: block; margin: 0 -8px; padding: 6px 8px; border-radius: 7px; color: var(--navy); font-size: 13px; font-weight: 500; text-decoration: none; }
.side-links a:hover { background: var(--blue-50); }

.page-doc__header { position: relative; margin-bottom: 6px; padding: 28px 32px 26px; border: 1px solid var(--blue-100); border-radius: 14px; background: var(--blue-50); }
.page-doc__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 8px; }
.page-doc__label { color: var(--blue-ink); font-size: 13px; font-weight: 500; }
.page-doc__title { max-width: 30ch; margin-bottom: 12px; color: var(--navy); font-size: 27px; font-weight: 600; line-height: 1.18; letter-spacing: -0.022em; }
.page-doc__summary { max-width: 64ch; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.page-doc__edit { font-size: 12.5px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.facts li { padding: 3px 9px; border: 1px solid var(--blue-200); border-radius: 6px; background: var(--surface); color: var(--navy); font-size: 12.5px; font-weight: 500; line-height: 1.5; }
.field__value .facts { margin-top: 4px; }

.blk { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px; padding: 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.blk__num { display: inline-grid; place-items: center; width: 34px; height: 24px; border-radius: 6px; background: var(--chip); color: var(--text-3); font-family: var(--mono); font-size: 11.5px; }
.blk--work .blk__num { background: var(--work-bg); color: var(--work); }
.blk__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 24px; margin-bottom: 12px; }
.blk__role { color: var(--navy); font-size: 14px; font-weight: 600; }
.blk__kind { color: var(--text-3); font-size: 12px; }
.blk__head .st { margin-left: auto; }
.blk__figure { margin: 0 0 14px; }
.blk__figure.is-omitted .desk { max-height: 200px; aspect-ratio: 16 / 5; }
.blk__figure.is-omitted .thumb { opacity: 0.55; filter: grayscale(0.7); }
.blk__fields { display: grid; gap: 2px; }
.blk__copy { max-width: 68ch; color: var(--text); font-size: 15px; line-height: 1.75; white-space: normal; }
.blk__cta { max-width: 60ch; color: var(--navy); font-size: 15.5px; font-weight: 500; line-height: 1.6; white-space: normal; }
.blk__credit { margin: 0 0 4px; color: var(--text-3); font-size: 12px; }
.blk__credit .muted { margin-left: 6px; color: #a5aec2; }
.blk__note { margin-top: 10px; color: var(--text-3); font-size: 12.5px; line-height: 1.55; }
.blk__note span { margin-right: 8px; color: var(--text-2); font-weight: 600; }
.page-doc__next { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); font-size: 15px; font-weight: 600; text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.page-doc__next span { color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.page-doc__next .i { margin-left: auto; color: var(--blue); }
.page-doc__next:hover { border-color: var(--blue-300); background: var(--blue-50); }

.form { display: grid; gap: 32px; }
.form__group h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--navy); font-size: 13.5px; font-weight: 600; }
.form__group > .field + .field { margin-top: 2px; }
.form__group .select { max-width: 460px; margin-top: 4px; }
.form__group--internal { padding: 16px 18px; border: 1px dashed var(--lilac-200); border-radius: 12px; background: var(--lilac-50); }
.form__group--internal h3 { border-color: var(--lilac-200); color: #4a3fb8; }
.form__group--internal h3 .i { color: var(--lilac); }
.serp { display: grid; gap: 3px; max-width: 600px; margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; font-family: Arial, sans-serif; }
.serp__url { color: #4d5156; font-size: 12px; }
.serp__title { color: #1a0dab; font-size: 18px; line-height: 1.3; }
.serp__desc { color: #4d5156; font-size: 13px; line-height: 1.5; }
.facts-list { display: grid; gap: 10px; margin: 0; }
.facts-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
.facts-list dt { color: var(--text-3); font-size: 12.5px; }
.facts-list dd { margin: 0; color: var(--text); font-size: 13.5px; line-height: 1.55; }
.facts-list--cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; margin-bottom: 14px; }
.facts-list--cols div { grid-template-columns: 1fr; gap: 1px; }
.facts-list--cols dd { color: var(--navy); font-size: 15px; font-weight: 600; }

.tab-lede { max-width: 72ch; margin-bottom: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.rules { display: grid; }
.rule { padding: 18px 0; border-top: 1px solid var(--line); }
.rule:first-child { border-top: 0; padding-top: 0; }
.rule h3 { margin-bottom: 8px; color: var(--navy); font-size: 14.5px; font-weight: 600; }
.rules + .disclosure { margin-top: 18px; }
.notes { min-height: 320px; font-size: 14px; }

/* ---- Media ------------------------------------------------------------- */

.media-groups { display: grid; gap: 30px; }
.media-group__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.media-group__head a { color: var(--navy); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.media-group__head a:hover { color: var(--blue-ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; transition: border-color 0.15s, box-shadow 0.2s; }
.tile:hover { border-color: var(--blue-300); box-shadow: var(--shadow-2); }
.tile:hover .desk > .thumb { transform: scale(1.03); }
.tile .desk { border-radius: 0; }
.tile--held .desk > .thumb { opacity: 0.5; filter: grayscale(0.7); }
.tile--work { border-color: var(--work-line); }
.tile__body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.tile__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tile__case { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tile__role { display: -webkit-box; min-height: 2.7em; overflow: hidden; color: var(--navy); font-size: 13px; font-weight: 500; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile__status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.tile__status:has(.tile__ch) { display: grid; grid-template-columns: 38px minmax(0, 1fr); }
.tile__status:has(.tile__ch) .tag { grid-column: 2; justify-self: start; }
.tile__ch { color: var(--text-3); font-size: 11px; }
.tile-wrap { display: flex; }

/* ---- Asset inspector ----------------------------------------------------- */

.inspector__figure { margin: 0; }
.inspector__figure figcaption { margin-top: 8px; color: var(--text-3); font-size: 12.5px; }
.inspector__caption { margin: 0; padding: 12px 14px; border-left: 3px solid var(--blue); border-radius: 0 9px 9px 0; background: var(--blue-50); color: var(--text); font-size: 13.5px; line-height: 1.6; }
.inspector__caption span { display: block; margin-bottom: 3px; color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.inspector__caption small { display: block; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.inspector__note { display: flex; gap: 8px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.inspector__note .i { flex: none; margin-top: 3px; color: var(--text-3); }
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ch { display: grid; align-content: start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ch--work { border-color: var(--work-line); background: #fffbf6; }
.ch__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.ch__head h3 { color: var(--navy); font-size: 13.5px; font-weight: 600; }
.ch__action { color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
.ch__alts { display: grid; gap: 6px; }
.ch__alts > span, .ch__override > span { color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.alt { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; }
.alt:hover { border-color: var(--blue-300); }
.alt .st { margin-left: auto; font-size: 11.5px; }
.ch__override { display: grid; gap: 4px; }
.ch__override .select { width: 100%; }
.ch__changed { display: flex; align-items: center; gap: 6px; color: var(--work); font-size: 12px; line-height: 1.45; }
.ch__changed strong { font-weight: 600; }
.uses, .files { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.uses a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: 13px; text-decoration: none; transition: background 0.15s; }
.uses a span { flex: 1; }
.uses a .i { color: var(--text-3); }
.uses a:hover { background: var(--blue-50); }

/* ---- Decks ----------------------------------------------------------------- */

.deck-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.deck-tab { display: grid; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.deck-tab:hover { border-color: var(--blue-300); }
.deck-tab.is-active { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(48, 131, 255, 0.1); }
.deck-tab__code { color: var(--blue-ink); font-size: 12px; font-weight: 600; }
.deck-tab__title { color: var(--navy); font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.deck-tab__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.deck-sum { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; margin-bottom: 14px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; }
.deck-sum__facts { display: grid; gap: 12px; margin: 0; }
.deck-sum__facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; }
.deck-sum__facts dt { color: var(--text-3); font-size: 12.5px; }
.deck-sum__facts dd { margin: 0; color: var(--text); font-size: 13.5px; line-height: 1.55; }
.deck-sum__facts .link { margin-left: 6px; }
.deck-sum__build { display: grid; align-content: start; gap: 14px; padding-left: 28px; border-left: 1px solid var(--line); }
.dpages { display: grid; margin-top: 8px; }
.dpage { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 32px; align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.dpage__frame { position: sticky; top: 24px; }
.slide { position: relative; display: flex; flex-direction: column; gap: 14px; aspect-ratio: 297 / 210; overflow: hidden; padding: 22px 24px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--paper); }
.slide__folio { position: absolute; top: 14px; right: 16px; color: var(--navy); font-family: var(--mono); font-size: 11px; font-weight: 500; }
.slide__folio span { color: var(--text-3); }
.slide__headline { display: -webkit-box; max-width: 86%; overflow: hidden; color: var(--navy); font-size: 17px; font-weight: 600; line-height: 1.28; letter-spacing: -0.015em; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.slide__visuals { display: grid; flex: 1; gap: 8px; min-height: 0; }
.slide__visuals--2 { grid-template-columns: 1fr 1fr; }
.slide__visuals--3 { grid-template-columns: 1fr 1fr 1fr; }
.slide__visual { position: relative; min-height: 0; overflow: hidden; padding: 0; border: 0; border-radius: 4px; background: var(--desk); }
.slide__visual .thumb { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 12px); max-height: calc(100% - 12px); box-shadow: 0 1px 3px rgba(19, 52, 102, 0.22); }
.slide__visual.is-blocked::after { content: ""; position: absolute; inset: 0; border-radius: 4px; box-shadow: inset 0 0 0 2px #f0b46a; }
.slide__text { flex: 1; overflow: hidden; color: var(--text-2); font-size: 11.5px; line-height: 1.6; }
.slide__brand { color: var(--blue); font-size: 10.5px; font-weight: 600; letter-spacing: -0.01em; }
.dpage__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.dpage__head h3 { display: flex; align-items: baseline; gap: 10px; color: var(--navy); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.dpage__num { color: var(--text-3); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.blockers { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.blockers button { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--work-line); border-radius: 9px; background: var(--work-bg); color: var(--work-ink); font-size: 12.5px; line-height: 1.5; text-align: left; }
.blockers button:hover { border-color: #e8b877; }
.blockers .code { flex: none; background: rgba(255, 255, 255, 0.7); }
.dfields { display: grid; margin: 0; }
.dfield { padding: 11px 0; border-top: 1px solid var(--line); }
.dfield:first-child { border-top: 0; padding-top: 0; }
.dfield dt { display: flex; align-items: center; justify-content: space-between; min-height: 24px; margin-bottom: 3px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.dfield dd { margin: 0; }
.dfield .copy-btn { opacity: 0; }
.dfield:hover .copy-btn, .dfield:focus-within .copy-btn { opacity: 1; }
.deck-sum + .disclosure { margin-bottom: 4px; }

/* ---- Pipeline ------------------------------------------------------------- */

.stages { display: flex; margin-bottom: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stages__item { display: grid; flex: 1; gap: 1px; min-width: 96px; padding: 12px 16px; border-left: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; text-decoration: none; transition: background 0.15s; }
.stages__item:first-child { border-left: 0; }
.stages__item:hover { background: var(--surface-2); }
.stages__count { color: var(--navy); font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.stages__item.is-zero .stages__count { color: #c3cbdb; }
.stages__item.is-active { background: var(--blue-50); box-shadow: inset 0 -2px 0 var(--blue); color: var(--navy); }
.leads { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lead-head, .lead-row { display: grid; grid-template-columns: 30px minmax(0, 1.25fr) minmax(0, 1.2fr) 74px minmax(0, 1fr) 118px; gap: 16px; align-items: center; padding: 0 20px; }
.lead-head { height: 40px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 500; }
.lead-row { width: 100%; min-height: 60px; padding-top: 9px; padding-bottom: 9px; border: 0; border-top: 1px solid var(--line); background: var(--surface); text-align: left; transition: background 0.15s; }
.lead-row:hover { background: var(--blue-50); }
.lead-row__num { color: var(--text-3); font-family: var(--mono); font-size: 11.5px; }
.lead-row__org, .lead-row__contact { display: grid; min-width: 0; }
.lead-row__org span { color: var(--navy); font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.lead-row__contact span { color: var(--text); font-size: 13px; }
.lead-row small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.next { display: grid; color: var(--text); font-size: 13px; }
.next__due { color: var(--text-3); font-size: 12px; }
.next.is-overdue .next__due { color: var(--work); font-weight: 500; }
.wave__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 16px 20px 10px; border-top: 1px solid var(--line); background: var(--surface-2); }
.lead-head + .wave .wave__head { border-top: 0; }
.wave__head h2 { color: var(--navy); font-size: 14px; font-weight: 600; }
.wave__head p { margin-left: auto; color: var(--text-3); font-size: 12px; }
.wave__head + .lead-row { border-top-color: var(--line); }
.playbook { display: grid; gap: 8px; margin-top: 24px; }

.lead-top { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: end; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.lead-next { display: grid; gap: 1px; }
.lead-next strong { color: var(--navy); font-size: 14.5px; font-weight: 600; }
.lead-next span:last-child { color: var(--text-2); font-size: 12.5px; }
.lead-next.is-overdue strong, .lead-next.is-overdue span:last-child { color: var(--work); }
.contact__name { margin-bottom: 8px; color: var(--navy); font-size: 14.5px; font-weight: 600; }
.contact__name span { display: block; color: var(--text-2); font-size: 12.5px; font-weight: 400; }
.contact__emails { display: grid; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.contact__emails li { display: flex; align-items: center; gap: 8px; }
.contact__emails a { display: inline-flex; align-items: center; gap: 7px; color: var(--blue-ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.contact__emails a:hover { text-decoration: underline; }
.contact__route { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 1.55; }
.contact__route .label { display: block; margin-bottom: 3px; }
.touches { display: grid; margin: 0 0 12px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; list-style: none; }
.touch { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--line); }
.touch:first-child { border-top: 0; }
.touch__dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--chip); color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.touch.is-sent .touch__dot { background: var(--blue); color: #fff; }
.touch.is-next { background: var(--blue-50); }
.touch.is-next .touch__dot { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue-ink); }
.touch__name { color: var(--navy); font-size: 13.5px; font-weight: 500; }
.touch__name small { display: block; color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.message { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.message__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 12px; }
.message__subject { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.message__subject span { color: var(--text-3); font-size: 12px; }
.message__subject p { color: var(--navy); font-size: 13.5px; font-weight: 500; }
.message__body { max-height: 360px; margin: 0; padding: 14px; overflow: auto; color: var(--text); font: 13px/1.68 var(--font); white-space: pre-wrap; }
.message__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; }
.log-add { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; margin-bottom: 12px; }
.log-add .input { height: 32px; font-size: 13px; }
.log { display: grid; margin: 0; padding: 0; list-style: none; }
.log li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.log time { color: var(--text-3); font-size: 12px; }

/* ---- Library and site pages ---------------------------------------------- */

.library, .split { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.library__nav, .split__nav { position: sticky; top: 24px; display: grid; gap: 2px; max-height: calc(100vh - 72px); overflow-y: auto; padding-right: 4px; }
.library__nav .search-field { margin-bottom: 6px; }
.library__group { display: grid; gap: 1px; }
.library__group .nav__label { padding: 14px 10px 4px; }
.library__item, .split__item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; line-height: 1.4; text-decoration: none; transition: background 0.15s, color 0.15s; }
.split__item { padding: 9px 12px; font-size: 13.5px; }
.library__item:hover, .split__item:hover { background: var(--surface-2); color: var(--navy); }
.library__item.is-active, .split__item.is-active { background: var(--blue-50); color: var(--navy); font-weight: 500; }
.reader { max-width: 780px; min-width: 0; }
.reader__head { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.reader__group { margin-bottom: 6px; color: var(--blue-ink); font-size: 12.5px; font-weight: 500; }
.reader__head h2 { margin-bottom: 14px; color: var(--navy); font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -0.022em; }
.toc { margin-bottom: 26px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; }
.toc summary { padding: 11px 0; color: var(--navy); font-size: 13px; font-weight: 500; cursor: pointer; }
.toc ol { margin: 0 0 12px; padding-left: 20px; columns: 2; column-gap: 28px; font-size: 13px; line-height: 1.9; }
.toc a { color: var(--blue-ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prose--doc { font-size: 14.5px; }

.split__main { min-width: 0; max-width: 820px; }
.sp-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sp-head h2 { color: var(--navy); font-size: 22px; font-weight: 600; letter-spacing: -0.018em; }
.sp-head .slug { margin-top: 4px; color: var(--text-3); font-size: 12.5px; }
.sp-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.sp-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.sp-section__head h3 { color: var(--navy); font-size: 15px; font-weight: 600; }

/* ---- Settings --------------------------------------------------------------- */

.settings { display: grid; gap: 20px; max-width: 900px; }
.export-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 16px; margin: 18px 0 4px; }
.export-grid > div { display: grid; gap: 2px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); }
.big-num { color: var(--navy); font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.big-num span { margin-left: 4px; color: var(--text-3); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.code-preview { max-height: 380px; margin: 10px 0 0; padding: 14px 16px; overflow: auto; border-radius: 10px; background: #0f2140; color: #d4e1ff; font: 12px/1.6 var(--mono); }
.change-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.change-list a, .change-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 13px; text-align: left; text-decoration: none; }
.change-list a:hover, .change-list button:hover { background: var(--blue-50); }

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 1360px) {
  .case-list__head, .case-row { grid-template-columns: 24px 84px minmax(0, 1fr) 168px 112px; }
  .case-list__head span:nth-child(4), .case-list__head span:nth-child(6), .case-row__type, .case-row__decks { display: none; }
  .desk--row { width: 84px; }
}

@media (max-width: 1240px) {
  .view { padding: 30px 32px 88px; }
  .lead-head, .lead-row { grid-template-columns: 28px minmax(0, 1.3fr) 70px minmax(0, 1fr) 112px; }
  .lead-head span:nth-child(3), .lead-row__contact { display: none; }
}

@media (max-width: 1080px) {
  .ov-grid, .editor { grid-template-columns: minmax(0, 1fr); }
  .editor__side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deck-sum { grid-template-columns: minmax(0, 1fr); }
  .deck-sum__build { padding: 16px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .dpage { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dpage__frame { position: static; max-width: 460px; }
  .library, .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .library__nav, .split__nav { position: static; max-height: 260px; }
  .split__nav { display: flex; max-height: none; overflow-x: auto; padding-bottom: 4px; }
  .split__item { flex: none; }
}

@media (max-width: 860px) {
  body { overflow: auto; }
  html, body, .app, .stage { height: auto; }
  .app { display: block; min-height: 100vh; }
  .side {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    width: 286px;
    background: var(--bg);
    visibility: hidden;
    transform: translateX(-105%);
    transition: transform 0.26s var(--ease), visibility 0s linear 0.26s;
  }
  body.nav-open .side { visibility: visible; box-shadow: var(--shadow-pop); transform: none; transition: transform 0.26s var(--ease); }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(19, 52, 102, 0.22); }
  .stage { padding: 0; }
  .main { height: auto; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .mobile-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 8px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px); }
  .mobile-bar img { height: 20px; width: auto; }
  .view { padding: 22px 16px 72px; }
  .save-warning { top: 56px; padding: 10px 16px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
  .page-head h1 { font-size: 24px; }
  .lede { font-size: 14px; }
  .page-head__actions { flex-wrap: wrap; }
  .toolbar > .search-field { margin-left: 0; width: 100%; }
  .search-field input { width: 100%; }
  .seg { max-width: 100%; overflow-x: auto; }
  .step, .steps--compact .step { grid-template-columns: minmax(0, 1fr) 28px; gap: 8px 12px; padding: 12px 14px; }
  .step .status-select { grid-column: 1; width: 150px; }
  .step__body { grid-column: 1 / -1; grid-row: 2; padding-top: 0; }
  .step__add-note { grid-row: 1; grid-column: 2; }
  .phase__done, .phase__note, .phase__empty { margin-left: 18px; padding-left: 0; }
  .phase__note { padding-left: 12px; }
  .case-list__head { display: none; }
  .case-row { grid-template-columns: 76px minmax(0, 1fr); gap: 6px 14px; padding: 12px 14px; }
  .case-row__num { display: none; }
  .case-row .desk { grid-row: span 3; width: 76px; }
  .case-row__ready, .case-row__publish { grid-column: 2; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .blk { grid-template-columns: minmax(0, 1fr); padding: 20px 0; }
  .blk__rail { margin-bottom: 6px; }
  .page-doc__header { padding: 22px 18px; }
  .page-doc__title { font-size: 22px; }
  .editor__side { grid-template-columns: minmax(0, 1fr); }
  .channels { grid-template-columns: minmax(0, 1fr); }
  .deck-tabs { grid-template-columns: minmax(0, 1fr); }
  .deck-sum { padding: 16px; }
  .deck-sum__facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lead-head { display: none; }
  .lead-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .lead-row__deck { display: none; }
  .lead-row__next { grid-column: 2; grid-row: 2; }
  .lead-row__stage { grid-column: 3; grid-row: 1; }
  .wave__head p { margin-left: 0; width: 100%; }
  .lead-top { grid-template-columns: minmax(0, 1fr); }
  .log-add { grid-template-columns: minmax(0, 1fr) auto; }
  .log-add .input--date { grid-column: 1 / -1; width: 100%; }
  .facts-list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
  .drawer__body { padding: 18px 16px 28px; }
  .drawer__head { padding: 14px 12px 12px 16px; }
  .toc ol { columns: 1; }
  .message__subject { grid-template-columns: minmax(0, 1fr) auto; }
  .message__subject span { display: none; }
}
