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

/* Base: charcoal page with a faint grid and an aqua glow in the top right corner */
.to { margin: 0; background-color: var(--to-night); background-image: radial-gradient(760px 560px at 100% 0%, var(--to-glow) 0%, transparent 70%), linear-gradient(var(--to-grid) 1px, transparent 1px), linear-gradient(90deg, var(--to-grid) 1px, transparent 1px); background-size: 100% 100%, var(--to-grid-size) var(--to-grid-size), var(--to-grid-size) var(--to-grid-size); background-repeat: no-repeat, repeat, repeat; color: var(--to-text); font-family: var(--to-sans); font-size: var(--to-text-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.to *, .to *::before, .to *::after { box-sizing: border-box; }
.to img, .to svg { max-width: 100%; display: block; }
.to a { color: var(--to-aqua); }
.to-container { width: min(100% - 40px, var(--to-container)); margin-inline: auto; }
.to-narrow { width: min(100% - 40px, var(--to-narrow)); margin-inline: auto; }
.to-center { text-align: center; }
.to-center .to-lead { margin-inline: auto; }

/* Sections */
.to-section { padding-block: var(--to-section); }
.to-section--panel { background: var(--to-panel); border-block: var(--to-border); }
.to-section--glow { position: relative; overflow: hidden; background: radial-gradient(70% 90% at 0% 100%, var(--to-glow) 0%, transparent 70%), var(--to-well); border-block: var(--to-border); }

/* Type: Sora for headings, Figtree for the rest */
.to-hero-title, .to-h2, .to-h3 { margin: 0; font-family: var(--to-display); font-weight: 600; color: var(--to-text); }
.to-hero-title { font-size: var(--to-text-hero); letter-spacing: var(--to-tracking-hero); line-height: 1.04; }
.to-h2 { font-size: var(--to-text-h2); letter-spacing: var(--to-tracking-h2); line-height: 1.12; }
.to-h3 { font-size: var(--to-text-h3); letter-spacing: -.01em; line-height: 1.3; }
.to-sun { color: var(--to-sun); }
.to-aqua { color: var(--to-aqua); }
.to-lead { max-width: 600px; margin: 18px 0 0; color: var(--to-soft); font-size: var(--to-text-lead); line-height: 1.55; }
.to-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--to-soft); font-family: var(--to-mono); font-size: var(--to-text-micro); letter-spacing: .08em; text-transform: uppercase; }
.to-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--to-sun); box-shadow: 6px 0 0 var(--to-aqua); margin-right: 6px; }
.to-mono { font-family: var(--to-mono); font-size: var(--to-text-small); }

/* Logo: two dots locked together, then the word */
.to-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--to-text); font-family: var(--to-display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.to-logo__mark { position: relative; width: 26px; height: 26px; flex-shrink: 0; }
.to-logo__mark::before, .to-logo__mark::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 4px solid; }
.to-logo__mark::before { top: 0; left: 0; border-color: var(--to-sun); }
.to-logo__mark::after { bottom: 0; right: 0; border-color: var(--to-aqua); }
.to .to-logo { color: var(--to-text); }

/* Nav: thin bar with a search pill and quiet icon links */
.to-nav { position: sticky; top: 0; z-index: 10; border-bottom: var(--to-border); background: rgba(21, 22, 24, .82); backdrop-filter: blur(10px); }
.to-nav__inner { display: flex; align-items: center; gap: 28px; min-height: 60px; }
.to-nav__links { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.to-nav__links a { color: var(--to-text); text-decoration: none; }
.to-nav__links a:hover { color: var(--to-aqua); }
.to-nav__end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.to-search { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 7px 10px 7px 12px; border: var(--to-border); border-radius: var(--to-radius-sm); background: var(--to-panel); color: var(--to-faint); font-size: var(--to-text-small); }
.to-search kbd { margin-left: auto; padding: 1px 6px; border: var(--to-border); border-radius: 5px; font-family: var(--to-mono); font-size: 11px; }
@media (max-width: 860px) { .to-nav__links, .to-search { display: none; } }

/* Buttons: aqua pill for the main action, a plain text link with an arrow beside it */
.to-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border: 0; border-radius: var(--to-radius-pill); font-family: var(--to-sans); font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s var(--to-ease), transform .2s var(--to-ease), box-shadow .2s var(--to-ease); }
.to-btn:active { transform: scale(.98); }
.to-btn:focus-visible { outline: none; box-shadow: var(--to-ring); }
.to .to-btn--primary { background: var(--to-aqua); color: var(--to-aqua-ink); }
.to .to-btn--primary:hover { background: var(--to-aqua-dark); }
.to .to-btn--outline { border: 1px solid var(--to-line-2); background: transparent; color: var(--to-text); }
.to .to-btn--outline:hover { border-color: var(--to-aqua); }
.to .to-btn--text { padding-inline: 6px; background: transparent; color: var(--to-text); font-weight: 500; }
.to .to-btn--text:hover { color: var(--to-aqua); }
.to-btn--sm { padding: 8px 16px; font-size: 14px; }
.to-btn--block { width: 100%; }
.to-btn__arrow { transition: transform .2s var(--to-ease); }
.to-btn:hover .to-btn__arrow { transform: translateX(3px); }
.to-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.to-center .to-actions { justify-content: center; }

