/*
 * Chalk Band: components
 * Built only from tokens.css. Load tokens.css first.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cb-slate);
  color: var(--cb-chalk);
  font-family: var(--cb-sans);
  font-size: var(--cb-text-body);
  line-height: var(--cb-leading);
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--cb-lime); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cb-chalk); }
h1, h2, h3 { font-family: var(--cb-serif); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; color: var(--cb-chalk); }
p { margin: 0 0 1em; }

.cb-wrap { max-width: var(--cb-container); margin: 0 auto; padding: 0 24px; }
.cb-narrow { max-width: var(--cb-narrow); margin: 0 auto; padding: 0 24px; }

/* ---------- Bands ---------- */
.cb-band { padding: var(--cb-band) 0; }
.cb-band--sky { background: var(--cb-sky); }
.cb-band--slate { background: var(--cb-slate); }
.cb-band--deep { background: var(--cb-well); }
.cb-band--crimson { background: var(--cb-crimson); }
.cb-band--paper { background: var(--cb-paper); color: var(--cb-ink); }
.cb-band--paper h2, .cb-band--paper h3 { color: var(--cb-ink); }
.cb-band__title { font-size: var(--cb-text-h2); margin-bottom: 28px; }

/* ---------- Nav bar ---------- */
.cb-bar {
  background: var(--cb-sky-deep);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  min-height: var(--cb-bar);
}
.cb-bar__in { display: flex; align-items: center; gap: 22px; min-height: var(--cb-bar); padding: 0 16px; max-width: 100%; }
.cb-bar a { color: var(--cb-chalk); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.cb-bar a:hover { color: var(--cb-lime); }
.cb-bar__links { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.cb-bar__end { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.cb-bar__moon { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset -5px -2px 0 0 var(--cb-sun); transform: rotate(-20deg); }

/* ---------- Sky hero (teal band with chalk doodles) ---------- */
.cb-sky { background: var(--cb-sky); position: relative; overflow: hidden; }
.cb-sky__in { position: relative; display: flex; align-items: flex-end; min-height: 230px; padding-top: 32px; padding-bottom: 28px; }
.cb-sky__doodle { position: absolute; right: -10px; bottom: 0; width: min(62%, 700px); height: auto; pointer-events: none; }
.cb-sky__doodle * { fill: none; stroke: var(--cb-chalk-line); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cb-sky--short .cb-sky__in { min-height: 150px; }

/* The wordmark: a chalk-drawn mascot circle and a soft lowercase name */
.cb-mark { display: inline-flex; align-items: center; gap: 14px; color: var(--cb-chalk); text-decoration: none; position: relative; z-index: 1; }
.cb-mark__badge {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--cb-sun); border: 4px solid var(--cb-chalk);
  display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); flex: none;
}
.cb-mark__badge svg { width: 44px; height: 44px; }
.cb-mark__name { font-family: var(--cb-sans); font-weight: 500; font-size: clamp(44px, 6vw, 68px); letter-spacing: -.02em; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .16); }
.cb-mark--small .cb-mark__badge { width: 34px; height: 34px; border-width: 2px; }
.cb-mark--small .cb-mark__badge svg { width: 20px; height: 20px; }
.cb-mark--small .cb-mark__name { font-size: 22px; text-shadow: none; }

/* ---------- Hero split on slate ---------- */
.cb-hero { background: var(--cb-slate); }
.cb-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.cb-hero__copy { padding: 44px 0 var(--cb-band); }
.cb-hero h1 { font-size: var(--cb-text-hero); margin-bottom: 14px; }
.cb-hero__lead { color: var(--cb-lime); font-size: var(--cb-text-lead); line-height: 1.6; max-width: 560px; }
.cb-hero__panel { margin-top: -70px; position: relative; z-index: 2; margin-bottom: 40px; }

/* ---------- Feature rows with round dots ---------- */
.cb-feature { display: grid; grid-template-columns: 34px 1fr; gap: 14px; margin-top: 26px; }
.cb-feature h3 { font-size: var(--cb-text-h3); margin: 0 0 4px; }
.cb-feature p { color: var(--cb-mist); margin: 0; }
.cb-dot { width: 32px; height: 32px; border-radius: var(--cb-pill); background: var(--cb-lime); color: var(--cb-slate); display: grid; place-items: center; margin-top: 2px; }
.cb-dot svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cb-dot--sun { background: var(--cb-sun); }
.cb-dot--red { background: var(--cb-red); color: var(--cb-chalk); }

/* ---------- Panels and cards ---------- */
.cb-panel {
  background: var(--cb-slate-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow-panel);
  padding: 30px 32px 32px;
}
.cb-panel__title { font-size: 28px; padding-bottom: 12px; border-bottom: 1px solid var(--cb-line); margin-bottom: 22px; }
.cb-card { background: var(--cb-slate-2); border-radius: var(--cb-radius); padding: 24px; border: 1px solid rgba(255, 255, 255, .06); }
.cb-card h3 { font-size: 21px; }
.cb-card p { color: var(--cb-mist); margin-bottom: 0; }
.cb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--cb-gap); }

