/* Content pages: guides, the reading speed test, shared quotes, releases, support, legal. */

/* ---------- layout ---------- */

.pmain {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 48px) 80px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font: 500 12px/1.4 var(--mono);
  color: var(--ink-3);
}

.crumbs li + li::before {
  content: '/';
  margin-right: 6px;
}

.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.phead {
  max-width: 760px;
  margin: 40px 0 36px;
}

.phead h1 {
  margin-top: 12px;
  font-size: clamp(34px, 5.4vw, 60px);
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 18px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.notice {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--gold) 14%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--border));
}

.ticks {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.ticks li {
  position: relative;
  padding-left: 28px;
}

.ticks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- prose (articles, legal) ---------- */

.article {
  max-width: 760px;
}

.article__meta {
  margin-top: 14px;
  font-size: 13px;
}

.toc {
  margin: 0 0 40px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.toc ol {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.toc a {
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.prose {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(24px, 3vw, 32px);
  scroll-margin-top: 90px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 600;
}

.prose .lead {
  font-size: 20px;
  color: var(--ink-2);
}

.prose .steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.prose .steps li {
  counter-increment: step;
  position: relative;
  padding: 2px 0 2px 48px;
}

.prose .steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 14px/1 var(--mono);
}

.prose .checklist li::marker {
  color: var(--gold);
  font-weight: 600;
}

.callout {
  padding: 18px 22px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--surface);
  font-size: 16px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.legal th,
.legal td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.legal th {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- FAQ ---------- */

.pfaq {
  max-width: 760px;
  margin-top: 56px;
}

.pfaq h2 {
  margin-bottom: 16px;
  font-size: clamp(24px, 3vw, 32px);
}

.pfaq details {
  border-top: 1px solid var(--divider);
  padding: 4px 0;
}

.pfaq details:last-child {
  border-bottom: 1px solid var(--divider);
}

.pfaq summary {
  cursor: pointer;
  padding: 14px 32px 14px 0;
  font-weight: 500;
  list-style: none;
  position: relative;
}

.pfaq summary::-webkit-details-marker {
  display: none;
}

.pfaq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 10px;
  font: 400 22px/1 var(--mono);
  color: var(--gold);
  transition: transform 0.25s var(--ease);
}

.pfaq details[open] summary::after {
  transform: rotate(45deg);
}

.pfaq details p {
  padding: 0 0 16px;
  color: var(--ink-2);
}

/* ---------- share row ---------- */

.share {
  margin-top: 48px;
}

.share__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.share__btn:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.share__btn--wa {
  background: #25d366;
  border-color: #25d366;
  color: #0b2e17;
}

.share__btn--wa:hover {
  background: #2fe073;
}

.related {
  margin-top: 40px;
}

.related ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.related a {
  font: 600 19px/1.35 var(--serif);
  color: var(--ink);
  text-decoration: none;
}

.related a:hover {
  text-decoration: underline;
}

/* ---------- call to action ---------- */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 72px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 22px;
  background: var(--ink);
  color: var(--bg);
}

.cta h2 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-style: italic;
}

.cta .muted {
  color: color-mix(in srgb, var(--bg) 70%, var(--ink));
  max-width: 34em;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cta .btn--ghost {
  --btn-fg: var(--bg);
  border-color: color-mix(in srgb, var(--bg) 30%, transparent);
}

.cta .btn--ghost:hover {
  background: color-mix(in srgb, var(--bg) 10%, transparent);
}

/* ---------- guide index ---------- */

.ggrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.gcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--elevated);
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.gcard img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  background: var(--surface);
}

.gcard__body {
  display: grid;
  gap: 8px;
  padding: 20px 22px 24px;
}

.gcard h2 {
  font-size: 22px;
  line-height: 1.2;
}

.gcard__meta {
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- support tiles ---------- */

.tiles3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.tile3 {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  text-decoration: none;
  transition: background 0.2s, transform 0.3s var(--ease);
}

.tile3:hover {
  background: var(--surface);
  transform: translateY(-2px);
}

.tile3 h2 {
  font-size: 24px;
}

/* ---------- releases ---------- */

.releases {
  max-width: 760px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--divider);
}

.release {
  position: relative;
  padding: 4px 0 36px 28px;
}

.release::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.release.is-latest::before {
  background: var(--gold);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 22%, transparent);
}

.release__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.release__head h2 {
  font-size: 28px;
}

.release__head time {
  font-size: 13px;
}

.release__notes {
  margin-top: 10px;
  line-height: 1.7;
}

/* ---------- reading speed test ---------- */

.speed {
  max-width: 760px;
  margin-bottom: 56px;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--elevated);
  box-shadow: var(--shadow);
}

.speed__bar {
  position: sticky;
  top: 72px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.speed__bar span {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
}

.speed__text {
  display: grid;
  gap: 1em;
  margin-bottom: 28px;
  font: 400 20px/1.75 var(--serif);
  font-variation-settings: 'opsz' 18;
}

.speed__quiz {
  display: grid;
  gap: 22px;
}

.speed__quiz fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.speed__quiz legend {
  margin-bottom: 8px;
  font: 600 20px/1.3 var(--serif);
}

.speed__quiz label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.speed__quiz label:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}

.speed__quiz input {
  accent-color: var(--accent);
}

.speed__score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
}

.speed__score b {
  font: 600 clamp(80px, 16vw, 140px)/0.9 var(--serif);
  letter-spacing: -0.04em;
  color: var(--accent);
}

.speed__score span {
  font: italic 400 24px/1.2 var(--serif);
  color: var(--ink-2);
}

.speed__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  margin: 22px 0;
}

.speed__facts div {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
}

.speed__facts b {
  display: block;
  font: 600 28px/1.1 var(--serif);
}

.speed__facts span {
  font-size: 14px;
  color: var(--ink-2);
}

.speed__gauge {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  margin: 22px 0 4px;
}

.speed__gauge i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--muted);
  transform-origin: bottom;
  animation: rise 0.6s var(--ease) both;
  animation-delay: calc(var(--i) * 40ms);
}

.speed__gauge i.on {
  background: var(--k);
}

.speed__gauge-labels {
  display: flex;
  justify-content: space-between;
  font: 500 11px/1 var(--mono);
  color: var(--ink-3);
}

.speed__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

@keyframes rise {
  from {
    transform: scaleY(0);
  }
}

/* ---------- shared quote page ---------- */

.qpage {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-top: 32px;
}

.qcard {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: card-in 0.8s var(--ease) both;
}

.qcard img {
  width: 100%;
  height: auto;
}

.qpage__text {
  margin: 12px 0 0;
  font: italic 400 24px/1.45 var(--serif);
}

.qpage__book {
  margin-top: 16px;
  font: 600 20px/1.3 var(--serif);
}

.qpage .share {
  margin-top: 28px;
}

.qpage__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-1.5deg);
  }
}

@media (max-width: 820px) {
  .qpage {
    grid-template-columns: 1fr;
  }
}

/* ---------- footer ---------- */

.pfoot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 48px;
  padding: 48px clamp(16px, 4vw, 48px) 40px;
  border-top: 1px solid var(--divider);
}

.pfoot .brand__word {
  font-size: 40px;
}

.pfoot p {
  margin-top: 8px;
}

.pfoot ul {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.pfoot ul a {
  color: var(--ink-2);
  text-decoration: none;
}

.pfoot ul a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.pfoot__copy {
  grid-column: 1 / -1;
  font-size: 12px;
}

.pfoot__copy a {
  color: inherit;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
