/*
 * Pencil Town: components
 * Every value comes from tokens.css. Load tokens.css first.
 */

/* ---------- Base ---------- */
.pt, .pt * { box-sizing: border-box; }
.pt {
  margin: 0;
  background: var(--pt-white);
  color: var(--pt-ink);
  font-family: var(--pt-sans);
  font-size: var(--pt-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.pt img, .pt svg { display: block; max-width: 100%; }
:where(.pt) a { color: inherit; }
.pt :focus-visible { outline: none; box-shadow: var(--pt-focus); border-radius: var(--pt-radius-sm); }

.pt-container { width: min(100% - 2 * var(--pt-gutter), var(--pt-container)); margin-inline: auto; }
.pt-narrow { width: min(100% - 2 * var(--pt-gutter), var(--pt-narrow)); margin-inline: auto; }
.pt-center { text-align: center; }
.pt-center .pt-lead, .pt-center .pt-actions { margin-inline: auto; justify-content: center; }

.pt-section { padding-block: var(--pt-section); }
.pt-section--mist { background: var(--pt-mist); }
.pt-section--tight { padding-block: calc(var(--pt-section) * .6); }
.pt-rule { height: 1px; margin: 0; border: 0; background: var(--pt-line); }

/* ---------- Type ---------- */
.pt-hero-title, .pt-h1, .pt-h2, .pt-h3 { margin: 0; color: var(--pt-ink); font-family: var(--pt-serif); font-weight: 400; text-wrap: balance; }
.pt-hero-title { font-size: var(--pt-text-hero); line-height: var(--pt-leading-hero); letter-spacing: var(--pt-tracking-hero); }
.pt-h1 { font-size: var(--pt-text-h1); line-height: 1.1; letter-spacing: var(--pt-tracking-hero); }
.pt-h2 { font-size: var(--pt-text-h2); line-height: 1.14; }
.pt-h3 { font-size: var(--pt-text-h3); line-height: 1.25; font-weight: 600; }
.pt-pink { color: var(--pt-pink); }
.pt-lead { max-width: 560px; margin: 18px 0 0; color: var(--pt-soft); font-size: var(--pt-text-lead); line-height: 1.5; }
.pt-eyebrow { display: inline-block; margin-bottom: 14px; color: var(--pt-soft); font-size: var(--pt-text-micro); font-weight: 800; letter-spacing: var(--pt-tracking-caps); text-transform: uppercase; }
.pt-eyebrow--pink { color: var(--pt-pink); }
.pt-small { color: var(--pt-soft); font-size: var(--pt-text-small); }
.pt-script { font-family: var(--pt-script); font-weight: 700; color: var(--pt-pink); font-size: 1.25em; line-height: 1; }

/* ---------- Nav ---------- */
.pt-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  min-height: var(--pt-nav-h);
  padding: 8px var(--pt-gutter);
  background: var(--pt-white);
}
.pt-nav--line { border-bottom: var(--pt-border); }
.pt-nav__links { display: flex; gap: 24px; }
.pt-nav__links a { color: var(--pt-ink); font-size: var(--pt-text-small); text-decoration: none; white-space: nowrap; }
.pt-nav__links a:hover, .pt-nav__links a[aria-current] { color: var(--pt-pink); }
.pt-nav__end { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.pt-nav__end > a:not(.pt-btn) { font-size: var(--pt-text-small); text-decoration: none; white-space: nowrap; }
.pt-logo { justify-self: center; font-family: var(--pt-script); font-size: var(--pt-text-logo); font-weight: 700; line-height: 1; color: var(--pt-ink-strong); text-decoration: none; white-space: nowrap; }
.pt-logo span { color: var(--pt-pink); }
@media (max-width: 860px) {
  .pt-nav { grid-template-columns: auto 1fr; }
  .pt-nav__links { display: none; }
  .pt-logo { justify-self: start; }
  .pt-nav__end > a:not(.pt-btn) { display: none; }
}

/* ---------- Buttons ---------- */
.pt-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--pt-btn-h); padding: 0 34px;
  border: 1.5px solid transparent; border-radius: var(--pt-radius-sm);
  font-family: var(--pt-sans); font-size: 16px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.pt-btn--primary { background: var(--pt-pink); color: var(--pt-white); box-shadow: var(--pt-pink-glow); }
.pt-btn--primary:hover { background: var(--pt-pink-dark); transform: translateY(-1px); }
.pt-btn--outline { background: var(--pt-white); color: var(--pt-ink); border-color: var(--pt-line-strong); }
.pt-btn--outline:hover { border-color: var(--pt-ink); }
.pt-btn--quiet { background: var(--pt-mist); color: var(--pt-ink); }
.pt-btn--sm { min-height: 40px; padding: 0 18px; font-size: 13px; }
.pt-btn--block { width: 100%; }
.pt-link { display: inline-flex; align-items: center; gap: 6px; color: var(--pt-pink); font-weight: 700; text-decoration: none; }
.pt-link::after { content: "\2192"; transition: transform .15s ease; }
.pt-link:hover::after { transform: translateX(3px); }

/* ---------- Hero with a drawn town ---------- */
.pt-hero { position: relative; padding: clamp(48px, 7vw, 96px) var(--pt-gutter) 0; text-align: center; background: var(--pt-white); }
.pt-hero__copy { position: relative; z-index: 1; max-width: 760px; margin-inline: auto; }
.pt-hero .pt-lead { margin-inline: auto; }
.pt-hero .pt-actions { justify-content: center; }
.pt-hero__town { position: relative; margin: clamp(-120px, -9vw, -40px) auto 0; max-width: 1440px; }
/* the pale ground runs edge to edge under the drawing: its line sits at 340 of a 380 tall viewBox */
.pt-hero__town::before { content: ""; position: absolute; inset: 89.5% 0 0; background: var(--pt-mist); box-shadow: 0 0 0 100vmax var(--pt-mist); clip-path: inset(0 -100vmax); }
.pt-hero__town svg { position: relative; width: 100%; height: auto; }
/* on phones, zoom into the middle of the street so the drawing stays readable */
@media (max-width: 700px) { .pt-hero__town { margin: 24px calc(-1 * var(--pt-gutter)) 0; overflow: hidden; } .pt-hero__town svg { width: 230%; max-width: none; margin-left: -65%; } }
.pt-hero--plain { padding-bottom: clamp(48px, 6vw, 80px); background: var(--pt-white); }

/* Sketch helpers for inline SVG drawings */
.pt-art { fill: none; stroke: var(--pt-sketch); stroke-width: var(--pt-sketch-width); stroke-linecap: round; stroke-linejoin: round; }
.pt-art .pt-f { fill: var(--pt-sketch-fill); }
.pt-art .pt-s { fill: var(--pt-sketch-shade); }
.pt-art .pt-l { stroke: var(--pt-sketch-light); }
.pt-art .pt-k { fill: var(--pt-pink); stroke: var(--pt-pink); }
.pt-art .pt-g { fill: var(--pt-mist); stroke: none; }

/* ---------- Press / trust strip ---------- */
.pt-press { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; padding: 22px var(--pt-gutter) 34px; background: var(--pt-mist); color: var(--pt-faint); font-family: var(--pt-serif); font-size: 19px; font-weight: 600; letter-spacing: .02em; }
.pt-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 36px; font-size: var(--pt-text-small); color: var(--pt-soft); }
.pt-facts span { display: inline-flex; align-items: center; gap: 8px; }
.pt-facts svg { width: 18px; height: 18px; color: var(--pt-pink); }