/* ---------- Buttons ---------- */
.cb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--cb-sans); font-weight: 500; font-size: 16px; line-height: 1;
  padding: 13px 22px; border-radius: var(--cb-radius-sm); border: 0; cursor: pointer;
  background: var(--cb-red); color: var(--cb-chalk); text-decoration: none; white-space: nowrap;
  box-shadow: var(--cb-bevel); background-image: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0));
  transition: transform .08s ease, box-shadow .08s ease;
}
.cb-btn:hover { color: var(--cb-chalk); filter: brightness(1.06); }
.cb-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--cb-red-edge); }
.cb-btn:focus-visible { outline: 2px solid var(--cb-lime); outline-offset: 3px; }
.cb-btn--quiet { background-color: var(--cb-slate-2); box-shadow: var(--cb-bevel-quiet); }
.cb-btn--lime { background-color: var(--cb-lime); color: var(--cb-slate); box-shadow: 0 3px 0 #8fa23d; }
.cb-btn--lime:hover { color: var(--cb-slate); }
.cb-btn--block { width: 100%; }
.cb-btn--small { padding: 9px 14px; font-size: 14px; }

/* ---------- Tags, counters ---------- */
.cb-tag { display: inline-block; font-size: var(--cb-text-micro); font-weight: 500; letter-spacing: .02em; padding: 3px 9px; border-radius: var(--cb-radius-sm); background: rgba(198, 220, 102, .16); color: var(--cb-lime); white-space: nowrap; }
.cb-tag--sun { background: rgba(241, 182, 71, .18); color: var(--cb-sun); }
.cb-tag--paper { background: var(--cb-paper-2); color: var(--cb-ink); }
.cb-counter { display: inline-flex; gap: 2px; font-family: var(--cb-mono); font-size: 15px; }
.cb-counter span { background: var(--cb-ink-band); color: var(--cb-sun); padding: 1px 5px; border-radius: 2px; box-shadow: var(--cb-inset); }

/* ---------- Forms ---------- */
.cb-form { display: grid; gap: 18px; }
.cb-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cb-field { display: grid; gap: 7px; }
.cb-label { color: var(--cb-lime); font-size: 15px; font-weight: 500; filter: saturate(.7); }
.cb-input, .cb-select, .cb-textarea {
  width: 100%; font-family: var(--cb-sans); font-size: 15px; color: var(--cb-chalk);
  background: var(--cb-well); border: 1px solid rgba(0, 0, 0, .25); border-radius: var(--cb-radius);
  padding: 11px 13px; box-shadow: var(--cb-inset);
}
.cb-input::placeholder, .cb-textarea::placeholder { color: var(--cb-mute); font-style: italic; }
.cb-input:focus, .cb-select:focus, .cb-textarea:focus { outline: 2px solid var(--cb-lime); outline-offset: 1px; }
.cb-suffix { display: flex; align-items: center; gap: 8px; }
.cb-suffix span { color: var(--cb-chalk); font-weight: 500; white-space: nowrap; }
.cb-check { display: flex; gap: 10px; align-items: flex-start; color: var(--cb-mist); font-size: var(--cb-text-small); }
.cb-check input { accent-color: var(--cb-lime); width: 18px; height: 18px; margin-top: 2px; }
.cb-hint { color: var(--cb-mute); font-size: var(--cb-text-small); }
.cb-strength { height: 4px; border-radius: 2px; background: var(--cb-well); overflow: hidden; }
.cb-strength i { display: block; height: 100%; width: 0; background: var(--cb-lime); transition: width .2s; }

/* ---------- Thumbnail wall (crimson band) ---------- */
.cb-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.cb-thumb { text-decoration: none; color: var(--cb-chalk); display: block; }
.cb-thumb__frame {
  background: var(--cb-chalk); padding: var(--cb-frame); border-radius: 3px;
  box-shadow: var(--cb-shadow-thumb); transition: transform .15s ease;
}
.cb-thumb:hover .cb-thumb__frame { transform: translateY(-4px) rotate(-1deg); }
.cb-thumb__page { aspect-ratio: 4 / 3; border-radius: 1px; overflow: hidden; position: relative; background: var(--cb-paper); }
.cb-thumb__name { display: block; font-size: var(--cb-text-small); margin-top: 10px; color: var(--cb-chalk); }
.cb-thumb__meta { display: block; font-size: var(--cb-text-micro); color: rgba(244, 241, 230, .7); }
/* Tiny homemade pages, drawn with gradients */
.cb-mini { position: absolute; inset: 0; padding: 8%; display: grid; grid-template-rows: auto 1fr; gap: 6%; }
.cb-mini__head { height: 10px; border-radius: 1px; }
.cb-mini__body { display: grid; grid-template-columns: 1fr 1.6fr; gap: 6%; }
.cb-mini__side { border-radius: 1px; }
.cb-mini__lines { background: repeating-linear-gradient(180deg, currentColor 0 2px, transparent 2px 7px); opacity: .45; }

/* ---------- Guestbook (testimonials) ---------- */
.cb-guestbook { display: grid; gap: 16px; }
.cb-entry { background: var(--cb-paper); color: var(--cb-ink); border-radius: var(--cb-radius); padding: 18px 20px; position: relative; border-left: 5px solid var(--cb-sun); }
.cb-entry p { font-family: var(--cb-serif); font-style: italic; font-size: 17px; margin-bottom: 8px; }
.cb-entry__by { font-size: var(--cb-text-small); color: #6b6f70; }
.cb-entry__by b { color: var(--cb-crimson); font-weight: 500; }

/* ---------- Stats ---------- */
.cb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--cb-gap); text-align: center; }
.cb-stat__n { font-family: var(--cb-serif); font-size: 40px; color: var(--cb-lime); line-height: 1; }
.cb-stat__l { color: var(--cb-mist); font-size: var(--cb-text-small); margin-top: 6px; }

