@import url("/assets/ui/interface-typography.css");
@import url("/assets/ui/typography-sizes.css");
@import url("/assets/ui/icon-motion.css");
@import url("/assets/ui/logo-sizes.css");
/* Shared screen presentation only. No auth, workflow, print, or document-export rules. */
:root {
  --dj-font: "DengXian", "等线", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --dj-heading: var(--dj-primary);
  --dj-text: var(--dj-primary);
  --dj-muted: #60776c;
  --dj-background: #f7faf8;
  --dj-surface: #ffffff;
  --dj-line: #d9e3dd;
  --dj-soft: #edf3ef;
  --dj-primary: #24483E;
  --dj-gold: #d18100;
  --dj-danger: #a12b25;
  --dj-warning: #795013;
  --dj-success: #256344;
}
@media screen {
  /* Explicit shared priority keeps independent legacy page bundles consistent. */
  body {
    --text: var(--dj-text); --muted: var(--dj-muted); --line: var(--dj-line);
    --green: var(--dj-primary); --blue: var(--dj-primary); --blue-soft: var(--dj-soft); --paper: var(--dj-surface); --soft: var(--dj-background);
    --navy-800: var(--dj-heading); --navy-900: var(--dj-heading); --navy-950: var(--dj-heading); --navy-980: var(--dj-heading);
    --admin-blue: var(--dj-primary); --admin-navy: var(--dj-heading); --admin-bg: var(--dj-background);
    --admin-line: var(--dj-line); --admin-text: var(--dj-text); --admin-muted: var(--dj-muted); --admin-paper: var(--dj-surface);
    --dw-blue: var(--dj-primary); --dw-ink: var(--dj-heading); --dw-muted: var(--dj-muted); --dw-border: var(--dj-line); --dw-soft: var(--dj-soft);
    --home-ink: var(--dj-heading); --home-muted: var(--dj-muted); --home-line: var(--dj-line);
    background:var(--dj-background); color:var(--dj-text);
    font-size:16px; line-height:1.7;
  }
  body, body * { font-family:var(--dj-font); font-weight:400; }

  h1,h2,h3,h4,h5,h6,strong,b,th,button,[role="button"],.button,.btn,[class$="-brand"] { font-weight:400; }
  h1,h2,h3,h4,h5,h6 { color:var(--dj-heading); line-height:1.45; }
  h1 { font-size:20px; } h2 { font-size:20px; } h3 { font-size:16px; }
  h4,h5,h6 { font-size:14px; }
  small,label,th,td,figcaption,[class*="subtitle"],[class*="kicker"],[class*="badge"],[class*="caption"] { font-size:12px; }
  small,[class*="muted"],[class*="subtitle"],[class*="hint"],[class*="caption"] { color:var(--dj-muted); }
  a { color:var(--dj-text); }
  input,textarea,select { color:var(--dj-heading); background-color:var(--dj-surface); border-color:var(--dj-line); }
  input::placeholder,textarea::placeholder { font-family:var(--dj-font); font-weight:400; color:var(--dj-muted); opacity: 1; }
  button,.button,.btn,.home-button,[role="button"],[class$="-button"],a.dw-btn {
    color:var(--dj-text); background:var(--dj-surface);
    border-color:var(--dj-line); font-weight:400;
  }
  form button:not([type="button"]):not([type="reset"]):not(.danger),button[type="submit"],.button-primary,.btn-primary,.primary,.login-submit,.home-button-primary,.home-login,.dw-btn.primary,.wb-primary,.wb-send {
    color:#ffffff; background:var(--dj-primary); border-color:var(--dj-primary);
  }
  :is(#case-start-page,#case-claim-goal-page,#evidence-types-page,#case-analysis-page,#evidence-list-page,#case-draft-page) .button-primary {
    color:#fff; background:var(--dj-primary); border-color:var(--dj-primary);
    box-shadow:0 3px 12px #24483e18;
  }
  :is(button,.button,.btn,[role="button"],input,select,textarea,a):focus-visible { outline: 2px solid var(--dj-primary) !important; outline-offset: 3px !important; }
  :is(button,input,select,textarea):disabled,[aria-disabled="true"] { opacity: .65; cursor: not-allowed; }
  :is(.admin-sidebar,.admin-topbar,.commerce-header,.home-header,.login-brand-footer,.home-footer,.admin-version) {
    background:var(--dj-surface); color:var(--dj-text); border-color:var(--dj-line);
  }
  .admin-sidebar nav a:hover,.admin-sidebar nav a.active,[role="tab"][aria-selected="true"] { background:var(--dj-soft); color:var(--dj-heading); }
  .market-sidebar,.wb-sidebar,.lc-sidebar,body[data-onboarding-theme="home"]>header { background:var(--dj-surface); color:var(--dj-text); border-color:var(--dj-line); }
  .market-sidebar nav [aria-current],.wb-sidebar nav a.is-active,.lc-sidebar nav [aria-current] { background:var(--dj-soft); color:var(--dj-heading); }
  .wb-brand-mark,.wb-user-avatar,.market-avatar { background:var(--dj-soft); color:var(--dj-heading); }
  .dw-path a.active { background:var(--dj-primary); color:#fff; }
  .dw-path a.active>span { color:var(--dj-heading); }
  .market-row-action,.wb-shell .wb-warning { font-size:12px; }
  .market-page .market-row-action { color:var(--dj-text); }
  .market-sidebar nav small { color:var(--dj-text); }
  .market-steps li>span { background:var(--dj-soft); color:var(--dj-heading); }
  .market-steps li.active>span { background:var(--dj-primary); color:#fff; }
  .market-state-dot { background:var(--dj-muted); color:#fff; }
  .passed .market-state-dot { background:var(--dj-success); }
  .missing .market-state-dot,.suggestion .market-state-dot { background:var(--dj-warning); }
  .market-list-icon { color:#fff; }
  .admin-sidebar nav a.active,.market-sidebar nav a[aria-current] { border-left-color:var(--dj-primary); }
  .hero { background:var(--dj-soft); color:var(--dj-text); }
  .cd-page { --cd-ink: var(--dj-heading); --cd-muted: var(--dj-muted); --cd-line: var(--dj-line); }
  .cd-page .cd-sidebar { background:var(--dj-surface); color:var(--dj-text); }
  .cd-page .cd-sidebar nav a[aria-current] { background:var(--dj-soft); color:var(--dj-heading); }
  .cd-page .cd-action { background:var(--dj-surface); border-color:var(--dj-line); }
  .case-brand small { color:var(--dj-text); }
  .case-progress .is-active span { background:var(--dj-primary); color:#fff; }
  .cd-page .cd-badge { background:var(--dj-warning); color:#fff; }
  .cd-page .cd-step-dot { color:#fff; }
  .toast { background:var(--dj-primary); color:#fff; }
  .toast.error { background:var(--dj-danger); color:#fff; }
  .lawyer-portal-shell,.lawyer-cases-view,.lawyer-case-table-card { min-width: 0; max-width: 100%; }
  .dw-form label,.dw-form select { min-width: 0; max-width: 100%; }
  .dw-form select { width: 100%; }
  .dw-card form label,.dw-card form select { min-width: 0; max-width: 100%; }
  .dw-card form select { width: 100%; }
  :is(.admin-panel,.commerce-card,.dw-card,.login-form-panel,dialog) { background-color:var(--dj-surface); border-color:var(--dj-line); box-shadow:0 3px 14px #24483e08; }
  :is(.site,.home-frost,.commerce-page,.case-start-page,.lawyer-apply-page,.lawyer-portal-page) { background:var(--dj-background); }
  .home-brand strong,.admin-brand,.commerce-brand { font-size:16px; font-weight:400; color:var(--dj-heading); }
  .home-brand small,.home-nav-links a,.login-home-link { font-size:12px; }
  .home-nav-links a:not(.login-home-link) { font-weight:400; }
  .login-home-link { font-weight:400; color:#fff; background:var(--dj-primary); }
  .home-hero h1 { font-size:28px; }
  .login-footer-right p,.home-footer-note { font-size:14px; font-weight:400; transform:none; color:var(--dj-text); }
  .login-footer-right small { font-size:12px; }
  :is(#login-page,#lawyer-login-page) .login-main::before { background:var(--dj-background); filter:none; }
  :is(#login-page,#lawyer-login-page) .login-form-panel::before { opacity: 0; }
  :is(#login-page,#lawyer-login-page) .login-role-switch a { font-size:14px; font-weight:400; }
  :is(#login-page,#lawyer-login-page) .password-field-label { font-size:12px; }
  :is(#login-page,#lawyer-login-page) .login-field-row input { font-size:12px; }
  :is(#login-page,#lawyer-login-page) .password-options,
  :is(#login-page,#lawyer-login-page) .password-options :is(label,button) { font-size:12px; }
  :is(#login-page,#lawyer-login-page) .login-submit { font-size:16px; }
  :is(#login-page,#lawyer-login-page) :is(.register-line,.register-line button,.email-login-panel summary) { font-size:12px; }
  /* Status meaning remains distinguishable by text/icon AND its own accessible color. */
  :is(.error,.danger,.is-danger,.is-error,.FAILED,.REJECTED,.RETURNED,.CONFLICT,[class$="-error"],[class$="-danger"],[data-tone="danger"],[data-tone="error"]) { color:var(--dj-danger); }
  :is(.warn,.warning,.risk,.blocked,.stale,.is-warning,.RUNNING,.QUEUED,.NEEDS_CLARIFICATION,.STALE,.PENDING_VERIFICATION,.missing .market-state,[class$="-warning"],[data-tone="warning"],.commerce-alert) { color:var(--dj-warning); }
  :is(.success,.ok,.is-success,.COMPLETED,.PUBLISHED,.APPROVED,.ACCEPTED,.CLEAR,.passed .market-state,[class$="-success"],[data-tone="success"]) { color:var(--dj-success); }
  .toast.ok { background:var(--dj-success); color:#fff; }
  :is(button,.button,.btn).danger { color:var(--dj-danger); background:#fff5f3; border-color:#deb4ae; }
  @media(max-width:600px) {
    .admin-content { min-width: 0; }
    #case-claim-goal-page input:not([type="checkbox"]):not([type="radio"]) { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
    .admin-panel,.card,.panel { max-width: 100%; overflow-x: auto; }
    input:not([type="checkbox"]):not([type="radio"]),select,textarea,
    :is(#login-page,#lawyer-login-page) .login-field-row input { font-size:16px; }
  }
}

/* Typography follows the approved homepage, while the visible homepage keeps
   its own exact cascade. Screen UI only; print/export typography is unchanged. */
@font-face { font-family: DongjuDengXian; src: url('/assets/home/garden/dengxian-ui.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: DongjuDengXian; src: url('/assets/home/garden/dengxian-ui-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: DongjuSimHei; src: url('/assets/home/garden/simhei-ui.woff2') format('woff2'); font-weight: 400; font-display: swap; }
:root {
  --dj-type-page: 24px;
  --dj-type-section: 22px;
  --dj-type-subsection: 18px;
  --dj-type-body: 16px;
  --dj-type-note: 14px;
  --dj-type-title-line: 32px;
  --dj-type-body-line: 24px;
}
@media screen {
  /* SPA auth/home stays inside .site.psd-home; its hidden state follows the
     existing router. Independent customer/lawyer/admin pages have no such host. */
  body:not(:has(> .site.psd-home:not([hidden]))) {
    --dj-font: DongjuDengXian, DengXian, "等线", sans-serif;
    --dj-heading: var(--dj-primary);
    --dj-text: #33454b;
    --dj-muted: #667078;
    font-family:var(--dj-font);
    font-size:var(--dj-type-body);
    font-weight:400;
    line-height: 1.5;
  }
  body:not(:has(> .site.psd-home:not([hidden]))) * {
    font-family:inherit;
    font-size:inherit;
    font-weight:inherit;
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(h1,[role="heading"][aria-level="1"],.wb-topbar strong) {
    font-size:var(--dj-type-page);
    font-weight:700;
    line-height:var(--dj-type-title-line);
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(h2,[role="heading"][aria-level="2"]) {
    font-size:var(--dj-type-section);
    font-weight:400;
    line-height:var(--dj-type-title-line);
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(h3,[role="heading"][aria-level="3"],.cd-action strong,.case-brand strong,.brand-copy strong,.wb-brand-copy strong,.cd-brand strong,.lc-brand strong,.market-brand strong,.admin-brand,.commerce-brand) {
    font-size:var(--dj-type-subsection);
    font-weight:700;
    line-height:1.5;
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(h4,h5,h6,strong,b,th) {
    font-weight:700;
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(p,li,td,label,input,textarea,select,button,.button,.btn,.dw-btn,[role="button"],summary) {
    font-size:var(--dj-type-body);
    line-height:var(--dj-type-body-line);
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(small,th,figcaption,[class*="subtitle"],[class*="kicker"],[class*="badge"],[class*="caption"],[class*="muted"],[class*="hint"],[class*="note"],.help,.case-field-helper,.case-field-error,.admin-version,.market-row-action,.wb-composer-meta,.wb-text-button,.security-status) {
    font-size:var(--dj-type-note);
    line-height:1.6;
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(.button-primary,.btn-primary,.primary,.login-submit,.wb-primary,.wb-send,button[type="submit"],.cd-action strong) {
    font-size:var(--dj-type-subsection);
    line-height:var(--dj-type-body-line);
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(.nav-links,.home-nav-links) > a {
    font-family:DongjuSimHei, SimHei, "黑体", sans-serif;
    font-size:20px;
    line-height:26px;
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(input,textarea,select) {
    color:var(--dj-text);
    font-weight:400;
  }
  body:not(:has(> .site.psd-home:not([hidden]))) :is(input,textarea)::placeholder {
    font-family:inherit;
    font-size:inherit;
    font-weight:400;
    color:var(--dj-muted);
    opacity: 1;
  }
  /* This overlay is a body sibling of the homepage host. Give the actual
     typed digits and refresh action the same readable control typography. */
  .human-verification-backdrop {
    --dj-font: DongjuDengXian, DengXian, "等线", sans-serif;
    --dj-heading: var(--dj-primary); --dj-text: #33454b; --dj-muted: #667078;
    font-family:var(--dj-font);
    font-size:var(--dj-type-body);
    font-weight:400;
    color:var(--dj-text);
  }
  .human-verification-backdrop * { font-family:inherit; font-weight:inherit; }
  .human-verification-backdrop h2 { font-size:16px; line-height:var(--dj-type-title-line); }
  .human-verification-backdrop :is(input,button) { font-size:var(--dj-type-body); line-height:var(--dj-type-body-line); }
  .human-verification-backdrop input { color:var(--dj-text); }
  /* Typed input is interface text; the captcha artwork itself is unchanged. */
  .human-verification-backdrop #human-captcha-answer { font-size:16px; line-height:28px; }
  .human-verification-backdrop #human-captcha-answer::placeholder { font-size:16px; }
  .human-verification-backdrop input::placeholder { font-family:inherit; font-size:inherit; font-weight:400; color:var(--dj-muted); opacity: 1; }
  .human-verification-backdrop .human-verification-confirm { font-size:var(--dj-type-body); }
  .human-verification-backdrop .human-verification-dialog > p,
  .human-verification-backdrop .human-verification-error { font-size:14px; line-height: 1.6; overflow-wrap: anywhere; }
  @media(max-width:900px) {
    body:not(:has(> .site.psd-home:not([hidden]))) :is(.nav-links,.home-nav-links) > a { font-size:16px; }
  }
  @media(max-width:480px) {
    body:not(:has(> .site.psd-home:not([hidden]))) :is(.nav-links,.home-nav-links) > a { font-size:16px; }
  }
}

/* Shared interaction and type tokens. Important declarations below protect accessibility. */
:root { --dj-duration:240ms; --dj-ease:cubic-bezier(.2,.7,.2,1); --dj-icon:18px; --dj-type-small:12px; --dj-type-note:14px; --dj-type-body:16px; --dj-type-section:20px; --dj-type-title:28px; --dj-type-display:40px; }
@media screen {
 html body { line-height:1.7; }
 html body :is(h1,h2,h3,h4,h5,h6) { line-height:1.25; }
 html body :is(button,.button,[role="button"],input:not([type="checkbox"]):not([type="radio"]),select) { min-height:44px; }
 html body :is(button,.button,.btn,.primary,.button-primary):disabled { background:var(--dj-soft); color:var(--dj-muted); border-color:var(--dj-line); box-shadow:none; cursor:not-allowed; }
}
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }
 .wb-loading,.wb-spinner,.loading-spinner { animation:none!important; }
}
[data-reduced-motion="true"] *,[data-reduced-motion="true"] *::before,[data-reduced-motion="true"] *::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }

/* One progress component for legacy and current customer pages. */
.dj-steps { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); list-style:none; gap:8px; padding:12px 0; margin:0 0 20px; }
.dj-steps li { display:flex; gap:8px; align-items:center; min-width:0; font-size:14px; color:var(--dj-muted); }
.dj-steps li>span { display:grid; place-items:center; flex:none; width:28px; height:28px; border-radius:50%; background:var(--dj-soft); }
.dj-steps .is-active { color:var(--dj-primary); font-weight:600; }
.dj-steps .is-active>span { color:#fff; background:var(--dj-primary); }
@media(max-width:760px) { .dj-steps {grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px;} .dj-steps li {font-size:12px;} }
/* Keep the shared rail motion current without changing an immutable legacy asset. */
.admin-rail-shell > .admin-sidebar.admin-rail { transition:width 240ms cubic-bezier(.2,.7,.2,1); }
:is(.wb-sidebar,.cd-sidebar,.lc-sidebar,.admin-rail,.market-sidebar) { scrollbar-color:#ffffff33 transparent; }