/* ---------- Section head ---------- */
.pt-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.pt-head .pt-lead { margin-inline: auto; }

/* ---------- Pick tiles (the product chooser) ---------- */
.pt-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pt-pick { display: grid; justify-items: center; gap: 14px; padding: 28px 18px 24px; border: var(--pt-border); border-radius: var(--pt-radius); background: var(--pt-white); text-align: center; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.pt-pick:hover { border-color: var(--pt-pink); box-shadow: var(--pt-shadow); transform: translateY(-2px); }
.pt-pick svg { width: 96px; height: 80px; }
.pt-pick strong { color: var(--pt-ink-strong); font-size: 18px; }
.pt-pick span { color: var(--pt-soft); font-size: var(--pt-text-small); }
@media (max-width: 900px) { .pt-picks { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Feature rows: drawing on one side, words on the other ---------- */
.pt-feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 96px); }
.pt-feature + .pt-feature { margin-top: clamp(64px, 8vw, 112px); }
.pt-feature--flip .pt-feature__art { order: 2; }
.pt-feature__art { display: grid; place-items: center; padding: 32px; border-radius: var(--pt-radius-lg); background: var(--pt-mist); }
.pt-section--mist .pt-feature__art { background: var(--pt-white); }
.pt-feature__art svg { width: 100%; max-width: 380px; height: auto; }
@media (max-width: 820px) { .pt-feature { grid-template-columns: 1fr; } .pt-feature--flip .pt-feature__art { order: 0; } }

/* ---------- Cards ---------- */
.pt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pt-card { padding: 30px; border: var(--pt-border); border-radius: var(--pt-radius); background: var(--pt-white); }
.pt-card .pt-h3 { margin: 18px 0 8px; }
.pt-card p { margin: 0; color: var(--pt-soft); }
.pt-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--pt-pink-soft); color: var(--pt-pink); }
.pt-icon svg { width: 24px; height: 24px; }
@media (max-width: 900px) { .pt-cards { grid-template-columns: 1fr; } }

