/* Foxxers — charcoal, graphite, off-white, amber. No web fonts fetched. */
:root {
  --charcoal: #1C1E21;
  --graphite: #2E3238;
  --graphite-2: #383D45;
  --off-white: #F4F4F2;
  --amber: #FFB020;
  --amber-dim: #C88614;
  --muted: #9AA0A8;
  --faint: #6B7280;
  --line: #3A3F47;
  --good: #4CC38A;
  --warn: #FFB020;
  --bad: #E5484D;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.25);
  --shadow-lift: 0 14px 38px rgba(0,0,0,.45);
  /* A hairline of light along the top edge is what stops a flat fill from
     reading as a painted rectangle. Everything raised gets one. */
  --edge: inset 0 1px 0 rgba(255,255,255,.05);
  --surface: linear-gradient(180deg, #33373E 0%, #2C3037 100%);
  --surface-flat: #2E3238;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--charcoal);
  color: var(--off-white);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
}

/*
 * Two very faint washes of the brand amber, fixed behind everything. Not
 * decoration for its own sake: without them every surface sits on the same
 * dead grey and the page reads as a wireframe rather than a product.
 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 12% -12%, rgba(255,176,32,.07), transparent 62%),
    radial-gradient(760px 420px at 92% 4%, rgba(255,176,32,.035), transparent 58%);
}
body > * { position: relative; z-index: 1; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5rem; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 750; letter-spacing: -.03em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1rem; }
small { color: var(--muted); }

/* ---- chrome ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  background: rgba(28,30,33,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 750; letter-spacing: -.02em; font-size: 1.15rem; color: var(--off-white); }
.brand:hover { text-decoration: none; }
/* The tile behind the fox is the same charcoal as the bar, so the mark reads
   as a logo rather than a badge stuck onto one. */
.brand .mark { width: 32px; height: 32px; display: block; object-fit: contain; }
.topbar nav { margin-left: auto; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }

/*
 * Signed in as both a customer and a foxxer there are five links, which wrap
 * into three ragged rows on a phone and push the brand out of the corner.
 * Below the breakpoint the brand takes its own row and the links scroll.
 */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: .5rem; }
  .brand { flex: 1 0 100%; }
  .topbar nav {
    margin-left: 0; flex-wrap: nowrap; width: 100%;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { white-space: nowrap; }
}
.topbar nav a { padding: .4rem .7rem; border-radius: 8px; color: var(--muted); font-size: .92rem; font-weight: 500; }
.topbar nav a:hover { background: var(--graphite); color: var(--off-white); text-decoration: none; }
.topbar nav a.active { color: var(--amber); background: var(--graphite); }

main { max-width: 1100px; margin: 0 auto; padding: clamp(1rem, 4vw, 2.2rem) clamp(1rem, 4vw, 2rem) 5rem; }
.wide { max-width: 1280px; }

/* ---- pieces ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm), var(--edge);
}
.card + .card { margin-top: .85rem; }

/* Cards that are themselves a link lift under the cursor. Static ones do
   not — a surface that moves when you cannot click it is a lie. */
