/* ===== BestQR — QR Design & Print Studio: home page, hubs and shared product components ===== */

:root {
  --paper: #fbfaf7;
  --paper-2: #f3f1ec;
  --ink: #14161f;
  --rule: #e6e3dc;
}

/* ---------- Sheet: a real tool output shown as a printed sheet, with crop marks ---------- */
.sheet {
  position: relative;
  display: block;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(20, 22, 31, .06), 0 18px 40px -22px rgba(20, 22, 31, .35);
  padding: 10px;
}

.sheet img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #b9b5ab;
  border-style: solid;
  pointer-events: none;
}

.sheet::before {
  top: -9px;
  left: -9px;
  border-width: 0 1px 1px 0;
}

.sheet::after {
  bottom: -9px;
  right: -9px;
  border-width: 1px 0 0 1px;
}

/* ---------- Home: hero ---------- */
.s-hero {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--rule);
}

.s-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.s-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.s-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ink);
}

.s-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5.6vw, 66px);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 0 0 22px;
  color: var(--ink);
}

.s-hero h1 span {
  color: var(--accent);
}

.s-lede {
  font-size: 18.5px;
  line-height: 1.6;
  color: #3b3f4c;
  max-width: 520px;
  margin: 0 0 30px;
}

.s-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.s-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15.5px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .15s;
}

.s-btn .icon {
  width: 18px;
  height: 18px;
}

.s-btn.primary {
  background: var(--ink);
  color: #fff;
}

.s-btn.primary:hover {
  background: #000;
  transform: translateY(-1px);
}

.s-btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--border-strong);
}

.s-btn.ghost:hover {
  border-color: var(--ink);
}

.s-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.s-facts li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.s-facts .icon {
  width: 16px;
  height: 16px;
  color: var(--ink);
}

/* hero composition: real outputs laid out like proofs on a desk */
.s-desk {
  position: relative;
  aspect-ratio: 1 / .92;
}

.s-desk .sheet {
  position: absolute;
}

.s-desk .d-tent {
  left: 2%;
  top: 4%;
  width: 37%;
  transform: rotate(-3deg);
}

.s-desk .d-wifi {
  left: 36%;
  top: 0;
  width: 33%;
  transform: rotate(2deg);
  z-index: 2;
}

.s-desk .d-review {
  right: 0;
  top: 30%;
  width: 46%;
  transform: rotate(-2deg);
  z-index: 3;
}

.s-desk .d-card {
  left: 6%;
  bottom: 6%;
  width: 42%;
  transform: rotate(1.5deg);
  z-index: 4;
}

.s-desk .d-labels {
  right: 4%;
  bottom: 2%;
  width: 52%;
  transform: rotate(-1deg);
  z-index: 5;
}

.s-desk-note {
  margin: 18px 0 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Home: sections ---------- */
.s-sec {
  padding: 84px 0;
}

.s-sec.rule {
  border-top: 1px solid var(--rule);
}

.s-sec.white {
  background: #fff;
}

.s-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
}

.s-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}

.s-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  max-width: 560px;
  line-height: 1.55;
}

.s-head .s-link {
  white-space: nowrap;
}

.s-link {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.s-link:hover {
  color: var(--accent-600);
}

/* "What do you want to make?" */
.s-make {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.s-make-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}

.s-make-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  padding: 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}

.s-make-img img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 10px 24px -14px rgba(20, 22, 31, .45);
  border-radius: 3px;
}

.s-make-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.s-make-body h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -.015em;
}

.s-make-body h3 a:hover {
  color: var(--accent-600);
}

.s-make-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.s-make-body ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.s-make-body li a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  font-size: 14.5px;
  font-weight: 500;
  border-top: 1px solid var(--rule);
}

.s-make-body li a::after {
  content: "→";
  color: var(--muted);
}

.s-make-body li a:hover {
  color: var(--accent-600);
}

/* Featured products */
.s-feat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.s-prod {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 22px;
}

.s-prod-img {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 18px;
}

.s-prod-img img {
  max-width: 100%;
  max-height: 230px;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 10px 24px -14px rgba(20, 22, 31, .45);
}

