/*
 * Clarion interactive demo: styles.
 * A copy of Clarion's real design (src/app/globals.css and the shared components), scoped under .cd
 * so nothing leaks into the TraCarta website. Light theme only. Charcoal for important blocks,
 * purple accent. Google Sans Flex everywhere; Newsreader only for the wordmark and page titles.
 */
@font-face { font-family: "CD Sans"; font-style: normal; font-display: swap; font-weight: 1 1000;
  src: url(fonts/google-sans-flex-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "CD Sans"; font-style: normal; font-display: swap; font-weight: 1 1000;
  src: url(fonts/google-sans-flex-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "CD Serif"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2-variations"); }

.cd {
  --ink: #16171b; --ink2: #3a3c44; --muted: #5b5e66; --faint: #6b6e76;
  --line: #e8e8e3; --line2: #efefea; --bg: #f7f7f5; --char: #1b1c20; --chip: #f1f1ee;
  --ok: #1d6b43; --okbg: #e6f4ec; --warn: #8a4205; --warnbg: #fdf1e4; --bad: #a1231b; --badbg: #fdecea;
  --accent: #7c5cf0; --accent-text: #5b3fd6; --accent-tint: #f0ecfe; --accent-deep: #4a32b8; --accent-line: #ddd3fd;
  --on-dark: #cfc4ff; --ring: rgba(124, 92, 240, .14);
  --sans: "CD Sans", "Google Sans Flex", "Google Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "CD Serif", "Newsreader", Georgia, serif;
  position: relative; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
.cd *, .cd *::before, .cd *::after { box-sizing: border-box; }
.cd a { color: var(--accent-text); text-decoration: none; }
.cd a:hover { color: var(--accent-deep); }
.cd button { font: inherit; color: inherit; }
.cd h1, .cd h2, .cd h3, .cd p, .cd ul, .cd ol { margin: 0; }
.cd ul, .cd ol { padding: 0; list-style: none; }
.cd ::selection { background: var(--accent-tint); }
.cd .serif { font-family: var(--serif); font-variation-settings: "opsz" 72; }
.cd .muted { color: var(--muted); } .cd .faint { color: var(--faint); }
.cd .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.cd .link { font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0; color: var(--accent-text); }
.cd .link:hover { color: var(--accent-deep); }
.cd .num { text-align: right; }
.cd svg { flex-shrink: 0; }
.cd * { scrollbar-width: thin; scrollbar-color: #cfcfc8 transparent; }

/* ---------- demo bar (not part of Clarion; marks this as a demo) ---------- */
.cd-ribbon { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 20px; background: #0f0f12; color: #fff; font-size: 13px; }
.cd-ribbon .tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.cd-ribbon .tag i { width: 8px; height: 8px; border-radius: 50%; background: #9b84ff; box-shadow: 0 0 0 4px rgba(155,132,255,.25); animation: cdpulse 2.4s ease-in-out infinite; }
.cd-ribbon .note { color: #b4b6bd; flex: 1 1 260px; }
.cd-ribbon .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.cd-ribbon button, .cd-ribbon a.rb { height: 30px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cd-ribbon button:hover, .cd-ribbon a.rb:hover { background: rgba(255,255,255,.08); color: #fff; }
.cd-ribbon .rb-main { background: #fff; color: var(--ink); border-color: #fff; }
.cd-ribbon .rb-main:hover { background: #ecebff; color: var(--ink); }
@keyframes cdpulse { 50% { box-shadow: 0 0 0 7px rgba(155,132,255,0); } }

/* ---------- Clarion top menu bar ---------- */
#cd-topwrap { display: contents; }
.cd-top { position: sticky; top: 46px; z-index: 50; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; height: 64px; padding: 0 28px; background: rgba(255,255,255,.95); backdrop-filter: blur(24px); border-bottom: 1px solid var(--line); }
.cd-brand { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); background: none; border: 0; cursor: pointer; padding: 0; justify-self: start; }
.cd-brand b { font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: 26px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.cd-brand span { font-size: 11px; color: var(--faint); white-space: nowrap; }
.cd-tabs { display: flex; height: 64px; max-width: 100%; align-items: stretch; overflow-x: auto; }
.cd-tab { display: inline-flex; height: 64px; align-items: center; gap: 6px; padding: 0 14px; white-space: nowrap; border: 0; background: none; cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.cd-tab:hover { color: var(--ink); }
.cd-tab[aria-current="page"] { font-weight: 600; color: var(--ink); box-shadow: inset 0 -2px 0 var(--char); }
.cd-tab .bdg { display: inline-flex; height: 18px; min-width: 18px; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); padding: 0 6px; font-size: 11px; font-weight: 700; color: #fff; }
.cd-right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.cd-search { display: flex; align-items: center; gap: 8px; height: 36px; width: 210px; padding: 0 8px 0 12px; border-radius: 10px; background: #f2f2ef; color: var(--muted); }
.cd-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 13.5px; color: var(--ink); }
.cd-ibtn { position: relative; display: inline-flex; height: 36px; min-width: 36px; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.cd-ibtn:hover { background: var(--chip); color: var(--ink); }
.cd-ibtn .dot { position: absolute; right: 8px; top: 8px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #fff; background: var(--accent); }
.cd-acct { position: relative; margin-left: 4px; }
.cd-acct > button { display: flex; height: 36px; align-items: center; gap: 4px; padding: 0 6px 0 2px; border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--muted); }
.cd-menu { position: absolute; right: 0; top: 48px; z-index: 80; width: 320px; padding: 8px; border-radius: 20px; border: 1px solid var(--line); background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.16); animation: cdpop .18s ease-out; }
.cd-menu .me { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; padding: 14px 12px; border-radius: 14px; background: var(--char); color: #fff; }
.cd-menu .me .av { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--char); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.cd-menu .mi { display: flex; width: 100%; height: 40px; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); text-align: left; }
.cd-menu .mi:hover { background: var(--chip); }
.cd-menu .mi svg { color: var(--ink2); }
.cd-menu hr { margin: 6px 4px; border: 0; height: 1px; background: var(--line2); }
.cd-av { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; background: var(--char); color: #fff; }
.cd-av.light { background: var(--chip); color: var(--ink2); }

/* ---------- page frame ---------- */
.cd-main { box-sizing: border-box; display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 32px 64px; flex: 1; }
.cd-main.wide { max-width: none; padding-left: 24px; padding-right: 24px; }
.cd-view { display: flex; flex-direction: column; gap: 24px; animation: cdin .4s cubic-bezier(.2,.7,.2,1); }
@keyframes cdin { from { opacity: 0; transform: translateY(6px); } }
.cd-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cd-head > div:first-child { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.cd-title { font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: 40px; font-weight: 450; letter-spacing: -.022em; line-height: 1.08; }
.cd-sub { font-size: 15px; color: var(--muted); }
.cd-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.cd-row { display: flex; flex-wrap: wrap; gap: 16px; }
.cd-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px; }
.cd-card.p0 { padding: 0; }
.cd-ch { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cd-ch h2 { font-size: 17px; font-weight: 600; } .cd-ch p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.cd-dark { background: var(--char); color: #fff; border-radius: 22px; padding: 24px 28px; }

/* ---------- buttons, inputs, pills ---------- */
.cd .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.cd .btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.cd .btn-lg { height: 52px; padding: 0 22px; font-size: 15px; }
.cd .btn-primary { background: var(--char); color: #fff; border-color: var(--char); }
.cd .btn-primary:hover { background: #000; color: #fff; }
.cd .btn-secondary { background: #fff; color: var(--ink); border-color: #dadad4; }
.cd .btn-secondary:hover { border-color: #b9b9b2; color: var(--ink); }
.cd .btn-danger { background: #b3261e; color: #fff; border-color: #b3261e; }
.cd .btn-white { background: #fff; color: var(--ink); border-color: #fff; }
.cd .btn-ghost { background: transparent; color: var(--ink); }
.cd .btn-ghost:hover { background: var(--chip); color: var(--ink); }
.cd .btn:disabled { opacity: .45; pointer-events: none; }
.cd .input { height: 48px; width: 100%; padding: 0 14px; border: 1px solid #d9d9d3; border-radius: 12px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); outline: none; }
.cd .input.sm { height: 36px; padding: 0 10px; font-size: 14px; }
.cd .input.h11 { height: 44px; }
.cd .input[readonly] { background: #f3f3f0; color: var(--muted); }
.cd .textarea { width: 100%; padding: 12px 14px; border: 1px solid #d9d9d3; border-radius: 12px; background: #fff; font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--ink); outline: none; resize: vertical; }
.cd .textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.cd .select { height: 40px; padding: 0 34px 0 12px; border: 1px solid #e1e1dc; border-radius: 11px; appearance: none; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); outline: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235B5E66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center; }
.cd .select.h11 { height: 44px; } .cd .select.h9 { height: 36px; font-size: 13px; } .cd .select.fw { font-weight: 500; }
.cd .input:focus, .cd .textarea:focus, .cd .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.cd .label { font-size: 13px; font-weight: 600; color: #2b2d33; }
.cd .hint { font-size: 12.5px; color: var(--faint); }
.cd .field { display: flex; flex-direction: column; gap: 8px; }
.cd .pill { display: inline-flex; height: 24px; align-items: center; gap: 6px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #ededE8; color: var(--ink2); }
.cd .pill.purple { background: var(--accent-tint); color: var(--accent-deep); }
.cd .pill.green { background: var(--okbg); color: var(--ok); }
.cd .pill.amber { background: var(--warnbg); color: var(--warn); }
.cd .pill.red { background: var(--badbg); color: var(--bad); }
.cd .pill.dark { background: var(--char); color: #fff; }
.cd .chk { width: 18px; height: 18px; accent-color: var(--char); cursor: pointer; margin: 0; }
.cd .chk.s { width: 16px; height: 16px; }
.cd .seg { display: inline-flex; height: 32px; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid #dadad4; background: #fff; color: var(--ink2); }
.cd .seg[aria-pressed="true"] { background: var(--char); border-color: var(--char); color: #fff; }
.cd .seg .n { color: var(--faint); } .cd .seg[aria-pressed="true"] .n { color: #b4b6bd; }
.cd .fychip { display: inline-flex; height: 36px; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; color: var(--ink2); cursor: pointer; }
.cd .fychip:hover { border-color: #cfcfc8; color: var(--ink); }
.cd .fychip[aria-current="page"] { border-color: var(--char); background: var(--char); font-weight: 600; color: #fff; }
.cd .fychip .n { color: var(--faint); } .cd .fychip[aria-current="page"] .n { color: #b4b6bd; }
.cd .alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid; font-size: 14px; line-height: 1.45; }
.cd .alert.info { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-deep); }
.cd .alert.ok { background: var(--okbg); border-color: #cbe6d6; color: var(--ok); }
.cd .alert.warn { background: var(--warnbg); border-color: #f3dcc1; color: var(--warn); }
.cd .kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line2); font-size: 13.5px; }
.cd .kv > div > span:first-child { color: var(--muted); }
.cd .kv > div > span:last-child { max-width: 60%; text-align: right; font-weight: 500; word-break: break-word; }

/* ---------- home ---------- */
.cd-big { font-size: 56px; font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.cd-split { display: flex; height: 10px; gap: 3px; }
.cd-split span { border-radius: 2px; }
.cd-tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cd-tri button { display: flex; flex-direction: column; gap: 4px; border: 0; background: none; color: #fff; text-align: left; cursor: pointer; padding: 0; }
.cd-tri .k { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #b4b6bd; }
.cd-tri .k i { width: 10px; height: 10px; border-radius: 3px; }
.cd-tri .v { font-size: 18px; font-weight: 600; }
.cd-donut { position: relative; width: 100px; height: 100px; flex-shrink: 0; }
.cd-donut b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.cd-donut circle.fg { transition: stroke-dasharray 1.1s cubic-bezier(.2,.7,.2,1); }
.cd-bar { display: flex; height: 10px; overflow: hidden; border-radius: 999px; background: #eeeee9; }
.cd-attn li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line2); }
.cd-attn .ic { display: flex; width: 42px; height: 42px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 12px; background: var(--accent-tint); color: var(--accent-text); }
.cd-attn .ic.a { background: var(--warnbg); color: var(--warn); }
.cd-attn .t { font-size: 15px; font-weight: 600; } .cd-attn .s { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.cd-rowlink { display: flex; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: var(--ink); }
.cd-rowlink:hover { color: var(--accent-text); }
.cd-months { display: grid; height: 220px; align-items: end; gap: 8px; }
.cd-mon { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; border: 0; background: none; cursor: pointer; padding: 0; color: var(--ink); }
.cd-mon .v { font-size: 11px; font-weight: 600; color: var(--ink2); }
.cd-mon .b { width: min(36px, 70%); border-radius: 7px 7px 0 0; background: var(--accent); transform-origin: bottom; animation: cdgrow .8s cubic-bezier(.2,.7,.2,1) backwards; }
.cd-mon .c { width: min(36px, 70%); border-radius: 0 0 3px 3px; background: #9a9ca3; }
.cd-mon:hover .b { background: var(--char); }
.cd-mon .m { font-size: 12px; color: var(--muted); }
@keyframes cdgrow { from { transform: scaleY(0); } }
.cd-hbar { display: flex; width: 100%; flex-direction: column; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: var(--ink); }
.cd-hbar .top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.cd-hbar .tr { height: 8px; border-radius: 4px; background: #f0f0ec; }
.cd-hbar .tr i { display: block; height: 100%; border-radius: 4px; background: var(--char); transform-origin: left; animation: cdwide .9s cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes cdwide { from { transform: scaleX(0); } }
.cd-air { display: inline-flex; align-items: center; gap: 8px; }
.cd-air .mk { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 6px; background: var(--char); font-weight: 700; color: #fff; }

/* ---------- Received → Being processed → Done ---------- */
.cd-p3 { display: grid; width: 100%; min-width: 300px; max-width: 380px; grid-template-columns: 1fr 1.35fr 1fr; gap: 8px; }
.cd-p3 > div { display: flex; flex-direction: column; gap: 6px; }
.cd-p3 i { height: 4px; border-radius: 2px; background: #e4e4df; }
.cd-p3 i.done { background: var(--char); } .cd-p3 i.now { background: var(--accent); }
.cd-p3 span { font-size: 12px; line-height: 1.2; color: var(--faint); }
.cd-p3 span.done { font-weight: 600; color: var(--ink2); } .cd-p3 span.now { font-weight: 600; color: var(--accent-deep); }
.cd-uprow { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 16px 4px; border-top: 1px solid var(--line2); cursor: pointer; }
.cd-uprow:hover { background: #fbfbf9; }
.cd-uprow .ic { display: flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 12px; background: var(--chip); color: var(--ink2); }
.cd-uprow.fresh { animation: cdflash 2.4s ease-out; }
@keyframes cdflash { 0% { background: var(--accent-tint); } 100% { background: transparent; } }
.cd-tl li { display: flex; gap: 14px; }
.cd-tl .dotcol { display: flex; flex-direction: column; align-items: center; }
.cd-tl .d { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cd-tl .d.done { background: var(--char); color: #fff; } .cd-tl .d.now { border: 6px solid var(--accent); background: #fff; } .cd-tl .d.next { border: 1.5px solid #cfcfc8; background: #fff; }
.cd-tl .ln { width: 2px; flex: 1; margin: 4px 0; background: #e4e4df; } .cd-tl .ln.done { background: var(--char); }

/* ---------- My Data / My Invoices ---------- */
.cd-grid2 { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 20px; align-items: start; }
.cd-grid2.norail { grid-template-columns: minmax(0, 1fr); }
.cd-rail { position: sticky; top: 140px; display: flex; max-height: calc(100vh - 160px); flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.cd-rail .rh { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line2); }
.cd-rail .rh .t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.cd-rail .rh .cnt { padding: 2px 8px; border-radius: 999px; background: var(--char); font-size: 11px; color: #fff; }
.cd-rail .rb { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cd-rail details { padding: 14px 0; border-top: 1px solid var(--line2); }
.cd-rail details:first-child { border-top: 0; padding-top: 0; }
.cd-rail summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); }
.cd-rail summary::-webkit-details-marker { display: none; }
.cd-rail summary .gc { margin-left: 8px; padding: 0 6px; border-radius: 999px; background: var(--accent-tint); font-size: 11px; color: var(--accent-deep); }
.cd-rail summary svg { color: var(--faint); transition: transform .2s; }
.cd-rail details[open] summary svg { transform: rotate(180deg); }
.cd-rail .opts { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.cd-rail .ck { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.cd-rail .ck:hover { background: var(--chip); }
.cd-rail .ck span:nth-of-type(1) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-rail .ck .c { font-size: 12px; color: var(--faint); }
.cd-rail .rf { padding: 12px; border-top: 1px solid var(--line2); }
.cd-rail .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-rail .two label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.cd-rail .rng { display: flex; align-items: center; gap: 8px; }
.cd-find { flex: 1; min-width: 280px; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #e1e1dc; border-radius: 12px; background: #fff; color: var(--muted); }
.cd-find:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.cd-find input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 14.5px; color: var(--ink); }
.cd-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cd-dates .input { width: 160px; height: 44px; font-size: 14px; }
.cd-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--line); }
.cd-sum > div { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: #fff; }
.cd-sum > div:first-child { background: var(--char); color: #fff; }
.cd-sum .k { font-size: 12.5px; color: var(--muted); } .cd-sum .v { font-size: 22px; font-weight: 500; letter-spacing: -.02em; } .cd-sum .s { font-size: 12px; color: var(--faint); }
.cd-sum > div:first-child .k, .cd-sum > div:first-child .s { color: #b4b6bd; }
.cd-dlc { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: var(--chip); }
.cd-dlc label { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink2); cursor: pointer; }
.cd-dlc label.on { background: #fff; font-weight: 600; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cd-dlc label.off { opacity: .4; cursor: not-allowed; }
.cd-dlc .n { color: var(--muted); font-weight: 400; }
.cd-tblwrap { overflow-x: auto; }
.cd .tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cd .tbl th { padding: 11px 16px; text-align: left; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--muted); border-bottom: 1px solid var(--line); background: #fafaf8; }
.cd .tbl td { padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.cd .tbl tr:last-child td { border-bottom: 0; }
.cd .tbl.compact td { padding: 10px 14px; font-size: 13.5px; white-space: nowrap; }
.cd .tbl.compact th { padding: 10px 14px; }
.cd .tbl tbody tr:hover { background: #fbfbf9; }
.cd .tbl tbody tr.sel { background: rgba(240,236,254,.5); }
.cd .tbl .lk { font-weight: 600; cursor: pointer; }
.cd .docbtn { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 0; border-radius: 8px; cursor: pointer; background: var(--accent-tint); color: var(--accent-text); }
.cd .docbtn.w { background: var(--warnbg); color: var(--warn); cursor: help; }
.cd .ib { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--ink2); }
.cd .ib:hover { background: var(--chip); }
.cd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.cd-foot .pg { display: flex; align-items: center; gap: 12px; }
.cd-empty { display: flex; max-width: 480px; margin: 0 auto; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0; text-align: center; }
.cd-empty .ic { display: flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 16px; background: var(--accent-tint); color: var(--accent-text); }
.cd-empty h2 { margin-top: 8px; font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: 28px; font-weight: 450; letter-spacing: -.02em; }
.cd-empty p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.cd-colrow { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.cd-colhd { padding: 10px 16px; border-bottom: 1px solid var(--line2); background: #fafaf8; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- reconciliation ---------- */
.cd-rhero { display: flex; flex-wrap: wrap; gap: 32px; overflow: hidden; padding: 36px 36px 0; border-radius: 26px; background: var(--char); color: #fff; }
.cd-rhero h2 { font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: 46px; font-weight: 400; line-height: 1.04; letter-spacing: -.025em; }
.cd-sheet { display: flex; min-width: 0; flex: 1 1 380px; flex-direction: column; justify-content: flex-end; align-self: stretch; }
.cd-sheet .tabs { display: flex; gap: 4px; padding-left: 10px; }
.cd-sheet .tabs span { padding: 6px 12px; border-radius: 8px 8px 0 0; background: rgba(255,255,255,.1); font-size: 12.5px; color: #c9cbd1; }
.cd-sheet .tabs span.on { background: #fff; font-weight: 600; color: var(--ink); }
.cd-sheet .body { overflow: hidden; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.cd-sheet .r { display: grid; grid-template-columns: 1.3fr 1fr 1fr .9fr; gap: 10px; padding: 10px 14px; border-top: 1px solid #eeeeea; }
.cd-sheet .r.h { border-top: 0; background: #f6f6f3; font-size: 11px; font-weight: 600; color: var(--muted); }
.cd-sheet .r i { height: 8px; border-radius: 4px; background: #eeeeea; }
.cd-sheet .r i:nth-child(2), .cd-sheet .r i:nth-child(3) { width: 60%; background: #f2f2ee; } .cd-sheet .r i:first-child { width: 80%; } .cd-sheet .r i:last-child { width: 50%; margin-left: auto; }
.cd-xls { display: inline-flex; width: 34px; height: 34px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 9px; background: var(--okbg); font-size: 10px; font-weight: 700; color: var(--ok); }

/* ---------- settings ---------- */
.cd-set { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.cd-setnav { display: flex; flex: 0 1 220px; flex-direction: column; gap: 2px; }
.cd-setnav button { display: flex; height: 40px; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink2); text-align: left; }
.cd-setnav button:hover { background: #fff; color: var(--ink); }
.cd-setnav button[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cd-setbody { display: flex; min-width: 0; flex: 999 1 560px; flex-direction: column; gap: 16px; }
.cd-opt { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer; }
.cd-roles label { display: flex; flex: 1; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.cd-roles label:has(:checked) { border-color: var(--char); }
.cd-pre { margin: 0; overflow-x: auto; padding: 16px 20px; border-radius: 16px; background: var(--char); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: #e4e4e8; white-space: pre; }

/* ---------- drawer / modal ---------- */
.cd-scrim { position: fixed; inset: 0; z-index: 200; background: rgba(22,23,27,.34); animation: cdfade .2s; }
@keyframes cdfade { from { opacity: 0; } }
.cd-drawer { position: fixed; z-index: 201; top: 0; right: 0; bottom: 0; display: flex; width: 100%; max-width: var(--w, 460px); flex-direction: column; background: #fff; box-shadow: -24px 0 60px rgba(0,0,0,.18); animation: cdslidein .3s cubic-bezier(.2,.7,.2,1); }
@keyframes cdslidein { from { transform: translateX(32px); opacity: 0; } }
.cd-drawer .dh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.cd-drawer .dh h2 { font-size: 19px; font-weight: 600; } .cd-drawer .dh p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.cd-drawer .db { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cd-drawer .df { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }
.cd-modalwrap { position: fixed; inset: 0; z-index: 201; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 10vh 24px 24px; }
.cd-modal { position: relative; width: 100%; max-width: var(--w, 560px); overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.22); animation: cdpop .25s cubic-bezier(.2,.7,.2,1); }
@keyframes cdpop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.cd-modal .mh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 28px 0; }
.cd-modal .mh h2 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; } .cd-modal .mh p { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.cd-modal .mb { padding: 20px 28px 24px; }
.cd-modal .mf { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); }
.cd-x { display: inline-flex; width: 36px; height: 36px; flex-shrink: 0; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--ink2); }
.cd-x:hover { background: var(--chip); }
.cd-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 20px; border: 1.5px dashed #cfcfc8; border-radius: 18px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.cd-drop:hover, .cd-drop.over { border-color: var(--accent); background: var(--accent-tint); }
.cd-drop .ic { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; background: var(--accent-tint); color: var(--accent-text); }

/* ---------- airline document preview (clearly marked as a sample) ---------- */
.cd-viewer { padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: #2a2b31; }
.cd-paper { position: relative; overflow: hidden; padding: 26px 28px; border-radius: 4px; background: #fff; font-size: 12px; color: #222; }
.cd-paper::after { content: "SAMPLE · DEMO DATA"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: 48px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; color: rgba(124,92,240,.09); pointer-events: none; }
.cd-paper .ph { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid #222; }
.cd-paper .ph b { font-size: 15px; } .cd-paper h4 { margin: 0; font-size: 17px; letter-spacing: .08em; text-align: right; }
.cd-paper .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.cd-paper .g2 span { display: block; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: #777; }
.cd-paper table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.cd-paper th, .cd-paper td { padding: 6px 8px; border: 1px solid #ddd; text-align: left; font-size: 11.5px; }
.cd-paper th { background: #f5f5f3; } .cd-paper .n { text-align: right; }
.cd-paper .fine { margin-top: 14px; font-size: 10.5px; color: #888; }

/* ---------- toast ---------- */
.cd-toasts { position: fixed; z-index: 400; left: 50%; bottom: 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.cd-toast { display: flex; max-width: min(560px, calc(100vw - 32px)); align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--char); color: #fff; font-size: 13.5px; box-shadow: 0 14px 40px rgba(0,0,0,.25); pointer-events: auto; animation: cdtoast .3s cubic-bezier(.2,.7,.2,1); }
.cd-toast svg { color: var(--on-dark); }
@keyframes cdtoast { from { opacity: 0; transform: translateY(10px); } }

/* ---------- welcome screen (demo only) ---------- */
.cd-welcome { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15,15,19,.62); backdrop-filter: blur(6px); animation: cdfade .3s; }
.cd-wbox { position: relative; width: min(980px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 28px; background: var(--char); color: #fff; box-shadow: 0 40px 120px rgba(0,0,0,.45); animation: cdpop .45s cubic-bezier(.2,.7,.2,1); }
.cd-wbox::before { content: ""; position: absolute; inset: 0; border-radius: 28px; pointer-events: none; background: radial-gradient(700px 360px at 85% -10%, rgba(124,92,240,.42), transparent 60%), radial-gradient(500px 300px at -5% 110%, rgba(124,92,240,.18), transparent 60%); }
.cd-wtop { position: relative; padding: 44px 48px 28px; }
.cd-wtop .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #cfc4ff; }
.cd-wtop h1 { max-width: 760px; margin-top: 14px; font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: clamp(36px, 5vw, 58px); font-weight: 400; line-height: 1.02; letter-spacing: -.03em; }
.cd-wtop p { max-width: 640px; margin-top: 14px; font-size: 16.5px; line-height: 1.55; color: #b9bbc2; }
.cd-wgrid { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 48px 40px; }
.cd-wopt { display: flex; min-height: 200px; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #fff; text-align: left; cursor: pointer; transition: transform .25s, background .25s, border-color .25s; }
.cd-wopt:hover, .cd-wopt:focus-visible { transform: translateY(-3px); background: rgba(255,255,255,.08); border-color: rgba(207,196,255,.5); outline: none; }
.cd-wopt.main { background: #fff; color: var(--ink); border-color: #fff; } .cd-wopt.main:hover { background: #f4f1ff; }
.cd-wopt .ic { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 13px; background: rgba(207,196,255,.16); color: #cfc4ff; }
.cd-wopt.main .ic { background: var(--accent-tint); color: var(--accent-text); }
.cd-wopt b { font-size: 17px; font-weight: 600; } .cd-wopt span { font-size: 13.5px; line-height: 1.5; color: #b4b6bd; } .cd-wopt.main span { color: var(--muted); }
.cd-wopt .go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 13px; font-weight: 600; color: #cfc4ff; } .cd-wopt.main .go { color: var(--accent-text); }
.cd-wfoot { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 16px 48px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: #9a9ca3; }

/* ---------- guided tour (demo only) ---------- */
.cd-spot { position: fixed; z-index: 500; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 4px rgba(124,92,240,.55), 0 0 0 9999px rgba(15,15,19,.58); transition: all .45s cubic-bezier(.2,.7,.2,1); }
.cd-spot.none { width: 0 !important; height: 0 !important; left: 50% !important; top: 50% !important; box-shadow: 0 0 0 9999px rgba(15,15,19,.58); }
.cd-tip { position: fixed; z-index: 501; width: min(380px, calc(100vw - 24px)); padding: 20px 22px 16px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.3); transition: left .45s cubic-bezier(.2,.7,.2,1), top .45s cubic-bezier(.2,.7,.2,1); animation: cdpop .3s cubic-bezier(.2,.7,.2,1); }
.cd-tip .st { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.cd-tip h4 { margin: 6px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.cd-tip p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.cd-tip .tf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.cd-tip .dots { display: flex; gap: 3px; }
.cd-tip .dots i { width: 5px; height: 5px; border-radius: 50%; background: #e2e2dc; } .cd-tip .dots i.on { width: 16px; border-radius: 3px; background: var(--accent); }
.cd-tip .try { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 11px; border-radius: 11px; background: var(--accent-tint); font-size: 13px; font-weight: 600; color: var(--accent-text); }

/* ---------- demo call-to-action at the foot of each screen ---------- */
.cd-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 28px; border-radius: 22px; background: linear-gradient(120deg, #1b1c20, #2a2340); color: #fff; }
.cd-end h3 { font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: 28px; font-weight: 400; letter-spacing: -.02em; }
.cd-end p { margin-top: 6px; color: #b9bbc2; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cd-top { grid-template-columns: auto 1fr; height: auto; padding: 8px 16px 0; row-gap: 0; }
  .cd-right .cd-search { display: none; }
  .cd-tabs { order: 3; grid-column: 1 / -1; height: 48px; } .cd-tab { height: 48px; }
  .cd-grid2 { grid-template-columns: minmax(0, 1fr); }
  .cd-rail { position: static; max-height: none; }
  .cd-wgrid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cd-main, .cd-main.wide { padding: 20px 14px 56px; }
  .cd-title { font-size: 32px; } .cd-big { font-size: 42px; }
  .cd-sum { grid-template-columns: 1fr 1fr; }
  .cd-card, .cd-dark { padding: 20px; }
  .cd-p3 { min-width: 0; }
  .cd-wtop { padding: 30px 24px 20px; } .cd-wgrid { padding: 0 24px 28px; } .cd-wfoot { padding: 14px 24px; }
  .cd-rhero { padding: 26px 22px 0; } .cd-rhero h2 { font-size: 34px; }
  .cd-ribbon { position: relative; padding: 8px 12px; } .cd-ribbon .note, .cd-ribbon .rb-reset { display: none; }
  .cd-ribbon button, .cd-ribbon a.rb { height: 28px; padding: 0 10px; }
  .cd-top { top: 0; } .cd-menu { width: min(320px, calc(100vw - 24px)); }
  .cd-tip { left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; }
  .cd-dates .input { width: 140px; }
}
@media (prefers-reduced-motion: reduce) { .cd *, .cd *::before, .cd *::after { animation: none !important; transition: none !important; } }
