/*
 * Specimen Pop: components
 * Needs tokens.css first. Every class starts with "sp-" so it can sit next to any other CSS.
 */

/* Base */
.sp { background: var(--sp-ink); color: var(--sp-on-ink); font-family: var(--sp-body); font-size: var(--sp-text-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.sp *, .sp *::before, .sp *::after { box-sizing: border-box; }
.sp img { max-width: 100%; display: block; }
.sp-container { width: min(100% - 48px, var(--sp-container)); margin-inline: auto; }

/* Sections: ink, paper, or one saturated band */
.sp-section { padding-block: var(--sp-section); }
.sp-section--ink { background: var(--sp-ink); color: var(--sp-on-ink); }
.sp-section--paper { background: var(--sp-paper); color: var(--sp-ink); }
.sp-section--cobalt { background: var(--sp-cobalt); color: var(--sp-white); }
.sp-section--sun { background: var(--sp-sun); color: var(--sp-ink); }
.sp-section--bubblegum { background: var(--sp-bubblegum); color: var(--sp-ink); }
.sp-section--tomato { background: var(--sp-tomato); color: var(--sp-ink); }

/* Type: the grotesque carries the weight, the serif italic is the accent, mixed inside words */
.sp-hero-title, .sp-h1, .sp-h2, .sp-h3 { margin: 0; font-family: var(--sp-display); font-weight: 800; letter-spacing: var(--sp-tracking-display); line-height: var(--sp-leading-display); }
.sp-hero-title { font-size: var(--sp-text-hero); }
.sp-h1 { font-size: var(--sp-text-h1); }
.sp-h2 { font-size: var(--sp-text-h2); }
.sp-h3 { font-size: var(--sp-text-h3); letter-spacing: -.03em; line-height: 1.05; }
.sp-serif { font-family: var(--sp-serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; }
.sp-lead { max-width: 34em; font-size: var(--sp-text-lead); line-height: 1.5; opacity: .78; }
.sp-mono { font-family: var(--sp-mono); font-size: var(--sp-text-small); }
.sp-center { text-align: center; }
.sp-center .sp-lead { margin-inline: auto; }

/* Pills: tags, labels and callouts */
.sp-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1.5px solid rgba(246, 243, 236, .22); border-radius: var(--sp-radius-pill); background: var(--sp-ink-2); color: var(--sp-on-ink); font-size: var(--sp-text-tag); font-weight: 700; white-space: nowrap; }
.sp-pill small { font-weight: 500; opacity: .6; font-size: inherit; }
.sp-pill--sun { border-color: transparent; background: var(--sp-sun); color: var(--sp-ink); box-shadow: 0 0 24px rgba(255, 207, 63, .45); }
.sp-pill--paper { border: var(--sp-border-thin); background: var(--sp-white); color: var(--sp-ink); }

/* A label pinned above a word by a thin line, like a specimen annotation */
.sp-callout { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.sp-callout::after { content: ""; width: 1.5px; height: 40px; background: rgba(246, 243, 236, .35); }

/* Buttons: big pills; the primary one is white on ink with a small sun badge */
.sp-btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border: 0; border-radius: var(--sp-radius-pill); font-family: var(--sp-body); font-size: 17px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .2s var(--sp-ease), box-shadow .2s var(--sp-ease); }
.sp-btn:hover { transform: translateY(-2px); }
.sp-btn--primary { background: var(--sp-white); color: var(--sp-ink); }
.sp-btn--ink { background: var(--sp-ink); color: var(--sp-white); }
.sp-btn--outline { border: var(--sp-border); background: var(--sp-white); color: var(--sp-ink); box-shadow: var(--sp-shadow-sm); }
.sp-btn--outline:hover { box-shadow: var(--sp-shadow); }
.sp-btn__badge { padding: 3px 9px; border-radius: var(--sp-radius-pill); background: var(--sp-sun); color: var(--sp-ink); font-size: 13px; }

/* Keycaps: for shortcuts, or any "press this" moment */
.sp-keys { display: inline-flex; align-items: center; gap: 8px; color: var(--sp-on-ink-soft); font-size: var(--sp-text-small); }
.sp-key { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 9px; background: linear-gradient(#fffdf6, #e9e4d6); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14), 0 2px 0 rgba(0, 0, 0, .4); color: var(--sp-ink); font-family: var(--sp-mono); font-size: 15px; font-weight: 600; }
.sp-key--sun { background: linear-gradient(#ffe07a, var(--sp-sun)); }

/* Cards: thick border, big radius, hard shadow, one flat color each */
.sp-card { padding: var(--sp-space-4) var(--sp-space-3) var(--sp-space-3); border: var(--sp-border); border-radius: var(--sp-radius-lg); background: var(--sp-white); color: var(--sp-ink); box-shadow: var(--sp-shadow); transition: transform .25s var(--sp-ease); }
.sp-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.sp-card--sun { background: var(--sp-sun); }
.sp-card--bubblegum { background: var(--sp-bubblegum); }
.sp-card--mint { background: var(--sp-mint); }
.sp-card--sky { background: var(--sp-sky); }
.sp-card__big { margin: 0 0 var(--sp-space-2); font-family: var(--sp-serif); font-size: 44px; line-height: 1; }
.sp-card__title { margin: 0 0 6px; font-family: var(--sp-display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sp-card__text { margin: 0; color: var(--sp-on-paper-soft); font-size: 15px; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-space-3); }

/* Browser window: frame any screenshot or mock page */
.sp-browser { overflow: hidden; border: var(--sp-border); border-radius: var(--sp-radius); background: var(--sp-paper); color: var(--sp-ink); box-shadow: var(--sp-shadow-lg); }
.sp-browser__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: var(--sp-border-thin); background: var(--sp-white); }
.sp-browser__dots { display: flex; gap: 6px; }
.sp-browser__dots i { width: 11px; height: 11px; border: 1.5px solid var(--sp-ink); border-radius: 50%; }
.sp-browser__url { flex: 1; max-width: 360px; margin: 0 auto; padding: 4px 14px; border: 1.5px solid rgba(18, 16, 20, .18); border-radius: var(--sp-radius-pill); font-family: var(--sp-mono); font-size: 12px; text-align: center; }
.sp-browser__body { padding: var(--sp-space-4); }

/* Steps: numbered white pills floating over a band */
.sp-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sp-steps li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: var(--sp-radius); background: var(--sp-white); color: var(--sp-ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-weight: 700; font-size: 15px; }
.sp-steps span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sp-ink); color: var(--sp-white); font-size: 13px; }

/* Code chip: a dark block for a line of code */
.sp-code { display: block; padding: 16px 20px; border-radius: var(--sp-radius-sm); background: var(--sp-ink-2); color: var(--sp-on-ink); font-family: var(--sp-mono); font-size: 14px; overflow-x: auto; }

/* Ticker: a tilted strip of big words between two sections */
/* Wrap the tilted ticker in .sp-ticker-band so its overhang never makes the page scroll sideways */
.sp-ticker-band { overflow-x: clip; }
.sp-ticker { position: relative; z-index: 2; overflow: hidden; margin: -30px -2%; padding: 18px 0; border-block: var(--sp-border); background: var(--sp-sun); color: var(--sp-ink); transform: rotate(var(--sp-tilt)); }
.sp-ticker__track { display: flex; width: max-content; animation: sp-ticker 30s linear infinite; }
.sp-ticker__track span { padding: 0 28px; font-family: var(--sp-display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.sp-ticker__track span:nth-child(even) { font-family: var(--sp-serif); font-weight: 400; font-style: italic; }
@keyframes sp-ticker { to { transform: translateX(-50%); } }

/* Floating bar: a dark pill fixed at the bottom of the screen */
.sp-floatbar { position: fixed; bottom: 20px; left: 50%; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; border: 1.5px solid rgba(246, 243, 236, .14); border-radius: var(--sp-radius-pill); background: var(--sp-ink-2); color: var(--sp-on-ink); font-size: var(--sp-text-small); transform: translateX(-50%); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.sp-floatbar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sp-tomato); }

/* Hanging tags: cards on strings, like a swatch rack */
.sp-rack { display: flex; gap: 14px; padding-top: 34px; border-top: 3px solid rgba(18, 16, 20, .5); overflow-x: auto; }
.sp-tag { position: relative; flex: 0 0 120px; padding: 18px 10px 12px; border: var(--sp-border-thin); border-radius: 16px; color: var(--sp-ink); text-align: center; box-shadow: var(--sp-shadow-sm); }
.sp-tag::before { content: ""; position: absolute; top: -34px; left: 50%; width: 1.5px; height: 30px; background: rgba(18, 16, 20, .5); }
.sp-tag::after { content: ""; position: absolute; top: 8px; left: 50%; width: 8px; height: 8px; border: 1.5px solid var(--sp-ink); border-radius: 50%; background: var(--sp-paper); transform: translateX(-50%); }
.sp-tag strong { display: block; margin-top: 6px; font-family: var(--sp-display); font-size: 40px; line-height: 1; }
.sp-tag small { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; }

/* Billing toggle: a pill switch with two options */
.sp-toggle { display: inline-flex; gap: 4px; padding: 5px; border: var(--sp-border-thin); border-radius: var(--sp-radius-pill); background: var(--sp-white); box-shadow: var(--sp-shadow-sm); }
.sp-toggle button { padding: 9px 18px; border: 0; border-radius: var(--sp-radius-pill); background: transparent; color: var(--sp-ink); font: 700 15px var(--sp-body); cursor: pointer; }
.sp-toggle button[aria-pressed="true"] { background: var(--sp-ink); color: var(--sp-white); }
.sp-toggle small { margin-left: 6px; padding: 2px 8px; border-radius: var(--sp-radius-pill); background: var(--sp-sun); color: var(--sp-ink); font-size: 12px; }

/* Plans: pricing cards; the featured one is a band color, lifted and tilted */
.sp-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-space-3); align-items: start; }
.sp-plan { display: flex; flex-direction: column; gap: var(--sp-space-2); padding: var(--sp-space-4) var(--sp-space-3); border: var(--sp-border); border-radius: var(--sp-radius-lg); background: var(--sp-white); color: var(--sp-ink); box-shadow: var(--sp-shadow); }
.sp-plan--featured { background: var(--sp-sun); box-shadow: var(--sp-shadow-lg); transform: rotate(-1.2deg) translateY(-12px); }
.sp-plan__name { margin: 0; font-family: var(--sp-display); font-size: var(--sp-text-h3); font-weight: 800; letter-spacing: -.03em; }
.sp-plan__price { display: flex; align-items: baseline; gap: 6px; margin: 0; font-family: var(--sp-display); font-size: 64px; font-weight: 800; letter-spacing: var(--sp-tracking-display); line-height: 1; }
.sp-plan__price small { font-family: var(--sp-body); font-size: var(--sp-text-small); font-weight: 600; letter-spacing: 0; opacity: .7; }
.sp-plan__text { margin: 0; color: var(--sp-on-paper-soft); font-size: 15px; }
.sp-plan__list { display: grid; gap: 10px; margin: 0; padding: var(--sp-space-2) 0 0; border-top: var(--sp-border-thin); list-style: none; font-size: 15px; }
.sp-plan__list li { display: flex; gap: 10px; }
.sp-plan__list li::before { content: "\2713"; display: grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--sp-ink); color: var(--sp-white); font-size: 12px; font-weight: 700; }
.sp-plan .sp-btn { justify-content: center; margin-top: auto; }

/* Table: thick-bordered comparison table on paper */
.sp-table-wrap { overflow-x: auto; border: var(--sp-border); border-radius: var(--sp-radius); background: var(--sp-white); box-shadow: var(--sp-shadow); }
.sp-table { width: 100%; border-collapse: collapse; color: var(--sp-ink); font-size: 15px; }
.sp-table th, .sp-table td { padding: 14px 18px; border-bottom: var(--sp-border-thin); text-align: left; }
.sp-table tr:last-child td { border-bottom: 0; }
.sp-table thead th { background: var(--sp-ink); color: var(--sp-on-ink); font-family: var(--sp-display); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.sp-table td:not(:first-child), .sp-table th:not(:first-child) { text-align: center; }
.sp-table__yes { font-weight: 800; }
.sp-table__no { opacity: .35; }

/* FAQ: native details elements as chunky rows */
.sp-faq { display: grid; gap: 12px; }
.sp-faq details { border: var(--sp-border); border-radius: var(--sp-radius); background: var(--sp-white); color: var(--sp-ink); box-shadow: var(--sp-shadow-sm); }
.sp-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-family: var(--sp-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; list-style: none; cursor: pointer; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--sp-sun); font-size: 20px; transition: transform .2s var(--sp-ease); }
.sp-faq details[open] summary::after { transform: rotate(45deg); }
.sp-faq details p { margin: 0; padding: 0 22px 20px; color: var(--sp-on-paper-soft); }

/* Prose: long-form article typography on paper */
.sp-prose { max-width: 680px; margin-inline: auto; color: var(--sp-ink); font-size: 19px; line-height: 1.7; }
.sp-prose > * + * { margin-top: 1.1em; }
.sp-prose p { margin-bottom: 0; }
.sp-prose h2 { margin: 2em 0 0; font-family: var(--sp-display); font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.sp-prose h3 { margin: 1.6em 0 0; font-family: var(--sp-display); font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.sp-prose a { color: inherit; text-decoration-color: var(--sp-tomato); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.sp-prose ul, .sp-prose ol { padding-left: 1.3em; }
.sp-prose li + li { margin-top: .4em; }
.sp-prose li::marker { color: var(--sp-tomato); font-weight: 800; }
.sp-prose blockquote { margin: 1.6em 0; padding: 0 0 0 var(--sp-space-3); border-left: 6px solid var(--sp-tomato); font-family: var(--sp-serif); font-style: italic; font-size: 34px; line-height: 1.2; }
.sp-prose code { padding: 2px 7px; border-radius: 6px; background: var(--sp-sun); font-family: var(--sp-mono); font-size: .82em; }
.sp-prose pre { overflow-x: auto; padding: 20px 22px; border-radius: var(--sp-radius-sm); background: var(--sp-ink); color: var(--sp-on-ink); font-family: var(--sp-mono); font-size: 15px; line-height: 1.6; }
.sp-prose pre code { padding: 0; background: none; font-size: inherit; }
.sp-prose figure { margin: 1.8em 0; }
.sp-prose figcaption { margin-top: 10px; color: var(--sp-on-paper-soft); font-size: var(--sp-text-small); text-align: center; }
.sp-media { display: grid; place-items: center; aspect-ratio: 16 / 9; border: var(--sp-border); border-radius: var(--sp-radius); box-shadow: var(--sp-shadow); font-family: var(--sp-serif); font-style: italic; font-size: 44px; }

/* Callout box: a tinted note inside an article */
.sp-callout-box { display: flex; gap: 16px; padding: 20px 22px; border: var(--sp-border); border-radius: var(--sp-radius); background: var(--sp-mint); box-shadow: var(--sp-shadow-sm); font-size: 17px; }
.sp-callout-box strong { display: block; font-family: var(--sp-display); font-size: 19px; }
.sp-callout-box__icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border: var(--sp-border-thin); border-radius: 50%; background: var(--sp-white); font-weight: 800; }

/* Author: avatar with name and meta, inline or as a card */
.sp-author { display: flex; align-items: center; gap: 12px; font-size: var(--sp-text-small); }
.sp-author strong { display: block; font-size: 16px; }
.sp-author span { opacity: .7; }
.sp-avatar { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border: var(--sp-border-thin); border-radius: 50%; background: var(--sp-bubblegum); color: var(--sp-ink); font-family: var(--sp-display); font-weight: 800; }
.sp-avatar--lg { flex-basis: 72px; height: 72px; font-size: 28px; }
.sp-author--card { gap: 20px; padding: var(--sp-space-3); border: var(--sp-border); border-radius: var(--sp-radius-lg); background: var(--sp-white); color: var(--sp-ink); box-shadow: var(--sp-shadow); font-size: 15px; }
.sp-author--card p { margin: 4px 0 0; }

/* Forms: labels above, thick bordered inputs, sun focus ring, tomato errors */
.sp-form { display: grid; gap: 18px; }
.sp-field { display: grid; gap: 6px; }
.sp-label { font-size: var(--sp-text-small); font-weight: 700; }
.sp-input, .sp-select { width: 100%; padding: 13px 16px; border: var(--sp-border-thin); border-radius: var(--sp-radius-sm); background: var(--sp-white); color: var(--sp-ink); font: 500 16px var(--sp-body); transition: box-shadow .15s var(--sp-ease); }
.sp-input::placeholder { color: var(--sp-on-paper-soft); }
.sp-input:focus, .sp-select:focus { outline: 0; box-shadow: 0 0 0 4px var(--sp-sun); }
.sp-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sp-ink) 50%), linear-gradient(135deg, var(--sp-ink) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.sp-input-wrap { position: relative; }
.sp-input-wrap .sp-input { padding-right: 76px; }
.sp-input-wrap__btn { position: absolute; top: 50%; right: 8px; padding: 6px 10px; border: 0; border-radius: var(--sp-radius-pill); background: var(--sp-paper); color: var(--sp-ink); font: 700 13px var(--sp-body); cursor: pointer; transform: translateY(-50%); }
.sp-help { color: var(--sp-on-paper-soft); font-size: 13px; }
.sp-field--error .sp-input { border-color: var(--sp-tomato); box-shadow: 0 0 0 4px var(--sp-bubblegum); }
.sp-error { color: var(--sp-tomato); font-size: 13px; font-weight: 700; }
.sp-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.sp-check input { appearance: none; flex: 0 0 22px; height: 22px; margin: 1px 0 0; border: var(--sp-border-thin); border-radius: 6px; background: var(--sp-white); cursor: pointer; }
.sp-check input:checked { background: var(--sp-ink); box-shadow: inset 0 0 0 4px var(--sp-white); }
.sp-check input:focus-visible { box-shadow: 0 0 0 4px var(--sp-sun); }
.sp-divider-text { display: flex; align-items: center; gap: 14px; color: var(--sp-on-paper-soft); font-size: var(--sp-text-small); font-weight: 600; }
.sp-divider-text::before, .sp-divider-text::after { content: ""; flex: 1; height: 2px; background: currentColor; opacity: .3; }
.sp-btn--social { justify-content: center; border: var(--sp-border-thin); background: var(--sp-white); color: var(--sp-ink); }
.sp-btn--social:hover { box-shadow: var(--sp-shadow-sm); }
.sp-btn__letter { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--sp-ink); color: var(--sp-white); font-size: 13px; }
.sp-btn--block { justify-content: center; width: 100%; }

/* Footer: ink, a big wordmark and small link columns */
.sp-footer { padding-block: var(--sp-space-5) var(--sp-space-4); background: var(--sp-ink); color: var(--sp-on-ink); font-size: var(--sp-text-small); }
.sp-footer a { color: var(--sp-on-ink-soft); text-decoration: none; }
.sp-footer a:hover { color: var(--sp-on-ink); }

@media (max-width: 760px) {
  .sp-plans { grid-template-columns: 1fr; }
  .sp-plan--featured { transform: none; }
  .sp-prose { font-size: 17px; }
  .sp-prose h2 { font-size: 32px; }
  .sp-prose blockquote { font-size: 26px; }
}

/* Entrances: rise in once; respect reduced motion */
.sp-rise { animation: sp-rise .9s var(--sp-ease) backwards; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .sp-rise, .sp-ticker__track { animation: none; }
  .sp-card, .sp-btn, .sp-input, .sp-select { transition: none; }
  .sp-faq summary::after { transition: none; }
}
