/* Finance journey migrated from the independent 4208 site; styles stay local. */
#agents.finance-journey, .journey-dialog {
  --navy: #17233a; --text: #5f6e83; --line-2: #e8edf4;
  --green: #26a778; --green-soft: #eaf8f2; --amber: #d58b22; --amber-soft: #fff5df;
  --red: #d85c57; --red-soft: #fff0ef; --shadow-soft: 0 12px 36px rgba(43,72,122,.08);
  color: var(--navy); line-height: 1.7;
}
#agents { scroll-margin-top: 32px; padding-top: 64px; }
#agents .journey-intro { max-width: 100%; margin: 0 auto 40px; text-align: center; }
#agents .journey-intro .eyebrow { margin-bottom: 16px; }
#agents .journey-intro h2 { margin: 0; font-size: clamp(44px, 4.8vw, 64px); line-height: 1.24; letter-spacing: -.045em; font-weight: 650; }
#agents .journey-intro h2 em { color: #75849b; font-style: normal; }
#agents .journey-summary { max-width: 100%; margin: 18px auto 0; color: var(--text); font-size: 16px; white-space: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
#agents .journey-summary > span { display: block; width: max-content; margin-inline: auto; }
#agents .journey-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; margin-bottom: 24px; }
#agents .journey-tabs button { min-height: 82px; display: grid; grid-template-columns: 42px 1fr auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fafbfd; color: #6d7b8f; padding: 14px 17px; cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s, color 0.2s; }
#agents .journey-tabs button b { font-size: 26px; line-height: 1; }
#agents .journey-tabs button span { font-size: 14px; }
#agents .journey-tabs button i { font-size: 25px; font-style: normal; font-weight: 300; }
#agents .journey-tabs button:hover { border-color: #aac2ee; color: var(--blue); }
#agents .journey-tabs button.active { color: var(--blue); background: #edf4ff; border-color: #8eb1f2; }
#agents .journey-playback { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: -6px 0 24px; color: #8090a5; font-size: 12px; }
#agents [data-journey-status] { display: inline-flex; align-items: center; gap: 8px; }
#agents [data-journey-status]:before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: #bac6d7; }
#agents[data-journey-playback="playing"] [data-journey-status]:before { background: var(--blue); box-shadow: 0 0 0 4px #edf4ff; }
#agents .journey-pause { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #607595; font: inherit; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
#agents .journey-pause:hover { border-color: #aac2ee; background: #f7faff; color: var(--blue); }
#agents .journey-pause[data-paused="true"] { color: var(--blue); border-color: #bfd3f8; background: #f3f7ff; }
#agents [data-journey-pause-icon] { width: 12px; text-align: center; line-height: 1; font-size: 12px; }
#agents .journey-panel { min-height: 500px; display: grid; grid-template-columns: 0.74fr 1.26fr; gap: 62px; align-items: center; }
#agents .journey-copy > p:first-child { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
#agents .journey-copy > p:first-child i { margin: 0 6px; color: #99a7ba; font-style: normal; }
#agents .journey-copy h3 { margin: 24px 0 18px; font-size: 34px; line-height: 1.35; letter-spacing: -0.035em; }
#agents .journey-copy > p:nth-of-type(2) { color: var(--text); font-size: 16px; }
#agents .journey-copy ul { list-style: none; margin: 23px 0 24px; padding: 0; }
#agents .journey-copy li { position: relative; padding: 7px 0 7px 24px; color: #526179; font-size: 14px; }
#agents .journey-copy li:before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
#agents .text-link { border: 0; background: transparent; color: var(--blue); padding: 5px 0; font-weight: 700; cursor: pointer; }
#agents .text-link span { margin-left: 10px; }
#agents .product-window { border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-soft); overflow: hidden; }
#agents .product-titlebar { height: 50px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: #f9fafd; border-bottom: 1px solid var(--line-2); color: #6e7c8f; font-size: 12px; }
#agents .product-titlebar:before { content: "•••"; letter-spacing: 3px; color: #bbc4d0; margin-right: -55%; }
#agents .product-titlebar em { color: var(--green); font-style: normal; font-size: 10px; }
#agents .expense-flow { min-height: 370px; display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 20px; padding: 26px; background: #fbfcfe; }
#agents .receipt-stack { min-height: 300px; position: relative; }
#agents .receipt { position: absolute; border: 1px solid #e1e6ee; background: #fff; border-radius: 8px; padding: 17px; box-shadow: 0 13px 32px rgba(46, 72, 112, 0.09); display: flex; flex-direction: column; }
#agents .receipt span { color: #77869b; font-size: 10px; }
#agents .receipt b { margin-top: 10px; font-size: 16px; }
#agents .receipt small { margin-top: 20px; color: #8d98a8; font-size: 9px; }
#agents .receipt-back { width: 72%; height: 145px; left: 4%; top: 22px; transform: rotate(-7deg); background: #f1f5fb; }
#agents .receipt-front { width: 84%; min-height: 200px; left: 11%; top: 36px; transform: rotate(3deg); }
#agents .receipt-front:after { content: "发票章"; position: absolute; right: 18px; bottom: 20px; width: 52px; height: 52px; border: 2px solid rgba(216, 92, 87, 0.5); color: rgba(216, 92, 87, 0.65); display: grid; place-items: center; border-radius: 50%; font-size: 9px; }
#agents .camera-button { position: absolute; left: 20%; bottom: 5px; display: flex; align-items: center; gap: 8px; color: var(--blue); background: #fff; border: 1px solid #bed1f4; border-radius: 99px; padding: 8px 13px; box-shadow: 0 8px 22px rgba(45, 103, 232, 0.12); font-size: 10px; }
#agents .camera-button i { font-style: normal; font-size: 16px; }
#agents .auto-form { border: 1px solid var(--line-2); border-radius: 9px; padding: 17px; background: #fff; }
#agents .ai-status, #agents .policy-check { display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 11px; }
#agents .ai-status { background: #edf4ff; color: #31588f; }
#agents .ai-status > i { width: 28px; height: 28px; display: grid; place-items: center; background: var(--blue); color: #fff; border-radius: 50%; font-style: normal; }
#agents .ai-status > span, #agents .policy-check > span { display: flex; flex-direction: column; flex: 1; }
#agents .ai-status b, #agents .policy-check b { font-size: 11px; }
#agents .ai-status small, #agents .policy-check small { color: #74869f; font-size: 9px; }
#agents .ai-status em { font-size: 10px; color: var(--blue); font-style: normal; }
#agents .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 13px 0; }
#agents .form-grid label { min-height: 58px; border: 1px solid var(--line-2); border-radius: 7px; padding: 9px 11px; display: flex; flex-direction: column; }
#agents .form-grid label span { color: #8793a4; font-size: 9px; }
#agents .form-grid label b { margin-top: 4px; font-size: 11px; font-weight: 600; }
#agents .policy-check { background: var(--green-soft); }
#agents .policy-check > i { color: var(--green); font-style: normal; font-weight: 800; }
#agents .form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#agents .form-actions button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 7px 11px; font-size: 9px; cursor: pointer; }
#agents .form-actions .submit-expense { background: var(--blue); color: #fff; border-color: var(--blue); }
#agents .product-window > footer { border-top: 1px solid var(--line-2); padding: 10px 18px; color: #8a96a7; font-size: 9px; }

