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

/* Base */
.ts { margin: 0; background: var(--ts-white); color: var(--ts-ink); font-family: var(--ts-sans); font-size: var(--ts-text-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.ts *, .ts *::before, .ts *::after { box-sizing: border-box; }
:where(.ts) a { color: inherit; }
.ts-container { width: min(100% - 32px, var(--ts-container)); margin-inline: auto; }
.ts-narrow { width: min(100% - 32px, var(--ts-narrow)); margin-inline: auto; }
.ts-section { padding-block: var(--ts-section); }
.ts-section--rail { background: var(--ts-rail); border-block: var(--ts-border); }
.ts-divider { height: 1px; margin: 0; border: 0; background: var(--ts-line); }

/* Type: heavy Archivo for headings, plain Work Sans for everything else */
.ts-hero-title, .ts-h2, .ts-h3 { margin: 0; font-family: var(--ts-head); color: inherit; }
.ts-hero-title { font-size: var(--ts-text-hero); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; }
.ts-h2 { font-size: var(--ts-text-h2); font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.ts-h3 { font-size: var(--ts-text-h3); font-weight: 600; line-height: 1.25; }
.ts-lead { max-width: 620px; margin: 10px 0 0; color: var(--ts-soft); font-size: var(--ts-text-lead); line-height: 1.5; }
.ts-eyebrow { display: block; margin-bottom: 8px; color: var(--ts-soft); font-size: var(--ts-text-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ts-mono { font-family: var(--ts-mono); font-size: var(--ts-text-small); }
.ts-link { color: var(--ts-coral); text-decoration: underline; text-underline-offset: 2px; }
.ts-link:hover { color: var(--ts-coral-dark); }

/* Section head: heading plus a small outlined "View all" button on one line */
.ts-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: var(--ts-gap); }

/* Top bar: logo, nav, a wide search, Log in and Register */
.ts-topbar { position: sticky; top: 0; z-index: 10; height: var(--ts-topbar); background: var(--ts-white); border-bottom: var(--ts-border); }
.ts-topbar__in { display: flex; align-items: center; gap: 22px; height: 100%; padding-inline: 16px; }
.ts-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ts-head); font-size: 20px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.ts-logo__mark { position: relative; width: 26px; height: 22px; border-radius: var(--ts-radius-sm); background: var(--ts-ink); }
.ts-logo__mark::before { content: ""; position: absolute; inset: 5px 5px auto; height: 4px; background: repeating-linear-gradient(90deg, var(--ts-white) 0 3px, transparent 3px 6px); }
.ts-logo__mark::after { content: ""; position: absolute; left: 5px; right: 5px; bottom: 4px; height: 5px; border-radius: 0 0 6px 6px; background: var(--ts-coral); }
.ts-nav { display: flex; gap: 20px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ts-nav a { text-decoration: none; }
.ts-nav a:hover { color: var(--ts-coral); }
.ts-search { flex: 1; min-width: 0; max-width: 340px; margin-left: auto; padding: 7px 12px; border: var(--ts-border); border-radius: var(--ts-radius); background: var(--ts-rail); color: var(--ts-ink); font: 14px var(--ts-sans); }
.ts-topbar__auth { display: flex; gap: 8px; }

/* Shell: a fixed-width directory sidebar beside the main column */
.ts-shell { display: grid; grid-template-columns: var(--ts-sidebar) minmax(0, 1fr); min-height: calc(100vh - var(--ts-topbar)); }
.ts-sidebar { padding: 18px 16px 28px; background: var(--ts-rail); border-right: var(--ts-border); font-size: var(--ts-text-small); }
.ts-sidebar__title { margin: 22px 0 8px; font-size: var(--ts-text-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ts-soft); }
.ts-sidebar > .ts-sidebar__title:first-child { margin-top: 0; }
.ts-sidebar__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
.ts-sidebar__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ts-sidebar a { text-decoration: none; }
.ts-sidebar a:hover { color: var(--ts-coral); }
.ts-sidebar__age { float: right; color: var(--ts-faint); font-family: var(--ts-mono); font-size: var(--ts-text-micro); }
.ts-main { min-width: 0; }

/* Intro strip: one plain sentence and two coral links, on white */
.ts-intro { padding: 12px 24px; border-bottom: var(--ts-border); font-size: 14px; }
.ts-intro strong { font-weight: 600; }

/* Buttons: small radius, solid fill and a 2px pressed lip. Coral only for the one main action */
.ts-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid transparent; border-radius: var(--ts-radius); font: 600 14px var(--ts-sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.ts-btn:active { transform: translateY(1px); box-shadow: none; }
.ts-btn--primary { background: var(--ts-coral); color: var(--ts-white); box-shadow: var(--ts-lip); }
.ts-btn--primary:hover { background: var(--ts-coral-dark); }
.ts-btn--plain { background: var(--ts-white); border-color: var(--ts-line); color: var(--ts-ink); box-shadow: inset 0 -2px 0 var(--ts-rail-2); }
.ts-btn--plain:hover { background: var(--ts-rail); }
.ts-btn--outline { background: transparent; border: 2px solid currentColor; padding: 8px 15px; }
.ts-btn--outline:hover { background: rgba(255, 255, 255, .08); }
.ts-btn--coral-outline { background: transparent; border: 1px solid var(--ts-coral); color: var(--ts-coral); padding: 4px 10px; font-size: 13px; }
.ts-btn--coral-outline:hover { background: var(--ts-coral-soft); }
.ts-btn--sm { padding: 6px 12px; font-size: 13px; }
.ts-btn--block { width: 100%; }
.ts-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }

/* Spotlight band: slate, with a framed cover on the left and plain copy on the right */
.ts-spotlight { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 24px; background: var(--ts-slate); color: var(--ts-white); }
.ts-spotlight__frame { box-shadow: var(--ts-frame); border-radius: var(--ts-radius-sm); }
.ts-spotlight .ts-lead { color: rgba(255, 255, 255, .74); }
.ts-spotlight .ts-eyebrow { color: rgba(255, 255, 255, .6); }
.ts-spotlight__tags { margin-top: 12px; color: rgba(255, 255, 255, .6); font-size: var(--ts-text-small); }
.ts-spotlight__close { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border: 0; border-radius: var(--ts-radius-sm); background: var(--ts-white); color: var(--ts-ink); font: 600 16px/26px var(--ts-sans); cursor: pointer; }

/* Covers: drawn with gradients only, 4:3. Pick a print modifier and a paint */
.ts-cover { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--ts-radius-sm); background-color: var(--ts-paint-1); }
.ts-cover--stripe { background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 10px, transparent 10px 24px); }
.ts-cover--check { background-image: linear-gradient(90deg, rgba(32, 33, 37, .16) 50%, transparent 50%), linear-gradient(rgba(32, 33, 37, .16) 50%, transparent 50%); background-size: 28px 28px; }
.ts-cover--dots { background-image: radial-gradient(rgba(32, 33, 37, .5) 2.5px, transparent 3px); background-size: 16px 16px; }
.ts-cover--wave { background-image: radial-gradient(circle at 50% 120%, transparent 14px, rgba(255, 255, 255, .5) 15px 19px, transparent 20px); background-size: 34px 22px; }
.ts-cover--grid { background-image: linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px); background-size: 20px 20px; }
.ts-cover--plaid { background-image: repeating-linear-gradient(0deg, rgba(32, 33, 37, .14) 0 6px, transparent 6px 22px), repeating-linear-gradient(90deg, rgba(239, 81, 87, .28) 0 6px, transparent 6px 22px); }
.ts-cover--p2 { background-color: var(--ts-paint-2); }
.ts-cover--p3 { background-color: var(--ts-paint-3); }
.ts-cover--p4 { background-color: var(--ts-paint-4); }
.ts-cover--p5 { background-color: var(--ts-paint-5); }
/* The pattern piece: a white paper cut-out with a dashed seam line, laid on the print */
.ts-piece { position: absolute; left: 50%; top: 52%; width: 44%; aspect-ratio: 1 / 1.15; transform: translate(-50%, -50%) rotate(-6deg); background: var(--ts-white); clip-path: polygon(22% 0, 78% 0, 100% 24%, 88% 100%, 12% 100%, 0 24%); }
.ts-piece::after { content: ""; position: absolute; left: 50%; top: 20%; bottom: 16%; border-left: 1.5px dashed var(--ts-faint); }
.ts-piece::before { content: ""; position: absolute; left: calc(50% - 4px); top: 18%; border: 4px solid transparent; border-bottom: 6px solid var(--ts-faint); border-top: 0; }
.ts-piece--skirt { clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.ts-piece--sleeve { clip-path: polygon(50% 0, 100% 30%, 86% 100%, 14% 100%, 0 30%); }
.ts-cover__label { position: absolute; left: 8px; bottom: 8px; padding: 2px 6px; background: var(--ts-ink); color: var(--ts-white); font: 500 var(--ts-text-micro) var(--ts-mono); }

/* Shelf: the dense grid of cover cards */
.ts-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px var(--ts-gap); }
.ts-card { min-width: 0; text-decoration: none; }
.ts-card .ts-cover { outline: 1px solid rgba(32, 33, 37, .08); }
.ts-card:hover .ts-cover { outline: 3px solid var(--ts-coral); }
.ts-card__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ts-card__title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.ts-card__tags { margin-top: 2px; color: var(--ts-coral); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-card__desc { margin: 2px 0 0; color: var(--ts-soft); font-size: 12px; line-height: 1.4; }
.ts-card__by { margin-top: 2px; color: var(--ts-soft); font-size: 12px; }

/* Price tag: a dark mono chip. --free is outlined, --sale is mustard */
.ts-price { flex: none; padding: 1px 6px; border-radius: var(--ts-radius-sm); background: var(--ts-ink); color: var(--ts-white); font: 500 12px/1.6 var(--ts-mono); }
.ts-price--free { background: transparent; border: 1px solid var(--ts-ink); color: var(--ts-ink); padding: 0 5px; }
.ts-price--sale { background: var(--ts-mustard); color: var(--ts-ink); }
.ts-tag { display: inline-block; padding: 2px 8px; border: var(--ts-border); border-radius: 99px; background: var(--ts-white); font-size: 12px; text-decoration: none; }
.ts-tag:hover { border-color: var(--ts-coral); color: var(--ts-coral); }
.ts-badge { display: inline-block; padding: 1px 6px; border-radius: var(--ts-radius-sm); background: var(--ts-coral-soft); color: var(--ts-coral-dark); font-size: var(--ts-text-micro); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ts-badge--moss { background: #e1f0e6; color: var(--ts-moss); }

/* Table: swaps, fees, comparisons. Rail header, 1px rows */
.ts-table { width: 100%; border: var(--ts-border); border-collapse: collapse; font-size: 14px; }
.ts-table th { padding: 8px 12px; background: var(--ts-rail); border-bottom: var(--ts-border); color: var(--ts-soft); font-size: var(--ts-text-micro); font-weight: 600; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.ts-table td { padding: 10px 12px; border-bottom: var(--ts-border); vertical-align: top; }
.ts-table tr:last-child td { border-bottom: 0; }
.ts-table-wrap { overflow-x: auto; }

/* Panel: a white box with a 1px line, used for forms, plans and side notes */
.ts-panel { padding: 20px; border: var(--ts-border); border-radius: var(--ts-radius); background: var(--ts-white); }
.ts-panel--rail { background: var(--ts-rail); }

/* Forms: plain labels above plain fields */
.ts-field { display: grid; gap: 5px; margin-bottom: 14px; }
.ts-label { font-size: 13px; font-weight: 600; }
.ts-hint { color: var(--ts-soft); font-size: 12px; }
.ts-input, .ts-select, .ts-textarea { width: 100%; padding: 9px 11px; border: var(--ts-border); border-radius: var(--ts-radius); background: var(--ts-white); color: var(--ts-ink); font: 15px var(--ts-sans); }
.ts-input:focus, .ts-select:focus, .ts-textarea:focus { outline: 2px solid var(--ts-coral); outline-offset: -1px; border-color: transparent; }
.ts-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.ts-check input { margin-top: 4px; accent-color: var(--ts-coral); }
.ts-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ts-choice label { display: block; padding: 10px 12px; border: var(--ts-border); border-radius: var(--ts-radius); font-size: 14px; cursor: pointer; }
.ts-choice input { accent-color: var(--ts-coral); }
.ts-choice label:has(input:checked) { border-color: var(--ts-coral); background: var(--ts-coral-soft); }

/* Tabs: underlined coral for the current one */
.ts-tabs { display: flex; gap: 22px; border-bottom: var(--ts-border); font-size: 14px; font-weight: 600; overflow-x: auto; }
.ts-tabs a, .ts-tabs button { padding: 10px 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ts-soft); font: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; }
.ts-tabs [aria-current="page"], .ts-tabs [aria-pressed="true"] { border-color: var(--ts-coral); color: var(--ts-ink); }

/* Pricing: plain columns with a top rule. The picked one gets a coral top rule */
.ts-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ts-gap); }
.ts-plan { display: flex; flex-direction: column; padding: 20px; border: var(--ts-border); border-top: 4px solid var(--ts-ink); border-radius: var(--ts-radius); background: var(--ts-white); }
.ts-plan--pick { border-top-color: var(--ts-coral); }
.ts-plan__price { margin: 12px 0 2px; font: 800 36px/1 var(--ts-head); letter-spacing: -.02em; }
.ts-plan__price small { color: var(--ts-soft); font: 500 13px var(--ts-sans); letter-spacing: 0; }
.ts-plan__list { display: grid; gap: 7px; margin: 16px 0 20px; padding: 0; list-style: none; font-size: 14px; }
.ts-plan__list li::before { content: "+ "; color: var(--ts-coral); font-family: var(--ts-mono); font-weight: 500; }
.ts-plan .ts-btn { margin-top: auto; }

/* Share slider: the seller picks the cut */
.ts-range { width: 100%; accent-color: var(--ts-coral); }
.ts-split { display: flex; height: 26px; overflow: hidden; border-radius: var(--ts-radius-sm); font: 500 12px/26px var(--ts-mono); }
.ts-split__you { background: var(--ts-ink); color: var(--ts-white); padding-left: 8px; white-space: nowrap; }
.ts-split__us { flex: 1; background: var(--ts-coral); color: var(--ts-white); padding-left: 8px; white-space: nowrap; overflow: hidden; }

/* Article: a narrow column on white, with a byline row and a rail note box */
.ts-article { font-size: 17px; line-height: 1.7; }
.ts-article h2 { margin: 34px 0 10px; font: 800 24px/1.2 var(--ts-head); letter-spacing: -.01em; }
.ts-article p { margin: 0 0 18px; }
.ts-article blockquote { margin: 26px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--ts-coral); font-family: var(--ts-head); font-size: 21px; font-weight: 600; line-height: 1.4; }
.ts-article code { padding: 1px 5px; border-radius: var(--ts-radius-sm); background: var(--ts-rail); font: 500 14px var(--ts-mono); }
.ts-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; color: var(--ts-soft); font-size: 13px; }
.ts-avatar { width: 30px; height: 30px; border-radius: var(--ts-radius-sm); background: var(--ts-paint-3); }
.ts-note { margin: 24px 0; padding: 14px 16px; border: var(--ts-border); border-left: 4px solid var(--ts-mustard); background: var(--ts-rail); font-size: 15px; }

