/* OGEN Control — noir profond, blanc, gris neutre, or discret #B39469 */
:root {
  color-scheme: light;
  --gold: #b39469;
  --gold-ink: #7d6440;          /* or lisible sur fond clair (texte, barres) */
  --gold-soft: #f4eee4;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --surface-3: #e8e5de;
  --text: #121212;
  --text-2: #4c4a45;
  --muted: #77746c;
  --border: #e3e0d8;
  --sidebar: #0b0b0b;
  --sidebar-text: #c9c6bf;
  --ok: #1e7b3c; --ok-soft: #e5f3e9;
  --warn: #9a5b00; --warn-soft: #fbf0dc;
  --bad: #b3261e; --bad-soft: #fbe7e5;
  --info: #2a5fa8; --info-soft: #e7eef9;
  --bar: #8a6d45;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 10px rgba(0, 0, 0, .04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --gold-ink: #cdb28a; --gold-soft: #2a241b;
    --bg: #0f0f0e; --surface: #181817; --surface-2: #211f1d; --surface-3: #2b2926;
    --text: #f0efec; --text-2: #c9c6bf; --muted: #9b978e; --border: #2f2d29;
    --sidebar: #050505;
    --ok: #5fcf86; --ok-soft: #15291c; --warn: #f0b350; --warn-soft: #2e2413; --bad: #f2867f; --bad-soft: #321816; --info: #8fb6ee; --info-soft: #172234;
    --bar: #c7a679;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --gold-ink: #cdb28a; --gold-soft: #2a241b;
  --bg: #0f0f0e; --surface: #181817; --surface-2: #211f1d; --surface-3: #2b2926;
  --text: #f0efec; --text-2: #c9c6bf; --muted: #9b978e; --border: #2f2d29;
  --sidebar: #050505;
  --ok: #5fcf86; --ok-soft: #15291c; --warn: #f0b350; --warn-soft: #2e2413; --bad: #f2867f; --bad-soft: #321816; --info: #8fb6ee; --info-soft: #172234;
  --bar: #c7a679;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { overflow-x: clip; }
body { font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--gold-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.45rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: var(--surface-2); border-radius: 6px; }
code { padding: 1px 5px; }
pre { padding: 12px; overflow: auto; white-space: pre-wrap; margin: 0; }

/* ---------- Coquille */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; border-right: 1px solid #1d1d1b; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; letter-spacing: .16em; font-weight: 600; font-size: .95rem; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand small { display: block; color: var(--gold); letter-spacing: .3em; font-size: .62rem; font-weight: 500; }
.nav { padding: 6px 10px 16px; display: grid; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--sidebar-text); font-weight: 500; font-size: .88rem; }
.nav a:hover { background: #1a1a18; color: #fff; text-decoration: none; }
.nav a.active { background: #1f1c17; color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.nav .ico { width: 18px; text-align: center; opacity: .85; }
.nav .phase { margin-left: auto; font-size: .62rem; color: #8d887d; border: 1px solid #3a3731; border-radius: 99px; padding: 0 6px; }
.sidebar-foot { margin-top: auto; padding: 14px 18px; border-top: 1px solid #1d1d1b; font-size: .8rem; }
.sidebar-foot .who { color: #fff; }
.sidebar-foot button { background: none; border: 0; color: var(--gold); cursor: pointer; padding: 0; font: inherit; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 28px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { padding-left: 32px; }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 6px; color: var(--muted); font-size: 1rem; }
.search-results { position: absolute; top: 40px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.12); max-height: 420px; overflow: auto; z-index: 40; }
.search-results a { display: block; padding: 8px 12px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:hover { background: var(--surface-2); text-decoration: none; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { position: relative; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1rem; }
.icon-btn .dot[hidden] { display: none; }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; background: var(--bad); color: #fff; font-size: .62rem; min-width: 16px; height: 16px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; }
main { padding: 24px 28px 80px; max-width: 1440px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 0; }

/* ---------- Composants */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 7px 13px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--gold); text-decoration: none; }
.btn.primary { background: #0b0b0b; color: #f1e6d4; border-color: #0b0b0b; }
.btn.primary:hover { background: #26231e; }
:root[data-theme="dark"] .btn.primary { background: var(--gold); color: #0b0b0b; border-color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: var(--gold); color: #0b0b0b; border-color: var(--gold); } }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #0b0b0b; }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 3px 9px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .v { font-size: 1.55rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .l { color: var(--muted); font-size: .8rem; }
.kpi .s { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.kpi.alert .v { color: var(--bad); }
.kpi.na .v { color: var(--muted); font-size: 1.05rem; font-weight: 500; }
.section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.gold { background: var(--gold-soft); color: var(--gold-ink); }
.badge.outline { background: transparent; border: 1px solid var(--border); }

label { display: block; font-weight: 500; font-size: .82rem; margin-bottom: 4px; color: var(--text-2); }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--gold); }
.field { margin-bottom: 12px; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--text); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters select, .filters input { width: auto; min-width: 150px; }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table-wrap.tall { max-height: 620px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; background: var(--surface); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--text); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }
.logo { width: 40px; height: 40px; border-radius: 9px; object-fit: contain; background: var(--surface-2); flex: none; }
.logo.sm { width: 26px; height: 26px; border-radius: 6px; }
.logo.lg { width: 72px; height: 72px; border-radius: 14px; }
.cell-client { display: flex; align-items: center; gap: 10px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 18px 0; overflow-x: auto; }
.tabs a { padding: 9px 13px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--gold); }

.score { --c: var(--muted); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; font-variant-numeric: tabular-nums; }
.score::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.score span { position: relative; }
.score.lg { width: 92px; height: 92px; font-size: 1.6rem; }
.score.lg::before { inset: 8px; }
.pill-score { font-weight: 650; font-variant-numeric: tabular-nums; }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gold); }
.stepper { display: flex; gap: 2px; }
.stepper span { flex: 1; height: 5px; border-radius: 2px; background: var(--surface-3); }
.stepper span.on { background: var(--gold); }

/* Chronologie */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--gold); }
.timeline .dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: var(--muted); cursor: pointer; padding: 0; z-index: 1; }
.timeline li.done .dot { background: var(--gold); border-color: var(--gold); color: #0b0b0b; }
.timeline li.current .dot { border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 4px var(--gold-soft); }
.timeline .body { padding-top: 4px; }
.timeline textarea { min-height: 34px; margin-top: 6px; }
.timeline input[type=date] { width: auto; padding: 3px 8px; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.kcol h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); display: flex; justify-content: space-between; }
.kcol.over { outline: 2px dashed var(--gold); }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: grab; font-size: .84rem; }
.kcard:hover { border-color: var(--gold); }
.kcard .t { font-weight: 600; margin-bottom: 4px; }
.kcard .m { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .74rem; }