#agents .audit-product-body { min-height: 370px; display: grid; grid-template-columns: 168px 1fr; }
#agents .audit-product-body > aside { padding: 16px 10px; background: #f5f7fa; border-right: 1px solid var(--line-2); }
#agents .audit-product-body > aside > b { display: block; padding: 3px 8px 12px; font-size: 11px; }
#agents .audit-product-body > aside button { width: 100%; border: 0; border-radius: 7px; background: transparent; padding: 10px 8px; display: flex; flex-direction: column; text-align: left; cursor: default; }
#agents .audit-product-body > aside button.active { background: #fff; box-shadow: 0 6px 18px rgba(41, 64, 100, .08); }
#agents .audit-product-body > aside button span { font-size: 9px; font-weight: 700; }
#agents .audit-product-body > aside button small { color: #8895a7; font-size: 7px; }
#agents .audit-product-main { padding: 21px; }
#agents .audit-product-main > header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-2); padding-bottom: 14px; }
#agents .audit-product-main > header > div { display: flex; flex-direction: column; }
#agents .audit-product-main > header small { color: #8895a7; font-size: 8px; }
#agents .audit-product-main > header b { font-size: 12px; }
#agents .audit-product-main > header > span { color: var(--amber); background: var(--amber-soft); border-radius: 99px; padding: 4px 7px; font-size: 8px; }
#agents .audit-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 14px 0; }
#agents .audit-kpis span { display: flex; flex-direction: column; background: #f6f8fb; border-radius: 7px; padding: 10px; }
#agents .audit-kpis small { color: #8995a7; font-size: 8px; }
#agents .audit-kpis b { font-size: 12px; }
#agents .risk-finding { display: flex; gap: 10px; padding: 13px; border: 1px solid #f1d9a7; border-radius: 7px; background: var(--amber-soft); }
#agents .risk-finding > i { width: 24px; height: 24px; flex: none; display: grid; place-items: center; color: #fff; background: var(--amber); border-radius: 50%; font-style: normal; font-weight: 800; font-size: 10px; }
#agents .risk-finding b { font-size: 10px; }
#agents .risk-finding p { margin: 3px 0; color: #746344; font-size: 8px; line-height: 1.55; }
#agents .risk-finding small { color: #a08a62; font-size: 7px; }
#agents .evidence-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
#agents .evidence-row span { border: 1px solid var(--line); border-radius: 99px; padding: 3px 7px; color: #718096; font-size: 7px; }