/* Comments: a flat list with a rail avatar square */
.ts-comment { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px 0; border-top: var(--ts-border); font-size: 14px; }
.ts-comment p { margin: 4px 0 0; }

/* Footer: slate, small, link columns */
.ts-footer { padding: 28px 24px; background: var(--ts-slate); color: rgba(255, 255, 255, .7); font-size: 13px; }
.ts-footer a { color: var(--ts-white); text-decoration: none; }
.ts-footer a:hover { text-decoration: underline; }
.ts-footer .ts-logo { color: var(--ts-white); font-size: 16px; }
.ts-footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ts-footer__cols ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.ts-footer__base { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14); }

/* Phone: the sidebar folds under the top bar as a scrolling chip row */
@media (max-width: 900px) {
  .ts-nav { display: none; }
  .ts-shell { grid-template-columns: minmax(0, 1fr); }
  .ts-sidebar { min-width: 0; }
  .ts-sidebar { padding: 10px 16px; border-right: 0; border-bottom: var(--ts-border); }
  .ts-sidebar__more { display: none; }
  .ts-sidebar__grid { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
  .ts-sidebar__grid li { flex: none; }
  .ts-sidebar__grid a { display: block; padding: 3px 10px; border: var(--ts-border); border-radius: 99px; background: var(--ts-white); white-space: nowrap; }
  .ts-spotlight { grid-template-columns: minmax(0, 1fr); padding: 24px 16px; }
  .ts-plans { grid-template-columns: 1fr; }
  .ts-footer__cols { grid-template-columns: 1fr 1fr; }
  .ts-intro { padding-inline: 16px; }
}
@media (max-width: 560px) {
  .ts-search { display: none; }
  .ts-topbar__auth { margin-left: auto; }
  .ts-topbar__auth .ts-btn--plain { display: none; }
  .ts-shelf { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .ts-choice { grid-template-columns: 1fr; }
}