/* Hero: text left, the orbit drawing right */
.to-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding-block: clamp(64px, 9vw, 120px) clamp(48px, 6vw, 80px); }
.to-hero__brand { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.to-orbit { width: 100%; max-width: 420px; margin-inline: auto; color: var(--to-line-2); }
.to-orbit circle, .to-orbit path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.to-orbit .to-orbit__sun { stroke: var(--to-sun); stroke-width: 2; }
.to-orbit .to-orbit__aqua { stroke: var(--to-aqua); stroke-width: 2; }
.to-orbit .to-orbit__dot { fill: var(--to-text); stroke: none; }
@media (max-width: 860px) { .to-hero { grid-template-columns: 1fr; } .to-orbit { max-width: 260px; } }

/* Tabbed card: a panel with an icon title, a row of tabs and a dark well holding one line */
.to-tabcard { border: var(--to-border); border-radius: var(--to-radius); background: var(--to-panel); padding: 26px 28px 28px; box-shadow: var(--to-shadow); }
.to-tabcard__title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-family: var(--to-display); font-size: 20px; font-weight: 600; }
.to-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid var(--to-sun); border-radius: var(--to-radius-sm); background: var(--to-sun-soft); color: var(--to-sun); }
.to-icon--aqua { border-color: var(--to-aqua); background: var(--to-aqua-soft); color: var(--to-aqua); }
.to-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.to-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: var(--to-border); scrollbar-width: none; }
.to-tabs button { padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--to-soft); font: 500 14px var(--to-sans); white-space: nowrap; cursor: pointer; }
.to-tabs button[aria-selected="true"] { border-color: var(--to-aqua); color: var(--to-text); }
.to-well { margin-top: 18px; padding: 14px 16px; border: var(--to-border); border-radius: var(--to-radius-sm); background: var(--to-well); font-family: var(--to-mono); font-size: var(--to-text-small); color: var(--to-text); overflow-wrap: anywhere; }
.to-well__k { color: var(--to-aqua); }
.to-well__s { color: var(--to-sun); }
.to-well__c { color: var(--to-faint); }

/* Cards */
.to-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.to-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .to-grid-2, .to-grid-3 { grid-template-columns: 1fr; } }
.to-card { border: var(--to-border); border-radius: var(--to-radius); background: var(--to-panel); padding: 24px; transition: border-color .2s var(--to-ease); }
.to-card:hover { border-color: var(--to-line-2); }
.to-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.to-card__title { margin: 0; font-family: var(--to-display); font-size: 18px; font-weight: 600; }
.to-card__text { margin: 0; color: var(--to-soft); font-size: 15px; }

/* Chips and dots */
.to-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: var(--to-border); border-radius: var(--to-radius-pill); background: var(--to-panel-2); color: var(--to-soft); font-size: var(--to-text-micro); font-weight: 500; white-space: nowrap; }
.to-chip--sun { border-color: rgba(246, 196, 69, .4); background: var(--to-sun-soft); color: var(--to-sun); }
.to-chip--aqua { border-color: rgba(127, 227, 239, .4); background: var(--to-aqua-soft); color: var(--to-aqua); }
.to-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--to-green); }

/* Pair row: two avatars locked like the logo, used for matches */
.to-pair { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: var(--to-border); border-radius: var(--to-radius-sm); background: var(--to-well); }
.to-pair + .to-pair { margin-top: 8px; }
.to-pair__faces { display: flex; flex-shrink: 0; }
.to-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--to-sun); background: var(--to-panel-2); color: var(--to-text); font-size: 13px; font-weight: 600; }
.to-avatar--aqua { border-color: var(--to-aqua); margin-left: -10px; }
.to-pair__text { min-width: 0; flex: 1; font-size: var(--to-text-small); }
.to-pair__text b { display: block; font-weight: 600; }
.to-pair__text span { color: var(--to-faint); }