a.card { display: block; color: inherit; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
a.card:hover { transform: translateY(-2px); border-color: #4A515C; box-shadow: var(--shadow-lift), var(--edge); text-decoration: none; }

/* A section heading with a short accent rule under it. */
.section-head { margin: 2.2rem 0 .9rem; }
.section-head h2 { margin: 0; }
.section-head::after {
  content: ""; display: block; width: 34px; height: 3px; border-radius: 2px;
  background: var(--amber); margin-top: .55rem;
}
.grid { display: grid; gap: .85rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.stack > * + * { margin-top: .6rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.05rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--graphite-2); color: var(--off-white);
  font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .06s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { background: #434952; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--amber); color: var(--charcoal); border-color: var(--amber); }
.btn.primary:hover { background: #FFC04D; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: #6b2b2d; color: #ff9b9e; }
.btn.sm { padding: .38rem .7rem; font-size: .87rem; border-radius: 8px; }
.btn.block { width: 100%; }

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: .6rem .7rem; border-radius: 9px;
  border: 1px solid var(--line); background: var(--charcoal); color: var(--off-white);
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--amber-dim); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 96px; resize: vertical; }
.field + .field { margin-top: .7rem; }
.inline-fields { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.check { display: flex; align-items: center; gap: .5rem; }
.check input { width: auto; }
.check label { margin: 0; color: var(--off-white); font-size: .95rem; }

.chip {
  display: inline-block; padding: .18rem .55rem; border-radius: 999px;
  background: var(--graphite-2); border: 1px solid var(--line);
  font-size: .76rem; color: var(--muted); font-weight: 600; letter-spacing: .02em;
}
.chip.amber { background: rgba(255,176,32,.13); border-color: rgba(255,176,32,.4); color: var(--amber); }
.chip.good  { background: rgba(76,195,138,.13); border-color: rgba(76,195,138,.4); color: var(--good); }
.chip.bad   { background: rgba(229,72,77,.13); border-color: rgba(229,72,77,.4); color: #ff9b9e; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.big { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.hr { height: 1px; background: var(--line); margin: 1rem 0; border: 0; }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .4rem .5rem; border-bottom: 1px solid var(--line); font-weight: 600; }
td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/*
 * A seven-column table does not survive a 390px screen. Below the breakpoint
 * a table marked `.stacks` becomes one card per row, with each cell's own
 * data-label as its heading. The alternative — a sideways scroll — hides the
 * two things that matter most, the amount to collect and the button that
 * collects it, off the right-hand edge.
 */
@media (max-width: 760px) {
  .table-wrap:has(.stacks) { overflow-x: visible; }
  table.stacks, table.stacks tbody, table.stacks tr, table.stacks td { display: block; width: 100%; }
  table.stacks thead { display: none; }

  table.stacks tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm), var(--edge);
    padding: .35rem .9rem .8rem; margin-bottom: .85rem;
  }
  table.stacks td {
    border: 0; padding: .5rem 0; text-align: left !important;
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  }
  table.stacks td + td { border-top: 1px solid var(--line); }
  table.stacks td::before {
    content: attr(data-label);
    font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 600; flex: 0 0 auto;
  }
  /* The action row is the reason for the card: give it the full width. */
  table.stacks td:last-child { display: block; }
  table.stacks td:last-child::before { content: none; }
  table.stacks .pay-row { justify-content: stretch !important; }
  table.stacks .pay-row select { flex: 1 1 auto; }
}

/* ---- home ---- */

/*
 * The hero was one column of text with an empty right half. It now carries a
 * worked example of the thing being promised — a tradesperson with real hours
 * against their name — because that is more persuasive than any adjective.
 */
.hero {
  padding: clamp(1.5rem, 5vw, 3rem) 0 1.5rem;
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero-aside { display: none; } }
.hero h1 { max-width: 15ch; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.06; }
.hero .lede { font-size: 1.08rem; color: var(--muted); max-width: 46ch; }
.searchbar { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr auto; margin-top: 1.4rem; }
@media (max-width: 700px) { .searchbar { grid-template-columns: 1fr; } }

/* Small factual claims under the search box. Each is checkable in the app. */
.proof { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-top: 1.1rem; }
.proof span { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; color: var(--muted); }
.proof span::before { content: "✓"; color: var(--good); font-weight: 700; }

/* The worked example: a booking card as it actually appears in the app. */
.hero-aside .demo-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow), var(--edge);
  transform: rotate(-.6deg);
}
.hero-aside .demo-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .8rem; }
.hero-aside .demo-slot {
  padding: .5rem .3rem; border-radius: 9px; text-align: center; font-size: .84rem;
  border: 1px solid var(--line); background: var(--charcoal); color: var(--muted);
}
.hero-aside .demo-slot.on { background: var(--amber); border-color: var(--amber); color: var(--charcoal); font-weight: 700; }

