/* SaaSPriced — static site styles. No build step, no JavaScript.
   Design: a price ledger. Numbers first, dates visible, decoration only
   where it carries information. System font stack only (zero webfonts). */

:root {
  color-scheme: light;
  --ink: #16211a;
  --muted: #4c5b52;
  --accent: #0a6b3c;
  --accent-strong: #084c2b;
  --bg: #ffffff;
  --bg-soft: #eff4f0;
  --line: #d9e2db;
  --highlight: #e3f0e6;
  --warn-bg: #fff7e0;
  --warn-line: #e3cd85;
  --warn-ink: #5c4a12;
  --cta-bg: #0a6b3c;
  --cta-ink: #ffffff;
  --cta-bg-hover: #084c2b;
  --focus: #0a6b3c;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e9f0ea;
    --muted: #a7b8ac;
    --accent: #63ce96;
    --accent-strong: #8fe0b4;
    --bg: #0d130f;
    --bg-soft: #151d17;
    --line: #2a362d;
    --highlight: #1d2b20;
    --warn-bg: #2a2210;
    --warn-line: #6b5a24;
    --warn-ink: #f0d492;
    --cta-bg: #35b26f;
    --cta-ink: #07130c;
    --cta-bg-hover: #63ce96;
    --focus: #63ce96;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1.0625rem;
}

/* Links: underlined in prose so meaning never rests on color alone */
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 0.06em;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(10 107 60 / 0.15);
}
a:hover { text-decoration-thickness: 0.12em; }

/* Visible keyboard focus everywhere (never outline: none) */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link: first tab stop, visible only when focused */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 0; }

/* Visually hidden but available to assistive tech (table captions) */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 6px 0;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; flex-wrap: wrap; }
.main-nav a {
  color: var(--muted);
  margin-left: 6px;
  padding: 8px 10px;
  font-size: 0.98rem;
  text-decoration: none;
  border-radius: 6px;
}
.main-nav a:hover { color: var(--ink); text-decoration: none; }
.main-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--accent);
  border-radius: 6px 6px 0 0;
}

/* Layout */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
main { padding: 36px 0 56px; }
article { max-width: 44rem; }

/* Hero / home */
.hero { padding: 24px 0 4px; }
.hero h1 {
  font-size: clamp(1.9rem, 5.2vw, 2.55rem);
  line-height: 1.22;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero p {
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0 0 10px;
  max-width: 40rem;
  text-wrap: pretty;
}
.snapshot { margin: 26px 0 6px; }
.snapshot-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.snapshot-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }

.section-title {
  font-size: 1.35rem;
  margin: 44px 0 6px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Comparison index: rows, not cards — a contents page for a ledger */
.article-list { margin-top: 10px; }
.article-row {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 20px 6px 22px;
  border-top: 1px solid var(--line);
}
.article-row:last-child { border-bottom: 1px solid var(--line); }
.article-row:hover { background: var(--bg-soft); text-decoration: none; }
.article-row .category {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 4px;
}
.article-row h3 {
  font-size: 1.28rem;
  line-height: 1.4;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.article-row p { color: var(--muted); font-size: 0.97rem; margin: 0 0 6px; max-width: 44rem; }
.article-row .checked { color: var(--muted); font-size: 0.86rem; margin: 0; }

/* Article typography */
h1.article-title {
  font-size: clamp(1.65rem, 4.6vw, 2.05rem);
  line-height: 1.32;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 22px; }
article h2 {
  font-size: 1.38rem;
  margin: 38px 0 10px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
article h3 { font-size: 1.13rem; margin: 26px 0 8px; }
article h2[id], article h3[id] { scroll-margin-top: 84px; }
article p { margin: 0 0 15px; overflow-wrap: break-word; }
article ul, article ol { margin: 0 0 15px; padding-left: 1.35em; }
article li { margin-bottom: 7px; }
.lede { font-size: 1.1rem; line-height: 1.65; text-wrap: pretty; }

/* Verdict: the answer, set off by a ledger-green rule */
.verdict {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
}
.verdict strong:first-child { color: var(--accent-strong); }

/* On-this-page contents (articles) */
.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 20px 8px;
  margin: 24px 0 8px;
  background: var(--bg);
}
.toc-title { font-weight: 700; margin: 0 0 6px; font-size: 0.98rem; }
.toc ol { margin: 0 0 8px; padding-left: 1.3em; }
.toc li { margin-bottom: 5px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Disclosure box (required at the top of every article) */
.disclosure {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--warn-ink);
  margin: 0 0 24px;
}
.disclosure strong { display: inline-block; margin-right: 6px; }
.disclosure a { color: var(--warn-ink); text-decoration-color: var(--warn-ink); }

/* Tables: semantic headers, sticky first column inside a scroll region.
   Pattern follows the modern-web-guidance "responsive-table" guide:
   thead/tbody/th semantics, wrapper with tabindex + role="region",
   row headers stay visible while the table scrolls sideways. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 22px;
  border-radius: 4px;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 34rem;
  font-size: 0.95rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
th, td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
thead th {
  background: var(--bg-soft);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody th[scope="row"] { font-weight: 600; }
thead th:first-child,
tbody th[scope="row"] {
  position: sticky;
  left: 0;
  box-shadow: 3px 0 6px -4px rgb(0 0 0 / 0.28);
}
thead th:first-child { background: var(--bg-soft); z-index: 3; }
tbody th[scope="row"] { background: var(--bg); z-index: 2; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.highlight td, tr.highlight th { background: var(--highlight); font-weight: 650; }

/* CTA buttons (affiliate link placeholders until accounts are approved) */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 1rem;
  text-decoration: none;
}
.cta:hover { background: var(--cta-bg-hover); text-decoration: none; }
.cta.secondary {
  background: var(--bg);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.cta.secondary:hover { background: var(--bg-soft); }
.cta-note { font-size: 0.84rem; color: var(--muted); }

.method-note {
  border-left: 3px solid var(--line);
  padding: 4px 0 4px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 28px 0;
}

/* End-of-article route back to the index */
.article-nav { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.article-nav a { font-weight: 650; text-decoration: none; }
.article-nav a:hover { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.site-footer .wrap { padding-top: 22px; padding-bottom: 26px; color: var(--muted); font-size: 0.9rem; }
.site-footer nav a { color: var(--muted); margin-right: 18px; text-decoration: none; padding: 6px 0; display: inline-block; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer p { margin: 10px 0 0; }

@media (max-width: 640px) {
  /* Keep the sticky header to one row on phones: it is always on screen,
     so its height is a standing tax on reading space. */
  .site-header .wrap { padding-top: 6px; padding-bottom: 6px; flex-wrap: nowrap; }
  .logo { font-size: 1.05rem; }
  .main-nav { flex-wrap: nowrap; }
  .main-nav a { font-size: 0.86rem; padding: 7px 5px; margin-left: 1px; white-space: nowrap; }
  main { padding: 26px 0 44px; }
  .article-row { padding: 16px 4px 18px; }
  .article-row h3 { font-size: 1.16rem; }
  th, td { padding: 9px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header, .site-footer, .toc, .article-nav, .cta-row { display: none; }
  body { color: #000; background: #fff; font-size: 11pt; }
  a { color: #000; }
  article { max-width: none; }
}

/* Article figures (charts) */
article figure { margin: 1.6em 0; }
article figure img { max-width: 100%; height: auto; display: block; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; }
article figcaption { font-size: 0.9em; opacity: 0.75; margin-top: 0.5em; }
