/* ================================================================
   RouteRun handwritten product pages (features/*, pricing, download ...)
   — page layer on top of /css/rr.css + /css/news.css.
   2026-11-18: moved here from the identical inline <style> blocks of
   pricing/index.html and features/**/index.html so the rules exist once.
   Values are the originals; colors only from rr.css tokens, no hex.
   ================================================================ */

/* ---- Page head and sections ---- */
.page-head { max-width: var(--max-w-text); }
.page-head .status-ai-note { max-width: var(--max-w-text); }
:where(.page) section { padding: 0; }  /* low specificity so section cards keep their own padding */
.pg-section { margin-top: clamp(48px, 7vw, 88px); }
.pg-h2 { margin: 0 0 var(--sp-5); font-family: var(--font-ui); font-size: var(--text-h3); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--color-text); text-wrap: balance; }
.pg-h2 a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.pg-text { max-width: var(--max-w-text); font-size: var(--text-body); line-height: var(--lh-ja); color: var(--color-text-2); text-wrap: pretty; }
.pg-text + .pg-text, .pg-text + .pg-list, .pg-list + .pg-text { margin-top: var(--sp-3); }
.pg-text a, .pg-list a, .pg-dl a, .pg-note a, .faq-a a, .status-ai-note a { color: var(--color-primary-hover); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

/* Lists: <ul class="pg-list"> is bulleted (features), <ol class="pg-list"> is numbered (pricing's steps);
   .pg-list--plain forces bullets either way. */
.pg-list { max-width: var(--max-w-text); display: grid; gap: var(--sp-2); padding-left: 1.5em; list-style: disc; font-size: var(--text-body); line-height: var(--lh-ja); color: var(--color-text-2); }
ol.pg-list { list-style: decimal; }
.pg-list--plain { list-style: disc; }

.pg-plan { max-width: var(--max-w-text); margin-top: var(--sp-4); padding: var(--sp-4) var(--sp-5); border: 1px solid var(--color-border); border-radius: var(--r-lg); font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.7; color: var(--color-text-2); }
.pg-plan b { color: var(--color-text); }
.pg-dl { max-width: 820px; display: grid; grid-template-columns: minmax(8em, 13em) minmax(0, 1fr); border-top: 1px solid var(--color-border); }
.pg-dl > div { display: contents; }
.pg-dl dt, .pg-dl dd { padding: var(--sp-4) 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-body); line-height: 1.7; }
.pg-dl dt { padding-right: var(--sp-4); font-family: var(--font-ui); font-weight: 600; color: var(--color-text); }
.pg-dl dd { margin: 0; color: var(--color-text-2); }
.pg-note { max-width: var(--max-w-text); margin-top: var(--sp-4); font-family: var(--font-ui); font-size: var(--text-sm); line-height: 1.7; color: var(--color-text-3); }
.pg-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.faq-list { margin: 0; }
.faq-q { font-size: var(--text-body); }
@media (max-width: 560px) {
  .pg-dl { grid-template-columns: 1fr; }
  .pg-dl dt { padding-bottom: 0; border-bottom: none; }
  .pg-dl dd { padding-top: var(--sp-1); }
}

/* ---- Utilities shared with the home page layer (index.html) ---- */
.nw { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---- Desktop handoff QR (features) ---- */
.qr-handoff svg { flex: none; width: 88px; height: 88px; border-radius: var(--r-md); background: var(--color-bg-surface); border: 1px solid var(--color-border); padding: 6px; }

/* ---- Pricing: period switch and cards ---- */
.pp { --pp: 0; }
.pp-period { display: flex; gap: 2px; width: max-content; max-width: 100%; margin: 0 0 var(--sp-8); padding: 3px; border: none; background: var(--color-bg-inset); border-radius: var(--r-pill); }
.pp-period input { position: absolute; opacity: 0; pointer-events: none; }
.pp-period label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-height: 40px; padding: 8px 18px; border-radius: var(--r-pill); font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 600; color: var(--color-text-2); cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast); }
.pp-period input:checked + label { background: var(--color-bg-surface); color: var(--color-text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.pp-period input:focus-visible + label { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.pp [data-pp="yearly"] { display: none; }
.pp:has(#pp-yearly:checked) [data-pp="monthly"] { display: none; }
.pp:has(#pp-yearly:checked) [data-pp="yearly"] { display: block; }
@supports not selector(:has(*)) { .pp-period { display: none; } }
.pricing-grid { max-width: 880px; margin: 0; }
.pricing-card { gap: var(--sp-5); }
.pricing-name { margin: 0; font-size: var(--text-h3); letter-spacing: 0; line-height: 1.2; }
.pricing-price .amount { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); }
.pricing-price .per { font-size: 0.4em; font-weight: 600; letter-spacing: 0; }
.pricing-alt { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--color-text-3); display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.pricing-card.pro .pricing-alt { color: var(--color-on-dark-2); }
.pricing-lead { font-size: var(--text-sm); line-height: 1.6; color: var(--color-text-3); margin: 0; }
.pricing-card.pro .pricing-lead { color: var(--color-on-dark-2); }
.pricing-card .btn { width: 100%; }
.pricing-card.pro .btn-dark { background: var(--color-on-dark); color: var(--color-bg-dark); }
.pricing-badge { background: var(--color-on-dark); color: var(--color-bg-dark); }
.pricing-features li { line-height: 1.5; }
.pricing-save { color: color-mix(in srgb, var(--color-secondary) 60%, var(--color-text)); }
.pricing-terms { max-width: 880px; margin: var(--sp-6) 0 0; font-family: var(--font-ui); font-size: var(--text-xs); color: var(--color-text-3); line-height: 1.7; }

/* ---- Reduced motion (same block the pages carried inline) ---- */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .mobile-menu.open { transition: none; }
}
