/* Haggleline shared styles: landing, legal pages and the dashboard. Tokens on :root. */
:root {
  --ink: #15181c;
  --muted: #59626e;
  --faint: #8a939e;
  --line: #e3e6ea;
  --panel: #f6f7f9;
  --accent: #0f5f4a;
  --accent-hover: #0b4a39;
  --accent-soft: #e5f2ee;
  --good: #17703a;
  --good-bg: #e5f4ea;
  --warn: #8a5a00;
  --warn-bg: #fff4d6;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: #fff; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.logo { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 16px; align-items: center; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }

.btn { display: inline-block; border: 0; border-radius: 8px; padding: 11px 18px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.hero { padding: 56px 0 32px; background: linear-gradient(180deg, var(--accent-soft), #fff); }
.hero h1 { font-size: clamp(30px, 5vw, 46px); max-width: 780px; }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 680px; }
.grid2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 18px; }

label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd5dc; border-radius: 8px; background: #fff;
}
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { margin-top: 4px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }

.section { padding: 44px 0; }
.section h2 { font-size: 28px; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li { background: var(--panel); border-radius: var(--radius); padding: 18px; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 8px; }

.notice { border-radius: 8px; padding: 12px 14px; font-size: 15px; margin: 12px 0; }
.notice.good { background: var(--good-bg); color: var(--good); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.info { background: var(--accent-soft); color: var(--accent-hover); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
.tablewrap { overflow-x: auto; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; margin-top: 40px; }
.site-footer a { color: var(--muted); }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal { padding: 32px 0; }
pre.letter { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; background: var(--panel); padding: 16px; border-radius: 8px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel); color: var(--muted); }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.big { font-size: 28px; font-weight: 800; }
.muted { color: var(--muted); }
