/* ============================================================
   tools.tayoledgers.com — shared design system
   Cool, muted, eye-friendly. No pure white, no black, no dark theme.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Surfaces (cool off-whites, slight blue-green tint) ---- */
  --bg:            #e7edee;   /* page canvas */
  --surface:       #f1f5f5;   /* cards, panels */
  --surface-2:     #eaf0f0;   /* nested / striped rows */
  --surface-raised:#f6f9f9;   /* floating elements */
  --surface-sunken:#dfe7e8;   /* wells, inputs track */

  /* ---- Ink (dark slate, never black) ---- */
  --ink:           #233438;
  --ink-2:         #46585c;
  --ink-3:         #6d7f82;
  --ink-faint:     #93a3a5;

  /* ---- Lines ---- */
  --line:          #cdd8da;
  --line-strong:   #b9c7c9;
  --line-soft:     #dbe4e5;

  /* ---- Accent: muted teal ---- */
  --accent:        #2f6f6b;
  --accent-hover:  #275c58;
  --accent-press:  #1f4b48;
  --accent-soft:   #dce8e7;
  --accent-softer: #e8f0ef;
  --accent-ink:    #1c4744;

  /* ---- Semantic (same chroma family, varied hue) ---- */
  --pos:           #41796a;   /* ACM / credit / commissionable */
  --pos-soft:      #dde9e5;
  --neg:           #a85f48;   /* ADM / debit — muted clay */
  --neg-soft:      #f0e1da;
  --warn:          #97744a;   /* caution — muted ochre */
  --warn-soft:     #efe6d8;
  --info:          #4a657f;
  --info-soft:     #dfe6ed;

  /* ---- Type ---- */
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* ---- Radius ---- */
  --r-sm: 6px;
  --r:    9px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* ---- Shadow (very soft, cool) ---- */
  --sh-sm: 0 1px 2px rgba(35,52,56,.05), 0 1px 1px rgba(35,52,56,.04);
  --sh:    0 2px 6px rgba(35,52,56,.06), 0 1px 2px rgba(35,52,56,.04);
  --sh-lg: 0 10px 30px rgba(35,52,56,.09), 0 2px 8px rgba(35,52,56,.05);

  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.18; letter-spacing: -0.01em; color: var(--ink); }
p { margin: 0; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }

.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.muted { color: var(--ink-3); }
.faint { color: var(--ink-faint); }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 62px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.brand .mark {
  font-family: var(--sans); font-weight: 700; font-size: 19px;
  letter-spacing: -0.02em; color: var(--ink);
}
.brand .mark b { color: var(--accent); font-weight: 700; }
.brand .tag {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 5px;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 8px 12px; border-radius: var(--r-sm); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a.active { color: var(--accent-ink); background: var(--accent-soft); }
.nav-burger { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger {
    display: inline-flex; margin-left: auto; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 500; color: var(--ink-2);
    background: var(--surface); border: 1px solid var(--line);
    padding: 7px 12px; border-radius: var(--r-sm); cursor: pointer;
  }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 62px; left: 0; right: 0;
    background: var(--surface-raised); border-bottom: 1px solid var(--line);
    padding: 10px 18px 16px; gap: 2px; box-shadow: var(--sh);
  }
  .nav-links.open a { padding: 11px 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  padding: 11px 18px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #f3f6f6; }
.btn-primary:hover { background: var(--accent-hover); color: #f3f6f6; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-quiet { background: transparent; color: var(--accent); padding: 8px 10px; }
.btn-quiet:hover { background: var(--accent-softer); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.card-pad { padding: 24px; }

/* ---------- Forms ---------- */
label.field { display: block; }
.field-label {
  display: block; font-size: 13px; font-weight: 500; color: var(--ink-2);
  margin-bottom: 6px; letter-spacing: 0.005em;
}
.field-hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 5px; }
input[type=text], input[type=number], input[type=date], input[type=email], select, textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input.mono, .mono input, textarea.mono { font-family: var(--mono); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-softer);
}
textarea { resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d7f82' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 34px;
}

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); }
table.data {
  width: 100%; border-collapse: collapse; background: var(--surface);
  font-size: 14px; min-width: 720px;
}
table.data thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  text-align: left; font-weight: 600; font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3);
  padding: 12px 14px; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.data tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink); vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: var(--surface-raised); }
table.data .ralign { text-align: right; }
table.data tfoot td {
  padding: 14px; font-weight: 600; background: var(--surface-2);
  border-top: 2px solid var(--line-strong); color: var(--ink);
}
.cell-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Badges / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  padding: 3px 9px; border-radius: 999px; letter-spacing: 0.02em;
}
.pill-neutral { background: var(--surface-sunken); color: var(--ink-2); }
.pill-accent  { background: var(--accent-soft); color: var(--accent-ink); }
.pill-pos     { background: var(--pos-soft); color: #2c5246; }
.pill-neg     { background: var(--neg-soft); color: #7a3f2c; }
.pill-warn    { background: var(--warn-soft); color: #6a5230; }
.pill-info    { background: var(--info-soft); color: #36495e; }

/* ---------- Trust badge ---------- */
.trust {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px 8px 12px;
  font-size: 13.5px; color: var(--ink-2); box-shadow: var(--sh-sm);
}
.trust .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--pos);
  box-shadow: 0 0 0 4px var(--pos-soft);
}
.trust b { color: var(--ink); font-weight: 600; }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface-2); padding: 44px 28px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-softer); }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon {
  width: 46px; height: 46px; margin: 0 auto 14px; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border-radius: 50%;
}

