/*
 * Patch Salad: components
 * Every value comes from tokens.css. Load tokens.css first, then this file.
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ps-coal);
  color: var(--ps-chalk);
  font-family: var(--ps-sans);
  font-size: var(--ps-text-body);
  line-height: 1.55;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ps-mint); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }

/* Layout */
.ps-wrap { max-width: var(--ps-container); margin: 0 auto; padding: 0 var(--ps-gutter); }
.ps-narrow { max-width: var(--ps-narrow); }
.ps-section { padding: var(--ps-section) 0; }
.ps-section--pit { background: var(--ps-pit); }
.ps-section--coal { background: var(--ps-coal); }
.ps-section + .ps-section--coal, .ps-section--pit + .ps-section--coal { border-top: 0; }
.ps-rule { border: 0; border-top: var(--ps-border); margin: 0; }

/* Nav: thin charcoal bar, mono logo, caret menus, mint register button */
.ps-nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--ps-coal);
  border-bottom: 4px solid var(--ps-slab);
}
.ps-nav__in { display: flex; align-items: center; gap: 28px; height: 44px; max-width: var(--ps-container); margin: 0 auto; padding: 0 var(--ps-gutter); }
.ps-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ps-mono); font-size: 16px; color: var(--ps-chalk); letter-spacing: .02em; }
.ps-logo:hover { text-decoration: none; }
.ps-logo svg { width: 22px; height: 22px; }
.ps-nav__links { display: flex; gap: 22px; }
.ps-nav__links a { color: var(--ps-chalk); font-weight: 500; font-size: 16px; }
.ps-nav__links a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.ps-nav__links a:hover { color: var(--ps-mint); text-decoration: none; }
.ps-nav__end { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.ps-nav__end > a:not(.ps-btn) { color: var(--ps-chalk); font-weight: 500; }
@media (max-width: 760px) {
  .ps-nav__links { display: none; }
  .ps-nav__end { gap: 14px; }
}

/* Buttons: small, square-ish, flat */
.ps-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 16px; border: 0; border-radius: var(--ps-radius-sm);
  font: 500 15px/1.3 var(--ps-sans); white-space: nowrap; cursor: pointer;
  transition: background .15s var(--ps-ease);
}
.ps-btn:hover { text-decoration: none; }
.ps-btn--mint { background: var(--ps-mint); color: var(--ps-mint-ink); }
.ps-btn--mint:hover { background: var(--ps-mint-dark); }
.ps-btn--slab { background: var(--ps-slab-2); color: var(--ps-chalk); }
.ps-btn--slab:hover { background: var(--ps-ash); }
.ps-btn--ghost { background: transparent; color: var(--ps-chalk); box-shadow: inset 0 0 0 1px var(--ps-line); }
.ps-btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ps-fog); }
.ps-btn--lg { padding: 10px 22px; font-size: 16px; }
.ps-btn--block { width: 100%; }

/* Type */
.ps-hero-title, .ps-h2, .ps-h3 { font-weight: var(--ps-weight-head); letter-spacing: var(--ps-tracking-head); margin: 0; }
.ps-hero-title { font-size: var(--ps-text-hero); line-height: 1.38; }
.ps-h2 { font-size: var(--ps-text-h2); line-height: 1.15; margin-bottom: 20px; }
.ps-h3 { font-size: var(--ps-text-h3); font-weight: 400; line-height: 1.25; margin-bottom: 8px; }
.ps-title { font-family: var(--ps-cond); font-weight: 600; font-size: var(--ps-text-title); text-transform: uppercase; letter-spacing: var(--ps-tracking-caps); line-height: 1.15; margin: 0; }
.ps-lead { font-size: var(--ps-text-lead); color: var(--ps-fog); max-width: 640px; }
.ps-small { font-size: var(--ps-text-small); color: var(--ps-fog); }
.ps-label { font-family: var(--ps-mono); font-size: var(--ps-text-micro); text-transform: uppercase; letter-spacing: .08em; color: var(--ps-fog); }
.ps-mint { color: var(--ps-mint); }
.ps-strong { font-weight: 600; color: var(--ps-chalk); }

