:root {
  --ink: #101014;
  --paper: #faf6f0;
  --signal: #f2541b;
  --signal-hover: #e04814;
  --refund: #0e6b4f;
  --success: #0e6b4f;
  --slate: #6b7280;
  --gold: #cfbe96;
  --warn: #b45309;
  --danger: #c2410c;
  --info: #4b5563;
  --line: rgba(16, 16, 20, 0.1);
  --border-subtle: #e5e0d8;
  --card-bg: #ffffff;
  --navy: #1b4f72;
  --sred-row: #e8f1fa;
  --page-max: 1280px;
  --gutter: 24px;
  --control-h: 40px;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  -webkit-font-smoothing: antialiased;
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.surface-paper {
  background-color: var(--paper);
}
.surface-ink {
  background-color: var(--ink);
}

.font-display {
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
.font-mono-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.scoreboard {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

/* ─── App bar (one nav) ─── */
#app-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
}
.app-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  min-height: 56px;
  flex-wrap: nowrap;
}
.app-logo { display: flex; align-items: center; flex-shrink: 0; }
.app-nav-desktop {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
}
.app-nav-desktop a,
.app-nav-mobile a,
#app-nav a,
.nav-pill-link {
  color: rgba(250, 246, 240, 0.75);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}
.app-nav-desktop a:hover,
.app-nav-mobile a:hover,
#app-nav a:hover,
.nav-pill-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}
.app-nav-desktop a.is-active,
.app-nav-mobile a.is-active,
#app-nav a.is-active,
.nav-pill-link.is-active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.20);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.app-bar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  background: var(--ink);
  padding-left: 12px;
}
#user-chip { text-align: right; font-size: 14px; line-height: 1.4; }
#user-chip .user-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 2px; }

.ctx-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.ctx-bar[hidden], .ctx-field[hidden] { display: none !important; }
.ctx-bar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 20px;
}
.ctx-bar .ctx-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@media (max-width: 639px) {
  .ctx-bar-inner { justify-content: stretch; }
  .ctx-bar .ctx-field { flex: 1 1 100%; }
}
.ctx-bar .ctx-field span {
  font: 500 12.5px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
}
.ctx-bar select {
  width: auto !important;
  min-width: 180px;
  max-width: min(260px, 100%);
  min-height: var(--control-h) !important;
  height: var(--control-h);
  padding: 6px 12px !important;
  background: #fff;
}
@media (max-width: 639px) {
  .ctx-bar select { width: 100% !important; max-width: none; min-width: 0; }
}

.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-burger-lines,
.nav-burger-lines::before,
.nav-burger-lines::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--paper);
  position: relative;
}
.nav-burger-lines::before,
.nav-burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-burger-lines::before { top: -5px; }
.nav-burger-lines::after { top: 5px; }

.app-nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px 16px;
}
.app-nav-mobile[hidden] { display: none; }

@media (min-width: 1280px) {
  .nav-burger { display: none; }
  .app-nav-desktop { display: flex; }
  .app-nav-mobile { display: none !important; }
  .app-bar-inner,
  .ctx-bar-inner { padding: 10px 32px; }
}
@media (max-width: 1280px) {
  #deadline-chip { display: none; }
}

.page-main {
  padding: 28px var(--gutter) 72px;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  min-width: 0;
}
.page-foot {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--slate);
}
.page-foot p {
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}

#project-detail-head { margin-bottom: 20px; }
.page-main > h1 { margin-bottom: 8px; }
.page-main > h1 + p,
.page-main > h1 + .lead { margin-bottom: 24px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: 6px; }

