/* TradeLine Assist - public site styles (portal adds portal.css on top of this)
   Palette: slate ink + hi-vis yellow on cool paper. Type: Barlow Condensed (headings) + Public Sans (body). */

:root {
  --ink: #17212b;
  --ink-2: #36424e;
  --mute: #566470;
  --line: #d3d9de;
  --paper: #f2f4f5;
  --white: #ffffff;
  --hivis: #ffd100;
  --pipe: #1c5a8a;
  --pipe-dark: #144266;
  --alert: #b3261e;
  --ok: #1f7a4d;
  --radius: 6px;
  --head: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--pipe); text-underline-offset: 0.18em; }
a:hover { color: var(--pipe-dark); }
:focus-visible { outline: 3px solid var(--pipe); outline-offset: 2px; border-radius: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--hivis); }

.skip { position: absolute; left: -999px; top: 0; background: var(--hivis); color: var(--ink); padding: .6rem 1rem; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; top: 8px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section--white { background: var(--white); border-block: 1px solid var(--line); }

h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: 0; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 4.9rem); line-height: .98; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.02; }
h3 { font-size: 1.45rem; line-height: 1.1; font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; line-height: 1.55; max-width: 38em; }
.muted { color: var(--mute); }
.small { font-size: .9rem; }
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.9rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4em; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font: 700 1.65rem/1 var(--head); }
.brand:hover { color: var(--ink); }
.brand svg { width: 38px; height: 20px; flex: none; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { border-color: var(--ink); }
.nav .nav-login { color: var(--pipe); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius); padding: .45rem .8rem; font: 600 .95rem var(--body); color: var(--ink); cursor: pointer; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 20px 1.2rem; }
  .site-header[data-open="true"] .nav { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--hivis); color: var(--ink); border: 2px solid var(--ink);
  font: 700 1rem/1.2 var(--body); padding: .8em 1.35em; border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--hivis); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.on-dark .btn { border-color: var(--hivis); }