/* Slab headline: each line sits on its own dark slab, the signature move */
.ps-slabs { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.ps-slab {
  display: inline-block; background: var(--ps-slab); padding: var(--ps-slab-pad);
  font-weight: var(--ps-weight-head); line-height: 1.12;
}
.ps-slab--mint { color: var(--ps-mint); }
.ps-slab--inline { display: inline; padding: .08em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.6; }

/* Hero: pitch black stage with slabs top left and a patch on the right */
.ps-hero { background: var(--ps-pit); padding: 56px 0 64px; overflow: hidden; }
.ps-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.ps-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 900px) { .ps-hero__grid { grid-template-columns: 1fr; } }

/* Patch: a stage of op boxes wired with SVG cables */
.ps-patch { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--ps-pit); background-image: radial-gradient(var(--ps-line) 1px, transparent 1px); background-size: 22px 22px; border: var(--ps-border); border-radius: var(--ps-radius); overflow: hidden; }
.ps-patch__cables { position: absolute; inset: 0; width: 100%; height: 100%; }
.ps-patch__cables path { fill: none; stroke-width: var(--ps-cable); }
.ps-cable--teal { stroke: var(--ps-port-teal); }
.ps-cable--sun { stroke: var(--ps-port-sun); }
.ps-cable--rose { stroke: var(--ps-port-rose); }
.ps-cable--mint { stroke: var(--ps-mint); stroke-dasharray: 6 5; animation: ps-flow 1.2s linear infinite; }
@keyframes ps-flow { to { stroke-dashoffset: -22; } }
.ps-op {
  position: absolute; min-width: 92px; padding: 7px 10px 6px;
  background: var(--ps-slab); border-radius: 2px;
  font-family: var(--ps-sans); font-size: 12px; font-weight: 500; color: var(--ps-chalk); white-space: nowrap;
  transform: translate(-50%, -50%);
}
.ps-op small { display: block; font-family: var(--ps-mono); font-size: 9px; color: var(--ps-dim); font-weight: 400; }
.ps-op__ports { position: absolute; left: 0; right: 0; display: flex; gap: 3px; padding: 0 4px; }
.ps-op__ports--in { top: 0; }
.ps-op__ports--out { bottom: 0; }
.ps-op__ports i { display: block; width: 12px; height: var(--ps-port); background: var(--ps-dim); }
.ps-op__ports--in i { height: 4px; }
.ps-op__ports i.t { background: var(--ps-port-teal); }
.ps-op__ports i.s { background: var(--ps-port-sun); }
.ps-op__ports i.r { background: var(--ps-port-rose); }
.ps-op__ports i.m { background: var(--ps-mint); }
.ps-op--live { box-shadow: inset 3px 0 0 var(--ps-mint); }
.ps-op--main { box-shadow: inset -4px 0 0 var(--ps-port-sun); }
@media (prefers-reduced-motion: reduce) { .ps-cable--mint { animation: none; } }

/* Two column intro block with grey callout panel */
.ps-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .ps-split { grid-template-columns: 1fr; gap: 32px; } }
.ps-callout { background: var(--ps-ash); border-radius: var(--ps-radius); padding: 18px 20px 22px; text-align: center; }
.ps-callout__title { font-size: 20px; font-weight: 300; margin: 0 0 6px; }
.ps-callout__title b { font-weight: 600; }
.ps-callout p { font-weight: 500; margin-bottom: 14px; }