.section { margin-bottom: 32px; }
.section > h2 { margin-bottom: 8px; }
.section > .lead { color: var(--slate); font-size: 15.5px; margin-bottom: 16px; max-width: 40rem; }

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px 20px;
  margin-bottom: 20px;
}
.status-bar .kicker {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--signal);
  margin: 0 8px 0 0;
}
.status-bar .pill {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  border-radius: 9999px;
  padding: 3px 12px;
}
.status-bar .status-meta {
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
  font-size: 14px;
  color: var(--slate);
}
.status-bar .status-ok {
  margin: 0 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--refund);
}
.status-bar .btn-signal,
.status-bar .status-pending { margin-left: auto; }
.status-bar .status-pending {
  margin-top: 0;
  font-size: 14px;
  color: var(--slate);
  max-width: 28rem;
}
.payout-bar {
  align-items: center;
}
.payout-copy { flex: 1 1 14rem; min-width: 0; }
.payout-copy .kicker { margin: 0 0 4px; }
.payout-copy .status-ok { margin-left: 0; }
.payout-copy .status-meta strong { font-weight: 600; color: var(--ink); }
.payout-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.payout-bar input[type="date"] {
  width: 10.75rem !important;
  min-width: 10.75rem;
  max-width: 10.75rem;
  flex: 0 0 10.75rem;
}