.on-dark .btn:hover { background: transparent; color: var(--hivis); }
.on-dark .btn--ghost { color: var(--white); border-color: var(--white); }
.on-dark .btn--ghost:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--white); padding-block: clamp(2.8rem, 7vw, 5.5rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.15fr .85fr; } }
.hero h1 { margin-bottom: .35em; }
.hero .lead { color: #dfe5ea; }

/* Example job summary (what the owner receives) */
.jobcard { background: var(--white); color: var(--ink); border-radius: 10px; max-width: 420px; width: 100%; justify-self: center; box-shadow: 0 28px 50px -22px rgba(0,0,0,.65); }
@media (min-width: 900px) { .jobcard { justify-self: end; } }
.jobcard__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 2px dashed var(--line); font-size: .9rem; color: var(--mute); }
.jobcard__head strong { color: var(--ink); }
.jobcard__body { padding: 1rem 1.1rem 1.2rem; }
.jobcard dl { margin: 0 0 .9rem; display: grid; grid-template-columns: 7.2rem 1fr; gap: .35rem .8rem; font-size: .95rem; }
.jobcard dt { color: var(--mute); }
.jobcard dd { margin: 0; font-weight: 600; }
.jobcard p { font-size: .95rem; margin: 0; padding-top: .8rem; border-top: 1px solid var(--line); }
.jobcard__foot { padding: .7rem 1.1rem; border-top: 2px dashed var(--line); font-size: .85rem; color: var(--mute); }
.tag { display: inline-block; border-radius: 4px; padding: .1em .55em; font: 700 .82rem/1.5 var(--body); }
.tag--urgent { background: var(--alert); color: #fff; }
.tag--ok { background: #dcefe4; color: #14583a; }
.tag--plain { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.example-note { color: #aeb9c3; font-size: .85rem; margin-top: .8rem; text-align: center; }
@media (min-width: 900px) { .example-note { text-align: right; max-width: 420px; margin-left: auto; } }

@media (prefers-reduced-motion: no-preference) {
  .jobcard [data-seq] { opacity: 0; animation: reveal .5s ease-out forwards; animation-delay: calc(var(--i, 0) * .32s + .35s); }
  @keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}

/* ---------- Plain facts row ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.facts > div { padding: 1.3rem 1.4rem; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; font: 600 1.35rem/1.15 var(--head); margin-bottom: .2rem; }
.facts span { color: var(--mute); font-size: .95rem; }
@media (max-width: 640px) { .facts > div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } .facts > div:first-child { border-top: 0; } }

/* ---------- Two-column section header + body ---------- */
.split { display: grid; gap: clamp(1.5rem, 4vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 880px) { .split { grid-template-columns: 5fr 7fr; } .split--even { grid-template-columns: 1fr 1fr; } }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.2rem 1fr; gap: 0 1rem; padding: 1.3rem 0; border-top: 2px solid var(--ink); }
.steps li:last-child { border-bottom: 2px solid var(--ink); }
.steps li::before { content: counter(step); font: 700 2.6rem/1 var(--head); color: var(--ink); }
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; color: var(--ink-2); }

/* ---------- Does / doesn't ---------- */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding: .8rem 0 .8rem 2rem; border-top: 1px solid var(--line); }
.checks li:last-child { border-bottom: 1px solid var(--line); }
.checks li::before { position: absolute; left: 0; top: .78rem; font-weight: 700; }
.checks--yes li::before { content: "\2713"; color: var(--ok); }
.checks--no li::before { content: "\2715"; color: var(--alert); }

/* ---------- Portal preview on the home page ---------- */
.mock { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 18px 40px -26px rgba(23,33,43,.5); }
.mock__bar { background: var(--ink); color: var(--white); padding: .6rem 1rem; font-size: .85rem; display: flex; justify-content: space-between; }
.mock__figs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.mock__figs div { padding: .9rem 1rem; border-left: 1px solid var(--line); }
.mock__figs div:first-child { border-left: 0; }
.mock__figs b { display: block; font: 700 1.9rem/1 var(--head); }
.mock__figs span { font-size: .8rem; color: var(--mute); }
.mock table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mock td { padding: .65rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.mock tr:last-child td { border-bottom: 0; }
.mock td:first-child { font-weight: 600; white-space: nowrap; }
.mock-note { font-size: .85rem; color: var(--mute); margin-top: .6rem; }
@media (max-width: 520px) { .mock td:nth-child(3) { display: none; } }

/* ---------- Dark call-to-action band ---------- */
.band { background: var(--ink); color: var(--white); padding-block: clamp(2.5rem, 6vw, 4rem); }
.band .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.band h2 { margin: 0; max-width: 18em; }
.band p { margin: .5rem 0 0; color: #cfd7de; }

/* ---------- Pricing board ---------- */
.board { display: grid; grid-template-columns: 1fr; border: 2px solid var(--ink); background: var(--white); }
@media (min-width: 860px) { .board { grid-template-columns: repeat(3, 1fr); } }
.plan { padding: 0 0 1.6rem; border-top: 2px solid var(--ink); display: flex; flex-direction: column; }
.plan:first-child { border-top: 0; }
@media (min-width: 860px) { .plan { border-top: 0; border-left: 2px solid var(--ink); } .plan:first-child { border-left: 0; } }
.plan__flag { background: var(--line); color: var(--ink); font-weight: 600; font-size: .9rem; padding: .35rem 1.4rem; min-height: 2rem; }
.plan--pop .plan__flag { background: var(--hivis); }
.plan__main { padding: 1.2rem 1.4rem 0; flex: 1; display: flex; flex-direction: column; }
.plan h3 { font-size: 2rem; margin: 0; }
.price { font: 700 3.4rem/1 var(--head); margin: .5rem 0 0; }
.price small { font: 500 1rem var(--body); color: var(--mute); }
.price-alt { color: var(--ink-2); margin: .3rem 0 1.1rem; }
.plan ul { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.plan li { padding: .55rem 0; border-top: 1px solid var(--line); font-size: .98rem; }
.plan .btn { margin-top: auto; text-align: center; }
.notes { display: grid; gap: .5rem; margin-top: 1.5rem; color: var(--ink-2); font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--line); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.5rem/1 var(--head); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .7rem 0 0; color: var(--ink-2); max-width: 44rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.field .hint { font-weight: 400; color: var(--mute); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid #9aa6b0; border-radius: var(--radius); padding: .7rem .8rem;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pipe); outline-offset: 1px; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.hp { position: absolute; left: -5000px; height: 0; width: 0; overflow: hidden; }
.msg { padding: .9rem 1rem; border-radius: var(--radius); font-weight: 500; }
.msg[hidden] { display: none; }
.msg--ok { background: #dcefe4; color: #14583a; border: 1px solid #a9d3bb; }
.msg--err { background: #fbe4e1; color: #7a1a14; border: 1px solid #efb3ac; }

/* ---------- Draft note on legal pages ---------- */
.draft-note { background: var(--hivis); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 2rem; font-weight: 500; }
.todo { background: #fff3b0; padding: 0 .25em; border-radius: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfd7de; padding-block: 3rem 2rem; font-size: .95rem; }
.site-footer a { color: var(--white); }
.site-footer .brand { color: var(--white); }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font: 600 1.15rem var(--head); color: var(--white); margin: 0 0 .6rem; letter-spacing: .01em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot-base { border-top: 1px solid #36424e; margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: #a7b3bd; }

@media print { .site-header, .site-footer, .band { display: none; } body { background: #fff; } }

/* ---------- Ruled rows: heading left, text right ---------- */
.rows > div { display: grid; gap: .3rem 2rem; grid-template-columns: 1fr; border-top: 1px solid var(--line); padding: 1.2rem 0; }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { margin: 0; }
.rows p { margin: 0; color: var(--ink-2); max-width: 40rem; }
@media (min-width: 800px) { .rows > div { grid-template-columns: 5fr 7fr; } }
.contact-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 7fr 5fr; } }
.side { border-top: 2px solid var(--ink); padding-top: 1rem; }
.side p { margin-bottom: .8rem; }
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { max-width: 14em; }

/* Nav button must win over the generic ".nav a" link rule */
.nav a.btn { padding: .65em 1.15em; border: 2px solid var(--ink); font-weight: 700; color: var(--ink); }
.nav a.btn:hover { color: var(--hivis); }
@media (min-width: 880px) { .split > div:first-child { align-self: start; position: sticky; top: 1.5rem; } }
