/* BidShred: one stylesheet. System fonts, one accent colour, a readable measure,
   and every wide table scrolls inside its own box so a phone never scrolls sideways. */

:root {
  --ink: #16191d;
  --ink-soft: #565d68;
  --line: #dfe3e8;
  --paper: #ffffff;
  --ground: #f6f7f9;
  --accent: #1f5f9c;
  --accent-ink: #ffffff;
  --ok: #1c6b3f;
  --warn: #8a5300;
  --measure: 68ch;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaee;
    --ink-soft: #a4acb8;
    --line: #333941;
    --paper: #1a1d22;
    --ground: #121417;
    --accent: #6fb0ea;
    --accent-ink: #10161d;
    --ok: #6ed49b;
    --warn: #f0b962;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

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

h1 { font-size: 2rem; line-height: 1.25; margin: 1.5rem 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.35rem; }
p, li { max-width: var(--measure); }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 0.9rem; }

/* Navigation ------------------------------------------------------------------ */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  justify-content: space-between; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.topbar nav a { text-decoration: none; }
form.inline { display: inline; margin: 0; }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit;
  padding: 0; }

/* Blocks ---------------------------------------------------------------------- */
main.wrap { padding-top: 0.5rem; padding-bottom: 3rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin: 1rem 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid > .card { margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; margin: 0 0 1.25rem; padding-left: 2.5rem; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent);
  color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }

/* Buttons and forms ----------------------------------------------------------- */
.button, button[type="submit"] {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: var(--radius); padding: 0.6rem 1.1rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button.small { padding: 0.35rem 0.7rem; font-size: 0.9rem; }
.button.secondary { background: transparent; color: var(--accent); border-color: var(--line); }
.button[aria-disabled="true"], button[disabled] {
  background: var(--line); color: var(--ink-soft); cursor: not-allowed; border-color: var(--line);
}
label { display: block; font-weight: 600; margin: 1rem 0 0.25rem; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; display: block; }
input[type="text"], input[type="email"], input[type="password"], input[type="file"], textarea,
select {
  width: 100%; max-width: 34rem; padding: 0.55rem 0.65rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
textarea { min-height: 5rem; }
.checkline { display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.checkline input { width: auto; }
.checkline label { margin: 0; }

/* Notices --------------------------------------------------------------------- */
.flash { border-radius: var(--radius); padding: 0.7rem 0.9rem; margin: 1rem 0; max-width: none;
  border: 1px solid var(--line); background: var(--paper); }
.flash-ok { border-color: var(--ok); color: var(--ok); }
.flash-warn { border-color: var(--warn); color: var(--warn); }

/* Tables ---------------------------------------------------------------------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line);
  vertical-align: top; font-size: 0.95rem; }
th { background: var(--ground); font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--ink-soft); position: sticky; top: 0; }
td.quote { min-width: 24rem; }
tr:last-child td { border-bottom: 0; }

/* Pricing --------------------------------------------------------------------- */
.price { font-size: 2rem; font-weight: 700; }
.price small { font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); }
.tier ul { padding-left: 1.1rem; }
.tier li { margin-bottom: 0.35rem; }

/* Progress -------------------------------------------------------------------- */
.progress { background: var(--ground); border: 1px solid var(--line); border-radius: 999px;
  height: 0.6rem; overflow: hidden; max-width: 34rem; }
.progress > span { display: block; height: 100%; background: var(--accent); width: 0; }
.state { font-weight: 600; }

.pill { display: inline-block; font-size: 0.8rem; padding: 0.1rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); }

.chips { max-width: none; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chip { display: inline-block; font-size: 0.85rem; padding: 0.15rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); text-decoration: none; }
.chip:hover { border-color: var(--accent); }
.count { margin: 0.75rem 0; }
.filterset { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 1rem 1rem;
  margin: 1.25rem 0 0; }
.filterset legend { font-weight: 600; padding: 0 0.35rem; }
.filterset .checkline { display: inline-flex; margin: 0.5rem 1.25rem 0 0; }

.footer { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.footer p { max-width: none; }

@media (max-width: 40rem) {
  h1 { font-size: 1.6rem; }
  .topbar nav { gap: 0.75rem; font-size: 0.95rem; }
}
