/* ============================================================
   FREE WEBSITE CHECK: the report pages in the hero
   The pages of a sample check report, fanned like the health-check
   banner (refs/seo-things/health-check). Every page turns about one
   point well below the deck, so the tops spread and the feet stay
   close together.
   Motion (transform and opacity only): the black cover slides up from
   below, then the pages underneath swing out to the left and right
   and land together. It runs once, when the fan first comes into view
   (a few lines at the foot of the page add .is-on).
   This page leans its pages on purpose, at John's request, to match
   the banner. Everywhere else the "No tilts" rule still stands.
   ============================================================ */
.ck-hero {
  --w: min(15vw, 13rem);
  position: relative;
  margin: 0;
  aspect-ratio: auto;
  height: calc(var(--w) * 1.414 * 1.42 + 1.5rem);
  overflow: visible;
}
@media (min-width: 820px) {
  .ck-hero { --w: min(13vw, 15rem); aspect-ratio: auto; }
}
.ck-fan { position: absolute; left: 50%; top: 1rem; width: 0; height: 0; }
.ck-card {
  position: absolute;
  left: calc(var(--w) / -2);
  top: 0;
  width: var(--w);
  max-width: none; /* the fan box is 0 wide, so the site's img max-width would squash it */
  height: calc(var(--w) * 1.414);
  object-fit: cover;
  border-radius: calc(var(--w) * .045);
  outline: 1px solid rgba(20, 17, 13, .08);
  box-shadow: 0 18px 34px -14px rgba(20, 17, 13, .38), 0 3px 8px rgba(20, 17, 13, .16);
  filter: blur(.4px);
  transform-origin: 50% 235%;
  transform: rotate(var(--r));
  animation: ck-open .9s cubic-bezier(.2, .8, .2, 1) .7s both;
}
.ck-card--cover {
  transform: none;
  animation: ck-cover .8s cubic-bezier(.2, .8, .2, 1) .1s both;
}
/* Waits, hidden, until the fan is in view (only when scripts run, so
   without them the pages simply sit in place). */
.js .ck-hero:not(.is-on) .ck-card { animation-play-state: paused; }

@keyframes ck-cover {
  from { transform: translateY(70%); opacity: 0; }
  40%  { opacity: 1; }
  to   { transform: none; opacity: 1; }
}
@keyframes ck-open {
  from { transform: rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  to   { transform: rotate(var(--r)); opacity: 1; }
}

/* Phones: the outer pair would be tiny, so the fan keeps seven pages. */
@media (max-width: 559px) {
  .ck-card--edge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ck-card, .ck-card--cover { animation: none; }
}

/* ============================================================
   "What a check might find" (also the "Where each one shows up"
   table on the Google Maps guide): a white table with a terracotta
   header row, so the column names are easy to read at a glance.
   Each finding gets its number in the display italic, as on the
   costs guide. Phones: each row becomes a short card, with the
   column name above the fix and the reason.
   Contrast: white on --accent-ink 5.3:1; ink-2 on white 10:1.
   ============================================================ */
.ck-table-wrap {
  margin-top: clamp(2rem, 5vw, 3rem);
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(20, 17, 13, .05), 0 30px 50px -36px rgba(40, 24, 8, .45);
}
.ck-table { width: 100%; border-collapse: collapse; }
.ck-table th {
  padding: 1.15rem 1.5rem;
  font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; text-align: left;
  color: var(--paper);
  background: var(--accent-ink);
}
.ck-table td {
  padding: 1.6rem 1.5rem;
  vertical-align: top;
  font-size: 1.0625rem; line-height: 1.55; color: var(--ink-2);
  border-top: 1px solid rgba(20, 17, 13, .09);
}
.ck-table tbody tr:first-child td { border-top: 0; }
.ck-table th:first-child, .ck-table td:first-child { width: 42%; }
.ck-found { display: flex; gap: 1.1rem; align-items: flex-start; }
.ck-found > div { flex: 1; min-width: 0; }
.ck-n {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: 2.6rem; line-height: .9; color: var(--accent);
}
.ck-table td b {
  display: block; margin-bottom: .35rem;
  font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 400; line-height: 1.2;
  color: var(--ink);
}
.ck-table td.ck-fix { color: var(--ink); font-weight: 500; }

@media (max-width: 699px) {
  .ck-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ck-table, .ck-table tbody, .ck-table tr { display: block; }
  .ck-table tr { padding: 1.5rem 1.3rem; border-top: 1px solid rgba(20, 17, 13, .09); }
  .ck-table tbody tr:first-child { border-top: 0; }
  .ck-table td, .ck-table td:first-child { display: block; width: auto; padding: 0; border: 0; }
  .ck-table td + td { margin-top: 1rem; }
  .ck-table td[data-label]::before {
    content: attr(data-label);
    display: block; margin-bottom: .2rem;
    font-family: var(--sans); font-size: .9rem; font-weight: 600;
    color: var(--accent-ink);
  }
}

/* ============================================================
   "How to ask for one": the costs guide's monthly-bit cards
   (polish.css .sa-after), four of them here. Wide: one row of four
   (two by two on smaller laptops), dealt out from under the first
   card as the section comes up the screen (the script at the foot
   of the page). 01 sits on top so the others slide out from under it.
   Phones: the same swipe strip as the costs guide, with each number
   rising out of its line.
   ============================================================ */
@media (min-width: 820px) and (min-device-width: 600px) and (min-device-height: 600px) {
  .ck-steps .sa-led { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ck-steps .sa-led__row { position: relative; }
  .ck-steps .sa-led__row:nth-child(1) { z-index: 4; }
  .ck-steps .sa-led__row:nth-child(2) { z-index: 3; }
  .ck-steps .sa-led__row:nth-child(3) { z-index: 2; }
  .ck-steps .sa-led__row:nth-child(4) { z-index: 1; }
}
@media (min-width: 1100px) and (min-device-width: 600px) and (min-device-height: 600px) {
  .ck-steps .sa-led { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============================================================
   Google Maps guide, "What a website adds": the tradies card wall,
   laid out in rows so the cards read left to right in order of
   importance (masonry columns would read 1, 3, 5 across the top).
   Phones keep the swipe strip.
   ============================================================ */
@media (min-width: 820px) and (min-device-width: 600px) and (min-device-height: 600px) {
  #adds .gd-trades .gd-deck.gd-wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; columns: auto; }
  #adds .gd-trades .gd-card { margin: 0; }
}
@media (min-width: 1100px) and (min-device-width: 600px) and (min-device-height: 600px) {
  #adds .gd-trades .gd-deck.gd-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The Maps guide's website column holds a sentence or two, so it keeps
   the ink colour without the extra weight. */
#searches .ck-table td.ck-fix { font-weight: 400; }

/* Links inside the table match the guides: a straight terracotta underline. */
.ck-table a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