.layout-split {
  display: grid;
  gap: 24px;
  align-items: start;
}
@media (min-width: 900px) {
  .layout-split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 20px;
}
@media (min-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.form-grid > .span-2,
.form-grid > .field.span-2 { grid-column: 1 / -1; }
.form-grid > .field { margin-bottom: 0; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.form-grid + .form-actions,
.form-grid + button { margin-top: 20px; }
label.flex, label.m-0 { margin-bottom: 0; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
@media (min-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.kpi-grid .card { padding: 16px 18px; }

.table-card {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.table-card .table-scroll { border: 0; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar h1,
.toolbar h2 { margin: 0; }
.toolbar-end { justify-content: flex-end; }

#client-tabs {
  gap: 0;
  margin: 20px 0 24px;
}
#client-tabs button {
  padding: 10px 16px 12px;
  margin-bottom: -1px;
  font: 500 14px/1.2 Inter, system-ui, sans-serif;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--slate);
}
#client-tabs button.border-b-2 { color: var(--ink); }

.onboard-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.onboard-steps li {
  font: 500 12px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--slate);
}
.onboard-steps li.is-now {
  color: var(--ink);
  border-color: var(--ink);
}
.onboard-steps li.is-done { color: var(--refund); border-color: var(--refund); }

/* ─── Login (one surface, real field spacing) ─── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
}
.login-page .login-mark { margin-bottom: 40px; }
.login-page .login-mark img { filter: brightness(0); }
.login-page h1 { margin-bottom: 8px; text-align: center; }
.login-page .login-lead {
  color: var(--slate);
  text-align: center;
  max-width: 28rem;
  margin-bottom: 0;
  line-height: 1.5;
}
.login-form {
  width: 100%;
  max-width: 400px;
  margin-top: 32px;
}
.login-form.card { padding: 28px 28px 24px; }
.login-demo {
  width: 100%;
  max-width: 400px;
  margin-top: 36px;
}
.login-demo p { font-size: 12px; color: var(--slate); margin-bottom: 12px; }
.login-demo a { display: block; padding: 10px 0; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.login-demo a:hover { color: var(--signal); }
.login-foot { margin-top: 48px; font-size: 12px; color: var(--slate); }

.field { margin-bottom: 16px; }
.field label { display: block; font: 500 14px/1.4 Inter, system-ui, sans-serif; margin-bottom: 6px; }
.field [data-err-for] { min-height: 1.1em; margin-top: 6px; }

.btn-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--signal);
  color: var(--ink);
  font: 600 15px/1.25 Inter, system-ui, sans-serif;
  border: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-signal:hover {
  background: var(--signal-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(242, 84, 27, 0.28);
}
.btn-signal:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.btn-signal-sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13.5px;
}
.btn-ghost {
  background: none;
  border: 0;
  padding: 0;
  font: 500 15px/1.4 Inter, system-ui, sans-serif;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--signal); }
.btn-ghost-light { color: rgba(250, 246, 240, 0.8); }
.btn-ghost-light:hover { color: var(--gold); }
.btn-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(16, 16, 20, 0.15);
  font: 500 15px/1.25 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.btn-ink:hover { border-color: var(--ink); }
.btn-ink:disabled, .btn-signal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
body select,
body textarea {
  width: 100%;
  min-height: 42px;
  height: auto;
  padding: 10px 14px !important;
  border-radius: 4px;
  background: #fff;
  border: 1px solid rgba(16, 16, 20, 0.18);
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
  color: var(--ink);
  box-sizing: border-box;
}
body input::placeholder, body textarea::placeholder {
  color: #9aa0a8;
  opacity: 1;
}
body textarea {
  min-height: 100px;
  height: auto;
  resize: vertical;
  padding: 10px 14px !important;
  line-height: 1.55;
}
textarea.tall { min-height: 172px; }
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(242, 84, 27, 0.15);
}
label { display: block; font: 500 14px/1.4 Inter, system-ui, sans-serif; margin-bottom: 6px; }
input[type="checkbox"], input[type="radio"] {
  width: 17px;
  height: 17px;
  min-height: 0 !important;
  padding: 0 !important;
  accent-color: var(--signal);
  flex-shrink: 0;
}
.lead { color: var(--slate); font-size: 15.5px; line-height: 1.6; max-width: 42rem; }
fieldset {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px 24px 24px;
  margin-bottom: 20px;
}
legend {
  font: 500 13px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 6px;
  color: var(--ink);
}
[data-err-for] { color: var(--signal); font-size: 13px; min-height: 1em; margin-top: 6px; }

.pill {
  display: inline-flex;
  align-items: center;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 4px;
  line-height: 1.35;
  white-space: nowrap;
}
.pill[data-tone="ok"], .pill-ok { color: #0e6b4f; border-color: #a3d9c9; background: #e6f4ea; font-weight: 500; }
.pill[data-tone="warn"], .pill-warn { color: #b45309; border-color: #fde68a; background: #fef3c7; font-weight: 500; }
.pill[data-tone="bad"], .pill-bad { color: #c2410c; border-color: #fecaca; background: #fee2e2; font-weight: 500; }
.pill[data-tone="info"], .pill-info { color: var(--slate); border-color: rgba(107, 114, 128, 0.3); background: rgba(107, 114, 128, 0.06); }
.pill[data-tone="muted"], .pill-muted { color: var(--slate); border-color: rgba(107, 114, 128, 0.2); background: transparent; }

.stamp-chip {
  display: inline-flex;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: 2px solid currentColor;
  line-height: 1.3;
}
.stamp-recon { color: var(--warn); }
.stamp-ok { color: var(--refund); }
.stamp-bad { color: var(--signal); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px 24px;
  max-width: 100%;
  min-width: 0;
}
.card > label.flex:last-child { border-bottom: 0; }
.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 8px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
}
.page-main, #page-root, .section, .card { min-width: 0; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
table.data th {
  position: sticky;
  top: 0;
  background: #fff;
  text-align: left;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover { background: rgba(16, 16, 20, 0.03); }
table.data .num { font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; text-align: right; }
table.data select,
table.exp select {
  min-height: 36px !important;
  height: 36px;
  padding: 6px 10px !important;
  font-size: 14px;
  width: auto;
  min-width: 8.5rem;
}

table.exp {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 640px;
  background: #fff;
}
table.exp th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  padding: 13px 16px;
  letter-spacing: 0.01em;
}
table.exp th.num, table.exp td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.exp td { padding: 13px 16px; border-bottom: 1px solid #d9e2ec; }
table.exp tbody tr:nth-child(even) { background: #f7f9fb; }
table.exp tbody tr.sred td { background: var(--sred-row); }
table.exp tfoot td {
  padding: 14px 16px;
  border-top: 2px solid var(--navy);
  font-weight: 600;
  background: #fff;
}
table.exp .pct-note { font-weight: 400; font-size: 13px; color: var(--slate); }

.journey { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); }
.journey li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.journey li:last-child { border-bottom: 0; }
@media (max-width: 639px) {
  .journey li { grid-template-columns: 28px 1fr; }
  .journey li > .btn-signal,
  .journey li > .pill { grid-column: 2; justify-self: start; margin-top: 4px; }
}
.journey a { color: inherit; text-decoration: none; }
.journey a:hover .journey-title { color: var(--signal); }
.journey-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 13px/1 Inter, system-ui, sans-serif;
  flex-shrink: 0;
}
.journey-mark.is-done { background: var(--refund); border-color: var(--refund); color: #fff; }
.journey-mark.is-now { border-color: var(--signal); color: var(--signal); }
.journey-title { font-weight: 600; font-size: 17px; }
.journey-help { color: var(--slate); font-size: 14px; margin-top: 4px; line-height: 1.5; }

.stack-list { display: flex; flex-direction: column; gap: 12px; }
.stack-item {
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px 18px;
}
.stack-item .meta { color: var(--slate); font-size: 14px; margin-top: 6px; }
.stack-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stack-item-head strong { min-width: 0; font-size: 16.5px; }
.stack-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--slate);
  font-size: 14px;
}
.payout-line {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--slate);
}
table.data tr.is-current td { background: var(--sred-row); }

.prose h2 { margin: 32px 0 10px; }
.prose h3 { margin: 20px 0 8px; font-size: 1.15rem; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; color: var(--ink); }
.prose ul { margin: 0 0 16px 1.2em; }
.prose p { margin-bottom: 14px; max-width: 42rem; }

.letter-card { border-left: 3px solid var(--signal); }
.letter-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px 20px;
  margin: 0;
}
.letter-meta dt {
  font: 500 12.5px/1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 4px;
}
.letter-meta dd { margin: 0; font-size: 15px; }

.t661-writeup {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px 32px;
}
.t661-writeup .t661-project + .t661-project {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.t661-writeup h3 { margin: 16px 0 8px; }
.t661-writeup h4 { margin: 16px 0 8px; font-size: 16px; font-weight: 600; }
.t661-line { font-size: 15px; margin: 0 0 6px; }
.t661-count { font-size: 13.5px; color: var(--slate); margin: 4px 0 16px; }
.t661-writeup .narrative {
  white-space: pre-wrap;
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 42rem;
}
.t661-ev { list-style: none; padding: 0; margin: 0 0 12px; font-size: 14.5px; }
.t661-ev li { padding: 3px 0; }

.spend-table table.exp { min-width: 1100px; }

.check-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.55;
}
.check-list li:last-child { border-bottom: 0; }
.check-list input { width: auto; min-height: 0 !important; height: auto; padding: 0 !important; margin-top: 4px; }
.note-field {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.spend-cards { display: none; }
@media (max-width: 720px) {
  .spend-cards { display: flex; }
  .spend-table { display: none; }
  table.data { min-width: 0; }
}

.link-out {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--info);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-out:hover { color: var(--signal); }

.bar { height: 6px; background: rgba(16, 16, 20, 0.08); max-width: 240px; display: inline-block; width: 160px; vertical-align: middle; margin-right: 8px; }
.bar > span { display: block; height: 100%; background: var(--refund); }
.bar[data-tone="warn"] > span { background: var(--warn); }
.bar[data-tone="bad"] > span { background: var(--signal); }

#app-bar a:focus-visible, .nav-burger:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  font-size: 14px;
  border-left: 2px solid var(--signal);
}
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 20, 0.72);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-panel {
  background: var(--paper);
  border-radius: 2px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.modal-panel.wide { max-width: 640px; }
.modal-panel .field:last-of-type { margin-bottom: 16px; }
.modal-panel h2 { margin-bottom: 16px; }

.chip-broken { border: 1px dashed var(--signal); color: var(--signal); text-decoration: line-through; }

h1, h2, h3 { overflow-wrap: break-word; }

@media print {
  #app-bar, #footer, .no-print, .toast-stack { display: none !important; }
  body, .surface-paper { background: #fff !important; }
  main { padding: 0 !important; }
  .card { border-color: #ccc; break-inside: avoid; }
  .print-watermark {
    position: fixed;
    inset: 30% 0 auto;
    text-align: center;
    font-size: 64px;
    color: rgba(16, 16, 20, 0.08);
    transform: rotate(-18deg);
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* ========================================================
   FIGMA REDESIGN V3.4 STYLES (MATCHING 29 SCREENS)
   ======================================================== */

/* Global Typography & Resets */
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  margin: 0;
  padding: 0;
}

/* App Shell (Two Column Layout for Workspace) */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--paper);
}