/* Stats */
.to-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.to-stat__num { font-family: var(--to-display); font-size: clamp(32px, 4vw, 44px); font-weight: 600; letter-spacing: -.03em; }
.to-stat__label { color: var(--to-soft); font-size: var(--to-text-small); }
@media (max-width: 700px) { .to-stats { grid-template-columns: repeat(2, 1fr); } }

/* Quote */
.to-quote { margin: 0; }
.to-quote p { margin: 0; font-family: var(--to-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: -.02em; line-height: 1.35; }
.to-quote footer { display: flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--to-soft); font-size: var(--to-text-small); }

/* Pricing */
.to-segment { display: inline-flex; gap: 2px; padding: 3px; border: var(--to-border); border-radius: var(--to-radius-pill); background: var(--to-panel); }
.to-segment button { padding: 7px 16px; border: 0; border-radius: var(--to-radius-pill); background: transparent; color: var(--to-soft); font: 500 14px var(--to-sans); cursor: pointer; white-space: nowrap; }
.to-segment button[aria-pressed="true"] { background: var(--to-panel-2); color: var(--to-text); box-shadow: inset 0 0 0 1px var(--to-line-2); }
.to-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .to-plans { grid-template-columns: 1fr; } }
.to-plan { display: flex; flex-direction: column; border: var(--to-border); border-radius: var(--to-radius); background: var(--to-panel); padding: 28px; }
.to-plan--featured { border-color: var(--to-aqua); box-shadow: 0 0 0 1px var(--to-aqua), 0 20px 50px rgba(127, 227, 239, .08); }
.to-plan__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.to-plan__name { margin: 0; font-family: var(--to-display); font-size: 20px; font-weight: 600; }
.to-plan__desc { margin: 8px 0 0; color: var(--to-soft); font-size: 15px; }
.to-plan__price { margin: 22px 0 4px; font-family: var(--to-display); font-size: 44px; font-weight: 600; letter-spacing: -.03em; }
.to-plan__price small { color: var(--to-faint); font-family: var(--to-sans); font-size: 15px; font-weight: 400; letter-spacing: 0; }
.to-plan__list { flex: 1; margin: 22px 0 26px; padding: 0; list-style: none; font-size: 15px; }
.to-plan__list li { display: flex; gap: 10px; padding-block: 6px; color: var(--to-soft); }
.to-plan__list li::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; border: 2px solid var(--to-aqua); }
.to-table-wrap { overflow-x: auto; border: var(--to-border); border-radius: var(--to-radius); }
.to-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.to-table th, .to-table td { padding: 14px 18px; border-bottom: var(--to-border); text-align: left; }
.to-table thead th { background: var(--to-panel-2); font-family: var(--to-display); font-weight: 600; }
.to-table tbody tr:last-child td { border-bottom: 0; }
.to-table td:first-child { color: var(--to-soft); }
.to-yes { color: var(--to-aqua); font-weight: 600; }
.to-no { color: var(--to-faint); }
.to-faq details { border-bottom: var(--to-border); }
.to-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-family: var(--to-display); font-size: 18px; font-weight: 600; list-style: none; cursor: pointer; }
.to-faq summary::-webkit-details-marker { display: none; }
.to-faq summary::after { content: "+"; color: var(--to-aqua); font-family: var(--to-mono); transition: transform .2s var(--to-ease); }
.to-faq details[open] summary::after { transform: rotate(45deg); }
.to-faq p { margin: 0 0 20px; color: var(--to-soft); }