.s-prod h3 {
  margin: 2px 0 8px;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -.02em;
}

.s-prod > div > p {
  margin: 0 0 14px;
  color: #3b3f4c;
  font-size: 15px;
  line-height: 1.55;
}

.s-prod dl {
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.s-prod dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.s-prod dd {
  margin: 2px 0 0;
  color: var(--ink);
  line-height: 1.45;
}

.s-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, background .15s;
}

.s-go:hover {
  border-color: var(--ink);
}

.s-go .icon {
  width: 16px;
  height: 16px;
}

.s-prod.wide {
  grid-template-columns: 1fr;
}

.s-prod.wide .s-prod-img {
  min-height: 0;
  padding: 26px 22px;
}

/* Generator band */
.s-gen {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 48px;
  align-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 24px;
  padding: 52px 56px;
}

.s-gen h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -.03em;
  margin: 0 0 14px;
}

.s-gen p {
  color: #c9ccd8;
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 520px;
}

.s-gen .s-btn.primary {
  background: #fff;
  color: var(--ink);
}

.s-gen .s-btn.primary:hover {
  background: #eceef5;
}

.s-gen-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.s-gen-types li {
  font-size: 13.5px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #e4e6ee;
}

.s-gen-art {
  justify-self: center;
  background: #fff;
  border-radius: 18px;
  padding: 22px 22px 14px;
  width: min(280px, 100%);
  text-align: center;
}

.s-gen-art img {
  width: 100%;
  height: auto;
  display: block;
}

.s-gen-art span {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--ink);
  font-size: 15px;
}

/* Check before you print */
.s-checks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.s-check {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s-check:last-child {
  border-right: 0;
}

.s-check .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.s-check b {
  font-size: 15.5px;
}

.s-check small {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.s-check:hover b {
  color: var(--accent-600);
}

/* How it works: two separate paths */
.s-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.s-path {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 28px 28px 26px;
}

.s-path h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -.02em;
}

.s-path > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}

.s-path ol {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: st;
}

.s-path li {
  counter-increment: st;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.5;
}