/* Dark Ink Sidebar */
.app-sidebar {
  width: 256px;
  min-width: 256px;
  background-color: #101014;
  color: #FAF6F0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 50;
  flex-shrink: 0;
}

.sidebar-brand {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FAF6F0;
  text-decoration: none;
  margin-bottom: 20px;
  display: block;
  line-height: 1.2;
}

.sidebar-back {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.65);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  transition: color 0.15s;
}
.sidebar-back:hover {
  color: #FAF6F0;
}

.sidebar-client-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(242, 84, 27, 0.15);
  border: 1px solid rgba(242, 84, 27, 0.4);
  color: #F2541B;
  border-radius: 9999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sidebar-entity {
  margin-bottom: 18px;
}
.sidebar-entity-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 18.5px;
  color: #FAF6F0;
  line-height: 1.25;
}
.sidebar-entity-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: rgba(250, 246, 240, 0.5);
  margin-top: 4px;
}

.sidebar-project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 18px;
}
.sidebar-project-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: #F2541B;
  font-weight: 600;
}
.sidebar-project-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: #FAF6F0;
  line-height: 1.3;
  margin: 3px 0 4px;
}
.sidebar-project-status {
  font-size: 12px;
  color: rgba(250, 246, 240, 0.55);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}
.sidebar-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(250, 246, 240, 0.82);
  transition: all 0.15s ease;
}
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FAF6F0;
}
.sidebar-nav a.is-active {
  background: #F2541B;
  color: #ffffff;
}
.sidebar-nav a.is-active .nav-sub {
  color: rgba(255, 255, 255, 0.85);
}
.sidebar-nav a .nav-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.25;
}
.sidebar-nav a .nav-sub {
  font-size: 12px;
  color: rgba(250, 246, 240, 0.5);
  margin-top: 2px;
}