/* ---------- Big numbers ---------- */
.pt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.pt-stat strong { display: block; color: var(--pt-ink); font-family: var(--pt-serif); font-size: clamp(44px, 5vw, 64px); font-weight: 400; line-height: 1; }
.pt-stat span { display: block; margin-top: 10px; color: var(--pt-soft); font-size: var(--pt-text-small); }
@media (max-width: 700px) { .pt-stats { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Quote ---------- */
.pt-quote { max-width: 820px; margin: 0 auto; text-align: center; }
.pt-quote blockquote { margin: 0; color: var(--pt-ink); font-family: var(--pt-serif); font-size: clamp(26px, 3vw, 38px); line-height: 1.3; }
.pt-byline { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; text-align: left; font-size: var(--pt-text-small); }
.pt-byline strong { display: block; color: var(--pt-ink-strong); }
.pt-byline span { color: var(--pt-soft); }
.pt-avatar { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1.5px solid var(--pt-sketch); border-radius: 50%; background: var(--pt-white); color: var(--pt-ink); font-family: var(--pt-script); font-size: 24px; font-weight: 700; }

/* ---------- Badges, chips, toggle ---------- */
.pt-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--pt-radius-pill); background: var(--pt-pink-soft); color: var(--pt-pink-dark); font-size: var(--pt-text-micro); font-weight: 800; letter-spacing: var(--pt-tracking-caps); text-transform: uppercase; white-space: nowrap; }
.pt-badge--gray { background: var(--pt-fog); color: var(--pt-soft); }
.pt-segment { display: inline-flex; padding: 4px; border: var(--pt-border); border-radius: var(--pt-radius-pill); background: var(--pt-mist); }
.pt-segment button { min-height: 40px; padding: 0 20px; border: 0; border-radius: var(--pt-radius-pill); background: transparent; color: var(--pt-soft); font: inherit; font-size: var(--pt-text-small); font-weight: 700; cursor: pointer; white-space: nowrap; }
.pt-segment button[aria-pressed="true"] { background: var(--pt-white); color: var(--pt-pink); box-shadow: var(--pt-shadow); }