/* ---------- Pricing ---------- */
.cb-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--cb-gap); align-items: stretch; }
.cb-plan { background: var(--cb-slate-2); border-radius: var(--cb-radius); padding: 28px; display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, .06); }
.cb-plan--pick { background: var(--cb-crimson); border-color: transparent; box-shadow: var(--cb-shadow-panel); }
.cb-plan--pick .cb-plan__note, .cb-plan--pick .cb-plan__list li { color: rgba(244, 241, 230, .86); }
.cb-plan__name { font-family: var(--cb-serif); font-size: 26px; margin-bottom: 4px; }
.cb-plan__price { font-family: var(--cb-serif); font-size: 46px; line-height: 1; margin: 6px 0 20px; }
.cb-plan__price small { font-family: var(--cb-sans); font-size: 15px; color: var(--cb-mist); }
.cb-plan--pick .cb-plan__price small { color: rgba(244, 241, 230, .8); }
.cb-plan__note { color: var(--cb-mist); font-size: var(--cb-text-small); margin-bottom: 18px; }
.cb-plan__list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 9px; flex: 1; }
.cb-plan__list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--cb-mist); font-size: 15px; }
.cb-plan__list li::before { content: ""; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; background: var(--cb-lime); box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .18); }
.cb-plan--pick .cb-plan__list li::before { background: var(--cb-sun); }
.cb-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cb-table th, .cb-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--cb-line); }
.cb-table th { font-family: var(--cb-serif); font-weight: 400; color: var(--cb-lime); }
.cb-table td:not(:first-child), .cb-table th:not(:first-child) { text-align: center; }
.cb-table-wrap { overflow-x: auto; }