#agents .accounting-body { min-height: 370px; display: grid; grid-template-columns: .68fr 1.32fr; gap: 15px; padding: 22px; background: #f8fafe; }
#agents .source-facts > p { margin: 0 0 9px; color: #7c899b; font-size: 9px; }
#agents .source-facts article { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; margin-bottom: 7px; padding: 10px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; }
#agents .source-facts article > i { width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue); background: #edf4ff; border-radius: 7px; font-style: normal; font-size: 9px; font-weight: 800; }
#agents .source-facts article > span { display: flex; flex-direction: column; }
#agents .source-facts article b { font-size: 9px; }
#agents .source-facts article small { color: #8c98a9; font-size: 7px; }
#agents .source-facts article em { color: var(--green); font-size: 7px; font-style: normal; }
#agents .voucher { align-self: start; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#agents .voucher > header { padding: 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
#agents .voucher > header span { display: flex; flex-direction: column; }
#agents .voucher > header small { color: #8995a7; font-size: 7px; }
#agents .voucher > header b { font-size: 10px; }
#agents .voucher > header em { color: var(--blue); background: #edf4ff; border-radius: 99px; padding: 4px 7px; font-size: 7px; font-style: normal; }
#agents .voucher-row { display: grid; grid-template-columns: 1.35fr 1.1fr .55fr .55fr; align-items: center; }
#agents .voucher-row > * { min-width: 0; padding: 10px 7px; border-bottom: 1px solid var(--line-2); font-size: 7px; font-style: normal; }
#agents .voucher-row.head { background: #f6f8fb; color: #7f8b9d; }
#agents .voucher-row b { font-weight: 600; }
#agents .voucher-row i { text-align: right; }
#agents .voucher > footer { display: flex; justify-content: space-between; padding: 12px; color: var(--green); background: var(--green-soft); font-size: 8px; }

