*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --floor: #f2f2ed;
  --ink: #171717;
  --muted: #5f625c;
  --line: #171717;
  --paper: #fffef8;
  --yellow: #ffd33d;
  --orange: #ff6b35;
  --green: #55c271;
  --steel: #d8ddd9;
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  background:
    linear-gradient(90deg, rgba(23,23,23,0.04) 1px, transparent 1px),
    linear-gradient(180deg, #fafaf5 0%, var(--floor) 100%);
  background-size: 28px 28px, auto;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.garage-shell {
  width: min(1320px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.garage-top,
.garage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 3px solid var(--line);
}

.garage-footer {
  border-top: 3px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--yellow);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.garage-nav,
.garage-footer {
  color: var(--muted);
}

.garage-nav,
.garage-footer nav {
  display: flex;
  gap: 18px;
}

.garage-board {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(300px, 0.86fr) 280px;
  gap: 14px;
  padding: 16px 0;
}

.price-ticket,
.mini-tool,
.ownership-panel,
.lane-note,
.ad-slot,
.subpage-hero,
.policy-card {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--line);
}

.price-ticket {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(0deg, rgba(255,211,61,0.25), rgba(255,211,61,0.25)),
    var(--paper);
}

.kicker,
.tool-head span,
.lane-note span,
.ad-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--orange);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-family: "Archivo", sans-serif;
  font-size: 4.2rem;
  line-height: 0.92;
}

h2 {
  font-size: 1.25rem;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.input-grid.tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px;
}

textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.5;
}

.shop-button {
  width: fit-content;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--green);
  color: var(--ink);
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--line);
}

.shop-button.compact {
  padding: 10px 14px;
}

.big-output,
.side-output {
  display: block;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--yellow);
  padding: 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 2.35rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.side-output {
  font-size: 1.25rem;
}

.stack-column {
  display: grid;
  gap: 14px;
}

.mini-tool,
.ownership-panel,
.lane-note,
.ad-slot {
  padding: 18px;
}

.fuel-tool {
  background: var(--steel);
}

.tool-head {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.ownership-panel {
  grid-column: 1 / 3;
  display: grid;
  gap: 14px;
  background: #fff;
}

.sponsor-lane {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: grid;
  align-content: start;
  gap: 12px;
}

.lane-note p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.ad-slot {
  min-height: 110px;
}

.ad-slot-sidebar { min-height: 230px; }
.ad-slot-inline { min-height: 120px; }
.ad-slot.is-hidden { display: none; }
.sponsor-lane.is-hidden .ad-slot { display: none; }

.ad-link {
  display: grid;
  gap: 10px;
}

.ad-link-image {
  overflow: hidden;
  border-radius: var(--radius);
  border: 3px solid var(--line);
}

.ad-link-image img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-copy {
  display: grid;
  gap: 4px;
}

.ad-copy span {
  color: var(--muted);
  line-height: 1.5;
}

.subpage-main {
  max-width: 900px;
  margin: 22px auto;
  display: grid;
  gap: 14px;
}

.subpage-hero,
.policy-card {
  padding: 24px;
}

.subpage-hero p,
.policy-card p,
.policy-card li {
  color: var(--muted);
  line-height: 1.7;
}

.policy-card ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 1120px) {
  .garage-board {
    grid-template-columns: 1fr 1fr;
  }

  .sponsor-lane {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lane-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .garage-shell {
    width: min(100% - 18px, 1320px);
  }

  .garage-top,
  .garage-footer,
  .garage-nav,
  .garage-footer nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .garage-board,
  .stack-column,
  .input-grid,
  .input-grid.tight,
  .ownership-panel,
  .sponsor-lane {
    grid-template-columns: 1fr;
  }

  .ownership-panel,
  .sponsor-lane {
    grid-column: auto;
  }

  h1 {
    font-size: 2.8rem;
  }
}