/* Article */
.to-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--to-faint); font-size: var(--to-text-small); }
.to-meta span + span::before { content: "·"; margin-right: 8px; }
.to-author { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.to-author b { display: block; font-size: 15px; }
.to-author--card { margin-top: 48px; padding: 22px; border: var(--to-border); border-radius: var(--to-radius); background: var(--to-panel); }
.to-cover { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 320px; border: var(--to-border); border-radius: var(--to-radius-lg); background: radial-gradient(60% 80% at 80% 10%, var(--to-glow), transparent 70%), var(--to-well); }
.to-cover .to-orbit { max-width: 280px; }
.to-prose { font-size: 17px; line-height: 1.75; color: var(--to-text); }
.to-prose p { margin: 0 0 22px; }
.to-prose h2 { margin: 48px 0 14px; font-family: var(--to-display); font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.to-prose h3 { margin: 32px 0 10px; font-family: var(--to-display); font-size: 20px; font-weight: 600; }
.to-prose ul { margin: 0 0 22px; padding-left: 0; list-style: none; }
.to-prose li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.to-prose li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--to-sun); }
.to-prose code { padding: 2px 6px; border-radius: 5px; background: var(--to-panel-2); font-family: var(--to-mono); font-size: .88em; }
.to-prose pre { margin: 0 0 22px; padding: 18px; overflow-x: auto; border: var(--to-border); border-radius: var(--to-radius-sm); background: var(--to-well); font-family: var(--to-mono); font-size: 14px; line-height: 1.6; }
.to-prose pre code { padding: 0; background: none; }
.to-prose blockquote { margin: 32px 0; padding-left: 22px; border-left: 2px solid var(--to-aqua); font-family: var(--to-display); font-size: 23px; font-weight: 500; line-height: 1.4; letter-spacing: -.015em; }
.to-prose figure { margin: 32px 0; }
.to-prose figcaption { margin-top: 10px; color: var(--to-faint); font-size: var(--to-text-small); text-align: center; }
.to-callout { margin: 28px 0; padding: 18px 20px; border: 1px solid rgba(246, 196, 69, .35); border-radius: var(--to-radius-sm); background: var(--to-sun-soft); font-size: 16px; }
.to-callout b { color: var(--to-sun); }
.to-post { display: block; border: var(--to-border); border-radius: var(--to-radius); background: var(--to-panel); overflow: hidden; color: var(--to-text); text-decoration: none; }
.to .to-post { color: var(--to-text); }
.to-post:hover { border-color: var(--to-line-2); }
.to-post__thumb { height: 120px; background: radial-gradient(50% 90% at 85% 0%, var(--to-glow), transparent 70%), linear-gradient(var(--to-grid) 1px, transparent 1px), linear-gradient(90deg, var(--to-grid) 1px, transparent 1px), var(--to-well); background-size: 100% 100%, 24px 24px, 24px 24px, 100% 100%; border-bottom: var(--to-border); }
.to-post__body { padding: 20px; }
.to-post__body h3 { margin: 6px 0 8px; font-family: var(--to-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.to-post__body p { margin: 0; color: var(--to-soft); font-size: 15px; }

/* Forms */
.to-form { display: grid; gap: 18px; }
.to-field { display: grid; gap: 7px; }
.to-label { font-size: var(--to-text-small); font-weight: 600; }
.to-input, .to-select { width: 100%; padding: 12px 14px; border: 1px solid var(--to-line-2); border-radius: var(--to-radius-sm); background: var(--to-well); color: var(--to-text); font: 400 16px var(--to-sans); transition: border-color .2s var(--to-ease), box-shadow .2s var(--to-ease); }
.to-input::placeholder { color: var(--to-faint); }
.to-input:focus, .to-select:focus { outline: none; border-color: var(--to-aqua); box-shadow: var(--to-ring); }
.to-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--to-soft) 50%), linear-gradient(135deg, var(--to-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.to-input-wrap { position: relative; }
.to-input-wrap .to-input { padding-right: 70px; }
.to-input-toggle { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); border: 0; background: none; color: var(--to-aqua); font: 600 13px var(--to-sans); cursor: pointer; }
.to-help { color: var(--to-faint); font-size: 13px; }
.to-error { color: var(--to-red); font-size: 13px; }
.to-field--error .to-input { border-color: var(--to-red); }
.to-check { display: flex; align-items: flex-start; gap: 10px; color: var(--to-soft); font-size: var(--to-text-small); }
.to-check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--to-aqua); }
.to-split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.to-btn--social { border: 1px solid var(--to-line-2); background: var(--to-panel); color: var(--to-text); font-weight: 500; }
.to .to-btn--social { color: var(--to-text); }
.to-btn__letter { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--to-panel-2); font-size: 12px; font-weight: 700; }
.to-divider-text { display: flex; align-items: center; gap: 14px; color: var(--to-faint); font-size: 13px; }
.to-divider-text::before, .to-divider-text::after { content: ""; flex: 1; height: 1px; background: var(--to-line); }

/* Footer */
.to-footer { padding-block: 56px 32px; border-top: var(--to-border); background: var(--to-well); }
.to-footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.to-footer h4 { margin: 0 0 12px; color: var(--to-faint); font-family: var(--to-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.to-footer ul { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.to-footer li { padding-block: 4px; }
.to-footer li a { color: var(--to-soft); text-decoration: none; }
.to-footer li a:hover { color: var(--to-aqua); }
.to-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: var(--to-border); color: var(--to-faint); font-size: 13px; }
@media (max-width: 760px) { .to-footer__cols { grid-template-columns: 1fr 1fr; } }

/* Motion */
.to-fade { animation: to-fade .9s var(--to-ease) both; }
@keyframes to-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.to-spin { transform-origin: center; animation: to-spin 60s linear infinite; }
@keyframes to-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .to-fade, .to-spin { animation: none; } }