/* ---------- Collapsible ---------- */
.collapse { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.collapse summary {
  list-style: none; cursor: pointer; padding: 14px 18px;
  display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14.5px;
  color: var(--ink);
}
.collapse summary::-webkit-details-marker { display: none; }
.collapse summary .chev { margin-left: auto; transition: transform .2s; color: var(--ink-3); }
.collapse[open] summary .chev { transform: rotate(180deg); }
.collapse .collapse-body { padding: 2px 18px 18px; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; border-top: 1px solid var(--line-soft); padding-top: 14px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  padding: 9px 15px; font-size: 14px; font-weight: 500; color: var(--ink-3);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* ---------- Waitlist CTA (consistent on every page) ---------- */
.waitlist { padding: 12px 0 64px; }
.waitlist-card {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 34px 36px; display: flex; align-items: center; gap: 32px;
  box-shadow: var(--sh);
}
.waitlist-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-softer) 0%, transparent 55%);
  pointer-events: none;
}
.waitlist-card { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .12s; }
.waitlist-card:hover { border-color: var(--accent); box-shadow: var(--sh-lg); transform: translateY(-2px); }
.waitlist-card > * { position: relative; }
.waitlist-text { flex: 1; min-width: 0; }
.waitlist-text .eyebrow { margin-bottom: 8px; display: block; }
.waitlist-text h3 { font-size: 22px; margin-bottom: 8px; }
.waitlist-text p { color: var(--ink-2); font-size: 15px; max-width: 60ch; }
.waitlist-card .btn { flex-shrink: 0; }
@media (max-width: 720px) {
  .waitlist-card { flex-direction: column; align-items: flex-start; gap: 18px; padding: 26px; }
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface-2); padding: 34px 0; }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; }
.foot .brand .mark { font-size: 17px; }
.foot-col { display: flex; flex-direction: column; gap: 7px; }
.foot-col .h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 600; margin-bottom: 3px; }
.foot-col a, .foot-col span { font-size: 13.5px; color: var(--ink-2); }
.foot-meta { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--ink-faint); max-width: 280px; }
@media (max-width: 720px) { .foot-meta { margin-left: 0; text-align: left; } }

/* ---------- Misc helpers ---------- */
.grid { display: grid; gap: 18px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.divider { height: 1px; background: var(--line-soft); border: none; margin: 0; }

/* ---------- Modal (waitlist) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(35,52,56,.42); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 44px 20px; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  width: 100%; max-width: 580px; margin: auto;
  transform: translateY(12px) scale(.99); transition: transform .22s ease;
  position: relative; overflow: hidden;
}
.modal-overlay.open .modal { transform: none; }
.modal-head {
  padding: 26px 30px 18px; border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2); position: relative;
}
.modal-head .eyebrow { display: block; margin-bottom: 9px; }
.modal-head h3 { font-size: 22px; margin-bottom: 7px; }
.modal-head p { font-size: 14px; color: var(--ink-2); max-width: 46ch; }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; line-height: 0;
  display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--surface-sunken); color: var(--ink); }
.modal-body { padding: 22px 30px 28px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-grid .full { grid-column: 1 / -1; }
@media (max-width: 540px) { .modal-grid { grid-template-columns: 1fr; } }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 9px 10px; font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink-2);
  border-radius: var(--r-sm); cursor: pointer; transition: all .15s;
}
.seg button:hover { border-color: var(--line-strong); }
.seg button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.modal-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.modal-actions .priv { font-size: 12px; color: var(--ink-faint); line-height: 1.4; }
.modal-success { padding: 40px 30px 44px; text-align: center; }
.modal-success .ok {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--pos-soft); color: var(--pos);
  display: flex; align-items: center; justify-content: center;
}
.modal-success h3 { font-size: 22px; margin-bottom: 10px; }
.modal-success p { font-size: 15px; color: var(--ink-2); max-width: 42ch; margin: 0 auto; line-height: 1.6; }
body.modal-open { overflow: hidden; }

/* ---------- Toast note ---------- */
.toast-note {
  margin: 0 20px 16px; padding: 12px 16px; font-size: 13px; line-height: 1.5;
  background: var(--accent-softer); border: 1px solid var(--accent-soft);
  color: var(--accent-ink); border-radius: var(--r-sm);
}

/* ---------- Evidence chips (ADM) ---------- */
.evi-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.evi-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.evi-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; color: var(--ink);
}
.evi-chip svg { color: var(--ink-3); }
.evi-chip .faint { font-size: 11.5px; font-family: var(--mono); }
.evi-x {
  border: none; background: var(--surface-sunken); color: var(--ink-3); cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%; line-height: 0; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.evi-x:hover { background: var(--neg-soft); color: var(--neg); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
