/* CJW Apps site. One stylesheet, light and dark, no frameworks. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #17212b;
  --muted: #55626f;
  --line: #dde3ea;
  --brand: #0f4c81;
  --brand-strong: #0a3a64;
  --accent: #0b6bcb;
  --accent-soft: #e8f1fb;
  --ok: #17794a;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 6px 20px rgba(16, 32, 48, .06);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151c;
    --surface: #18212b;
    --text: #e8edf2;
    --muted: #a3afbb;
    --line: #2a3644;
    --brand: #14365a;
    --brand-strong: #0f2a47;
    --accent: #6cb2f5;
    --accent-soft: #1b2d42;
    --ok: #5fd39a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* ---- header */
.site-header { background: var(--brand); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: .2px; }
.brand-mark { background: #fff; color: var(--brand-strong); border-radius: 8px; padding: 2px 8px; font-size: .95rem; letter-spacing: .6px; }
.menu { display: flex; flex-wrap: wrap; gap: 4px; }
.menu a { color: #dbe8f5; text-decoration: none; font-weight: 600; font-size: .98rem; padding: 7px 13px; border-radius: 999px; }
.menu a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.menu a[aria-current="page"] { background: #fff; color: var(--brand-strong); }

/* ---- content */
.content { padding-top: 36px; padding-bottom: 56px; }
.content > h1:first-child, .content > .hero:first-child { margin-top: 0; }
h1 { font-size: 2.1rem; line-height: 1.2; letter-spacing: -.4px; margin: 0 0 .5em; }
h2 { font-size: 1.4rem; line-height: 1.3; margin: 2em 0 .5em; letter-spacing: -.2px; }
h3 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
.content > p, .content > ul, .content > ol, .content > h2, .content > h3, .content > blockquote, .content > hr { max-width: 760px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; margin: 0 0 1.4em; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--accent-soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.content > p > img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.table-scroll { overflow-x: auto; }

/* ---- hero */
.hero { padding: 8px 0 20px; }
.hero h1 { font-size: 2.6rem; margin-bottom: .3em; }
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin-bottom: 0; }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin: 0 0 .5em; }
.title-icon { width: 60px; height: 60px; border-radius: 14px; vertical-align: middle; margin-right: 14px; }

/* ---- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 24px 0 8px; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card h2, .card h3 { margin: 0; font-size: 1.25rem; }
.card h2 a, .card h3 a { color: var(--text); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card-head { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.app-icon.plain { background: #fff; border: 1px solid var(--line); }
.platform { font-size: .8rem; color: var(--muted); font-weight: 600; }
.card-actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-actions ~ .card-actions { margin-top: 0; padding-top: 0; }
.icon-row { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.icon-row a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.icon-row a:hover { color: var(--accent); }
.icon-row img { width: 30px; height: 30px; border-radius: 7px; }

/* ---- buttons and badges */
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: .93rem; padding: 8px 15px; border-radius: 9px; border: 1px solid transparent; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { background: var(--accent-soft); filter: none; }
@media (prefers-color-scheme: dark) { .btn { color: #0c1620; } .btn.ghost { color: var(--accent); } }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--muted); border: 1px solid var(--line); }
.badge.free { color: var(--ok); }

/* ---- panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 28px 0; box-shadow: var(--shadow); }
.panel h2 { margin-top: 0; font-size: 1.2rem; }
.panel > :last-child { margin-bottom: 0; }

/* ---- footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: .93rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; padding-top: 28px; padding-bottom: 32px; }
.foot-brand { font-weight: 700; margin-bottom: 4px; }
.foot-note { color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; align-content: flex-start; max-width: 460px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2rem; }
  h1 { font-size: 1.7rem; }
  .bar { justify-content: center; }
  .cards, .cards.two { grid-template-columns: 1fr; }
}