/* Graphiques */
.chart { position: relative; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .82rem; }
.bar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar .track { height: 10px; border-radius: 0 4px 4px 0; position: relative; }
.bar .fill { height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.bar .fill:not([style*="width:0%"]) { min-width: 2px; }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); min-width: 32px; }
.bar:hover .fill { filter: brightness(1.15); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--text-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
svg.line text { fill: var(--muted); font-size: 11px; }
svg.line .grid { stroke: var(--border); stroke-width: 1; }
svg.line .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.line .pt { stroke: var(--surface); stroke-width: 2; }
#tooltip { position: fixed; pointer-events: none; background: #0b0b0b; color: #f3efe7; padding: 6px 9px; border-radius: 7px; font-size: .78rem; z-index: 100; opacity: 0; transition: opacity .1s; max-width: 300px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
#tooltip.show { opacity: 1; }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty b { color: var(--text); display: block; margin-bottom: 4px; }
.notice { border-left: 3px solid var(--gold); background: var(--gold-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .85rem; margin-bottom: 14px; }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }
.notice.bad { border-color: var(--bad); background: var(--bad-soft); }
.notice.info { border-color: var(--info); background: var(--info-soft); }
.demo-tag { background: repeating-linear-gradient(135deg, var(--warn-soft) 0 6px, transparent 6px 12px); }

.issue { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.issue.Critique { border-left-color: var(--bad); }
.issue.Haute { border-left-color: var(--warn); }
.issue.Moyenne { border-left-color: var(--info); }
.issue .meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.issue .meta b { color: var(--text-2); font-weight: 600; }
details summary { cursor: pointer; font-weight: 500; }
details[open] summary { margin-bottom: 6px; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff > div { border: 1px solid var(--border); border-radius: 8px; padding: 10px; white-space: pre-wrap; font-size: .85rem; }
.diff .before { background: var(--bad-soft); }
.diff .after { background: var(--ok-soft); }
.serp { font-family: arial, sans-serif; max-width: 600px; }
.serp .u { color: var(--text-2); font-size: .78rem; }
.serp .t { color: #1a0dab; font-size: 1.1rem; }
.serp .d { color: var(--text-2); font-size: .85rem; }
:root[data-theme="dark"] .serp .t { color: #8ab4f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .serp .t { color: #8ab4f8; } }

.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 12px 14px; border-radius: 10px; max-width: 900px; }
.msg.user { background: var(--gold-soft); align-self: flex-end; }
.msg.bot { background: var(--surface); border: 1px solid var(--border); }
.md p { margin: 0 0 .6em; }
.md ul, .md ol { margin: 0 0 .6em; padding-left: 20px; }
.md h3, .md h4 { margin: .8em 0 .3em; }

.panel { position: fixed; top: 0; right: 0; width: min(560px, 100vw); height: 100vh; background: var(--surface); border-left: 1px solid var(--border); box-shadow: -10px 0 30px rgba(0,0,0,.12); z-index: 60; overflow-y: auto; padding: 22px; transform: translateX(100%); transition: transform .18s, visibility .18s; visibility: hidden; }
.panel.open { transform: none; visibility: visible; }
.panel-close { position: absolute; top: 14px; right: 14px; }
dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); width: min(560px, 94vw); padding: 22px; }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #0b0b0b; color: #f3efe7; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 120; max-width: 90vw; border: 1px solid #2c2a26; }
#toast.show { opacity: 1; }
#toast.error { background: var(--bad); color: #fff; }

/* Connexion */
.auth { min-height: 100vh; display: grid; place-items: center; background: #0b0b0b; padding: 16px; }
.auth .box { width: min(400px, 100%); background: var(--surface); border-radius: 14px; padding: 28px; }
.auth img { width: 140px; display: block; margin: 0 auto 10px; border-radius: 12px; }

/* Rapport imprimable */
.report { background: #fff; color: #111; max-width: 860px; margin: 0 auto; padding: 36px 40px; border: 1px solid var(--border); }
.report h1 { font-size: 1.6rem; }
.report .rh { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #b39469; padding-bottom: 14px; margin-bottom: 20px; }
.report .tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #7d6440; font-weight: 700; }
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .shell { display: block; }
  main { padding: 0; }
  .report { border: 0; padding: 0; }
  body { background: #fff; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { position: fixed; z-index: 70; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-grid !important; }
  main { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .diff { grid-template-columns: 1fr; }
}
.menu-btn { display: none !important; }

/* ---------------------------------------------------------------- Espace client */
.portal-head { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.portal-head h1 { margin: 2px 0; }
.eyebrow { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--gold); }
.current-step { border-left: 3px solid var(--gold); }
.current-step h3 { margin: 4px 0 6px; }

.voyage-wrap { overflow-x: auto; padding: 4px 0; }
.voyage { --dot: 34px; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(84px, 1fr)); list-style: none; margin: 0; padding: 0; min-width: calc(var(--n) * 84px); }
.voyage::before, .voyage-fill { content: ""; position: absolute; top: calc(var(--dot) / 2); left: calc(50% / var(--n)); }
.voyage::before { right: calc(50% / var(--n)); border-top: 1.5px dashed color-mix(in srgb, var(--gold) 45%, transparent); }
.voyage-fill { height: 2px; margin-top: -1px; background: var(--gold); width: calc((100% - 100% / var(--n)) * var(--p)); }
.vstep { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; }
.vstep .dot { width: var(--dot); height: var(--dot); border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-size: 15px; }
.vstep .dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.vstep.done .dot, .vstep.current .dot { border-color: var(--ok); color: var(--ok); }
.vstep.done .dot::after, .vstep.current .dot::after { display: none; }
.vstep.current .dot { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.vstep.current .dot img { width: 22px; height: 22px; border-radius: 50%; animation: wheel 9s linear infinite; }
.vstep .lbl { margin-top: 8px; font-size: .74rem; line-height: 1.3; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.vstep .num { font-size: .66rem; letter-spacing: .12em; color: var(--muted); }
.vstep.current .lbl { color: var(--text); font-weight: 600; }
.vstep.done .lbl { color: var(--text-2); }
.vstep .when { font-size: .68rem; color: var(--muted); font-weight: 400; }
@keyframes wheel { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vstep.current .dot img { animation: none; } }
@media (max-width: 760px) {
  .voyage { grid-template-columns: 1fr; min-width: 0; row-gap: 14px; }
  .voyage::before { top: calc(var(--dot) / 2); bottom: calc(var(--dot) / 2); left: calc(var(--dot) / 2); right: auto; border-top: 0; border-left: 1.5px dashed color-mix(in srgb, var(--gold) 45%, transparent); }
  .voyage-fill { top: calc(var(--dot) / 2); left: calc(var(--dot) / 2 - 1px); width: 2px; margin-top: 0; height: calc((100% - var(--dot)) * var(--p)); }
  .vstep { flex-direction: row; text-align: left; gap: 12px; padding: 0; }
  .vstep .dot { flex-shrink: 0; }
  .vstep .lbl { margin-top: 0; font-size: .85rem; }
}

.doc { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.card h3 + .doc { border-top: 0; }
.doc-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; flex-shrink: 0; }
.doc-main { flex: 1; min-width: 160px; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 26px 14px; text-align: center; cursor: pointer; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--gold); background: var(--gold-soft); }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery figure { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.gallery img, .file-tile { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-weight: 700; letter-spacing: .08em; }
.gallery figcaption { padding: 8px; font-size: .75rem; display: flex; flex-direction: column; gap: 2px; position: relative; }
.gallery figcaption > span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 22px; }
.gallery figcaption .btn { position: absolute; top: 4px; right: 2px; }
