/* TOCS Operations theme. Times New Roman is the text. */
:root, .tofs-shell {
  --orange:#E86B40;--orange-d:#C9552D;--orange-t:#FBE8DF;--orange-f:#FEF5F1;
  --navy:#102347;--navy-t:#E3E8F2;
  --purple:#8B4F7F;--purple-t:#F1E7EF;
  --teal:#3FA584;--teal-t:#E3F4EE;--teal-d:#23775C;
  --amber:#D9A33F;--amber-t:#FBF1DC;--amber-d:#8A5F0E;
  --steel:#4A7B9D;--red:#C85757;--red-t:#F9E3E3;--red-d:#A13C3C;
  --ink:#1F2937;--muted:#6B7280;--faint:#9CA3AF;
  --line:#EDEFF2;--line2:#DDE1E6;--soft:#F7F8FA;
  --bg:#F3F4F6;--side:#FFFFFF;--top:rgba(255,255,255,.94);--shell-line:#E5E7EB;
  --side-ink:#4B5563;--side-mute:#9CA3AF;--side-hover:#F3F4F6;--side-on:#FEF1EB;--side-on-ink:#102347;
  --on:#102347;--on-m:#5B6472;--on-f:#8A919C;--ctl:#FFFFFF;--ctl-line:#DDE1E6;--ctl-ink:#1F2937;
  --card-line:#E6E8EC;
}
.tofs-shell.tofs-theme-navy {
  --bg:#141414;--side:#191919;--top:rgba(20,20,20,.92);--shell-line:#2A2A2A;
  --side-ink:#B3B3B3;--side-mute:#7A7A7A;--side-hover:#232323;--side-on:#FFFFFF;--side-on-ink:#102347;
  --on:#F5F5F7;--on-m:#B3B3B3;--on-f:#8A8A8A;--ctl:#202020;--ctl-line:#363636;--ctl-ink:#F5F5F7;
  --card-line:transparent;
}
html, body, .dash-app, #tofs-root, .tofs-shell, .tofs-shell button, .tofs-shell input, .tofs-shell select,
.tofs-shell h1, .tofs-shell h2, .tofs-shell h3, .tofs-shell .dash-spreadsheet-inner td, .tofs-shell .dash-spreadsheet-inner th {
  font-family: "Times New Roman", Times, serif !important;
}
.tofs-shell { background: var(--bg) !important; color: var(--on) !important; font-size: 14px; }