#agents .tax-body { min-height: 370px; display: grid; grid-template-columns: .78fr 1.22fr; gap: 15px; padding: 22px; background: #f8fafe; }
#agents .risk-map, #agents .tax-findings { border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
#agents .risk-map > header { padding: 14px; display: flex; justify-content: space-between; }
#agents .risk-map > header > span { display: flex; flex-direction: column; }
#agents .risk-map header small { color: #8995a7; font-size: 7px; }
#agents .risk-map header b { font-size: 14px; }
#agents .risk-map header em { color: var(--red); font-size: 7px; font-style: normal; }
#agents .risk-orbits { height: 240px; position: relative; }
#agents .risk-orbits:before, #agents .risk-orbits:after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1px solid #dae4f1; border-radius: 50%; }
#agents .risk-orbits:before { width: 190px; height: 190px; }
#agents .risk-orbits:after { width: 125px; height: 125px; }
#agents .risk-orbits > strong { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 78px; height: 78px; display: grid; place-items: center; background: var(--navy); color: #fff; border-radius: 50%; font-size: 24px; }
#agents .risk-orbits > strong small { display: block; margin-top: -18px; color: #9aacc5; font-size: 7px; font-weight: 400; }
#agents .risk-orbits > i { position: absolute; z-index: 2; min-width: 47px; padding: 5px 7px; color: #5e6f87; background: #edf4ff; border: 1px solid #cbdcf8; border-radius: 99px; font-size: 7px; font-style: normal; }
#agents .risk-orbits > i b { color: var(--red); margin-left: 5px; }
#agents .risk-orbits > i:nth-child(1) { left: 10%; top: 28%; }
#agents .risk-orbits > i:nth-child(2) { right: 7%; top: 19%; }
#agents .risk-orbits > i:nth-child(3) { right: 10%; bottom: 23%; }
#agents .risk-orbits > i:nth-child(4) { left: 12%; bottom: 17%; }
#agents .tax-findings > header { display: flex; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--line-2); }
#agents .tax-findings > header b { font-size: 11px; }
#agents .tax-findings > header span { color: var(--blue); font-size: 8px; }
#agents .tax-findings article { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line-2); }
#agents .tax-findings article > i { width: 27px; height: 27px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); border-radius: 50%; font-size: 8px; font-style: normal; font-weight: 800; }
#agents .tax-findings article > i.medium { color: var(--amber); background: var(--amber-soft); }
#agents .tax-findings article > div { display: flex; flex-direction: column; }
#agents .tax-findings article b { font-size: 9px; }
#agents .tax-findings article small { color: #8794a6; font-size: 7px; }
#agents .tax-findings article em { color: var(--blue); font-size: 7px; font-style: normal; }

#agents .close-body { min-height: 370px; padding: 22px; background: #f8fafe; }
#agents .close-body > header { display: grid; grid-template-columns: 155px 1fr 40px; align-items: center; gap: 12px; margin-bottom: 17px; }
#agents .close-body > header > div { display: flex; flex-direction: column; }
#agents .close-body > header small { color: #8995a7; font-size: 7px; }
#agents .close-body > header b { font-size: 14px; }
#agents .close-body > header > span { height: 6px; overflow: hidden; background: #e4eaf2; border-radius: 99px; }
#agents .close-body > header > span i { display: block; height: 100%; background: var(--blue); }
#agents .close-body > header > em { color: var(--blue); font-size: 9px; font-style: normal; }
#agents .close-lanes { border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
#agents .close-lanes article { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
#agents .close-lanes article:last-child { border-bottom: 0; }
#agents .close-lanes article > span { width: 30px; height: 30px; display: grid; place-items: center; color: #8491a4; background: #f1f4f8; border-radius: 50%; font-size: 8px; }
#agents .close-lanes article > div { display: flex; flex-direction: column; }
#agents .close-lanes article b { font-size: 9px; }
#agents .close-lanes article small { color: #8794a6; font-size: 7px; }
#agents .close-lanes article > em { color: #8390a2; background: #f1f4f8; border-radius: 99px; padding: 4px 7px; font-size: 7px; font-style: normal; }
#agents .close-lanes article.done > span { color: var(--green); background: var(--green-soft); }
#agents .close-lanes article.done > em { color: var(--green); background: var(--green-soft); }
#agents .close-lanes article.running { background: #f5f8fd; }
#agents .close-lanes article.running > span { color: var(--blue); background: #edf4ff; }
#agents .close-lanes article.running > em { color: var(--blue); background: #edf4ff; }
#agents .close-lanes article.blocked > span { color: var(--amber); background: var(--amber-soft); }
#agents .close-lanes article.blocked > em { color: var(--amber); background: var(--amber-soft); }