.s-path li::before {
  content: counter(st, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.s-path li b {
  color: var(--ink);
}

/* Guides */
.s-guides {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.s-guide {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0 0;
  border-top: 2px solid var(--ink);
}

.s-guide span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.s-guide b {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.s-guide:hover b {
  color: var(--accent-600);
}

/* ---------- Design & Print and QR Tools hubs ---------- */
.dt-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.dt-jump a {
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}

.dt-jump a:hover {
  border-color: var(--ink);
}

.dt-group {
  padding-top: 30px;
  scroll-margin-top: 80px;
}

.dt-title {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -.025em;
  margin: 0 0 6px;
}

.dt-intro {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15.5px;
}

.dt-more {
  margin: 40px 0 0;
  text-align: center;
  color: var(--muted);
}

.dt-more a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.pgrid.n5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.pgrid.n5 .pc-thumb {
  height: 160px;
}

.pcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.pcard:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pc-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  padding: 18px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
}

.pc-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 8px 20px -12px rgba(20, 22, 31, .45);
}

.pc-icon {
  color: var(--c);
  background: var(--s);
}

.pc-icon svg {
  width: 64px;
  height: 64px;
}

.pc-body {
  display: grid;
  gap: 4px;
  padding: 16px 18px 18px;
}

.pc-body b {
  font-size: 16.5px;
  font-family: var(--display);
  letter-spacing: -.01em;
}

.pc-body small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.tgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.tcard {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  transition: border-color .15s, box-shadow .15s;
}

.tcard:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.tc-ic {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-600);
}

.tc-ic .icon {
  width: 22px;
  height: 22px;
}

.tc-body {
  display: grid;
  gap: 3px;
}

.tc-body b {
  font-size: 16px;
}

.tc-body small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pgrid,
  .pgrid.n5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .s-check {
    border-bottom: 1px solid var(--rule);
  }

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

@media (max-width: 900px) {
  .s-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .s-desk {
    max-width: 560px;
    margin: 0 auto;
  }

  .s-desk-note {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .s-feat {
    grid-template-columns: 1fr;
  }

  .s-gen {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }

  .s-paths {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .s-hero {
    padding: 40px 0 48px;
  }

  .s-lede {
    font-size: 17px;
  }

  .s-sec {
    padding: 56px 0;
  }

  .s-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .s-make {
    grid-template-columns: 1fr;
  }

  .s-prod {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .s-prod-img {
    min-height: 0;
  }

  .s-checks {
    grid-template-columns: 1fr 1fr;
  }

  .s-guides {
    grid-template-columns: 1fr;
  }

  .s-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .pgrid,
  .pgrid.n5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pc-thumb,
  .pgrid.n5 .pc-thumb {
    height: 130px;
    padding: 12px;
  }

  .pc-body {
    padding: 12px 12px 14px;
  }

  .pc-body b {
    font-size: 15px;
  }

  .pc-body small {
    font-size: 13px;
  }
}

/* ---------- Home: compact category overview ---------- */
.s-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.s-cat {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 6px 0;
}

.s-cat + .s-cat {
  padding-left: 22px;
  border-left: 1px solid var(--rule);
}

.s-cat h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -.015em;
}

.s-cat h3 a:hover {
  color: var(--accent-600);
}

.s-cat p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

.s-cat > a {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  font-weight: 500;
}

.s-cat > a::after {
  content: "→";
  color: var(--muted);
}

.s-cat > a:hover {
  color: var(--accent-600);
}

/* ---------- Home: featured products ---------- */
.s-show {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 4px 0 36px;
}

.s-show + .s-show {
  border-top: 1px solid var(--rule);
  padding-top: 36px;
}

/* a smaller showcase: text on the left, the preview on the right at a fixed width */
.s-show.compact {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
}

.s-show.compact .s-proof {
  order: 2;
}

.s-show.compact .s-proof {
  padding: 22px 26px;
}

.s-show.compact .s-proof .sheet {
  width: 100%;
  padding: 5px;
}

.s-show.compact .s-show-text h3 {
  font-size: clamp(22px, 2.2vw, 26px);
  margin-bottom: 10px;
}

.s-show.compact .s-show-text > p:not(.s-kicker) {
  font-size: 15.5px;
  margin-bottom: 14px;
  max-width: 640px;
}

.s-show.compact .s-specs {
  margin-bottom: 20px;
}

.s-show.flip .s-proof {
  order: 2;
}

.s-proof {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--paper-2);
  border-radius: 20px;
  padding: 32px 32px;
}

.s-proof .sheet {
  width: min(280px, 72%);
  padding: 8px;
}

.s-fold {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-left: calc(min(280px, 72%) / 2 + 26px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.s-fold::before {
  content: "";
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  width: 16px;
  border-top: 1px dashed var(--muted);
}

.s-kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-600);
}

.s-show-text h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--ink);
}

.s-show-text > p:not(.s-kicker) {
  margin: 0 0 18px;
  color: #3b3f4c;
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 520px;
}

.s-specs {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
}

.s-specs li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.s-specs li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transform: translateY(-1px);
}

.s-more-title {
  margin: 4px 0 18px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -.02em;
}

.s-minis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.s-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s-mini-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  margin-bottom: 8px;
  padding: 22px;
  background: var(--paper-2);
  border-radius: 14px;
  transition: background .15s;
}

.s-mini-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 10px 24px -14px rgba(20, 22, 31, .45);
}

.s-mini:hover .s-mini-img {
  background: #ebe8e1;
}

.s-mini b {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -.01em;
}

.s-mini:hover b {
  color: var(--accent-600);
}