/* Sign-in */
.tofs-shell:has(.login-wrap) { display: block !important; background: #fff !important; min-height: 100vh; }
#page-chrome:has(.login-wrap) { display: block !important; padding: 0 !important; min-height: 100vh; width: 100%; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); }
.story { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 44px 56px; display: flex; flex-direction: column; min-height: 100vh; }
.story::before { content: ""; position: absolute; width: 620px; height: 620px; right: -220px; top: -240px; border-radius: 50%; background: radial-gradient(circle, rgba(232,107,64,.28), transparent 65%); }
.story::after { content: ""; position: absolute; width: 520px; height: 520px; left: -200px; bottom: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(139,79,127,.35), transparent 65%); }
.story > * { position: relative; z-index: 1; }
.lockup, .brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--purple), var(--orange)); color: #fff; font-weight: 800; font-size: 14px; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; font-size: 12px; }
.lockup b, .brand b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: #fff; line-height: 1.1; }
.brand b { color: var(--on) !important; font-size: 16.5px; }
.lockup span, .brand span { display: block; font-size: 12px; color: rgba(255,255,255,.6); font-weight: 500; }
.brand span { color: var(--side-mute) !important; font-size: 11.5px; }
.story-body { margin: auto 0; max-width: 520px; padding: 48px 0; }
.story h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; margin: 0 0 14px; color: #fff !important; }
.story p { color: rgba(255,255,255,.72); font-size: 15.5px; line-height: 1.6; margin: 0 0 36px; max-width: 44ch; }
.trail { list-style: none; margin: 0; padding: 0; position: relative; }
.trail::before { content: ""; position: absolute; left: 15px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--orange), var(--purple)); opacity: .6; }
.trail li { display: flex; align-items: center; gap: 16px; padding: 9px 0; }
.trail .node { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); border: 2px solid var(--orange); display: grid; place-items: center; color: var(--orange); flex-shrink: 0; }
.trail li:last-child .node { background: var(--orange); color: #fff; }
.trail .node .ic { width: 15px; height: 15px; background: currentColor; }
.trail .t { font-size: 14px; font-weight: 600; color: #fff; }
.trail .s { font-size: 12.5px; color: rgba(255,255,255,.55); }
.story-foot { font-size: 12px; color: rgba(255,255,255,.45); }
.signin { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.tofs-theme-navy .signin { background: var(--bg); }
.login { width: min(400px, 100%); }
.login h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--on) !important; }
.login .intro { color: var(--on-m) !important; margin: 6px 0 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--on) !important; margin-bottom: 6px; }
.login .in, .login input.in {
  width: 100%; height: 42px; border: 1px solid var(--ctl-line) !important; border-radius: 8px !important;
  padding: 0 12px; font-size: 14px; color: var(--ctl-ink) !important; background: var(--ctl) !important;
  -webkit-text-fill-color: var(--ctl-ink) !important; outline: none;
}
.login input.in:focus { border-color: var(--orange) !important; box-shadow: 0 0 0 3px var(--orange-t); }
.pw { position: relative; }
.pw .in, .pw input.in { padding-right: 64px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 6px; height: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 7px; border: 1px solid transparent; background: var(--orange); color: #fff !important; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.block { width: 100%; height: 42px; font-size: 14px; margin-top: 6px; }
.btn.ghost { background: var(--ctl) !important; color: var(--ctl-ink) !important; border-color: var(--ctl-line) !important; }
.demo { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-h { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.acct { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--ctl-line); border-radius: 9px; background: var(--ctl); color: var(--ctl-ink); cursor: pointer; text-align: left; height: auto; }
.acct:hover { border-color: var(--orange); background: var(--orange-f); }
.acct .av { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; font-weight: 700; }
.acct .av.ops { background: var(--navy-t); color: var(--navy); }
.acct .av.cs { background: var(--purple-t); color: var(--purple); }
.acct b { display: block; font-size: 13.5px; color: var(--ctl-ink); }
.acct small { display: block; font-size: 12px; color: var(--muted); }
.acct .use { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--orange-d); }

/* Shell */
.tofs-shell:has(.tofs-side) { display: grid !important; grid-template-columns: 244px minmax(0,1fr); background: var(--bg) !important; color: var(--on) !important; }
.tofs-shell .tofs-side { background: var(--side) !important; border-right: 1px solid var(--shell-line) !important; width: 244px; padding: 16px 12px; }
.tofs-shell .tofs-side .nlabel { color: var(--side-mute) !important; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.tofs-shell .tofs-side .nlink { color: var(--side-ink) !important; border-radius: 7px; font-weight: 500; }
.tofs-shell .tofs-side .nlink .ic { background: var(--side-mute); }
.tofs-shell .tofs-side .nlink:hover { background: var(--side-hover) !important; color: var(--on) !important; }
.tofs-shell .tofs-side .nlink.on { background: var(--side-on) !important; color: var(--side-on-ink) !important; font-weight: 600; }
.tofs-shell .tofs-side .nlink.on .ic { background: var(--orange) !important; }
.tofs-shell .side-foot { margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--shell-line); display: flex; align-items: center; gap: 10px; }
.tofs-shell .side-foot .who { flex: 1; min-width: 0; }
.tofs-shell .side-foot .who b { display: block; font-size: 13px; color: var(--on) !important; }
.tofs-shell .side-foot .who span { font-size: 11.5px; color: var(--side-mute) !important; }
.avatar, .desk-chip .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--orange-t); color: var(--navy); flex-shrink: 0; }
.desk-cs .avatar { background: var(--purple-t); color: var(--purple); }
.desk-chip .avatar { width: 26px; height: 26px; font-size: 10px; }
.tofs-shell .side-out { font-size: 0 !important; text-decoration: none; color: var(--on-m) !important; }
.side-out::before {
  content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/></svg>") center / contain no-repeat;
}
.tofs-shell .tofs-top { background: var(--top) !important; border-bottom: 1px solid var(--shell-line) !important; backdrop-filter: blur(10px); padding: 10px 28px; gap: 10px; }
.tofs-shell .crumb { color: var(--on-f) !important; }
.tofs-shell .crumb b { color: var(--on) !important; }
.tofs-shell .gs-wrap { position: relative; flex: 1; max-width: 420px; }
.tofs-shell .gs-wrap .ic-search { position: absolute; left: 10px; top: 9px; background: var(--on-f); }
.tofs-shell .gs-wrap input { width: 100%; height: 34px; border: 1px solid var(--ctl-line) !important; background: var(--ctl) !important; color: var(--ctl-ink) !important; -webkit-text-fill-color: var(--ctl-ink) !important; border-radius: 8px; padding: 0 12px 0 32px; font-size: 13px; }
.tofs-shell .gs-wrap input:focus { border-color: var(--orange) !important; box-shadow: 0 0 0 3px var(--orange-t); }
.tofs-shell .gsearch-pop { display: none; position: absolute; top: 40px; left: 0; right: 0; z-index: 50; background: #fff; color: #1F2937; border: 1px solid #E6E8EC; border-radius: 10px; box-shadow: 0 12px 32px rgba(16,35,71,.12); max-height: 320px; overflow: auto; padding: 6px; }
.tofs-shell .gsearch-pop.open { display: block; }
.tofs-shell .gsearch-pop button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: #102347; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; height: auto; }
.tofs-shell .gsearch-pop button small { display: block; color: #6B7280; }
.tofs-shell .iconbtn, .tofs-shell .tofs-hamb { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--ctl-line) !important; background: var(--ctl) !important; color: var(--on-m) !important; display: grid; place-items: center; cursor: pointer; }
.desk-chip { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px; border-radius: 99px; background: var(--ctl); border: 1px solid var(--ctl-line); font-size: 12.5px; font-weight: 600; color: var(--ctl-ink); }
.tofs-theme-bar { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.theme-proxy::before, .dens-proxy::before { content: ""; width: 16px; height: 16px; background: currentColor; }
.theme-proxy::before { -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'><path d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'><path d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/></svg>") center / contain no-repeat; }
.dens-proxy::before { -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'><path d='M3 6h18M3 12h18M3 18h18'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'><path d='M3 6h18M3 12h18M3 18h18'/></svg>") center / contain no-repeat; }

.tofs-shell:has(.tofs-side) > #live-bar,
.tofs-shell:has(.tofs-side) > #page-main,
.tofs-shell:has(.tofs-side) > #ops-incident-wrap,
.tofs-shell:has(.tofs-side) > #cs-incident-wrap { padding-left: 28px; padding-right: 28px; }
.tofs-shell .tofs-ph h1, .tofs-shell .tofs-report h2 { color: var(--on) !important; font-weight: 700; letter-spacing: -.02em; }
.tofs-shell .tofs-ph h1 { font-size: 24px; }
.tofs-shell .tofs-ph p, .tofs-shell .tofs-muted { color: var(--on-m) !important; }
.tofs-shell .tofs-phase { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 600; color: var(--on-f) !important; }
.tofs-shell .tofs-card, .tofs-shell .tofs-kpi, .tofs-shell .tofs-note, .tofs-shell .tofs-forecast-note {
  background: #fff !important; color: #1F2937 !important; border: 1px solid var(--card-line) !important; border-radius: 10px !important; box-shadow: none !important;
}
.tofs-shell .tofs-kpi .label { color: #6B7280 !important; font-size: 12px; font-weight: 500; }
.tofs-shell .tofs-kpi .value { color: #102347 !important; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.tofs-shell .tofs-kpis .tofs-kpi:first-child { box-shadow: inset 0 3px 0 var(--orange) !important; }
.desk-cs .tofs-kpis .tofs-kpi:first-child { box-shadow: inset 0 3px 0 var(--purple) !important; }
.tofs-shell .tofs-card h3, .tofs-shell .tofs-note strong { color: #102347 !important; }
.tofs-shell .tofs-card .tofs-muted, .tofs-shell .tofs-note p, .tofs-shell .tofs-kpi .hint { color: #6B7280 !important; }
.tofs-shell .tofs-btn, .tofs-shell a.tofs-btn { background: #E86B40 !important; color: #fff !important; border: 0 !important; border-radius: 7px !important; font-weight: 600; }
.tofs-shell .tofs-alert { display: flex; gap: 12px; background: #fff !important; color: #1F2937 !important; border: 1px solid #DDE1E6 !important; border-left: 3px solid #4A7B9D !important; border-radius: 8px !important; }
.tofs-shell .tofs-alert.is-high { border-left-color: #C85757 !important; }
.tofs-shell .tofs-alert.is-medium { border-left-color: #D9A33F !important; }
.tofs-shell .tofs-alert strong { color: #1F2937 !important; }
.tofs-shell .tofs-alert p { color: #6B7280 !important; opacity: 1 !important; }
.tofs-shell .tofs-livebar { background: var(--ctl) !important; color: var(--on) !important; border: 1px solid var(--ctl-line) !important; border-radius: 8px; display: inline-flex; gap: 8px; padding: 7px 11px; margin-top: 14px; }

.tofs-shell .dash-spreadsheet-inner td, .tofs-shell .dash-spreadsheet-inner th { background-color: #fff !important; color: #1F2937 !important; -webkit-text-fill-color: #1F2937 !important; border-color: #EDEFF2 !important; }
.tofs-shell .dash-spreadsheet-inner thead th { background-color: #F9FAFB !important; color: #6B7280 !important; -webkit-text-fill-color: #6B7280 !important; font-size: 11px !important; letter-spacing: .04em; text-transform: uppercase; }
.tofs-shell .dash-spreadsheet-inner tbody tr:nth-child(even) td { background-color: #F9FAFB !important; }
.tofs-shell .dash-spreadsheet-inner td .dash-cell-value { background-color: transparent !important; color: inherit !important; -webkit-text-fill-color: inherit !important; }
.tofs-shell .dash-spreadsheet-inner td.cell--selected, .tofs-shell .dash-spreadsheet-inner td.focused { background-color: #FEF5F1 !important; color: #102347 !important; -webkit-text-fill-color: #102347 !important; }
.tofs-shell .dash-filter input, .tofs-shell .export { background: #fff !important; color: #1F2937 !important; -webkit-text-fill-color: #1F2937 !important; }
body.compact .dash-spreadsheet-inner td, body.compact .dash-spreadsheet-inner th { padding: 6px 10px !important; font-size: 12.5px !important; }
.tofs-shell .hit { outline: 2px solid #E86B40; outline-offset: 2px; }

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: minmax(0,1fr); }
  .story { min-height: 0; padding: 28px 24px; }
  .story-body { padding: 28px 0 8px; }
  .story h2 { font-size: 28px; }
  .story-foot, .trail { display: none; }
  .story p { margin-bottom: 0; }
  .tofs-shell:has(.tofs-side) { grid-template-columns: minmax(0,1fr); }
  .tofs-shell .tofs-side { position: fixed; width: min(272px, 86vw); }
  .tofs-shell .gs-wrap { max-width: none; flex: 1 1 100%; order: 5; }
  .tofs-shell .tofs-top { flex-wrap: wrap; padding: 10px 16px; }
  .desk-chip span { display: none; }
}

/* Trace and settlement flow diagrams */
.tofs-shell .flowboard {
  background: #fff !important;
  color: #1F2937 !important;
  border: 1px solid #E6E8EC;
  border-top: 3px solid #E86B40;
  border-radius: 16px;
  padding: 16px 16px 14px;
  margin: 4px 0 14px;
  box-shadow: 0 12px 32px rgba(16, 35, 71, .06);
}
.tofs-shell .flow-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.tofs-shell .flow-eye { margin: 0; color: #E86B40; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.tofs-shell .flowboard h3 { margin: 2px 0 0; color: #102347 !important; font-size: 18px; font-weight: 700; }
.tofs-shell .flow-legend { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tofs-shell .flow-legend .lg { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #F3F4F6; color: #4B5563; }
.tofs-shell .flow-legend .lg.is-done { background: #E3F4EE; color: #23775C; }
.tofs-shell .flow-legend .lg.is-wait { background: #FBF1DC; color: #8A5F0E; }
.tofs-shell .flow-legend .lg.is-gap { background: #F3F4F6; color: #6B7280; }
.tofs-shell .flow-legend .lg.is-bad { background: #F9E3E3; color: #A13C3C; }
.tofs-shell .flow-ribbon { border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.tofs-shell .flow-ribbon.is-done { background: #E3F4EE; color: #23775C; }
.tofs-shell .flow-ribbon.is-wait { background: #FBF1DC; color: #8A5F0E; }
.tofs-shell .flow-ribbon.is-gap, .tofs-shell .flow-ribbon.is-bad { background: #F9E3E3; color: #A13C3C; }
.tofs-shell .flow-meter { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #F3F4F6; }
.tofs-shell .flow-meter .ok { background: #3FA584; display: block; height: 100%; }
.tofs-shell .flow-meter .flag { background: #C85757; display: block; height: 100%; }
.tofs-shell .flow-meter-key { margin: 6px 0 12px; color: #6B7280; font-size: 12.5px; }
.tofs-shell .flow-key { display: flex; gap: 16px; margin: 0 0 8px; color: #6B7280; font-size: 12.5px; }
.tofs-shell .swatch-ghost, .tofs-shell .swatch-live { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.tofs-shell .swatch-ghost { background: #D5DBE3; }
.tofs-shell .swatch-live { background: #3FA584; }
.tofs-shell .flow-cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 22px; }
.tofs-shell .flow-col { display: flex; flex-direction: column; gap: 0; position: relative; min-width: 0; }
.tofs-shell .flow-col:not(:last-child)::after, .tofs-shell .flow-col:not(:last-child)::before {
  position: absolute; right: -24px; transform: translateY(-50%); font-size: 18px; line-height: 1; color: #C5CDD8;
}
.tofs-shell .flow-col:not(:last-child)::after { content: "→"; top: 26%; }
.tofs-shell .flow-col:not(:last-child)::before { content: "→"; top: 74%; color: #E86B40; }
.tofs-shell .flow-ghost, .tofs-shell .flow-node {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; text-align: left; border-radius: 14px; min-width: 0;
}
.tofs-shell .flow-ghost {
  position: relative; min-height: 78px; padding: 10px 12px; border: 1px dashed #D5DBE3; background: #F8F9FB; cursor: help;
}
.tofs-shell .flow-ghost strong { color: #6B7280; font-size: 12.5px; font-weight: 600; }
.tofs-shell .flow-ghost .flow-sub, .tofs-shell .flow-ghost .flow-tag { color: #9CA3AF; }
.tofs-shell .flow-ghost .flow-n { background: transparent; color: #9CA3AF; border: 1px solid #E5E7EB; width: 18px; height: 18px; font-size: 11px; }
.tofs-shell .flow-join { width: 2px; height: 14px; margin-left: 18px; background: #E5E7EB; }
.tofs-shell .flow-node {
  height: auto !important; min-height: 108px; padding: 12px; cursor: pointer;
  border: 1px solid #E6E8EC; background: #fff; color: #1F2937;
  box-shadow: 0 8px 20px rgba(16, 35, 71, .05);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tofs-shell .flow-node:hover, .tofs-shell .flow-ghost:hover { animation-play-state: paused; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(16, 35, 71, .12); z-index: 2; }
.tofs-shell .flow-node:focus-visible { outline: 2px solid #E86B40; outline-offset: 2px; }
.tofs-shell .flow-node strong { color: #102347; font-size: 13.5px; font-weight: 700; max-width: 100%; }
.tofs-shell .flow-sub { color: #4B5563; font-size: 12.5px; line-height: 1.35; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tofs-shell .flow-n {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; background: #E3E8F2; color: #102347; flex: 0 0 auto;
}
.tofs-shell .flow-tag { margin-top: auto; font-style: normal; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #6B7280; }
.tofs-shell .flow-node.is-done { background: #F3FBF8; border-color: #B7E4D4; }
.tofs-shell .flow-node.is-done .flow-n { background: #3FA584; color: #fff; border: 0; }
.tofs-shell .flow-node.is-wait { background: #FFF9EE; border-color: #F3D48A; }
.tofs-shell .flow-node.is-wait .flow-n { background: #D9A33F; color: #fff; border: 0; }
.tofs-shell .flow-node.is-gap { background: #F8F9FB; border-style: dashed; border-color: #D5DBE3; }
.tofs-shell .flow-node.is-gap .flow-n { background: #E5E7EB; color: #6B7280; }
.tofs-shell .flow-node.is-bad { background: #FDF4F4; border-color: #F0C2C2; }
.tofs-shell .flow-node.is-bad .flow-n { background: #C85757; color: #fff; border: 0; }
.tofs-shell .flow-step.on .flow-node { box-shadow: 0 0 0 2px #E86B40, 0 12px 24px rgba(16, 35, 71, .08); }
.tofs-shell .flow-src { display: none !important; }
.tofs-shell .cfa-net {
  display: grid; grid-template-columns: minmax(160px, 210px) 28px minmax(0, 1fr) 28px minmax(140px, 180px);
  align-items: stretch; margin-top: 16px;
}
.tofs-shell .net-arm { align-self: center; height: 2px; background: linear-gradient(90deg, #E86B40, #F6D2C4, #E86B40); background-size: 200% 100%; animation: flow-arm 1.4s linear infinite; }
@keyframes flow-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes flow-step {
  0%, 72%, 100% { box-shadow: 0 8px 20px rgba(16, 35, 71, .05); }
  8% { box-shadow: 0 0 0 3px rgba(232, 107, 64, .7), 0 14px 26px rgba(232, 107, 64, .22); }
  20% { box-shadow: 0 8px 20px rgba(16, 35, 71, .05); }
}
@keyframes flow-arrow { 0%, 100% { opacity: .28; } 10%, 24% { opacity: 1; } }
@keyframes flow-arm { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.tofs-shell .flow-col:nth-child(1) { animation: flow-in .5s ease both; }
.tofs-shell .flow-col:nth-child(2) { animation: flow-in .5s ease .15s both; }
.tofs-shell .flow-col:nth-child(3) { animation: flow-in .5s ease .3s both; }
.tofs-shell .flow-col:nth-child(4) { animation: flow-in .5s ease .45s both; }
.tofs-shell .flow-col:nth-child(5) { animation: flow-in .5s ease .6s both; }
.tofs-shell .flow-col:nth-child(6) { animation: flow-in .5s ease .75s both; }
.tofs-shell .flow-cols .flow-col:nth-child(1) .flow-step .flow-node { animation: flow-step 6.6s ease-in-out infinite; }
.tofs-shell .flow-cols .flow-col:nth-child(2) .flow-step .flow-node { animation: flow-step 6.6s ease-in-out infinite .55s; }
.tofs-shell .flow-cols .flow-col:nth-child(3) .flow-step .flow-node { animation: flow-step 6.6s ease-in-out infinite 1.1s; }
.tofs-shell .flow-cols .flow-col:nth-child(4) .flow-step .flow-node { animation: flow-step 6.6s ease-in-out infinite 1.65s; }
.tofs-shell .flow-cols .flow-col:nth-child(5) .flow-step .flow-node { animation: flow-step 6.6s ease-in-out infinite 2.2s; }
.tofs-shell .flow-cols .flow-col:nth-child(6) .flow-step .flow-node { animation: flow-step 6.6s ease-in-out infinite 2.75s; }
.tofs-shell .flow-col:nth-child(1)::before { animation: flow-arrow 6.6s ease-in-out infinite .28s; }
.tofs-shell .flow-col:nth-child(2)::before { animation: flow-arrow 6.6s ease-in-out infinite .83s; }
.tofs-shell .flow-col:nth-child(3)::before { animation: flow-arrow 6.6s ease-in-out infinite 1.38s; }
.tofs-shell .flow-col:nth-child(4)::before { animation: flow-arrow 6.6s ease-in-out infinite 1.93s; }
.tofs-shell .flow-col:nth-child(5)::before { animation: flow-arrow 6.6s ease-in-out infinite 2.48s; }
.tofs-shell .cfa-net > .flow-step:first-child .flow-node { animation: flow-step 4.4s ease-in-out infinite 2.2s; }
.tofs-shell .cfa-chip { animation: flow-step 4.4s ease-in-out infinite; }
.tofs-shell .cfa-net > .flow-step:last-child .flow-node { animation: flow-step 4.4s ease-in-out infinite 3.15s; }
#flow-tip { position: fixed; z-index: 80; max-width: 280px; background: #102347; color: #fff; border-radius: 10px; padding: 9px 11px; font-family: "Times New Roman", Times, serif; font-size: 13.5px; line-height: 1.4; box-shadow: 0 12px 28px rgba(16, 35, 71, .22); pointer-events: none; }
#flow-tip[hidden] { display: none !important; }
.tofs-shell .cfa-rail {
  display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding: 10px; border-radius: 14px;
  border: 1px solid #E6E8EC; max-height: 280px; overflow: auto;
  background: radial-gradient(circle at 1px 1px, #E6E8EC 1px, transparent 0) 0 0 / 14px 14px, #FCFCFD;
}
.tofs-shell .cfa-chip { width: 168px; min-height: 78px; padding: 8px 10px; }
.tofs-shell .cfa-hub { min-height: 120px; justify-content: center; }
.tofs-shell .flow-note { margin: 8px 0 0; color: #6B7280; font-size: 12.5px; }
.tofs-shell .flow-drawer {
  margin-top: 12px; background: #FCFCFD; border: 1px dashed #E5E7EB; border-radius: 12px; padding: 12px 14px; min-height: 48px; color: #6B7280;
}
.tofs-shell .flow-drawer.is-live { background: #fff; border-style: solid; border-color: #E6E8EC; color: #1F2937; }
.tofs-shell .flow-drawer h4 { margin: 0 0 4px; color: #102347 !important; font-size: 15px; }
.tofs-shell .flow-intro { margin: 0; color: #4B5563; font-size: 13.5px; }
.tofs-shell .flow-list { margin: 8px 0 0; padding-left: 18px; color: #1F2937; }
.tofs-shell .flow-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 14px; margin: 10px 0 0; }
.tofs-shell .flow-kv dt { color: #6B7280; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.tofs-shell .flow-kv dd { margin: 2px 0 0; color: #102347; font-size: 14px; }
.tofs-shell .tofs-incident-result.flow-linked { box-shadow: 0 0 0 2px #E86B40; border-radius: 12px; }

@media (max-width: 1280px) {
  .tofs-shell .flow-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tofs-shell .flow-col:nth-child(3)::before, .tofs-shell .flow-col:nth-child(3)::after { content: none; }
}
@media (max-width: 900px) {
  .tofs-shell .flow-cols { grid-template-columns: 1fr; gap: 16px; }
  .tofs-shell .flow-col:not(:last-child)::before, .tofs-shell .flow-col:not(:last-child)::after { content: none; }
  .tofs-shell .flow-head, .tofs-shell .flow-legend { flex-direction: column; align-items: flex-start; }
  .tofs-shell .cfa-net { grid-template-columns: 1fr; gap: 8px; }
  .tofs-shell .net-arm { width: 2px; height: 16px; justify-self: center; }
  .tofs-shell .cfa-chip { width: calc(50% - 8px); }
}
@media (prefers-reduced-motion: reduce) {
  .tofs-shell .flow-col, .tofs-shell .flow-node, .tofs-shell .flow-col::before, .tofs-shell .net-arm { animation: none !important; }
}
