/*
 * Test Card: components
 * Every value comes from tokens.css. Load tokens.css first.
 */

/* Base */
.tc { margin: 0; background: var(--tc-night); color: var(--tc-text); font-family: var(--tc-body); font-size: var(--tc-text-body); line-height: var(--tc-leading); -webkit-font-smoothing: antialiased; overflow-x: clip; }
:where(.tc) *, :where(.tc) *::before, :where(.tc) *::after { box-sizing: border-box; }
:where(.tc) img, :where(.tc) svg { max-width: 100%; }
:where(.tc) p { margin: 0 0 var(--tc-space-4); }
:where(.tc) a { color: inherit; text-decoration: none; }
:where(.tc) a:focus-visible, :where(.tc) button:focus-visible, :where(.tc) input:focus-visible, :where(.tc) select:focus-visible { outline: none; box-shadow: var(--tc-focus); }
:where(.tc) ::selection { background: var(--tc-warn); color: var(--tc-tile); }
.tc-container { width: 100%; max-width: var(--tc-container); margin: 0 auto; padding: 0 var(--tc-space-5); }
.tc-narrow { max-width: var(--tc-narrow); margin-left: auto; margin-right: auto; }
.tc-center { text-align: center; }
.tc-dim { color: var(--tc-dim); }
.tc-micro { font-size: var(--tc-text-micro); color: var(--tc-faint); }
.tc-link, .tc-prose a { color: var(--tc-link); text-decoration: none; }
.tc-link:hover, .tc-prose a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Sections: the page gets darker as you scroll */
.tc-section { padding: var(--tc-space-7) 0; }
.tc-section--deep { background: var(--tc-deep); }
.tc-section--tile { background: var(--tc-tile); }

/* Shards: pale diagonal planes behind a hero */
.tc-shards { position: relative; isolation: isolate; overflow: hidden; }
.tc-shards::before, .tc-shards::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.tc-shards::before { inset: 0; background: var(--tc-shard); clip-path: polygon(0 58%, 100% 30%, 100% 62%, 0 100%); }
.tc-shards::after { inset: 0; background: var(--tc-shard-hi); clip-path: polygon(62% 0, 100% 0, 100% 22%, 38% 46%); opacity: .7; }

/* Stripe: the test card as a thin rule */
.tc-stripe { height: 8px; background: var(--tc-stripe); }
.tc-stripe--thick { height: 16px; }

/* Nav: round mark, two-line wordmark, links with an underline on the current page */
.tc-nav { display: flex; align-items: flex-start; gap: var(--tc-space-5); padding: var(--tc-space-4) 0; }
.tc-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--tc-text); white-space: nowrap; }
.tc-logo svg { width: 40px; height: 40px; flex: none; }
.tc-logo b { display: block; font: 800 20px/1 var(--tc-display); }
.tc-logo small { display: block; font: 700 14px/1.3 var(--tc-display); color: var(--tc-text); }
.tc-nav__end { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: var(--tc-space-2); }
.tc-nav__links { display: flex; gap: var(--tc-space-5); margin: 0; padding: 0; list-style: none; font: 500 17px/1 var(--tc-display); }
.tc-nav__links a { display: block; padding: 6px 2px 8px; border-bottom: 2px solid transparent; }
.tc-nav__links a:hover { border-bottom-color: var(--tc-line); }
.tc-nav__links a[aria-current] { border-bottom-color: var(--tc-blue); }
.tc-nav__chips { display: flex; gap: 6px; align-items: center; }
.tc-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--tc-radius-chip); background: var(--tc-blue); color: var(--tc-text); font: 700 13px/1 var(--tc-body); white-space: nowrap; }
.tc-chip svg { width: 14px; height: 14px; }
.tc-chip--go { background: var(--tc-go); }
.tc-chip--ink { background: var(--tc-tile); }
@media (max-width: 820px) { .tc-nav__links { display: none; } .tc-nav { align-items: center; } }

/* Buttons: square, electric blue, equal width when in a row */
.tc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 22px; border: 0; border-radius: var(--tc-radius); background: var(--tc-blue); color: var(--tc-text); font: 700 18px/1.1 var(--tc-display); white-space: nowrap; cursor: pointer; transition: background var(--tc-fast); }
.tc-btn:hover { background: var(--tc-blue-deep); }
.tc-btn svg { width: 18px; height: 18px; flex: none; }
.tc-btn--go { background: var(--tc-go); }
.tc-btn--go:hover { background: var(--tc-go-deep); }
.tc-btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--tc-line); }
.tc-btn--ghost:hover { background: var(--tc-blue-soft); box-shadow: inset 0 0 0 2px var(--tc-blue); }
.tc-btn--sm { min-height: 34px; padding: 6px 14px; font-size: 15px; }
.tc-btn--block { width: 100%; }
.tc-keys { display: grid; grid-template-columns: repeat(var(--tc-keys, 3), minmax(0, 200px)); justify-content: center; gap: var(--tc-space-4); margin: var(--tc-space-5) 0; }
.tc-keys .tc-btn { width: 100%; }
@media (max-width: 560px) { .tc-keys { grid-template-columns: 1fr; } }