#agents .journey-panel > *, #agents .journey-visual { min-width: 0; }
#agents .journey-copy > p:first-child { font-size: 12px; }
#agents .journey-copy h3 { font-weight: 650; }
#agents .journey-tabs button { grid-template-columns: 34px 1fr auto; gap: 8px; padding: 14px; }
#agents .journey-tabs #journey-tab-expense { grid-template-columns: 42px 1fr auto; }
#agents .journey-tabs #journey-tab-expense b { font-size: 21px; white-space: nowrap; }
#agents .journey-tabs button span { white-space: nowrap; }
#agents .journey-tabs button i { font-size: 22px; }
#agents .text-link { font-size: 16px; }
#agents .journey-visual { align-self: center; }
#agents :focus-visible, .journey-dialog :focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
#agents .journey-panel:focus-visible { outline-offset: 10px; }
body.journey-dialog-open { overflow: hidden; }
.journey-dialog { position: fixed; inset: 0 0 0 auto; width: min(640px, 94vw); height: 100dvh; max-height: 100dvh; max-width: none; margin: 0; padding: 0; border: 0; background: #fff; box-shadow: -26px 0 70px rgba(20,35,60,.2); overflow-y: auto; overscroll-behavior: contain; }
.journey-dialog::backdrop { background: rgba(12,22,39,.48); backdrop-filter: blur(4px); }
.journey-sheet-close { position: absolute; right: 24px; top: 20px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #647389; font-size: 24px; cursor: pointer; }
.journey-sheet-content { padding: 78px 44px 40px; }
.journey-sheet-label { margin: 0 0 14px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.journey-sheet-content h2 { margin: 0 0 18px; font-size: 32px; line-height: 1.35; letter-spacing: -.035em; }
.journey-sheet-content > p:not(.journey-sheet-label) { color: var(--text); font-size: 16px; }
.journey-sheet-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
.journey-sheet-metrics span { display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: #7b899c; font-size: 12px; }
.journey-sheet-metrics b { color: var(--navy); font-size: 18px; }
.journey-sheet-flow { margin: 32px 0; border-top: 1px solid var(--line); }
.journey-sheet-flow article { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.journey-sheet-flow article > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); background: #edf4ff; border-radius: 50%; font-size: 12px; font-weight: 700; }
.journey-sheet-flow h3 { margin: 0 0 4px; font-size: 16px; }
.journey-sheet-flow p { margin: 0; color: var(--text); font-size: 14px; }
.journey-sheet-note { border-left: 3px solid var(--blue); background: #f3f7fd; padding: 16px 18px; color: #53647d; font-size: 14px; }
.journey-sheet-content > p.journey-demo-note { margin-top: 24px; font-size: 12px; color: #7b899c; }
@media (max-width: 1100px) {
  #agents .journey-panel { gap: 35px; }
  #agents .journey-tabs button { grid-template-columns: 28px 1fr auto; padding: 14px 10px; }
}
@media (max-width: 900px) {
  #agents .journey-tabs { overflow-x: auto; grid-template-columns: repeat(5, minmax(180px, 1fr)); padding: 4px 4px 12px; margin-inline: -4px; scroll-padding-inline: 4px; }
  #agents .journey-panel { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  #agents .journey-copy { max-width: 620px; }
}
@media (max-width: 640px) {
  #agents .journey-playback { gap: 10px; align-items: flex-start; margin-top: -2px; font-size: 11px; }
  #agents [data-journey-status] { padding-top: 8px; line-height: 1.7; }
  #agents .journey-pause { min-height: 36px; padding-inline: 10px; }
  #agents .journey-intro { margin-bottom: 28px; }
  #agents .journey-intro h2 { font-size: clamp(27px, 7.3vw, 44px); letter-spacing: -.045em; }
  #agents .journey-summary { font-size: 15px; }
  #agents .journey-panel { gap: 28px; }
  #agents .journey-copy h3 { font-size: 28px; }
  /* Keep the page steady while different-length mobile demos rotate. */
  #agents .product-window { height: 560px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bdccec #f4f7fc; }
  #agents .expense-flow { grid-template-columns: 1fr; padding: 14px; }
  #agents .receipt-stack { min-height: 260px; }
  #agents .auto-form { padding: 12px; }
  #agents .product-titlebar { padding: 0 12px; gap: 10px; font-size: 11px; }
  #agents .product-titlebar:before { display: none; }
  #agents .form-grid { grid-template-columns: 1fr; }
  #agents .audit-product-body { grid-template-columns: 1fr; }
  #agents .audit-product-body > aside { display: none; }
  #agents .audit-product-main { padding: 14px; }
  #agents .accounting-body, #agents .tax-body { grid-template-columns: 1fr; padding: 14px; }
  #agents .tax-findings article { padding: 12px; gap: 7px; }
  #agents .close-body { padding: 14px; }
  #agents .close-body > header { grid-template-columns: 115px 1fr 34px; }
  .journey-sheet-content { padding: 72px 22px 30px; }
  .journey-sheet-content h2 { font-size: 28px; }
  .journey-sheet-metrics span { padding: 10px 8px; }
  .journey-sheet-metrics b { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #agents .journey-tabs button, #agents .journey-pause { transition: none; }
}