.sidebar-user {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #FAF6F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.sidebar-user-info {
  flex: 1 1 auto;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #FAF6F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 12px;
  color: rgba(250, 246, 240, 0.5);
}

/* Workspace Main Container */
.workspace-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 32px 40px 72px;
  background-color: var(--paper);
}
@media (max-width: 900px) {
  .workspace-main {
    padding: 20px 16px 60px;
  }
}

/* Top Workspace Header Bar */
.workspace-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.workspace-topbar-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
  line-height: 1.2;
}
.workspace-topbar-sub {
  font-size: 14.5px;
  color: var(--slate);
  margin-top: 4px;
}
.workspace-topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Deadline Pill */
.pill-deadline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background-color: #FFF2EB;
  border: 1px solid rgba(194, 65, 12, 0.25);
  border-radius: 9999px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #C2410C;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

/* Stepper / Journey Progress Bar */
.journey-stepper-wrap {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.journey-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  width: 100%;
  margin-bottom: 4px;
}
.journey-stepper::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: #E5E0D8;
  z-index: 1;
}
.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  text-decoration: none;
  color: inherit;
  min-width: 44px;
}
.step-node {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  background: #FAF6F0;
  border: 2px solid #D1D5DB;
  color: #6B7280;
  transition: all 0.2s ease;
}
.step-label {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  margin-top: 6px;
  white-space: nowrap;
}
.journey-step.is-done .step-node {
  background: #0E6B4F;
  border-color: #0E6B4F;
  color: #ffffff;
}
.journey-step.is-done .step-label {
  color: #0E6B4F;
  font-weight: 600;
}
.journey-step.is-current .step-node {
  background: #F2541B;
  border-color: #F2541B;
  color: #ffffff;
}
.journey-step.is-current .step-label {
  color: #F2541B;
  font-weight: 700;
}
.journey-step.is-locked {
  cursor: not-allowed;
  opacity: 0.6;
}
.journey-step.is-locked .step-node {
  background: #F3F4F6;
  border-color: #D1D5DB;
  color: #9CA3AF;
  font-size: 12px;
}
.journey-step.is-locked .step-label {
  color: #9CA3AF;
}
.journey-step.is-locked:hover .step-node {
  border-color: #F59E0B;
  color: #D97706;
}
.stage-lock-banner {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-left: 4px solid #F59E0B;
}
.journey-stepper-caption {
  font-size: 14px;
  color: var(--slate);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(16, 16, 20, 0.05);
}