/* Hero: centered, chunky, with a mono "latest" line */
.tc-hero { padding-top: var(--tc-space-8); padding-bottom: var(--tc-space-7); text-align: center; }
.tc-hero h1 { margin: 0; font: 800 var(--tc-text-hero)/1 var(--tc-display); letter-spacing: -0.015em; }
.tc-hero__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin: var(--tc-space-3) 0 0; font-size: var(--tc-text-small); font-weight: 700; }
.tc-hero__meta svg { width: 15px; height: 15px; }
.tc-hero__lead { max-width: 640px; margin: 0 auto var(--tc-space-2); font-size: var(--tc-text-lead); }

/* Headings */
.tc-h1 { margin: 0 0 var(--tc-space-4); font: 800 var(--tc-text-h1)/1.08 var(--tc-display); letter-spacing: -0.01em; }
.tc-h2 { margin: 0 0 var(--tc-space-4); font: 700 var(--tc-text-h2)/1.15 var(--tc-display); }
.tc-h3 { margin: 0 0 var(--tc-space-2); font: 700 var(--tc-text-h3)/1.25 var(--tc-display); }
.tc-tier { margin: 0 0 var(--tc-space-5); font: 700 22px/1.2 var(--tc-display); text-transform: uppercase; letter-spacing: .02em; text-align: center; }
.tc-heading { margin: 0 auto var(--tc-space-6); max-width: 1000px; padding-bottom: var(--tc-space-3); border-bottom: var(--tc-rule); font: 700 var(--tc-text-h2)/1.15 var(--tc-display); text-align: center; }
.tc-label { display: inline-block; margin-bottom: var(--tc-space-3); font: 500 var(--tc-text-micro)/1 var(--tc-mono); color: var(--tc-dim); text-transform: uppercase; letter-spacing: .08em; }
.tc-label::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--tc-stripe); background-size: 70px 10px; vertical-align: -1px; }

/* Screen: an app window framed in the page, with a test card inside */
.tc-screen { max-width: 820px; margin: var(--tc-space-6) auto 0; background: var(--tc-tile); border: var(--tc-border); text-align: left; }
.tc-screen__bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: var(--tc-border-soft); font: 500 12px/1 var(--tc-mono); color: var(--tc-faint); }
.tc-screen__bar i { width: 8px; height: 8px; background: var(--tc-line); }
.tc-screen__body { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: 300px; }
.tc-screen__side { padding: 10px; border-right: var(--tc-border-soft); font-size: 13px; color: var(--tc-dim); }
.tc-screen__side p { margin: 0 0 6px; padding: 3px 6px; }
.tc-screen__side p.is-on { background: var(--tc-blue); color: var(--tc-text); }
.tc-screen__main { padding: 14px; min-width: 0; }
@media (max-width: 600px) { .tc-screen__body { grid-template-columns: 1fr; } .tc-screen__side { display: none; } }

/* Card: the drawn test card itself */
.tc-card { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--tc-stripe); overflow: hidden; }
.tc-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(90deg, var(--tc-bar-7) 0 14.28%, var(--tc-tile) 0 28.57%, var(--tc-bar-5) 0 42.85%, var(--tc-tile) 0 57.14%, var(--tc-bar-3) 0 71.42%, var(--tc-tile) 0 85.71%, var(--tc-bar-1) 0 100%); }
.tc-card__badge { position: absolute; left: 50%; top: 39%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--tc-tile); color: var(--tc-text); box-shadow: 0 0 0 4px var(--tc-text); }
.tc-card__badge svg { width: 62%; height: 62%; }

/* Tiles: dark blocks set in tiers (sponsors, features, stats) */
.tc-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--tc-space-4); margin-bottom: var(--tc-space-6); }
.tc-tile { flex: 0 1 var(--tc-tile-w, 260px); min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: var(--tc-space-5); border-radius: var(--tc-radius-tile); background: var(--tc-tile); text-align: center; min-width: 0; }
.tc-tile--sm { --tc-tile-w: 200px; min-height: 90px; }
.tc-tile b { font: 800 26px/1 var(--tc-display); letter-spacing: -0.01em; }
.tc-tile span { font-size: var(--tc-text-small); color: var(--tc-dim); }
.tc-tile svg { width: 34px; height: 34px; }
@media (max-width: 560px) { .tc-tile { flex-basis: calc(50% - 8px); } .tc-tile b { font-size: 20px; } }