/* ---------- Pricing ---------- */
.pt-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.pt-plan { position: relative; padding: 32px 28px; border: var(--pt-border); border-radius: var(--pt-radius); background: var(--pt-white); }
.pt-plan--featured { border: 2px solid var(--pt-pink); box-shadow: var(--pt-shadow-lift); }
.pt-plan--featured .pt-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--pt-pink); color: var(--pt-white); }
.pt-plan__art { display: grid; place-items: center; height: 96px; margin-bottom: 14px; }
.pt-plan__art svg { height: 96px; width: auto; }
.pt-plan__name { margin: 0; color: var(--pt-ink-strong); font-size: 20px; font-weight: 800; text-align: center; }
.pt-plan__price { margin: 14px 0 4px; color: var(--pt-ink); font-family: var(--pt-serif); font-size: 56px; line-height: 1; text-align: center; }
.pt-plan__price small { color: var(--pt-soft); font-family: var(--pt-sans); font-size: 16px; }
.pt-plan__note { margin: 0 0 24px; color: var(--pt-soft); font-size: var(--pt-text-small); text-align: center; }
.pt-checks { display: grid; gap: 12px; margin: 24px 0 0; padding: 24px 0 0; border-top: var(--pt-border); list-style: none; font-size: var(--pt-text-small); }
.pt-checks li { display: flex; gap: 10px; }
.pt-checks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--pt-pink-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.5' fill='none' stroke='%23ff1f8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.pt-checks li.is-off { color: var(--pt-faint); }
.pt-checks li.is-off::before { background: var(--pt-fog); }
@media (max-width: 900px) { .pt-plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

.pt-table-wrap { overflow-x: auto; border: var(--pt-border); border-radius: var(--pt-radius); }
.pt-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--pt-text-small); }
.pt-table th, .pt-table td { padding: 16px 20px; border-bottom: var(--pt-border); text-align: left; }
.pt-table thead th { background: var(--pt-mist); color: var(--pt-ink-strong); font-weight: 800; }
.pt-table tr:last-child td { border-bottom: 0; }
.pt-table td:not(:first-child), .pt-table th:not(:first-child) { text-align: center; }
.pt-yes { color: var(--pt-pink); font-weight: 800; }
.pt-no { color: var(--pt-faint); }

/* ---------- FAQ ---------- */
.pt-faq { display: grid; gap: 0; border-top: var(--pt-border); }
.pt-faq details { border-bottom: var(--pt-border); }
.pt-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; color: var(--pt-ink-strong); font-size: 18px; font-weight: 700; cursor: pointer; list-style: none; }
.pt-faq summary::-webkit-details-marker { display: none; }
.pt-faq summary::after { content: "+"; flex: none; color: var(--pt-pink); font-size: 24px; line-height: 1; }
.pt-faq details[open] summary::after { content: "\2212"; }
.pt-faq p { margin: 0 0 22px; color: var(--pt-soft); }

/* ---------- Article ---------- */
.pt-article-head { padding-block: clamp(48px, 7vw, 88px) 40px; text-align: center; }
.pt-article-head .pt-lead { margin-inline: auto; }
.pt-meta { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--pt-soft); font-size: var(--pt-text-small); text-align: left; }
.pt-meta strong { display: block; color: var(--pt-ink-strong); }
.pt-figure { margin: 0 auto 56px; }
.pt-figure__art { display: grid; place-items: center; padding: clamp(20px, 4vw, 48px); border-radius: var(--pt-radius-lg); background: var(--pt-mist); }
.pt-figure__art svg { width: 100%; height: auto; }
.pt-figure figcaption { margin-top: 12px; color: var(--pt-faint); font-size: var(--pt-text-small); text-align: center; }
.pt-prose { font-size: 19px; line-height: 1.7; }
.pt-prose h2 { margin: 52px 0 12px; color: var(--pt-ink); font-family: var(--pt-serif); font-size: 32px; font-weight: 400; line-height: 1.2; }
.pt-prose p, .pt-prose ul, .pt-prose ol { margin: 0 0 22px; }
.pt-prose li { margin-bottom: 8px; }
.pt-prose li::marker { color: var(--pt-pink); font-weight: 800; }
.pt-prose a { color: var(--pt-pink); text-underline-offset: 3px; }
.pt-prose blockquote { margin: 36px 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--pt-pink); color: var(--pt-ink); font-family: var(--pt-serif); font-size: 26px; line-height: 1.4; }
.pt-note { display: flex; gap: 16px; margin: 36px 0; padding: 22px 24px; border: 1.5px dashed var(--pt-line-strong); border-radius: var(--pt-radius); background: var(--pt-white); font-size: 17px; }
.pt-note strong { color: var(--pt-ink-strong); }
.pt-note svg { flex: none; width: 28px; height: 28px; color: var(--pt-pink); }

