/* Content pages (per-sim + how-to guides).
   Loaded AFTER landing.css. Gives the sim/guide pages their own purpose-built
   identity — two-column hero with an export spec panel, a vertical step rail,
   a real code-block component, and refined cards — without touching the
   landing page's own section styles. Shared bits (reset, header, buttons,
   footer, faq accordion) still come from landing.css. */

/* ---- Section rhythm + labels --------------------------------------- */

.content-main h2 {
  margin-inline: 0;
  text-align: left;
  max-width: 40ch;
}

.section-label {
  display: block;
  margin-bottom: .55rem;
  color: var(--red);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.content-main .section-intro {
  margin-top: .65rem;
  max-width: 60ch;
  color: var(--muted);
}

/* ---- Two-column hero with export spec panel ------------------------ */

/* The section itself stays full-bleed so its gradient background reaches the
   viewport edges. The two columns live in .content-hero__inner, which the
   landing's `.hero > *` rule already caps at min(100%, 1080px) and centres —
   so the hero content tracks the same 1080px column as the rest of the page. */
.content-hero {
  text-align: left;
}

.content-hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-content: center;
}

.content-hero .hero-copy {
  display: grid;
  gap: 1.2rem;
  align-content: center;
  max-width: 36rem;
}

.content-hero h1 {
  max-width: 16ch;
}

.content-hero .subhead {
  margin: 0;
  max-width: 46ch;
}

.content-hero .hero-cta {
  justify-content: flex-start;
  margin-top: .35rem;
}

/* The export spec panel — reads as a product sheet for the sim. */
.spec-panel {
  align-self: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(20, 28, 38, .7), rgba(10, 14, 20, .8));
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.spec-panel__head {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 15, .35);
}

.spec-panel__dot {
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, .18);
}

.spec-panel__title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec-rows {
  display: grid;
  gap: 0;
  list-style: none;
}

.spec-rows li {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: .9rem 1.2rem;
}

/* On very narrow phones, stack key over value so file-name chips
   (car_<id>.tga) get the full width instead of breaking mid-token. */
@media (max-width: 400px) {
  .spec-rows li {
    grid-template-columns: 1fr;
    gap: .3rem;
  }
}

.spec-rows li + li {
  border-top: 1px solid var(--line);
}

.spec-rows dt,
.spec-key {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.spec-val {
  min-width: 0;
  color: var(--text);
  font-weight: 600;
}

/* ---- Code: inline chips + block component -------------------------- */

.content-main code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  /* Long Windows paths must never spill out of a card — break anywhere. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Inline chip for short tokens like car_<id>.tga */
.content-main p code,
.content-main li code,
.content-main dd code,
.spec-val code {
  padding: .12em .45em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 11, 15, .55);
  font-size: .92em;
  color: #d7e0ec;
}

/* Block-level path component — used for install paths. */
.codeblock {
  display: grid;
  gap: .4rem;
  margin-top: .9rem;
}

.codeblock__label {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.codeblock__path {
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  background: rgba(8, 11, 15, .6);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: .9rem;
  line-height: 1.55;
  color: #d7e0ec;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* A codeblock used inline in a card shouldn't carry its own chip border. */
.codeblock__path code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1em;
}

/* ---- Vertical step rail -------------------------------------------- */

.steprail {
  display: grid;
  gap: 0;
  margin-top: 1.9rem;
  list-style: none;
  counter-reset: steprail;
}

.steprail li {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.1rem;
  padding: 0 0 1.9rem 0;
}

.steprail li:last-child {
  padding-bottom: 0;
}

/* Connector line down the rail. */
.steprail li::before {
  content: "";
  position: absolute;
  top: 2.5rem;
  bottom: -.1rem;
  left: 1.25rem;
  width: 2px;
  background: linear-gradient(180deg, var(--red), rgba(215, 25, 32, .15));
  transform: translateX(-1px);
}

.steprail li:last-child::before {
  display: none;
}

.steprail .step-n {
  position: relative;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.05rem;
  box-shadow: 0 0 0 5px var(--bg);
}

.steprail .step-body {
  padding-top: .25rem;
}

.steprail h3 {
  margin-bottom: .35rem;
}

.steprail p {
  color: var(--muted);
}

.steprail a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Install / detail panels --------------------------------------- */

.panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.75rem;
}

.panel {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-deep);
  box-shadow: var(--shadow-card);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.panel:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.panel h3 {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.panel h3::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 2px;
  background: var(--red);
}

.panel p {
  margin-top: .5rem;
  color: var(--muted);
}

/* ---- Idea cards ---------------------------------------------------- */

.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
  list-style: none;
}

.idea-card {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-deep);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.idea-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--red), rgba(215, 25, 32, .2));
}

.idea-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.idea-card h3 {
  padding-left: .35rem;
}

.idea-card p {
  margin-top: .45rem;
  padding-left: .35rem;
  color: var(--muted);
}

/* ---- CTA band ------------------------------------------------------ */

.cta-band {
  text-align: center;
  background:
    radial-gradient(circle at 50% -10%, rgba(215, 25, 32, .22), transparent 22rem),
    var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cta-band h2 {
  margin-inline: auto;
  text-align: center;
  max-width: 24ch;
}

.cta-band > p {
  max-width: 52ch;
  margin: .7rem auto 0;
  color: var(--muted);
}

.cta-band .get-started-cta {
  margin-top: 1.5rem;
}

/* ---- Responsive ---------------------------------------------------- */

@media (min-width: 880px) {
  .content-hero__inner {
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 3rem;
  }

  .panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
