/* Cronomz site — one stylesheet for every page.
   Notebook-paper palette lifted from the game (app.json backgroundColor
   #f6f1e1). Light and dark both styled; no external fonts or assets, so
   every page works offline and on a bare static host. */

:root {
  --paper: #f6f1e1;
  --ink: #2b2723;
  --muted: #6b6357;
  --rule: #d9d0b8;
  --accent: #b4541f;
  --card: #fffdf5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17150f;
    --ink: #ece5d4;
    --muted: #a49c8b;
    --rule: #3a3529;
    --accent: #e8955c;
    --card: #201d15;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main { max-width: 46rem; margin: 0 auto; }

/* ---- site header ---- */

.nav {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
}
.nav .brand {
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] { font-weight: 600; }

/* ---- type ---- */

h1 { font-size: 1.9rem; line-height: 1.2; margin: 2rem 0 .35rem; }
h2 {
  font-size: 1.25rem; margin: 2.75rem 0 .75rem;
  padding-bottom: .35rem; border-bottom: 2px solid var(--rule);
}
h3 { font-size: 1.02rem; margin: 1.75rem 0 .5rem; }
p, li { overflow-wrap: break-word; }
ul { padding-left: 1.25rem; }
li { margin: .4rem 0; }
a { color: var(--accent); }
strong { font-weight: 650; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }

.dates { color: var(--muted); font-size: .92rem; margin: 0 0 1.75rem; }
.lede {
  background: var(--card); border: 1px solid var(--rule); border-radius: .6rem;
  padding: 1rem 1.15rem; margin: 1.5rem 0;
}
.lede p:first-child { margin-top: 0; }
.lede p:last-child { margin-bottom: 0; }

/* ---- tables (wide ones scroll rather than pushing the page sideways) ---- */

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }

/* ---- home page cards ---- */

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 2rem 0; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--rule); border-radius: .6rem;
  padding: 1.1rem 1.2rem;
}
.card:hover { border-color: var(--accent); }
.card h2 { border: none; margin: 0 0 .3rem; padding: 0; font-size: 1.05rem; color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---- product list (home) ---- */

.products { display: grid; gap: 1rem; margin: 1.25rem 0 2rem; }
.product {
  display: grid; grid-template-columns: 4rem 1fr; gap: .25rem 1.1rem; align-items: start;
  background: var(--card); border: 1px solid var(--rule); border-radius: .6rem;
  padding: 1.15rem 1.2rem;
}
.product > img { grid-row: span 3; width: 4rem; height: 4rem; border-radius: .9rem; }
.product h3 { margin: 0; font-size: 1.15rem; }
.product h3 a { color: var(--ink); text-decoration: none; }
.product h3 a:hover { color: var(--accent); }
.product p { margin: .15rem 0 0; }
.product .links { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .93rem; margin-top: .5rem; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .3rem 0 .1rem; color: var(--muted); font-size: .88rem; }
.badge {
  display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid var(--rule); color: var(--muted); background: var(--paper);
}
.badge.soon { color: var(--accent); border-color: var(--accent); }

@media (max-width: 30rem) {
  .product { grid-template-columns: 3rem 1fr; }
  .product > img { width: 3rem; height: 3rem; border-radius: .7rem; }
}

/* ---- product pages ---- */

.hero { display: flex; gap: 1.1rem; align-items: center; margin: 2rem 0 .5rem; }
.hero img { width: 4.5rem; height: 4.5rem; border-radius: 1rem; flex: none; }
.hero h1 { margin: 0; }
.hero p { margin: .2rem 0 0; color: var(--muted); }
.crumbs { color: var(--muted); font-size: .9rem; margin: 1.5rem 0 0; }
.crumbs a { color: var(--muted); }

.shot { margin: 1.5rem 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: .6rem; }
.shot figcaption { color: var(--muted); font-size: .88rem; margin-top: .5rem; }
.shot.phone { max-width: 20rem; }
.shots { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin: 1.5rem 0; }
.shots .shot { margin: 0; }
@media (max-width: 40rem) { .shots { grid-template-columns: 1fr; } .shots .shot.phone { max-width: 20rem; } }

.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1rem 0; }
.plan { background: var(--card); border: 1px solid var(--rule); border-radius: .6rem; padding: 1rem 1.15rem; }
.plan h3 { margin: 0 0 .25rem; }
.plan .price { font-size: 1.5rem; font-weight: 700; margin: 0 0 .25rem; }
.plan ul { margin: .5rem 0 0; }

/* ---- Pagewatch activation page (the extension updates this box) ---- */

.activate {
  background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--rule);
  border-radius: .6rem; padding: 1.1rem 1.25rem; margin: 1.75rem 0;
}
.activate h2 { border: none; margin: 0 0 .35rem; padding: 0; font-size: 1.2rem; }
.activate p { margin: 0; }
.activate.working { border-left-color: var(--muted); }
.activate.ok { border-left-color: #2f8a4c; }
.activate.ok h2 { color: #2f8a4c; }
.activate.error { border-left-color: #c0392b; }
.activate.error h2 { color: #c0392b; }
.activate.confirm { border-left-color: var(--accent); }
@media (prefers-color-scheme: dark) {
  .activate.ok { border-left-color: #6cc98a; }
  .activate.ok h2 { color: #6cc98a; }
  .activate.error { border-left-color: #f08a7e; }
  .activate.error h2 { color: #f08a7e; }
}
.activate-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.activate-actions:empty { display: none; }
.activate-btn {
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  padding: .5rem 1rem; border-radius: .5rem; border: 1px solid var(--accent);
  background: var(--accent); color: var(--paper);
}
.activate-btn.secondary { background: transparent; color: var(--accent); }

hr { border: none; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
footer { margin-top: 3rem; color: var(--muted); font-size: .9rem; }