/* Feature tiles */
.ps-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .ps-tiles { grid-template-columns: 1fr; } }
.ps-tile { background: var(--ps-slab); border-radius: var(--ps-radius-sm); padding: 22px 20px 20px; position: relative; }
.ps-tile::before { content: ""; position: absolute; top: 0; left: 14px; width: 26px; height: var(--ps-port); background: var(--ps-port-teal); }
.ps-tile--sun::before { background: var(--ps-port-sun); }
.ps-tile--rose::before { background: var(--ps-port-rose); }
.ps-tile p { color: var(--ps-fog); margin: 0; }

/* Gallery cards: screen, avatar, uppercase title, mint author, counts */
.ps-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .ps-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ps-cards { grid-template-columns: 1fr; } }
.ps-card__screen { aspect-ratio: 16 / 9; background: var(--ps-pit); overflow: hidden; position: relative; }
.ps-card__screen--light { background: var(--ps-chalk); }
.ps-card__screen--ash { background: var(--ps-ash); }
.ps-card__meta { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0 0; }
.ps-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ps-slab-2); display: grid; place-items: center; font-family: var(--ps-mono); font-size: 12px; color: var(--ps-chalk); }
.ps-avatar--mint { background: var(--ps-mint); color: var(--ps-mint-ink); }
.ps-avatar--sun { background: var(--ps-port-sun); color: var(--ps-mint-ink); }
.ps-avatar--rose { background: var(--ps-port-rose); color: var(--ps-mint-ink); }
.ps-card__by { font-size: 12px; color: var(--ps-fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-card__by a { color: var(--ps-mint); }
.ps-counts { display: flex; gap: 10px; font-size: 14px; color: var(--ps-chalk); }
.ps-counts span { display: inline-flex; align-items: center; gap: 3px; }
.ps-counts svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* Badges */
.ps-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--ps-radius-sm); background: var(--ps-slab-2); font-family: var(--ps-mono); font-size: var(--ps-text-micro); text-transform: uppercase; letter-spacing: .06em; color: var(--ps-chalk); white-space: nowrap; }
.ps-badge--mint { background: var(--ps-mint); color: var(--ps-mint-ink); }
.ps-badge::before { content: ""; width: 6px; height: 6px; background: currentColor; }

/* Section heading centered like a gallery wall */
.ps-center { text-align: center; }
.ps-wall-title { font-size: var(--ps-text-h2); font-weight: var(--ps-weight-head); text-align: center; margin: 0 0 24px; }

/* Forms */
.ps-form { display: grid; gap: 16px; }
.ps-field { display: grid; gap: 6px; }
.ps-field label { font-size: var(--ps-text-small); font-weight: 500; color: var(--ps-chalk); }
.ps-input, .ps-select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-sm);
  background: var(--ps-pit); color: var(--ps-chalk); font: 400 15px var(--ps-sans);
}
.ps-input::placeholder { color: var(--ps-dim); }
.ps-input:focus, .ps-select:focus { outline: none; border-color: var(--ps-mint); box-shadow: inset 3px 0 0 var(--ps-mint); }
.ps-hint { font-size: 12px; color: var(--ps-dim); }
.ps-check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--ps-text-small); color: var(--ps-fog); }
.ps-check input { accent-color: var(--ps-mint); margin-top: 3px; }
.ps-panel { background: var(--ps-slab); border-radius: var(--ps-radius); padding: 28px; }

