/* Foundation */
:root {
  --ink: #172333;
  --muted: #526071;
  --accent: #a52d4f;
  --line: #dfe3e8;
  --paper: #ffffff;
  --soft: #f5f6f8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.4rem); line-height: 1.4; letter-spacing: .02em; }
h2 { font-size: 1.3rem; line-height: 1.5; }
.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { display: block; padding: 12px; }

/* Header and page headings */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; flex-wrap: wrap; }
.brand { font-size: 1.7rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.brand-dot { color: var(--accent); }
.site-header nav { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; padding-block: 6px; color: var(--muted); white-space: nowrap; }
.site-header nav a[aria-current] { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 700; }
.demo-notice { margin: 18px 0 0; background: var(--soft); padding: 9px 14px; color: var(--muted); font-size: .8rem; border: 1px solid var(--line); border-radius: 4px; }
.demo-notice strong { color: var(--ink); letter-spacing: .08em; margin-right: 8px; }
.page-heading { padding-block: 40px 32px; }
.page-heading p { color: var(--muted); margin-bottom: 10px; }
.home-heading { padding-block: 22px 20px; }
.home-heading h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 10px; }
.home-heading p:last-child { margin-bottom: 0; }
.eyebrow { font-size: .7rem; letter-spacing: .16em; font-weight: 700; }
.home-section { padding-block: 8px 28px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.section-count { font-size: .68rem; color: var(--muted); letter-spacing: .1em; }
.section-end { margin-top: 14px; text-align: right; }
.more-link { color: var(--accent); font-weight: 600; font-size: .9rem; }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product-card { min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
/* 16:7.5 is 25% shorter than the previous 16:10 cover at the same width. */
.demo-cover { aspect-ratio: 16 / 7.5; background: #eff1f4; color: #5c6879; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.cover-mark { font-family: Georgia, serif; font-size: 1.6rem; line-height: 1.3; color: #798393; }
.cover-word { font-size: .8rem; letter-spacing: .25em; margin-top: 5px; }
.cover-caption { font-size: .65rem; margin-top: 3px; }
.card-body { min-width: 0; padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-body h2, .card-body h3 { font-size: 1rem; line-height: 1.5; margin-bottom: 5px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.badge { display: inline-block; max-width: 100%; background: #fbeef2; color: #922444; border: 1px solid #efd4dd; font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; }
.badge-neutral { color: #405065; background: #f4f6f8; border-color: #dfe3e8; }
.circle-name { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.rank-change { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.card-body .rank-change { white-space: nowrap; }
.meta { font-size: .75rem; color: var(--muted); margin-bottom: 12px; }
.card-body .meta { margin-bottom: 6px; }
.price { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin-bottom: 8px; }
.current-price { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.price strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.tax-note { font-size: .65rem; color: var(--muted); }
.list-price { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.external-button { margin-top: auto; display: flex; justify-content: center; gap: 12px; padding: 7px 12px; border: 1px solid #cbd1d9; border-radius: 4px; background: #f3f4f6; color: #526071; font-size: .85rem; }
.button-note { margin-top: 5px; font-size: .65rem; color: var(--muted); text-align: center; }
.empty-state { padding: 24px; border: 1px dashed var(--line); background: var(--soft); grid-column: 1 / -1; }

/* Circles and information */
.circle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.circle-card { border: 1px solid var(--line); border-radius: 6px; padding: 26px; }
.circle-card.is-notable { border-top: 3px solid var(--accent); }
.circle-card h2 { margin-top: 14px; font-size: 1.1rem; }
.circle-stats { display: flex; flex-wrap: wrap; gap: 24px; padding-block: 12px; border-block: 1px solid var(--line); }
.circle-stats dt { font-size: .72rem; color: var(--muted); }
.circle-stats dd { margin: 0; font-weight: 700; }
.latest-title { margin-bottom: 4px; }
.latest-summary { background: var(--soft); border: 1px solid var(--line); padding: 24px; margin-bottom: 32px; }
.latest-summary p:last-child { margin-bottom: 0; }
.list-heading { margin-bottom: 20px; }
.prose { max-width: 760px; padding-block: 40px 20px; }
.prose h2 { margin-top: 32px; font-size: 1.15rem; }
.prose p { color: var(--muted); }
.site-footer { margin-top: 64px; padding-block: 32px; border-top: 1px solid var(--line); background: #fafbfc; }
.footer-brand { font-weight: 700; text-decoration: none; }
.site-footer nav { display: flex; gap: 8px 24px; flex-wrap: wrap; margin-block: 12px 20px; font-size: .8rem; }
.site-footer p { font-size: .72rem; color: var(--muted); margin-bottom: 6px; }

/* Narrow layouts: no fixed-width content or horizontal navigation scrolling. */
@media (max-width: 800px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .header-inner { gap: 12px; }
}
@media (max-width: 540px) {
  .container { width: calc(100% - 32px); }
  .header-inner { padding-block: 14px; }
  .site-header nav { width: 100%; gap: 4px 18px; font-size: .85rem; }
  .page-heading { padding-block: 28px 24px; }
  .home-heading { padding-block: 18px 18px; }
  .product-grid, .circle-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .demo-cover { aspect-ratio: 16 / 6; }
  .card-body { padding: 14px; }
  .card-body .rank-change { font-size: clamp(.9rem, 4.8vw, 1.2rem); }
  .section-count { display: none; }
  .section-heading h2 { font-size: 1.2rem; }
  .site-footer { margin-top: 40px; padding-block: 24px; }
}