/* Feature rows: a framed screen and a block of text, alternating */
.tc-feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tc-space-7); align-items: center; padding: var(--tc-space-6) 0; }
.tc-feature + .tc-feature { border-top: var(--tc-border-soft); }
.tc-feature--flip > :first-child { order: 2; }
.tc-feature p { color: var(--tc-dim); }
@media (max-width: 820px) { .tc-feature { grid-template-columns: 1fr; gap: var(--tc-space-5); } .tc-feature--flip > :first-child { order: 0; } }

/* Stock meter: horizontal bars in the stripe colors */
.tc-meter { display: grid; gap: 10px; }
.tc-meter__row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 13px; color: var(--tc-dim); }
.tc-meter__track { height: 14px; background: var(--tc-panel); }
.tc-meter__fill { display: block; height: 100%; width: var(--v, 50%); background: var(--c, var(--tc-blue)); }
.tc-meter__row b { font: 500 12px/1 var(--tc-mono); color: var(--tc-text); text-align: right; }

/* Badges */
.tc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--tc-radius-chip); background: var(--tc-panel); font: 500 12px/1.3 var(--tc-mono); color: var(--tc-dim); white-space: nowrap; }
.tc-badge--blue { background: var(--tc-blue); color: var(--tc-text); }
.tc-badge--go { background: var(--tc-go); color: var(--tc-text); }
.tc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc-go); }

/* Callout: plain notice with a stripe on top */
.tc-callout { background: var(--tc-panel); border-top: 6px solid transparent; border-image: var(--tc-stripe) 1; padding: var(--tc-space-5); }
.tc-callout p:last-child { margin-bottom: 0; }

/* Forms */
.tc-form { display: grid; gap: var(--tc-space-4); }
.tc-field { display: grid; gap: 6px; }
.tc-field label { font: 700 var(--tc-text-small)/1.3 var(--tc-body); }
.tc-field small { color: var(--tc-faint); font-size: var(--tc-text-micro); }
.tc-input, .tc-select, .tc-textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: var(--tc-border); border-radius: var(--tc-radius); background: var(--tc-tile); color: var(--tc-text); font: 400 var(--tc-text-body)/1.3 var(--tc-body); }
.tc-input::placeholder, .tc-textarea::placeholder { color: var(--tc-faint); }
.tc-input:focus, .tc-select:focus, .tc-textarea:focus { border-color: var(--tc-blue); }
.tc-check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--tc-text-small); color: var(--tc-dim); }
.tc-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--tc-blue); flex: none; }
.tc-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tc-choice { position: relative; }
.tc-choice input { position: absolute; opacity: 0; }
.tc-choice span { display: block; padding: 10px 8px; border: var(--tc-border); background: var(--tc-tile); text-align: center; font: 700 15px/1.2 var(--tc-display); cursor: pointer; }
.tc-choice input:checked + span { background: var(--tc-blue); border-color: var(--tc-blue); }
.tc-choice input:focus-visible + span { box-shadow: var(--tc-focus); }
@media (max-width: 480px) { .tc-choices { grid-template-columns: 1fr; } }

