/* FirstBid: repair-ticket look. Ink navy text, cool paper, yellow only for money and the main action. */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --ink: #14213d;
  --ink-2: #26375e;
  --paper: #f7f8fa;
  --white: #ffffff;
  --money: #ffc93c;
  --money-deep: #e0a800;
  --fix: #1f9d6b;
  --fix-soft: #e3f4ec;
  --alert: #d64545;
  --alert-soft: #fbe9e9;
  --slate: #5b6478;
  --line: #dde2ea;
  --display: "Bricolage", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ink-2); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; z-index: 10; }

/* Header and footer */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); }
.site-head__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 750; font-size: 1.35rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); position: relative; }
.brand__mark::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 5px; height: 4px; border-radius: 2px; background: var(--money); }
.site-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--slate); font-weight: 550; }
.site-nav a:hover { color: var(--ink); }
.site-foot { border-top: 1px solid var(--line); background: var(--white); padding: 28px 0; margin-top: 64px; color: var(--slate); font-size: 0.95rem; }
.site-foot__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot p { margin: 0; max-width: 60ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--radius); border: 2px solid transparent;
  font: 650 1rem/1 var(--body); text-decoration: none; cursor: pointer;
}
.btn--money { background: var(--money); color: var(--ink); border-color: var(--money); }
.btn--money:hover { background: #ffd35f; color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--ink:hover { background: var(--ink-2); color: var(--white); }
.btn--wide { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: 550 1rem var(--body); color: var(--slate); cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

/* The amount: the one bold element, underlined with a highlighter stroke */
.amount {
  display: inline-block; position: relative; z-index: 0;
  font-family: var(--display); font-weight: 800; font-size: clamp(3.2rem, 7vw, 4.6rem); line-height: 1;
  letter-spacing: -0.03em;
}
.amount::after {
  content: ""; position: absolute; z-index: -1; left: -6px; right: -8px; bottom: 0.04em; height: 0.38em;
  background: var(--money); border-radius: 3px 10px 4px 8px; transform: rotate(-1.5deg);
}
.amount--small { font-size: 2.6rem; margin: 0 0 12px; }

/* Hero */
.hero { padding: 64px 0 72px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.lede { font-size: 1.2rem; color: var(--slate); max-width: 52ch; margin-bottom: 28px; }
.promises { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; }
.promises li { position: relative; padding-left: 28px; font-weight: 550; }
.promises li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 9px; border-left: 3px solid var(--fix); border-bottom: 3px solid var(--fix); transform: rotate(-45deg); }

/* Ticket: a paper repair ticket with a perforated top edge */
.ticket {
  margin: 0; position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 34px 30px 26px; transform: rotate(1.2deg);
}
.ticket::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 12px; height: 0;
  border-top: 2px dashed var(--line);
}
.ticket__tag { position: absolute; top: -13px; left: 24px; background: var(--ink); color: var(--white); font-size: 0.85rem; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.ticket__problem { font-family: var(--display); font-size: 1.3rem; font-weight: 600; margin: 8px 0 18px; }
.ticket__budget { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 18px; }
.ticket__label { color: var(--slate); font-weight: 600; font-size: 0.95rem; }
.ticket__head { font-weight: 650; margin-bottom: 8px; }
.ticket__note { color: var(--slate); font-size: 0.93rem; margin: 14px 0 0; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checks li { position: relative; padding-left: 24px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 11px; height: 6px; border-left: 2px solid var(--fix); border-bottom: 2px solid var(--fix); transform: rotate(-45deg); }

/* Request form and live quote */
.start { padding: 56px 0; background: var(--white); border-block: 1px solid var(--line); scroll-margin-top: 12px; }
.start__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.request h2 { margin-bottom: 24px; }
.group { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.group legend { font-weight: 650; margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 0.95rem; font-weight: 550; cursor: pointer; }
.chip input:hover + span { border-color: var(--slate); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--money-deep); outline-offset: 2px; }

.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { margin-bottom: 18px; min-width: 0; }
.field label, .check { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { color: var(--slate); font-weight: 450; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], textarea, select {
  width: 100%; font: 400 1rem/1.4 var(--body); color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 48px;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 33, 61, 0.12); }
.field--error input, .field--error textarea { border-color: var(--alert); }
.field__err { color: var(--alert); font-size: 0.93rem; font-weight: 550; margin: 6px 0 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; }

.budget { display: flex; align-items: stretch; max-width: 260px; }
.budget__sign { display: grid; place-items: center; padding: 0 14px; background: var(--money); border: 1.5px solid var(--money); border-radius: var(--radius) 0 0 var(--radius); font: 800 1.4rem var(--display); }
.budget input { border-radius: 0 var(--radius) var(--radius) 0; font: 750 1.5rem var(--display); }
.picks { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pick { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); background: var(--white); border-radius: 8px; font: 650 0.95rem var(--body); color: var(--ink); cursor: pointer; }
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed="true"] { background: var(--money); border-color: var(--money); }

.fine { color: var(--slate); font-size: 0.92rem; margin-top: 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.quote { position: sticky; top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.quote__eyebrow { font-weight: 650; color: var(--slate); margin-bottom: 12px; }
.quote__empty { color: var(--slate); margin: 0; }
.quote__task { font-weight: 600; color: var(--slate); margin-bottom: 4px; }
.quote__head { font-family: var(--display); font-size: 1.35rem; font-weight: 700; margin: 10px 0; }
.quote__note { color: var(--slate); font-size: 0.95rem; margin: 14px 0 0; }
.quote--free .quote__head, .quote--redirect .quote__head { color: var(--ink-2); }
.quote__flag { display: inline-block; font-size: 0.85rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--fix-soft); color: #11603f; margin-bottom: 8px; }
.quote--smaller .quote__flag, .quote--diagnosis .quote__flag { background: #fff4d1; color: #6b4e00; }
.quote--redirect .quote__flag, .quote--free .quote__flag { background: #e9edf5; color: var(--ink-2); }
.quote-inline { display: none; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); font-weight: 600; }
.quote__error { color: var(--alert); font-weight: 550; margin: 0; }

/* Price list and steps */
.fixes, .how { padding: 64px 0 0; }
.section-lede { color: var(--slate); max-width: 62ch; }
.price-list { margin: 24px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.price-list__row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.price-list dt { font-weight: 550; }
.price-list dd { margin: 0; font-family: var(--display); font-weight: 700; white-space: nowrap; }
.aside-note { color: var(--slate); max-width: 70ch; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(step); display: block; font: 800 1.6rem var(--display); margin-bottom: 8px; }
.steps p { color: var(--slate); margin: 0; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; }
.alert--error { background: var(--alert-soft); color: #8a2020; border: 1px solid #f2c6c6; }
.alert--ok { background: var(--fix-soft); color: #11603f; border: 1px solid #bfe5d3; }

/* Status page */
.status, .plain, .admin { padding: 48px 0; }
.status__wrap { max-width: 980px; }
.status__ref { color: var(--slate); font-weight: 650; margin-bottom: 6px; }
.status__site { color: var(--slate); word-break: break-all; }
.tracker { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tracker__step { position: relative; padding-top: 18px; font-size: 0.9rem; font-weight: 550; color: var(--slate); }
.tracker__step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: 4px; background: var(--line); }
.tracker__step.is-done::before { background: var(--fix); }
.tracker__step.is-now { color: var(--ink); font-weight: 700; }
.tracker__step.is-now::before { background: var(--ink); }
.pay { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--white); border: 2px solid var(--money); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 24px; }
.pay__title { font-weight: 700; margin-bottom: 4px; }
.pay__text { margin: 0; color: var(--slate); }
.status__grid, .admin__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; min-width: 0; }
.card h2 { font-size: 1.3rem; }
.card__task { font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.card__head { font-weight: 650; margin-bottom: 8px; }
.card__note { color: var(--slate); font-size: 0.95rem; margin: 12px 0 0; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { border-left: 3px solid var(--line); padding-left: 14px; }
.timeline time { display: block; font-size: 0.85rem; color: var(--slate); }
.timeline p { margin: 2px 0 0; }
.plain__wrap { max-width: 640px; }
.login { max-width: 420px; }
.stack-form { margin-bottom: 22px; }

/* Admin */
.page-admin h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.filters a { text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 0.93rem; font-weight: 550; }
.filters a[aria-current="page"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.count { color: inherit; opacity: 0.7; }
.table-scroll { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 650; color: var(--slate); }
.table .num { font-family: var(--display); font-weight: 700; }
.muted { color: var(--slate); font-size: 0.88rem; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: #e9edf5; color: var(--ink-2); }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 650; background: #e9edf5; color: var(--ink-2); white-space: nowrap; }
.status-pill--awaiting_payment { background: #fff4d1; color: #6b4e00; }
.status-pill--paid, .status-pill--working, .status-pill--testing { background: #e3ecfb; color: #1d3f7a; }
.status-pill--done { background: var(--fix-soft); color: #11603f; }
.facts { margin: 0 0 16px; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.facts dt { color: var(--slate); font-weight: 550; }
.facts dd { margin: 0; word-break: break-word; }
.pre { white-space: pre-wrap; word-break: break-word; background: var(--paper); border-radius: 8px; padding: 12px; }
.empty { color: var(--slate); }

/* Responsive */
@media (max-width: 900px) {
  .hero__grid, .start__grid, .status__grid, .admin__grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 40px 0 56px; }
  .ticket { transform: none; }
  .quote { position: static; }
  .quote-inline:not(:empty) { display: block; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .row, .steps { grid-template-columns: minmax(0, 1fr); }
  .site-nav { gap: 14px; font-size: 0.95rem; }
  .tracker { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
