/* Hallmark · macrostructure: Workbench (tools) + Long Document (guides) · tone: utilitarian, warm · anchor hue: lime on navy
 * theme: Readyo house system (design.md) · nav: brand bar + breadcrumb · footer: shared site footer
 * Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4
 *
 * Readyo · tool, guide and compare pages (body.pg). Loaded after tokens, base, chrome and legal; tools.css adds the
 * workbench controls on tool pages. Every colour comes from tokens.css. Motion: assets/js/pages.js (Motion 13), never CSS
 * transitions, except the timer bar that the tools drive themselves. Hidden start states exist only under html.m-wait,
 * which an inline script sets when motion is allowed and removes after 2.5 s at the latest. */

/* ---------- Page frame ---------- */
html, body { overflow-x: clip; }
.pg-card {
  width: min(100% - 2 * var(--page-gutter), var(--page-max));
  margin-inline: auto;
  border-radius: var(--radius-card);
  background: var(--color-card);
  color: var(--color-text);
}
.pg .btn { transition: none; }
.pg .btn:hover { transform: none; }

/* ---------- Hero: breadcrumb, title, one line, facts. No tab cloud. ---------- */
.pg-hero {
  position: relative; isolation: isolate; overflow: clip;
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  padding: clamp(1.75rem, 5vw, 4.5rem) var(--card-pad);
}
.pg-hero__text { display: grid; justify-items: start; align-content: start; gap: var(--space-md); min-width: 0; max-width: 46rem; }
.pg-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; font-size: var(--text-sm); color: var(--color-text-muted); }
.pg-crumbs a { color: var(--color-text-muted); text-decoration: none; }
.pg-crumbs a:hover { color: var(--color-text); text-decoration: underline; }
.pg-crumbs [aria-current="page"] { color: var(--color-text); font-weight: 700; }
.pg-crumbs .sep { color: var(--color-line-strong); }
.pg-hero__title {
  font-size: clamp(2.1rem, 4.2vw + 0.6rem, 4rem);
  font-weight: 500; line-height: 1.04; letter-spacing: -0.04em;
  color: var(--color-text);
  overflow-wrap: anywhere; min-width: 0; text-wrap: balance;
}
.pg-hero__lede { max-width: 52ch; font-size: var(--text-md); line-height: 1.55; color: var(--color-text-soft); }
.pg-hero__aside { max-width: 60ch; font-size: var(--text-sm); color: var(--color-text-muted); }
.pg-hero__aside a { color: var(--color-link-dark); font-weight: 700; }
.pg-facts { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.pg-facts li {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 36px; padding: 0 0.85rem;
  border-radius: var(--radius-pill); background: var(--color-veil); color: var(--color-text);
  font-size: var(--text-sm); font-weight: 700; white-space: nowrap;
}
.pg-facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-lime); flex: none; }
.pg-langs { display: flex; gap: var(--space-xs); font-size: var(--text-sm); }
.pg-langs a { color: var(--color-text-muted); }

/* Lime panel with the white starburst: the brand mark of every Readyo page head */
.pg-hero__art { display: none; }
@media (min-width: 64rem) {
  .pg-hero { grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem); align-items: center; }
  .pg-hero__art {
    display: block; position: relative; aspect-ratio: 1;
    border-radius: calc(var(--radius-card) - 0.5rem);
    background: linear-gradient(180deg, var(--color-lavender-2), var(--color-lavender) 55%, var(--color-lavender-3));
  }
  .pg-hero__burst { position: absolute; inset: 12%; width: 76%; height: 76%; fill: var(--color-text); }
}

/* ---------- Reading card (guides, and the explanation under a tool) ---------- */
.pg-doc { padding: clamp(2rem, 6vw, 5rem) var(--card-pad); }
.pg-doc__body { max-width: 44rem; font-size: var(--text-md); line-height: 1.7; color: var(--color-text-soft); }
.pg-doc__body > * + * { margin-top: var(--space-md); }
.pg-doc__meta { font-size: var(--text-sm); color: var(--color-text-muted); }
.pg-doc h2 {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.03em;
  color: var(--color-text); text-wrap: balance;
}
.pg-doc__body > :first-child { margin-top: 0; }
.pg-doc h2::before { content: ""; display: block; width: 2.25rem; height: 3px; margin-bottom: var(--space-md); border-radius: 2px; background: var(--color-lime); }
.pg-doc h3 { margin-top: var(--space-xl); font-size: var(--text-lg); font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; color: var(--color-text); }
.pg-doc h2 + *, .pg-doc h3 + * { margin-top: var(--space-xs); }
.pg-doc strong { color: var(--color-text); }
.pg-doc a { color: var(--color-link-dark); text-decoration-thickness: 1px; }
.pg-doc ul:not([class]), .pg-doc ol:not([class]) { padding-left: 1.3rem; }
.pg-doc ul:not([class]) { list-style: disc; }
.pg-doc ol:not([class]) { list-style: decimal; }
.pg-doc li + li { margin-top: 0.45rem; }
.pg-doc li::marker { color: var(--color-lime); font-weight: 700; }
.pg-doc .small { color: var(--color-text-muted); }
.pg-doc .summary { padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius-lg); background: var(--color-lime-wash); border: 1px solid var(--color-line); }
.pg-doc .summary > strong { display: block; margin-bottom: var(--space-xs); font-size: var(--text-md); color: var(--color-text); }
.pg-doc .tablewrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-line-strong); }
.pg-doc .tablewrap table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.5; }
.pg-doc .tablewrap th, .pg-doc .tablewrap td { padding: 0.75rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-line); }
.pg-doc .tablewrap th { background: var(--color-card-2); color: var(--color-text); font-weight: 700; }
.pg-doc .tablewrap tr:last-child td { border-bottom: 0; }