/* ---------- FAQ ---------- */
.cb-faq { border-top: 1px solid var(--cb-line); }
.cb-faq details { border-bottom: 1px solid var(--cb-line); padding: 16px 0; }
.cb-faq summary { cursor: pointer; font-family: var(--cb-serif); font-size: 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.cb-faq summary::after { content: "+"; color: var(--cb-lime); font-family: var(--cb-sans); }
.cb-faq details[open] summary::after { content: "\2013"; }
.cb-faq p { color: var(--cb-mist); margin: 10px 0 0; }

/* ---------- Article ---------- */
.cb-article { font-size: 17px; }
.cb-article__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--cb-mist); font-size: var(--cb-text-small); margin-bottom: 18px; }
.cb-article h1 { font-size: var(--cb-text-hero); }
.cb-article h2 { font-size: 28px; margin-top: 1.6em; }
.cb-article p, .cb-article li { color: #dde3df; }
.cb-article p:first-of-type::first-letter { font-family: var(--cb-serif); float: left; font-size: 3.3em; line-height: .9; padding: 4px 8px 0 0; color: var(--cb-lime); }
.cb-article blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--cb-red); font-family: var(--cb-serif); font-style: italic; font-size: 22px; color: var(--cb-chalk); }
.cb-article code { font-family: var(--cb-mono); background: var(--cb-well); padding: 2px 6px; border-radius: 3px; color: var(--cb-lime); }
.cb-figure { margin: 1.8em 0; background: var(--cb-chalk); padding: var(--cb-frame); border-radius: 3px; box-shadow: var(--cb-shadow-thumb); }
.cb-figure figcaption { color: var(--cb-ink); font-size: var(--cb-text-small); padding: 8px 4px 2px; font-style: italic; }
.cb-byline { display: flex; gap: 14px; align-items: center; padding: 20px; background: var(--cb-slate-2); border-radius: var(--cb-radius); margin-top: 36px; }
.cb-avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; background: var(--cb-sun); border: 3px solid var(--cb-chalk); display: grid; place-items: center; font-family: var(--cb-serif); font-size: 22px; color: var(--cb-slate); }

/* ---------- Footer ---------- */
.cb-foot { background: var(--cb-ink-band); color: var(--cb-mist); padding: 48px 0 32px; font-size: var(--cb-text-small); }
.cb-foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.cb-foot h4 { font-family: var(--cb-serif); font-weight: 400; color: var(--cb-chalk); font-size: 17px; margin: 0 0 10px; }
.cb-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cb-foot a { color: var(--cb-mist); text-decoration: none; }
.cb-foot a:hover { color: var(--cb-lime); }
.cb-foot__base { border-top: 1px solid var(--cb-line); margin-top: 32px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cb-thumbs { grid-template-columns: repeat(3, 1fr); }
  .cb-foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .cb-hero__grid, .cb-cards, .cb-plans, .cb-stats { grid-template-columns: 1fr; }
  .cb-hero__copy { padding-bottom: 0; }
  .cb-hero__panel { margin-top: 0; }
  .cb-sky__doodle { width: 92%; opacity: .55; }
}
@media (max-width: 520px) {
  .cb-wrap, .cb-narrow { padding: 0 16px; }
  .cb-thumbs { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cb-form__row { grid-template-columns: 1fr; }
  .cb-panel { padding: 22px 18px; }
  .cb-mark__badge { width: 54px; height: 54px; }
  .cb-mark__badge svg { width: 32px; height: 32px; }
  .cb-bar__links { gap: 16px; }
  .cb-bar__links a:nth-child(n+4) { display: none; }
  .cb-sky__in { min-height: 180px; }
  .cb-foot__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cb-thumb__frame, .cb-btn { transition: none; }
}