.s-mini small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 1080px) {
  .s-minis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .s-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .s-cat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .s-show {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .s-show.flip .s-proof {
    order: 0;
  }

  .s-show.compact {
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 24px;
    align-items: start;
  }

  .s-proof {
    padding: 32px 24px;
  }

  .s-fold {
    display: none;
  }
}

@media (max-width: 640px) {
  .s-cats {
    grid-template-columns: 1fr;
  }

  .s-cat,
  .s-cat + .s-cat {
    padding: 18px 0 4px;
    border-left: 0;
  }

  .s-cat + .s-cat {
    border-top: 1px solid var(--rule);
  }

  .s-proof .sheet {
    width: min(220px, 64%);
  }

  .s-show.compact {
    grid-template-columns: 1fr;
  }

  .s-show.compact .s-proof {
    order: 0;
  }

  .s-show.compact .s-proof .sheet {
    width: min(170px, 50%);
  }

  .s-show {
    padding-bottom: 40px;
  }

  .s-show + .s-show {
    padding-top: 40px;
  }

  .s-minis {
    gap: 14px;
  }

  .s-mini-img {
    height: 130px;
    padding: 14px;
  }

  .s-mini small {
    font-size: 13px;
  }

  .s-gen-art {
    width: 168px;
    padding: 14px 14px 10px;
    justify-self: start;
  }
}

/* ---------- Index pages (QR Tools, Guides): left-aligned heading, sections as an index ---------- */
.p-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--rule);
}

.p-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.04;
  letter-spacing: -.035em;
  margin: 0 0 16px;
  color: var(--ink);
  max-width: 820px;
}

.p-title span {
  color: var(--accent);
}

.p-lede {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.6;
  color: #3b3f4c;
}

.ix {
  padding: 12px 0 80px;
}

.ix-sec {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 48px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 80px;
}

.ix-head h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--ink);
}

.ix-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.ix-list {
  border-top: 2px solid var(--ink);
}

.ix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--rule);
  transition: background .15s;
}

.ix-row:has(.ix-ic) {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.ix-row:last-child {
  border-bottom: 0;
}

.ix-row:hover {
  background: rgba(20, 22, 31, .03);
}

.ix-row:hover b {
  color: var(--accent-600);
}

.ix-ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--rule);
  color: var(--ink);
}

.ix-ic .icon {
  width: 20px;
  height: 20px;
}

.ix-txt {
  display: grid;
  gap: 3px;
}

.ix-txt b {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}

.ix-txt small {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.45;
}

.ix-go,
.ix-meta {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.ix-meta {
  font-family: var(--mono);
  font-size: 12px;
}

.ix-note {
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 760px;
}

.ix-note a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Guides: three guides to read first */
.g-start {
  padding: 40px 0 8px;
}

.g-label {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.g-sec {
  padding: 44px 0 4px;
}

.g-sec:last-child {
  padding-bottom: 80px;
}

.g-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.g-sec.lead .g-head {
  border-top: 0;
  padding-top: 0;
}

.g-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -.02em;
  color: var(--ink);
}

.g-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.g-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.g-sec.lead .g-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.g-sec:not(.lead) .g-card b {
  font-size: 17px;
}

.g-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g-img {
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-2);
  margin-bottom: 6px;
}

.g-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.g-card:hover .g-img img {
  transform: scale(1.03);
}

.g-card b {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--ink);
}

.g-card:hover b {
  color: var(--accent-600);
}

.g-card small {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.g-min {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .ix-sec {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 28px 0;
  }

  .g-grid,
  .g-sec.lead .g-grid {
    grid-template-columns: 1fr 1fr;
  }

  .g-sec.lead .g-card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .g-sec.lead .g-card:nth-child(3) .g-img {
    aspect-ratio: 5 / 2;
  }
}

@media (max-width: 640px) {
  .p-head {
    padding: 36px 0 28px;
  }

  .p-lede {
    font-size: 16.5px;
  }

  .g-grid,
  .g-sec.lead .g-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .g-card,
  .g-sec.lead .g-card:nth-child(3) {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
  }

  .g-img,
  .g-sec.lead .g-card:nth-child(3) .g-img {
    grid-row: 1 / span 3;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    margin: 0;
  }

  .g-card b {
    font-size: 17px;
  }

  .g-card small {
    font-size: 13.5px;
  }

  .ix-row {
    padding: 14px 2px;
    gap: 12px;
  }

  .ix-row:has(.ix-ic) {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .ix-ic {
    width: 36px;
    height: 36px;
  }
}