/* FAQ rows: question line, plus sign that Motion turns into a cross */
.pg-faq { display: grid; margin-top: var(--space-md); border-top: 1px solid var(--color-line-strong); }
.pg-faq details { border-bottom: 1px solid var(--color-line-strong); }
.pg-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
  min-height: 56px; padding-block: var(--space-sm); cursor: pointer; list-style: none;
  font-weight: 700; color: var(--color-text); line-height: 1.4;
}
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--color-veil); }
.pg-faq__icon svg { width: 12px; height: 12px; stroke: var(--color-lime); stroke-width: 2; }
.pg-faq details[open] .pg-faq__icon { transform: rotate(45deg); }   /* Motion animates the turn; this is the resting state */
.pg-faq details > p { padding-bottom: var(--space-md); max-width: 60ch; }

/* ---------- "More tools" / "More guides": rows, not a pill cloud ---------- */
.pg-more { padding: clamp(1.75rem, 5vw, 4rem) var(--card-pad); }
.pg-more__h { font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem); font-weight: 500; letter-spacing: -0.03em; color: var(--color-text); }
.pg-more__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--space-xl); margin: var(--space-lg) 0 0; padding: 0; list-style: none; }
.pg-more__list li { border-top: 1px solid var(--color-line-strong); }
.pg-more__list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.15rem var(--space-md);
  padding-block: var(--space-md); color: var(--color-text); text-decoration: none;
}
.pg-more__name { font-weight: 700; }
.pg-more__desc { grid-column: 1; font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }
.pg-more__arrow { grid-column: 2; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--color-veil); }
.pg-more__arrow svg { width: 14px; height: 14px; stroke: var(--color-text); stroke-width: 2; fill: none; }
.pg-more__list a:hover .pg-more__name { color: var(--color-lime); }
.pg-more__list a:hover .pg-more__arrow { background: var(--color-lime); }
.pg-more__list a:hover .pg-more__arrow svg { stroke: var(--color-ink); }
.pg-more__all { margin-top: var(--space-lg); font-size: var(--text-sm); }
.pg-hub__group + .pg-hub__group { margin-top: var(--space-2xl); }
@media (min-width: 48rem) {
  .pg-more__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Closing call to action: the lime panel, a real app screenshot, the starburst ---------- */
.pg-cta {
  position: relative; isolation: isolate; overflow: clip;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); align-items: center;
  padding: clamp(2rem, 6vw, 5rem) var(--card-pad) 0;
  background: linear-gradient(180deg, var(--color-lavender-2), var(--color-lavender) 45%, var(--color-lavender-3));
  color: var(--color-ink);
}
.pg-cta__text { display: grid; justify-items: start; gap: var(--space-md); max-width: 36rem; min-width: 0; padding-bottom: clamp(0rem, 4vw, 4rem); }
.pg-cta__h { font-size: clamp(2rem, 3.6vw + 0.6rem, 3.6rem); font-weight: 500; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; overflow-wrap: anywhere; }
.pg-cta__p { font-size: var(--text-md); line-height: 1.55; color: var(--color-ink-soft); max-width: 46ch; }
.pg-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); }
.pg-cta .btn--store { background: var(--color-ink); color: var(--color-lime); gap: 0.6rem; white-space: nowrap; }
.pg-cta .btn--store svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.pg-cta a:not(.btn) { color: var(--color-ink); font-weight: 700; text-decoration-thickness: 2px; text-decoration-color: var(--color-purple); }
.pg-cta :focus-visible { outline-color: var(--color-ink); }
.pg-cta__fine { font-size: var(--text-sm); color: var(--color-ink-soft); }
.pg-cta__figure { position: relative; justify-self: center; width: min(68vw, 17rem); margin: 0; align-self: end; }
.pg-cta__burst { position: absolute; z-index: -1; width: 150%; left: -25%; top: -12%; fill: var(--color-text); }
.pg-cta__shot {
  display: block; width: 100%; height: auto;
  border-radius: 1.75rem 1.75rem 0 0;
  border: 1px solid var(--color-line-ink); border-bottom: 0;   /* a real screenshot with a hairline, no drawn phone */
  box-shadow: 0 -1.5rem 3rem -1.5rem var(--color-ink-soft);
}
@media (min-width: 56rem) {
  .pg-cta { grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem); }
  .pg-cta__figure { width: 100%; }
}

/* ---------- Motion start states (pages.js). Only when motion is allowed and the script runs. ---------- */
.m-wait [data-m], .m-wait .m-reveal { opacity: 0; }

/* Phones */
@media (max-width: 47.99rem) {
  .pg-hero__title { font-size: clamp(2rem, 8vw, 2.6rem); }
  .pg-facts li { min-height: 32px; font-size: var(--text-xs); }
}

/* Print: browsers drop backgrounds, so the light text goes dark; nothing stays hidden by the motion start states */
@media print {
  .pg { --color-text: var(--color-ink); --color-text-soft: var(--color-ink); --color-text-muted: var(--color-ink-soft); --color-link-dark: var(--color-ink); }
  .pg, .pg-card { background: none; }
  .m-reveal, [data-m] { opacity: 1 !important; transform: none !important; }
  .pg-hero__art, .pg-more, .pg-cta__figure, .pg .topbar { display: none; }
}
