/* One small stylesheet for every page. Neutral on purpose — the point of
   this demo is the integration code, not the pixels. */

:root {
  --ink: #1a1a1a;
  --muted: #666;
  --line: #e2e2e2;
  --bg: #fafafa;
  --card: #fff;
  --accent: #0b6e4f;   /* the one brand-ish color */
  --amber: #9a6700;
  --red: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

main { max-width: 860px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* Header: the four cases as plain links. The current one is bolded by a
   tiny script in each page (aria-current). */
header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
header nav {
  max-width: 860px; margin: 0 auto; padding: .75rem 1rem;
  display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline;
}
header .brand { font-weight: 700; margin-right: auto; text-decoration: none; color: var(--ink); }
header nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
header nav a:hover { color: var(--ink); }
header nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

h1 { font-size: 1.5rem; margin: 1rem 0 .5rem; }
h2 { font-size: 1.1rem; margin-top: 2rem; }
p.muted, .muted { color: var(--muted); }

/* The explainer box at the top of each flow */
.note {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: .75rem 1rem; margin: 1rem 0; border-radius: 4px; font-size: .95rem;
}

/* Product grid */
.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin-top: 1rem;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 1rem; display: flex; flex-direction: column; gap: .35rem;
}
.card .name { font-weight: 600; }
.card .price { color: var(--accent); font-variant-numeric: tabular-nums; }

button {
  font: inherit; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 4px;
  padding: .5rem .9rem; margin-top: .4rem;
}
button:hover { filter: brightness(1.1); }
button:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

/* Order status badges — honest colors: green paid, amber pending, red expired */
.status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.status.pending { background: #fdf3d7; color: var(--amber); }
.status.paid    { background: #dcefe6; color: var(--accent); }
.status.expired { background: #f9dedc; color: var(--red); }

dl.order { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; }
dl.order dt { color: var(--muted); font-size: .85rem; margin-top: .6rem; }
dl.order dd { margin: 0; }
dl.order dt:first-child { margin-top: 0; }

code, pre { background: #f0f0ee; border-radius: 3px; font-size: .9em; }
code { padding: .1em .35em; }
pre { padding: .75rem 1rem; overflow-x: auto; }

/* Case tabs on the landing page */
.cases { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 1rem; }
.cases a {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 1rem; text-decoration: none; color: var(--ink);
}
.cases a:hover { border-color: var(--accent); }
.cases .k { color: var(--accent); font-weight: 700; font-size: .85rem; }

footer {
  max-width: 860px; margin: 0 auto; padding: 1rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem;
}
footer a { color: var(--muted); }