/* ---------- Forms ---------- */
.pt-panel { padding: clamp(28px, 4vw, 44px); border: var(--pt-border); border-radius: var(--pt-radius-lg); background: var(--pt-white); box-shadow: var(--pt-shadow); }
.pt-form { display: grid; gap: 20px; }
.pt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .pt-row { grid-template-columns: 1fr; } }
.pt-field { display: grid; gap: 8px; }
.pt-label { color: var(--pt-ink-strong); font-size: var(--pt-text-small); font-weight: 700; }
.pt-input, .pt-select { width: 100%; min-height: 54px; padding: 0 16px; border: 1.5px solid var(--pt-line-strong); border-radius: var(--pt-radius-sm); background: var(--pt-white); color: var(--pt-ink-strong); font: inherit; }
.pt-input::placeholder { color: var(--pt-faint); }
.pt-input:focus, .pt-select:focus { outline: none; border-color: var(--pt-pink); box-shadow: 0 0 0 4px var(--pt-pink-soft); }
.pt-hint { color: var(--pt-faint); font-size: var(--pt-text-micro); }
.pt-check { display: flex; align-items: flex-start; gap: 10px; color: var(--pt-soft); font-size: var(--pt-text-small); }
.pt-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pt-pink); }
.pt-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pt-choice { position: relative; display: grid; justify-items: center; gap: 8px; padding: 18px 10px 14px; border: 1.5px solid var(--pt-line); border-radius: var(--pt-radius); background: var(--pt-white); color: var(--pt-ink); font-size: var(--pt-text-small); font-weight: 700; cursor: pointer; text-align: center; }
.pt-choice input { position: absolute; opacity: 0; }
.pt-choice svg { width: 56px; height: 46px; }
.pt-choice:has(input:checked) { border-color: var(--pt-pink); background: var(--pt-pink-soft); color: var(--pt-pink-dark); }
@media (max-width: 480px) { .pt-choices { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .pt-choice { padding: 14px 4px 10px; font-size: var(--pt-text-micro); } .pt-choice svg { width: 44px; height: 36px; } }
.pt-progress { display: flex; gap: 6px; }
.pt-progress span { flex: 1; height: 4px; border-radius: var(--pt-radius-pill); background: var(--pt-fog); }
.pt-progress span.is-done { background: var(--pt-pink); }
.pt-chat { display: flex; align-items: flex-start; gap: 12px; }
.pt-bubble { padding: 14px 18px; border-radius: 4px var(--pt-radius) var(--pt-radius) var(--pt-radius); background: var(--pt-mist); color: var(--pt-ink); font-size: 17px; }

/* ---------- Call to action band ---------- */
.pt-cta { text-align: center; }
.pt-cta .pt-actions { justify-content: center; }

/* ---------- Footer ---------- */
.pt-footer { padding: 64px var(--pt-gutter) 32px; border-top: var(--pt-border); background: var(--pt-mist); font-size: var(--pt-text-small); }
.pt-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; width: min(100%, var(--pt-container)); margin-inline: auto; }
.pt-footer__grid p { margin: 12px 0 0; color: var(--pt-soft); max-width: 280px; }
.pt-footer__title { margin: 0 0 12px; color: var(--pt-ink-strong); font-weight: 800; }
.pt-footer__grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pt-footer__grid a { color: var(--pt-soft); text-decoration: none; }
.pt-footer__grid a:hover { color: var(--pt-pink); }
.pt-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; width: min(100%, var(--pt-container)); margin: 48px auto 0; padding-top: 24px; border-top: var(--pt-border); color: var(--pt-faint); font-size: var(--pt-text-micro); }
.pt-footer .pt-logo { justify-self: start; font-size: 34px; }
@media (max-width: 760px) { .pt-footer__grid { grid-template-columns: 1fr 1fr; } .pt-footer__grid > :first-child { grid-column: 1 / -1; } }