/* Pricing: tiers in tiles, the middle one keyed blue */
.tc-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tc-space-4); align-items: stretch; }
.tc-plan { display: flex; flex-direction: column; padding: var(--tc-space-6) var(--tc-space-5); border-radius: var(--tc-radius-tile); background: var(--tc-tile); }
.tc-plan--key { box-shadow: inset 0 6px 0 var(--tc-blue); background: var(--tc-panel); }
.tc-plan__name { margin: 0 0 var(--tc-space-2); font: 700 22px/1.2 var(--tc-display); text-transform: uppercase; letter-spacing: .02em; }
.tc-plan__price { margin: var(--tc-space-3) 0; font: 800 46px/1 var(--tc-display); }
.tc-plan__price small { font: 400 var(--tc-text-small)/1 var(--tc-body); color: var(--tc-dim); }
.tc-plan ul { flex: 1; margin: var(--tc-space-4) 0 var(--tc-space-5); padding: 0; list-style: none; font-size: var(--tc-text-small); }
.tc-plan li { padding: 8px 0 8px 22px; border-top: var(--tc-border-soft); position: relative; }
.tc-plan li::before { content: ""; position: absolute; left: 0; top: 15px; width: 10px; height: 10px; background: var(--tc-go); }
@media (max-width: 900px) { .tc-plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

/* Table */
.tc-table { width: 100%; border-collapse: collapse; font-size: var(--tc-text-small); }
.tc-table th, .tc-table td { padding: 12px 10px; border-bottom: var(--tc-border-soft); text-align: left; }
.tc-table th { font: 700 var(--tc-text-small)/1.2 var(--tc-display); color: var(--tc-dim); }
.tc-table td + td, .tc-table th + th { text-align: center; }
.tc-table-wrap { overflow-x: auto; }

/* FAQ */
.tc-faq details { border-bottom: var(--tc-border-soft); }
.tc-faq summary { padding: var(--tc-space-4) 0; font: 700 var(--tc-text-h3)/1.3 var(--tc-display); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.tc-faq summary::after { content: "+"; color: var(--tc-blue); font-weight: 800; }
.tc-faq details[open] summary::after { content: "\2212"; }
.tc-faq p { color: var(--tc-dim); }

/* Article */
.tc-article { max-width: var(--tc-narrow); margin: 0 auto; }
.tc-article__head { text-align: center; padding: var(--tc-space-7) 0 var(--tc-space-5); }
.tc-byline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; font-size: var(--tc-text-small); color: var(--tc-dim); }
.tc-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--tc-stripe); background-size: 140px 32px; flex: none; }
.tc-prose { font-size: 18px; line-height: 1.7; }
.tc-prose h2 { margin: var(--tc-space-7) 0 var(--tc-space-3); font: 700 28px/1.2 var(--tc-display); }
.tc-prose h3 { margin: var(--tc-space-6) 0 var(--tc-space-2); font: 700 21px/1.3 var(--tc-display); }
.tc-prose ul, .tc-prose ol { padding-left: 22px; }
.tc-prose li { margin-bottom: 6px; }
.tc-prose blockquote { margin: var(--tc-space-6) 0; padding: var(--tc-space-2) 0 var(--tc-space-2) var(--tc-space-5); border-left: var(--tc-rule); font: italic 400 21px/1.5 var(--tc-body); color: var(--tc-text); }
.tc-prose code { padding: 1px 6px; background: var(--tc-panel); font: 500 .85em var(--tc-mono); color: var(--tc-warn); }
.tc-figure { margin: var(--tc-space-6) 0; }
.tc-figure figcaption { margin-top: var(--tc-space-2); font-size: var(--tc-text-micro); color: var(--tc-faint); text-align: center; }

/* CTA band */
.tc-cta { text-align: center; padding: var(--tc-space-7) var(--tc-space-5); background: var(--tc-shard); }
.tc-cta p { color: var(--tc-dim); max-width: 560px; margin: 0 auto var(--tc-space-4); }

/* Footer */
.tc-footer { background: var(--tc-tile); padding: var(--tc-space-6) 0 var(--tc-space-5); font-size: var(--tc-text-small); color: var(--tc-dim); }
.tc-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: var(--tc-space-5); }
.tc-footer h4 { margin: 0 0 var(--tc-space-3); font: 700 15px/1.2 var(--tc-display); color: var(--tc-text); }
.tc-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tc-footer a:hover { color: var(--tc-text); }
.tc-footer__base { margin-top: var(--tc-space-6); padding-top: var(--tc-space-4); border-top: var(--tc-border-soft); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: var(--tc-text-micro); color: var(--tc-faint); }
@media (max-width: 760px) { .tc-footer__grid { grid-template-columns: 1fr 1fr; } .tc-footer__grid > :first-child { grid-column: 1 / -1; } }

/* Mark: a round badge drawn in currentColor; .tc-k parts are cut out in the page color */
.tc-mark .tc-k { fill: var(--tc-tile); }
.tc-logo .tc-k { fill: var(--tc-night); }
.tc-actions { display: flex; flex-wrap: wrap; gap: var(--tc-space-3); margin-top: var(--tc-space-4); }
.tc-feature .tc-screen { width: 100%; margin: 0; }
.tc-keys--2 { --tc-keys: 2; }
.tc-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.tc-fieldset legend { padding: 0; margin-bottom: 6px; font: 700 var(--tc-text-small)/1.3 var(--tc-body); }
.tc-note { margin-top: var(--tc-space-5); }
.tc-footer__base--solo { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 560px) { .tc-nav__chips .tc-chip:not(.tc-chip--go):not(.tc-chip--ink) { display: none; } .tc-nav__chips .tc-chip--ink[aria-label] { display: none; } .tc-logo small { white-space: normal; } }
