@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --paper: #eef0ea;
  --paper-raised: #e4e7dd;
  --ink: #1c201d;
  --ink-soft: #4a5148;
  --pine: #26433a;
  --pine-deep: #1a2e28;
  --caution: #f2b705;
  --rust: #8a4b32;
  --line: #c9cdc0;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --measure: 68ch;
  --radius: 4px;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--pine);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover { color: var(--rust); }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-raised);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: var(--pine-deep);
}

/* Layout frame: left rail + content */

.frame {
  display: grid;
  grid-template-columns: 15rem 1fr;
  min-height: 100vh;
}

.rail {
  background: var(--pine);
  color: #eef0ea;
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.rail__mark {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
  box-sizing: border-box;
}

.rail__tagline {
  margin: -1rem 0 0;
  font-size: 0.9rem;
  color: #c3d0c9;
  line-height: 1.5;
}

.rail__nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-weight: 500;
}

.rail__nav a {
  color: #eef0ea;
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}

.rail__nav a:hover {
  color: var(--caution);
}

.rail__nav a.rail__nav-sub {
  margin-left: 1.1rem;
  font-weight: 400;
  font-size: 0.92rem;
  color: #c3d0c9;
}

.rail__nav a.rail__nav-sub:hover {
  color: var(--caution);
}

.rail__disclaimer {
  margin-top: auto;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #8fa295;
}

.content {
  padding: 3.5rem 3rem 5rem;
  max-width: 68rem;
}

/* Entry cards (series/variant/category pages) */

.entry-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.35rem 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: hidden;
  margin-bottom: 1.1rem;
  max-width: var(--measure);
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--type-color, var(--ink-soft));
}

.entry-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  flex-wrap: wrap;
}

.entry-card__type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--type-color, var(--ink-soft));
  font-weight: 500;
}

.entry-card__type::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 1px;
  background: var(--type-color, var(--ink-soft));
  flex-shrink: 0;
}

.entry-card__models {
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding-left: 0.5rem;
  border-left: 1px solid var(--line);
}

.entry-card__title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.entry-card__title a { color: var(--ink); text-decoration: none; }
.entry-card__title a:hover { color: var(--rust); }

.entry-card__desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.entry-card__specs {
  display: flex;
  gap: 1.25rem;
  margin: 0.2rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.entry-card__specs > div { display: flex; flex-direction: column; gap: 0.15rem; }
.entry-card__specs dt { font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.entry-card__specs dd { margin: 0; font-size: 0.85rem; }

.entry-card__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.2rem 0 0;
}

.entry-card__date { font-size: 0.78rem; color: var(--ink-soft); }
.entry-card__more { font-size: 0.85rem; font-weight: 600; }
.entry-card__more a { text-decoration: none; }

/* Guide index */

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.guide-list li {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0;
}

.guide-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.guide-list a {
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
}

.guide-list p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Guide article */

.guide {
  max-width: var(--measure);
}

.guide__eyebrow a {
  font-size: 0.9rem;
  text-decoration: none;
}

.guide__type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--type-color, var(--ink-soft));
  font-weight: 500;
  margin: 0.5rem 0 0.6rem;
}

.guide__type::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  background: var(--type-color, var(--ink-soft));
}

.guide__title {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
}

/* Card/line view toggle (series, category, and home pages) */

.section-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.1rem;
}

.section-title {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

.section-bar__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.view-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.view-toggle button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button.is-active { background: var(--pine); color: #fff; }
.view-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin: 0 0 2.5rem;
}

.entry-grid[hidden] { display: none; }

.entry-grid .entry-card { margin-bottom: 0; max-width: none; }

.entry-lines {
  border-top: 1px solid var(--line);
  margin: 0 0 2.5rem;
}

.entry-line {
  display: grid;
  grid-template-columns: 1fr 9rem 5.5rem;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.entry-line__title { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }

.entry-line__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 1px;
  background: var(--type-color, var(--ink-soft));
  flex-shrink: 0;
}

.entry-line__title a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-line__title a:hover { color: var(--rust); }

.entry-line__models {
  font-size: 0.82rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-line__date { font-size: 0.82rem; color: var(--ink-soft); text-align: right; }

.specsheet {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 2.25rem;
  padding: 0;
}

.specsheet__row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.specsheet__row:first-child { border-top: none; }

.specsheet__row dt {
  color: var(--ink-soft);
  font-weight: 500;
}

.specsheet__row dd { margin: 0; }

.guide__body h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.guide__body h2::before {
  content: '';
  display: block;
  width: 2rem;
  height: 3px;
  background: var(--caution);
  margin-bottom: 0.75rem;
}

.guide__body p { margin: 0 0 1.1rem; }

.guide__body ol,
.guide__body ul {
  padding-left: 1.3rem;
}

.guide__body li { margin-bottom: 0.5rem; }

.guide__body pre {
  background: var(--pine-deep);
  color: #eef0ea;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.85rem;
}

.guide__body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.callout {
  border-left: 3px solid var(--caution);
  background: var(--paper-raised);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

.callout strong { color: var(--rust); }

.cite {
  font-size: 0.7em;
  margin-left: 0.05em;
}

.cite a {
  color: var(--rust);
  text-decoration: none;
}

.cite a:hover { text-decoration: underline; }

.guide__sources ul { list-style: none; margin: 0; padding: 0; }

.source {
  display: flex;
  gap: 0.4em;
  align-items: baseline;
  padding: 0.2rem 0;
}

.source__num {
  color: var(--ink-faint, #8a8a86);
  font-variant-numeric: tabular-nums;
}

.source__badge {
  font-size: 0.7em;
  color: var(--ink-faint, #8a8a86);
  border: 1px solid currentColor;
  border-radius: 1em;
  padding: 0.05em 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.unconfirmed {
  color: var(--rust);
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
}

/* Credits list */

.credits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.credits-list li {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.credits-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.credits-list__name {
  font-weight: 600;
}

.credits-list__handle {
  text-decoration: none;
  font-size: 0.92rem;
}

.credits-list__platform {
  font-size: 0.8rem;
  color: var(--rust);
}

.credits-list__note {
  flex-basis: 100%;
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Home hero */

.hero {
  max-width: var(--measure);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.35rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 55ch;
}

.button {
  display: inline-block;
  background: var(--pine);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.button:hover {
  background: var(--pine-deep);
  color: var(--caution);
}

@media (max-width: 860px) {
  .frame {
    grid-template-columns: 1fr;
  }
  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 1.25rem 1.5rem;
  }
  .rail__tagline,
  .rail__disclaimer { display: none; }
  .rail__nav {
    flex-direction: row;
    gap: 1.25rem;
    margin-left: auto;
  }
  .content {
    padding: 2.25rem 1.5rem 3.5rem;
  }
}

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

/* Ad slot placeholder — reserved height matches AdSense's typical banner
   sizes so activation causes zero layout shift. */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  margin: 2rem 0;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
}

.ad-slot__label {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (min-width: 728px) {
  .ad-slot { min-height: 90px; }
}