.trade-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); }
.trade-tile {
  display: flex; align-items: center; gap: .6rem;
  padding: .85rem .9rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--edge);
  color: var(--off-white); font-weight: 550; font-size: .93rem;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.trade-tile:hover {
  border-color: var(--amber); text-decoration: none;
  transform: translateY(-2px); box-shadow: var(--shadow-sm), var(--edge);
}
.trade-tile .ic { font-size: 1.35rem; line-height: 1; }

/* How it works — the two doors, side by side, because which one you are in
   is the first thing a customer needs to understand. */
.how { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.how .step-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm), var(--edge);
}
.how .n {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255,176,32,.14); border: 1px solid rgba(255,176,32,.4);
  color: var(--amber); font-weight: 800; font-size: .92rem; margin-bottom: .7rem;
}
.how h3 { margin-bottom: .3rem; }
.how p { margin: 0; color: var(--muted); font-size: .93rem; }

/* The two call-outs at the foot of the home page speak to opposite people,
   so they must not look like the same grey slab twice. */
.panel {
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm), var(--edge);
  display: flex; gap: 1.2rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.panel h2 { margin: 0 0 .35rem; }
.panel p { margin: 0; color: var(--muted); max-width: 62ch; }
.panel-urgent {
  background: linear-gradient(135deg, rgba(229,72,77,.16) 0%, rgba(46,50,56,.9) 55%);
  border-color: rgba(229,72,77,.35);
}
.panel-trade {
  background: linear-gradient(135deg, rgba(255,176,32,.14) 0%, rgba(46,50,56,.9) 55%);
  border-color: rgba(255,176,32,.32);
}

/* ---- pro cards ---- */

/*
 * Three columns: who they are, what they said, when they can come. The
 * right-hand column was inline, so the "from EUR x" line and the button
 * fought for the same row and overlapped. It is a column now.
 */
.pro-card { display: grid; gap: 1rem; grid-template-columns: auto 1fr auto; align-items: start; }
@media (max-width: 720px) { .pro-card { grid-template-columns: auto 1fr; } .pro-card .when { grid-column: 1 / -1; } }