/* Stat Cards (White rounded card with 4px left accent bar) */
.stat-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.stat-accent-signal::before { background-color: #F2541B; }
.stat-accent-gold::before { background-color: #CFBE96; }
.stat-accent-ink::before { background-color: #101014; }
.stat-accent-success::before { background-color: #0E6B4F; }

.stat-card-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 6px;
}
.stat-card-value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-card-sub {
  font-size: 13.5px;
  color: var(--slate);
  margin-top: 6px;
}

/* Company Picker Cards Grid (Screen 04) */
.company-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.company-picker-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.company-picker-card:hover {
  border-color: #F2541B;
  box-shadow: 0 4px 12px rgba(242, 84, 27, 0.08);
}
.company-picker-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.25;
}
.company-picker-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: var(--slate);
  margin-top: 4px;
  margin-bottom: 14px;
}
.company-picker-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.company-picker-progress-wrap {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 16, 20, 0.06);
}
.company-picker-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 6px;
}
.company-picker-progress-bar {
  height: 6px;
  background: #E5E0D8;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.company-picker-progress-fill {
  height: 100%;
  background: #F2541B;
  border-radius: 9999px;
}
.company-picker-progress-fill.is-done {
  background: #0E6B4F;
}
.company-picker-open-link {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #F2541B;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.company-picker-new-card {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed #D1D5DB;
  border-radius: 12px;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.company-picker-new-card:hover {
  background: #ffffff;
  border-color: #F2541B;
}

/* Banner component */
.claim-banner {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.claim-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Redesigned Card */
.ui-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.ui-card-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18.5px;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 6px;
}
.ui-card-sub {
  font-size: 14.5px;
  color: var(--slate);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Form Controls with Figma Styling */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
  background-color: #FAF6F0 !important;
  border: 1px solid #D5CEBF !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 15px !important;
  color: var(--ink) !important;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: #F2541B !important;
  outline: 2px solid rgba(242, 84, 27, 0.2) !important;
  background-color: #ffffff !important;
}

/* Buttons */
.btn-signal {
  background-color: #F2541B !important;
  color: #ffffff !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  border: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: background-color 0.15s !important;
  text-decoration: none !important;
}
.btn-signal:hover {
  background-color: #E04814 !important;
}
.btn-signal:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

.btn-ink {
  background-color: #101014 !important;
  color: #FAF6F0 !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  border: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-decoration: none !important;
}
.btn-ink:hover {
  background-color: #1E1E24 !important;
}

.btn-ghost {
  background-color: transparent !important;
  color: var(--ink) !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  border-radius: 8px !important;
  padding: 9px 18px !important;
  border: 1px solid #D5CEBF !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.btn-ghost:hover {
  background-color: #F4EFE6 !important;
}

.btn-danger-ghost {
  background-color: transparent !important;
  color: #C2410C !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  border: none !important;
  padding: 8px 12px !important;
  cursor: pointer !important;
  text-decoration: underline !important;
}
.btn-danger-ghost:hover {
  color: #9A3412 !important;
}

/* Split auth container (login, signup, onboard) */
.auth-split-wrap {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: #101014;
  color: #FAF6F0;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 960px;
  width: 100%;
  gap: 48px;
  align-items: center;
}
@media (min-width: 840px) {
  .auth-split-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
  }
}
.auth-card {
  background: #ffffff;
  color: #101014;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* 7-Document Dossier Styling (Screen 29) */
.dossier-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(16, 16, 20, 0.06);
}
.dossier-file-row:last-child {
  border-bottom: none;
}
.doc-type-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.doc-badge-docx { background: #E0E7FF; color: #3730A3; }
.doc-badge-xlsx { background: #DCFCE7; color: #166534; }
.doc-badge-pptx { background: #FFEDD5; color: #9A3412; }


/* ==========================================================================
   MOBILE & CROSS-DEVICE RESPONSIVE OPTIMIZATIONS
   ========================================================================== */

/* Off-canvas mobile sidebar drawer */
@media (max-width: 899px) {
  .app-shell {
    flex-direction: column !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
  }
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    max-width: 85vw !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: none !important;
  }
  .app-sidebar.is-open {
    transform: translateX(0) !important;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8) !important;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 16, 20, 0.7);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-sidebar-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
  }
  .mobile-sidebar-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #FAF6F0;
    cursor: pointer;
    position: absolute;
    top: 18px;
    right: 14px;
  }
  .workspace-main {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 12px 64px !important;
  }
  .workspace-topbar {
    padding: 12px 12px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .workspace-topbar-tools {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .workspace-topbar-title {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }
  .workspace-topbar-sub {
    font-size: 11.5px !important;
  }
}

@media (min-width: 900px) {
  .mobile-sidebar-toggle,
  .mobile-sidebar-close,
  .sidebar-backdrop {
    display: none !important;
  }
}

/* Horizontal scroll container for 9-step Journey Stepper on all devices */
.journey-stepper-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}
.journey-stepper-wrap::-webkit-scrollbar {
  height: 4px;
}
.journey-stepper-wrap::-webkit-scrollbar-thumb {
  background: rgba(16, 16, 20, 0.15);
  border-radius: 4px;
}
.journey-stepper {
  min-width: 640px;
}

