/* Pagelee Investment — design layer on top of Tailwind CDN.
   Direction: "the statement". The page borrows the visual language of an
   engraved securities certificate and a custodial account statement — ledger
   rules, tabular figures, guilloché engraving — because that is the artifact a
   retirement investor actually recognises and trusts. */

:root {
  --ink:   #151C18;
  --cert:  #0E3B2E;
  --deep:  #092A21;
  --paper: #F0EFE8;
  --bond:  #E3E2D7;
  --brass: #A8853C;
  --muted: #666C64;
}

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

body {
  background-color: var(--paper);
  color: var(--ink);
  font-feature-settings: "kern" 1;
  /* Faint laid-paper tooth so large flat areas don't read as flat screen. */
  background-image:
    repeating-linear-gradient(0deg, rgba(21,28,24,.016) 0 1px, transparent 1px 3px);
}

/* --- Type -------------------------------------------------------------- */
.font-display { font-family: "Newsreader", Georgia, serif; }
.font-body    { font-family: "Public Sans", system-ui, -apple-system, sans-serif; }
.font-data    { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.display-xl {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
}
.display-lg {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
}
.display-md {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  line-height: 1.16;
  letter-spacing: -0.012em;
}
.display-xl em, .display-lg em { font-style: italic; color: var(--cert); }

/* The eyebrow doubles as a document reference — it labels the section the way a
   filing labels a schedule, rather than decorating it. */
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.688rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .no { color: var(--brass); }

.prose-body p { line-height: 1.68; }
.tnum { font-variant-numeric: tabular-nums; }

/* --- Ledger rules ------------------------------------------------------- */
.rule       { border-top: 1px solid rgba(21,28,24,.14); }
.rule-brass { border-top: 1px solid rgba(168,133,60,.5); }
.rule-light { border-top: 1px solid rgba(240,239,232,.16); }

/* --- Statement specimen (the signature element) ------------------------- */
.statement {
  background: #FBFAF5;
  border: 1px solid rgba(21,28,24,.16);
  box-shadow: 0 1px 0 rgba(21,28,24,.05), 0 22px 44px -30px rgba(9,42,33,.5);
  position: relative;
}
.statement::after { /* perforation edge, like a tear-off statement stub */
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background-image: radial-gradient(circle, rgba(21,28,24,.34) 1px, transparent 1px);
  background-size: 7px 1px;
}
.statement-row { border-top: 1px solid rgba(21,28,24,.1); }
.statement-row:first-of-type { border-top: 0; }

/* Overprint so the specimen can never be mistaken for a real account. */
.overprint {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: .32em;
  color: rgba(168,133,60,.34);
  border: 1px solid rgba(168,133,60,.34);
  transform: rotate(-6deg);
  pointer-events: none;
}

/* --- Engraved band ------------------------------------------------------ */
.guilloche { color: var(--brass); opacity: .34; height: 44px; }
.guilloche svg { width: 100%; height: 100%; display: block; }
.guilloche--light { color: var(--brass); opacity: .3; }

/* --- Controls ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: "Public Sans", sans-serif;
  font-weight: 600; font-size: .875rem; letter-spacing: .01em;
  padding: .875rem 1.5rem;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--cert); color: #F4F3EC; }
.btn-primary:hover { background: var(--deep); }
.btn-outline { border-color: rgba(21,28,24,.3); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--cert); color: var(--cert); }
.btn-onDark { border-color: rgba(240,239,232,.4); color: var(--paper); }
.btn-onDark:hover { background: var(--paper); color: var(--cert); border-color: var(--paper); }

.link-underline {
  border-bottom: 1px solid rgba(168,133,60,.6);
  padding-bottom: 1px;
  transition: border-color .18s ease, color .18s ease;
}
.link-underline:hover { border-color: var(--cert); color: var(--cert); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* --- Disclosure accordion ---------------------------------------------- */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details .chev { transition: transform .2s ease; }
details[open] .chev { transform: rotate(45deg); }

/* --- Motion ------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .62s cubic-bezier(.22,.61,.36,1), transform .62s cubic-bezier(.22,.61,.36,1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Forms -------------------------------------------------------------- */
.errorlist {
  list-style: none; margin: .4rem 0 0; padding: 0;
  font-family: "IBM Plex Mono", monospace; font-size: .72rem;
  letter-spacing: .04em; color: #8C2F1E;
}
.form-label {
  display: block; margin-bottom: .4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: .688rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.lead-form { --lead-gap: .9rem; }
.lead-form .grid { gap: .9rem 1rem; }
.lead-form .form-label {
  margin-bottom: .25rem;
  font-size: .625rem;
  letter-spacing: .12em;
}
.lead-form input,
.lead-form select,
.lead-form textarea {
  padding-top: .7rem !important;
  padding-bottom: .7rem !important;
  font-size: 14px !important;
}
.lead-form textarea {
  min-height: 88px;
}
.lead-form .btn {
  padding-top: .8rem;
  padding-bottom: .8rem;
}
select.w-full { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--muted) 50%),
  linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

@media print { .no-print { display: none !important; } }

/* ======================================================================
   Staff console — a different surface to the marketing site on purpose.
   Denser, sans-dominant, mono numerals, app-shell rather than page.
   ====================================================================== */
.console-body { background: #FAFAF7; }
.c-card { background: #fff; border: 1px solid rgba(21,28,24,.11); }
.c-label {
  font-family: "IBM Plex Mono", monospace; font-size: .625rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.c-stat { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 1.85rem; letter-spacing: -.02em; color: var(--ink); }
.c-table { width: 100%; border-collapse: collapse; }
.c-table th {
  font-family: "IBM Plex Mono", monospace; font-size: .625rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  text-align: left; font-weight: 400; padding: .625rem .875rem;
  border-bottom: 1px solid rgba(21,28,24,.13);
}
.c-table td { padding: .8rem .875rem; font-size: .875rem;
  border-bottom: 1px solid rgba(21,28,24,.07); }
.c-table tbody tr:hover { background: rgba(14,59,46,.035); }
.c-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .625rem .9rem; font-size: .875rem; color: rgba(240,239,232,.62);
  border-left: 2px solid transparent; transition: color .15s, background-color .15s;
}
.c-nav a:hover { color: var(--paper); background: rgba(240,239,232,.05); }
.c-nav a.is-active { color: var(--paper); border-left-color: var(--brass);
  background: rgba(240,239,232,.07); }
.pill {
  display: inline-block; font-family: "IBM Plex Mono", monospace;
  font-size: .625rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .2rem .5rem; border: 1px solid currentColor;
}
.pill-new       { color: #0E3B2E; }
.pill-contacted { color: #7A6220; }
.pill-qualified { color: #1B5E4A; }
.pill-not_a_fit { color: #6B7169; }
.pill-closed    { color: #6B7169; }
.c-input {
  width: 100%; background: #fff; border: 1px solid rgba(21,28,24,.16);
  padding: .55rem .75rem; font-size: .875rem; color: var(--ink);
}
.c-input:focus { outline: none; border-color: var(--cert);
  box-shadow: 0 0 0 3px rgba(14,59,46,.13); }

/* ======================================================================
   Shared UI components (added in the UX pass)
   ====================================================================== */

/* Flash messages — dismissible, announced to screen readers */
.flash { display:flex; gap:.75rem; align-items:flex-start;
  padding:.8rem 1rem; border:1px solid; font-family:"IBM Plex Mono",monospace;
  font-size:.75rem; line-height:1.7; }
.flash-success { border-color:rgba(14,59,46,.3); color:var(--cert); background:rgba(14,59,46,.05); }
.flash-error   { border-color:rgba(140,47,30,.4); color:#8C2F1E; background:rgba(140,47,30,.05); }
.flash-info    { border-color:rgba(168,133,60,.45); color:#7A6220; background:rgba(168,133,60,.06); }
.flash button { margin-left:auto; opacity:.55; line-height:1; flex-shrink:0; }
.flash button:hover { opacity:1; }

/* Empty state */
.empty { border:1px dashed rgba(21,28,24,.25); padding:2.5rem 2rem; text-align:center; }
.empty-title { font-family:"Newsreader",Georgia,serif; font-size:1.3rem; color:var(--ink); }
.empty-body { margin-top:.6rem; font-size:.9375rem; line-height:1.65;
  color:rgba(21,28,24,.68); max-width:34rem; margin-left:auto; margin-right:auto; }

/* Error summary — focused on submit so keyboard and AT users land on it */
.error-summary { border-left:3px solid #8C2F1E; background:rgba(140,47,30,.05);
  padding:1rem 1.15rem; margin-bottom:1.5rem; }
.error-summary:focus { outline:2px solid #8C2F1E; outline-offset:3px; }
.error-summary ul { margin:.5rem 0 0; padding-left:1.1rem; }
.error-summary li { font-size:.8125rem; line-height:1.8; color:#8C2F1E; }

/* Buttons: busy state stops double-submitting a money request */
.btn[aria-busy="true"], .btn:disabled { opacity:.6; pointer-events:none; }
.btn[aria-busy="true"]::after { content:""; width:.75rem; height:.75rem;
  border:1.5px solid currentColor; border-right-color:transparent; border-radius:50%;
  display:inline-block; animation:spin .6s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Status timeline */
.timeline { position:relative; padding-left:1.6rem; }
.timeline::before { content:""; position:absolute; left:.3rem; top:.45rem; bottom:.45rem;
  width:1px; background:rgba(21,28,24,.15); }
.timeline-item { position:relative; padding-bottom:1.4rem; }
.timeline-item::before { content:""; position:absolute; left:-1.47rem; top:.4rem;
  width:.5rem; height:.5rem; background:var(--paper); border:1.5px solid var(--brass); }
.timeline-item.is-done::before { background:var(--cert); border-color:var(--cert); }

/* Step rail for transfer progress */
.rail { display:flex; gap:.25rem; }
.rail span { flex:1; height:3px; background:rgba(21,28,24,.12); }
.rail span.on { background:var(--cert); }

/* Sticky table headers in the console — long lists stay readable */
.c-table thead th { position:sticky; top:0; background:#fff; z-index:1; }

/* Amount input with a currency prefix */
.amount-wrap { position:relative; }
.amount-wrap .sym { position:absolute; left:1rem; top:50%; transform:translateY(-50%);
  font-family:"IBM Plex Mono",monospace; font-size:.9rem; color:var(--muted); pointer-events:none; }
.amount-wrap input { padding-left:2.1rem !important; font-family:"IBM Plex Mono",monospace;
  font-variant-numeric:tabular-nums; }

.pill-requested    { color:#7A6220; }
.pill-instructions { color:#7A6220; }
.pill-in_transit   { color:#0E3B2E; }
.pill-completed    { color:#1B5E4A; }
.pill-cancelled,
.pill-rejected     { color:#6B7169; }
.pill-deposit      { color:#1B5E4A; }
.pill-withdrawal   { color:#7A6220; }