.pro-card .when {
  display: flex; flex-direction: column; align-items: flex-end; gap: .15rem;
  min-width: 170px; text-align: right;
  padding-left: 1rem; border-left: 1px solid var(--line);
}
@media (max-width: 720px) {
  .pro-card .when { align-items: flex-start; text-align: left; padding: .8rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
.pro-card .when .at { font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.pro-card .when .btn { margin-top: .6rem; }

/*
 * No photographs anywhere in this app — nothing is fetched from a third
 * party and nobody has uploaded anything. Initials on a coloured tile give a
 * listing something to anchor on without inventing a face for a real person.
 */
.monogram {
  width: 54px; height: 54px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em;
  color: var(--charcoal);
  background: linear-gradient(145deg, #FFC759, var(--amber-dim));
  box-shadow: var(--shadow-sm);
}
.monogram.lg { width: 68px; height: 68px; border-radius: 17px; font-size: 1.4rem; }

/* A job in the customer's list: trade mark, then the job, then where it is up to.
   Specific enough to beat `a.card { display: block }`, which it is also. */
a.card.job-row, .job-row {
  display: grid; grid-template-columns: auto 1fr; gap: .95rem; align-items: start;
}
.job-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 1.3rem;
  background: rgba(255,176,32,.10); border: 1px solid rgba(255,176,32,.28);
}

/* Trade tiles wrap onto two lines for the longer names, so pin a height and
   the grid stops looking like a broken staircase. */
.trade-tile { min-height: 66px; }

/* Long headings break badly at large sizes — "Find a" alone on a line. */
h1, h2 { text-wrap: balance; }

/* Picking a rating. Big enough to hit with a thumb. */
.rate { display: flex; gap: .2rem; }
.rate .star {
  background: none; border: 0; cursor: pointer; padding: .1rem .25rem;
  font-size: 2rem; line-height: 1; color: var(--line);
  transition: color .1s ease, transform .1s ease;
}
.rate .star.on { color: var(--amber); }
.rate .star:hover { transform: translateY(-2px); }

.stars { color: var(--amber); letter-spacing: .06em; }

/* ---- slots ---- */
.daystrip { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
.daybtn {
  flex: 0 0 auto; padding: .5rem .8rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--graphite); color: var(--off-white);
  font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap;
}
.daybtn.on { background: var(--amber); color: var(--charcoal); border-color: var(--amber); font-weight: 650; }
.slots { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); margin-top: .8rem; }
.slot {
  padding: .55rem .3rem; border-radius: 9px; border: 1px solid var(--line);
  background: var(--charcoal); color: var(--off-white); font: inherit; cursor: pointer; text-align: center;
}
.slot:hover { border-color: var(--amber); }
.slot.on { background: var(--amber); color: var(--charcoal); border-color: var(--amber); font-weight: 650; }

/* ---- money / totals ---- */
.totals { margin-left: auto; max-width: 380px; }
.totals .line { display: flex; justify-content: space-between; padding: .28rem 0; }
.totals .line.sum { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .55rem; font-weight: 700; font-size: 1.05rem; }
.totals .line.withheld { color: var(--warn); }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1.05rem; box-shadow: var(--shadow-sm), var(--edge);
}
.stat .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-top: .15rem; }
.stat.bad .v { color: #ff9b9e; }
.stat.good .v { color: var(--good); }

/*
 * Two columns at most: four across turns each step into a narrow strip of
 * wrapped text. The cards stretch to a common height and the button sits on
 * the bottom edge of each, so the row of actions reads as a row.
 */
.setup-grid {
  display: grid; gap: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  max-width: 900px;
}
.setup-step { display: flex; flex-direction: column; }
.setup-step p { flex: 1 1 auto; }
.setup-step .btn { align-self: flex-start; }

/* A step already done recedes rather than disappearing, so the list keeps its
   shape and you can see how far along you are. */
.setup-step.done { opacity: .62; }
.setup-step.done:hover { opacity: 1; }

/* ---- misc ---- */
.notice { padding: .75rem .9rem; border-radius: 10px; border: 1px solid; margin-bottom: 1rem; font-size: .93rem; }
.notice.err { background: rgba(229,72,77,.1); border-color: rgba(229,72,77,.45); color: #ffb3b5; }
.notice.ok { background: rgba(76,195,138,.1); border-color: rgba(76,195,138,.45); color: #9ae6c4; }
.notice.info { background: rgba(255,176,32,.09); border-color: rgba(255,176,32,.35); color: #ffd694; }
.empty {
  text-align: center; padding: 2.6rem 1.2rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: rgba(46,50,56,.35);
}
.empty p { margin-bottom: .9rem; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--graphite) 25%, var(--graphite-2) 50%, var(--graphite) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 1em; }
@keyframes sk { to { background-position: -200% 0; } }
footer {
  border-top: 1px solid var(--line); padding: 1.4rem clamp(1rem,4vw,2rem);
  color: var(--muted); font-size: .85rem; text-align: center;
  display: flex; flex-wrap: wrap; gap: .3rem .8rem;
  align-items: baseline; justify-content: center;
}
/* Empty until the server answers, so it must not reserve a gap when it is. */
.version:empty { display: none; }
.version { font-family: var(--mono); font-size: .8rem; color: var(--faint); }

.steps { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.step { flex: 1 1 90px; padding: .4rem .55rem; border-radius: 8px; background: var(--graphite); border: 1px solid var(--line); font-size: .78rem; text-align: center; color: var(--muted); }
.step.done { border-color: var(--good); color: var(--good); }
.step.now { border-color: var(--amber); color: var(--amber); font-weight: 650; }

.tabs {
  display: flex; gap: .3rem; overflow-x: auto;
  border-bottom: 1px solid var(--line); margin-bottom: 1.2rem;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a { scroll-snap-align: start; }
.tabs a { padding: .55rem .85rem; color: var(--muted); font-size: .93rem; font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--off-white); text-decoration: none; }
.tabs a.active { color: var(--amber); border-bottom-color: var(--amber); }

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