/* Table scroll wrapper to prevent horizontal blowout on phones */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-scroll::-webkit-scrollbar {
  height: 5px;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(16, 16, 20, 0.15);
  border-radius: 4px;
}
.table-scroll table,
table.data,
table.exp {
  min-width: 580px;
}

/* Mobile optimizations for auth cards, company picker, and stat cards */
@media (max-width: 640px) {
  .auth-split-wrap {
    padding: 20px 14px !important;
  }
  .auth-split-grid {
    gap: 28px !important;
  }
  .auth-card {
    padding: 22px 16px !important;
    border-radius: 14px !important;
  }
  .company-picker-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .company-picker-card {
    padding: 16px 14px !important;
  }
  .ui-card {
    padding: 18px 14px !important;
    border-radius: 12px !important;
  }
  .stat-card {
    padding: 14px 14px !important;
  }
  .stat-value {
    font-size: 22px !important;
  }
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY & ACCESSIBILITY READABILITY SCALING
   Increases normal body and meta text sizes across all webapp screens.
   ========================================================================== */

/* Scaling utility classes generated by Tailwind / used in app.js */
.text-xs {
  font-size: 13.5px !important;
  line-height: 1.55 !important;
}

.text-sm {
  font-size: 15px !important;
  line-height: 1.6 !important;
}

.text-base {
  font-size: 16.5px !important;
  line-height: 1.6 !important;
}

/* Scaling micro-labels and tiny brackets (formerly 9px-11px) */
.text-\[9px\],
.text-\[10px\],
.text-\[10\.5px\],
.text-\[11px\],
.text-\[11\.5px\] {
  font-size: 12.5px !important;
  line-height: 1.45 !important;
}

.text-\[12px\],
.text-\[12\.5px\] {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
}

.text-\[13px\],
.text-\[13\.5px\] {
  font-size: 14.5px !important;
  line-height: 1.55 !important;
}

.text-\[14px\] {
  font-size: 15px !important;
  line-height: 1.55 !important;
}

/* Monospace labels & code tags */
.font-mono.text-xs,
.font-mono.text-\[11px\],
.font-mono.text-\[10px\],
.font-mono.text-\[9px\],
.font-mono-label {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* Universal text readability boost on cards, forms, and descriptions */
.ui-card p,
.ui-card li,
.claim-banner p,
.claim-banner li,
.page-main p,
.modal-panel p {
  font-size: 15px;
  line-height: 1.6;
}

/* Form inputs & interactive controls across all pages */
body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
body select,
body textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="password"] {
  font-size: 15px !important;
  line-height: 1.5 !important;
  min-height: 42px !important;
  padding: 10px 14px !important;
}

/* Labels */
label,
.field label {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  margin-bottom: 6px !important;
}

/* Buttons */
.btn-signal,
.btn-ink,
.btn-ghost {
  font-size: 15px !important;
  padding: 10px 20px !important;
  min-height: 42px !important;
}

/* Table cells and headers */
table.data td,
table.exp td {
  font-size: 14.5px !important;
  line-height: 1.5 !important;
  padding: 12px 16px !important;
}

table.data th,
table.exp th {
  font-size: 12.5px !important;
  padding: 12px 16px !important;
}

/* Checklist items */
.check-list li {
  font-size: 15px !important;
  line-height: 1.55 !important;
  padding: 14px 18px !important;
}