/* Pricing */
.ps-toggle { display: inline-flex; background: var(--ps-slab); border-radius: var(--ps-radius-sm); padding: 3px; gap: 3px; }
.ps-toggle button { border: 0; background: transparent; color: var(--ps-fog); font: 500 14px var(--ps-sans); padding: 5px 14px; border-radius: 2px; cursor: pointer; white-space: nowrap; }
.ps-toggle button[aria-pressed="true"] { background: var(--ps-mint); color: var(--ps-mint-ink); }
.ps-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
@media (max-width: 900px) { .ps-plans { grid-template-columns: 1fr; } }
.ps-plan { background: var(--ps-slab); border-radius: var(--ps-radius-sm); padding: 26px 22px 24px; display: flex; flex-direction: column; position: relative; }
.ps-plan::before { content: ""; position: absolute; top: 0; left: 16px; width: 30px; height: var(--ps-port); background: var(--ps-dim); }
.ps-plan--featured { background: var(--ps-slab-2); box-shadow: inset 0 0 0 1px var(--ps-mint); }
.ps-plan--featured::before { background: var(--ps-mint); }
.ps-plan__price { font-size: 46px; font-weight: 300; line-height: 1; margin: 18px 0 4px; }
.ps-plan__price small { font-size: 15px; color: var(--ps-fog); font-weight: 400; }
.ps-plan__desc { color: var(--ps-fog); font-size: 14px; margin: 8px 0 0; }
.ps-plan__list { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 9px; font-size: 14px; flex: 1; }
.ps-plan__list li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; }
.ps-plan__list li::before { content: ""; width: 10px; height: 4px; margin-top: 8px; background: var(--ps-mint); }
.ps-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ps-table th, .ps-table td { padding: 11px 10px; border-bottom: var(--ps-border); text-align: left; }
.ps-table th { font-family: var(--ps-cond); font-weight: 600; text-transform: uppercase; letter-spacing: var(--ps-tracking-caps); color: var(--ps-fog); }
.ps-table td:not(:first-child), .ps-table th:not(:first-child) { text-align: center; }
.ps-scroll-x { overflow-x: auto; }

/* FAQ */
.ps-faq details { border-bottom: var(--ps-border); padding: 16px 0; }
.ps-faq summary { cursor: pointer; font-size: 17px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.ps-faq summary::after { content: "+"; font-family: var(--ps-mono); color: var(--ps-mint); }
.ps-faq details[open] summary::after { content: "-"; }
.ps-faq p { color: var(--ps-fog); margin: 10px 0 0; }

/* Article */
.ps-article { max-width: var(--ps-narrow); margin: 0 auto; }
.ps-article__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 22px 0 32px; }
.ps-article h2 { font-size: 28px; font-weight: 300; margin: 44px 0 14px; }
.ps-article p, .ps-article li { font-size: 17px; line-height: 1.7; color: var(--ps-chalk); }
.ps-article ul { padding-left: 20px; }
.ps-article blockquote { margin: 32px 0; padding: 0; font-size: 24px; font-weight: 300; line-height: 1.4; }
.ps-article blockquote span { background: var(--ps-slab); padding: .08em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ps-code { background: var(--ps-pit); border: var(--ps-border); border-radius: var(--ps-radius-sm); padding: 16px 18px; font-family: var(--ps-mono); font-size: 13px; line-height: 1.7; color: var(--ps-fog); overflow-x: auto; white-space: pre; }
.ps-code b { color: var(--ps-mint); font-weight: 400; }
.ps-figure { margin: 32px 0; }
.ps-figure figcaption { font-size: 13px; color: var(--ps-dim); margin-top: 8px; font-family: var(--ps-mono); }

/* Footer */
.ps-footer { background: var(--ps-pit); border-top: 4px solid var(--ps-slab); padding: 48px 0 28px; font-size: 14px; }
.ps-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .ps-footer__grid { grid-template-columns: 1fr 1fr; } }
.ps-footer h4 { font-family: var(--ps-cond); font-weight: 600; text-transform: uppercase; letter-spacing: var(--ps-tracking-caps); font-size: 14px; margin: 0 0 10px; color: var(--ps-fog); }
.ps-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ps-footer a { color: var(--ps-chalk); }
.ps-footer__base { margin-top: 36px; padding-top: 18px; border-top: var(--ps-border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ps-dim); font-size: 13px; }

/* Bottom notice strip (cookie or announcement) */
.ps-strip { background: var(--ps-pit); border-top: var(--ps-border); padding: 14px var(--ps-gutter); text-align: center; font-size: 14px; color: var(--ps-chalk); }
.ps-strip b { font-weight: 600; }
