/* ============================================
   SIGMASIX Apps — Stylesheet
   ============================================ */

/* ============ FONTS ============ */
@font-face {
  font-family: 'Rational';
  src: url('fonts/Rational-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rational';
  src: url('fonts/Rational-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rational';
  src: url('fonts/Rational-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Rational';
  src: url('fonts/Rational-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rational Mono';
  src: url('fonts/Rational-Mono.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-soft2: #F4F4F4;
  --ink: #0A0A0A;
  --ink-soft: rgba(10, 10, 10, 0.55);
  --ink-quiet: rgba(10, 10, 10, 0.30);
  --rule: rgba(10, 10, 10, 0.12);
  --rule-strong: rgba(10, 10, 10, 0.22);
  --max: 1400px;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --font: 'Rational', Arial, Helvetica, sans-serif;
  --font-mono: 'Rational Mono', ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  font-weight: 400;
}

::selection { background: var(--ink); color: var(--bg); }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}

.site-header nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.wordmark {
  display: block;
  width: 110px;
  height: auto;
  color: var(--ink);
  transition: opacity 0.25s ease;
  flex-shrink: 0;
}
.wordmark:hover { opacity: 0.6; }
.wordmark svg {
  width: 100%;
  height: auto;
  display: block;
  fill: currentColor;
}

.nav-title {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}
.nav-title a { display: inline-block; transition: opacity 0.2s; }
.nav-title a:hover { opacity: 0.55; }
.nav-title .sep { color: var(--ink-quiet); margin: 0 0.5rem; font-weight: 400; }

.nav-meta {
  justify-self: end;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  display: flex;
  gap: 1.5rem;
}

/* ============ HERO (INDEX) ============ */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10rem var(--pad-x) 5rem;
}

.hero-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
}

.hero h1 {
  font-size: clamp(4rem, 13vw, 13rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0;
}

.hero h1 .dot {
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  background: var(--ink);
  border-radius: 50%;
  margin-left: 0.05em;
  transform: translateY(-0.05em);
}

.hero-text { padding-bottom: 1rem; }

.hero-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 28rem;
}

.hero-text p + p {
  margin-top: 1.4rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ============ APPS GRID (INDEX) ============ */
.apps {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x) 6rem;
  border-top: 1px solid var(--rule);
}

.apps-header {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 0.4s ease;
  min-height: 32rem;
}

.app:nth-child(2n) { border-right: none; }
.app:hover { background: var(--bg-soft); }

.app-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3rem;
}

.app-meta .num { font-variant-numeric: tabular-nums; }

.app-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 220px;
  margin: 0 auto 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.app:hover .app-icon { transform: scale(1.04); }

.app-icon svg {
  width: 100%; height: 100%;
  max-width: 200px; max-height: 200px;
}

.app-foot { margin-top: auto; }

.app-foot h2 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
  line-height: 1;
}

.app-foot .description {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
  max-width: 26rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cta::after { content: "→"; font-weight: 400; }
.cta:hover { gap: 1rem; }

/* ============ APP DETAIL — HERO ============ */
.app-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9rem var(--pad-x) 4rem;
}

.hero-grid + .hero-grid { /* prevent collision if reused */ }

.app-hero .hero-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero-left { display: flex; flex-direction: column; }

.hero-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 2rem;
  color: var(--ink);
}
.hero-icon svg { width: 100%; height: 100%; }

.app-hero h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 28rem;
  margin-bottom: 2.5rem;
}

.specs-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.specs-inline span {
  position: relative;
  padding-left: 1rem;
}
.specs-inline span::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--ink-quiet);
}
.specs-inline span:first-child { padding-left: 0; }
.specs-inline span:first-child::before { display: none; }

/* ============ BUY BUTTONS ============ */
.ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  max-width: 30rem;
}

.ctas:has(> .btn:only-child) {
  grid-template-columns: 1fr;
  max-width: 18rem;
}

.btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--ink);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: #222; }

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--bg-soft); }

.btn .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn .icon svg { width: 100%; height: 100%; }

.btn .text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  flex: 1;
}

.btn .top {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.7;
  margin-bottom: 0.2rem;
}

.btn .bot {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.price-note {
  margin-top: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============ APP DETAIL — HERO SHOT ============ */
.hero-shot {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.hero-shot::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
}

.hero-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95);
}

.shot-tag {
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 2;
  background: var(--bg);
  padding: 0.4rem 0.7rem;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
}

/* ============ SECTIONS COMMON ============ */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) var(--pad-x);
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: baseline;
  margin-bottom: 4rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.section-head h2 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.section-head .label-num { align-self: center; }

.section-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 30rem;
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.about-grid .body p {
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 36rem;
}
.about-grid .body p + p { margin-top: 1.25rem; }

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.feature {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
}
.feature:last-child { border-right: none; }

.feature .num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 2.5rem;
  display: block;
}

.feature h3 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
  line-height: 1.15;
}

.feature p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ============ GALLERY ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.shot {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
}

.shot::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px var(--rule);
  pointer-events: none;
}

.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.shot:hover img { transform: scale(1.02); }

.shot-empty {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}
.shot-empty span {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  background: var(--bg);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule);
}

.shot-caption {
  position: absolute;
  bottom: 1rem; left: 1rem;
  z-index: 2;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rule);
}

/* ============ REQUIREMENTS ============ */
.req-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.req-row {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.req-row .key {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.req-row .value {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ============ CTA BOTTOM ============ */
.cta-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) var(--pad-x);
  border-top: 1px solid var(--rule);
  text-align: center;
}

.cta-bottom .label { display: block; margin-bottom: 1.5rem; }

.cta-bottom h2 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 3rem;
}

.cta-bottom .ctas { margin: 0 auto 1.5rem; }
.cta-bottom .price-note { text-align: center; }

/* ============ FOOTER ============ */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem var(--pad-x) 3rem;
  border-top: 1px solid var(--rule);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-grid h4 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 1rem;
  font-weight: 400;
}

.footer-grid ul { list-style: none; }
.footer-grid li { padding: 0.25rem 0; }
.footer-grid a { font-size: 0.85rem; transition: opacity 0.2s; }
.footer-grid a:hover { opacity: 0.55; }

.footer-mark {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.footer-mark + p {
  font-size: 0.82rem;
  max-width: 22rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.footer-bottom .right { display: flex; gap: 2rem; }

/* ============ RELEASE NOTES ============ */
.releases {
  border-top: 1px solid var(--rule);
}

.release {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.release-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.release-version {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.release-date {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.release-tag {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--ink);
  color: var(--bg);
  padding: 0.3rem 0.55rem;
  margin-top: 0.5rem;
}

.release-changes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.release-changes li {
  font-size: 0.95rem;
  line-height: 1.6;
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.release-changes li:last-child { margin-bottom: 0; }

.release-changes li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-quiet);
}

/* ============ CODE PREVIEW (HERO) ============ */
.hero-shot--code {
  background: var(--bg-soft);
  display: flex;
  align-items: stretch;
  padding: 0;
}

.hero-shot--code::after {
  /* keep the inset rule like other hero shots */
}

.code-preview {
  margin: 0;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
}

/* ============ SCRIPTS LIST ============ */
.scripts-section .section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.scripts-intro {
  margin-bottom: 3rem;
  max-width: 36rem;
}

.scripts-list {
  border-top: 1px solid var(--rule);
}

.script {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.script-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.script-num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
  padding-top: 0.2rem;
}

.script-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}

.script-description {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 48rem;
  margin: -0.5rem 0 1.25rem 0;
  padding-left: calc(0.7rem + 1.25rem); /* align with title (rough) */
}

.script-description code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-soft2);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--rule);
}

.script-description a {
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s, color 0.2s;
}
.script-description a:hover { border-color: var(--ink); color: var(--ink); }

.script-code {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.4rem;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.script-code code {
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  border: none;
  padding: 0;
}

.script-copy {
  font-family: var(--font);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.script-copy:hover { background: var(--ink); color: var(--bg); }
.script-copy.is-copied {
  background: var(--ink);
  color: var(--bg);
}

/* ============ WARNING BOX (experimental scripts) ============ */
.scripts-section.is-warning .section-head h2 {
  /* slightly desaturated treatment for the experimental section */
}

.warning-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--ink);
  margin-bottom: 2.5rem;
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 48rem;
}

.warning-tag {
  flex-shrink: 0;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--ink);
  color: var(--bg);
  padding: 0.25rem 0.55rem;
  align-self: flex-start;
  margin-top: 0.1rem;
}

/* ============ BOTTOM NOTE (scripts page) ============ */
.cta-bottom--scripts .bottom-note {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 38rem;
  margin: 0 auto;
  color: var(--ink-soft);
}

/* ============ ENTRANCE ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.in { opacity: 1; transform: translateY(0); }
  .reveal[data-delay="1"] { transition-delay: 0.08s; }
  .reveal[data-delay="2"] { transition-delay: 0.16s; }
  .reveal[data-delay="3"] { transition-delay: 0.24s; }
}

/* ============ RELEASE NOTES ============ */
.releases {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.release {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.release-head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}

.release-version {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.release-date {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.release-changes {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.release-changes li {
  font-size: 0.95rem;
  line-height: 1.55;
  padding-left: 1.5rem;
  position: relative;
}

.release-changes li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-quiet);
}

/* ============ APPLESCRIPTS PAGE ============ */
.hero-grid-narrow {
  grid-template-columns: 7fr 5fr;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat {
  padding: 1.75rem 1rem;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat:last-child { border-right: none; }

.stat-num {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.script-section-intro {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 38rem;
  margin-bottom: 2.5rem;
  color: var(--ink-soft);
}

.script-section-intro em {
  font-style: italic;
  color: var(--ink);
}

.script-section-intro code,
.script-desc code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-soft);
  padding: 0.1em 0.4em;
  border: 1px solid var(--rule);
}

.warning-banner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--ink);
  margin-bottom: 3rem;
  background: var(--bg-soft);
}

.warning-tag {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--ink);
  color: var(--bg);
  padding: 0.35rem 0.7rem;
  flex-shrink: 0;
}

.warning-banner p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.scripts {
  display: grid;
  gap: 0;
}

.script {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
}

.script:last-child { border-bottom: 1px solid var(--rule); }

.script-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.script-head > div {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex: 1;
}

.script-num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  padding-top: 0.3rem;
}

.script-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.script-desc {
  margin-left: calc(0.7rem * 4);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 42rem;
}

.script-desc a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.2s;
}
.script-desc a:hover { border-bottom-color: var(--ink); }

.copy-btn {
  font-family: var(--font);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.55rem 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.copy-btn:hover { background: var(--ink); color: var(--bg); }

.copy-btn.is-copied {
  background: var(--ink);
  color: var(--bg);
}
.copy-btn.is-copied .copy-label::before {
  content: "✓ ";
}

.script-code {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-left: calc(0.7rem * 4);
}

.script-code code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre;
  color: var(--ink);
  display: block;
}

.bottom-note {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 32rem;
  margin: 0 auto;
  color: var(--ink-soft);
}

.cta-bottom .bottom-note { text-align: center; }

/* ============ FAQ ACCORDION ============ */
.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.faq-item {
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 5rem;
}

.faq-q {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2rem;
  gap: 1rem;
  align-items: baseline;
  padding: 1.4rem 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: padding-left 0.2s ease;
}

.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ""; }

.faq-q:hover { padding-left: 0.3rem; }

.faq-q-num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
}

.faq-q-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.faq-q-icon {
  position: relative;
  width: 14px;
  height: 14px;
  align-self: center;
  justify-self: end;
}

.faq-q-icon::before,
.faq-q-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-q-icon::after { transform: rotate(90deg); }

.faq-item[open] .faq-q-icon::after { transform: rotate(0deg); }

.faq-a {
  padding: 0 0 1.6rem calc(2.5rem + 1rem);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 48rem;
}

.faq-a p { margin-bottom: 0.75rem; }
.faq-a p:last-child { margin-bottom: 0; }

.faq-a a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.2s ease;
}
.faq-a a:hover { border-bottom-color: var(--ink); }

.faq-a strong { font-weight: 700; }
.faq-a em { font-style: italic; }

.faq-cta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.faq-cta a {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.15rem;
  transition: gap 0.2s ease;
}
.faq-cta a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ============ SUPPORT PAGE ============ */
.support-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9rem var(--pad-x) 4rem;
  border-bottom: 1px solid var(--rule);
}

.support-hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 1.5rem;
  max-width: 18ch;
}

.support-subtitle {
  font-size: 1.1rem;
  line-height: 1.55;
  max-width: 38rem;
  margin-bottom: 2.5rem;
}

.support-faq-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.support-faq-links .label { display: inline-block; }

.faq-shortcut {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.1rem;
  transition: border-color 0.2s ease;
}
.faq-shortcut:hover { border-bottom-color: var(--ink); }

/* ----- Support body: 2-column ----- */
.support-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--pad-x) 6rem;
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: flex-start;
}

.support-side {
  position: sticky;
  top: 6rem;
  display: grid;
  gap: 2rem;
}

.support-side-block .label {
  display: block;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.support-side-block p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.support-side-block a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.2s;
}
.support-side-block a:hover { border-bottom-color: var(--ink); }

/* ----- Form ----- */
.support-form { width: 100%; }

.form-head {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.form-head .label { display: block; margin-bottom: 0.8rem; }

.form-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem;
}

.field { display: flex; flex-direction: column; }

.field-half { grid-column: span 1; }
.field-full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
  font-weight: 400;
}

.required { color: var(--ink); }

.field input,
.field textarea,
.field select {
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.75rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-quiet);
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-bottom-color: var(--ink-soft);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--ink);
  border-bottom-width: 1px;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
  padding-top: 1rem;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  cursor: pointer;
  padding-right: 2rem;
}

.select-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  pointer-events: none;
  margin-top: -3px;
}
.select-wrap:hover .select-arrow {
  transform: translateY(calc(-50% + 1px)) rotate(0deg);
}

.form-actions {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.form-note {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36rem;
}

.form-note a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
}
.form-note a:hover { border-bottom-color: var(--ink); }

.btn-submit {
  padding: 1.05rem 2rem 1.05rem 1.5rem;
  min-width: 14rem;
}

.btn-submit .icon {
  font-size: 1.1rem;
  font-weight: 400;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-submit:hover .icon { transform: translateX(4px); }

/* ============ LEGAL PAGES (T&C, Privacy) ============ */
.legal-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9rem var(--pad-x) 4rem;
  border-bottom: 1px solid var(--rule);
}

.legal-hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 1.5rem;
  max-width: 24ch;
}

.legal-subtitle {
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 38rem;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.legal-intro {
  max-width: 42rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.legal-intro p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.legal-intro p:last-child { margin-bottom: 0; }

.legal-intro em {
  font-style: italic;
  color: var(--ink);
}

/* ----- 2-column layout: ToC + content ----- */
.legal-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--pad-x) 6rem;
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: flex-start;
}

.legal-toc {
  position: sticky;
  top: 6rem;
  align-self: start;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.legal-toc-label {
  display: block;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
  display: grid;
  gap: 0.1rem;
}

.legal-toc li { padding: 0; }

.legal-toc a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.45rem 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.legal-toc a:hover {
  color: var(--ink);
  padding-left: 0.2rem;
}

.legal-toc .num {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
}

.legal-toc .text { font-size: 0.85rem; }

/* ----- Sections ----- */
.legal-content { max-width: 42rem; }

.legal-section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}

.legal-section:first-child {
  padding-top: 0;
  border-top: none;
}

.legal-section-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.legal-section-num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  flex-shrink: 0;
  padding-top: 0.4rem;
}

.legal-section h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.legal-section-body {
  padding-left: calc(0.7rem * 4 + 1px);
}

.legal-section-body p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 1rem;
}

.legal-section-body p:last-child { margin-bottom: 0; }

.legal-section-body strong { font-weight: 700; }
.legal-section-body em { font-style: italic; }

.legal-section-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.2s ease;
}
.legal-section-body a:hover { border-bottom-color: var(--ink); }

.legal-section-body ul,
.legal-section-body ol {
  margin: 0 0 1rem 0;
  padding: 0;
  list-style: none;
}

.legal-section-body li {
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.4rem;
}

.legal-section-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-quiet);
}

.legal-section-body ol {
  counter-reset: legal-ol;
}

.legal-section-body ol li {
  counter-increment: legal-ol;
}

.legal-section-body ol li::before {
  content: counter(legal-ol) ".";
  position: absolute;
  left: 0;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.legal-section-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 1.75rem 0 0.6rem;
  text-transform: none;
}

.legal-section-body h4:first-child { margin-top: 0; }

/* ----- Bottom contact ----- */
.legal-bottom {
  border-top: 1px solid var(--rule);
}

.legal-bottom-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6rem) var(--pad-x);
  text-align: center;
}

.legal-bottom .label {
  display: block;
  margin-bottom: 1.25rem;
}

.legal-bottom h3 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.legal-bottom p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 32rem;
  margin: 0 auto 0.75rem;
  color: var(--ink-soft);
}

.legal-bottom a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.2s ease;
}
.legal-bottom a:hover { border-bottom-color: var(--ink); }

.legal-bottom-meta {
  margin-top: 2rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  max-width: 100% !important;
}

/* ----- Smooth anchor scrolling with header offset ----- */
.legal-section { scroll-margin-top: 5rem; }

/* ----- Print stylesheet ----- */
@media print {
  .site-header, .site-footer, .legal-toc, .legal-bottom { display: none !important; }
  .legal-hero { padding-top: 0; padding-bottom: 2rem; }
  .legal-body { display: block; padding: 0; }
  .legal-content { max-width: 100%; }
  .legal-section { page-break-inside: avoid; padding: 1.5rem 0; }
  .legal-section-body { padding-left: 0; }
  body { font-size: 11pt; line-height: 1.5; }
  a { color: var(--ink); }
}

/* ============ SUPPORT PAGE ============ */
/* The support page lives at /support/ (root) and links to /apps/assets/style.css.
   These styles are scoped to .support-page on <body> so they don't clash with
   the apps' own .site-header / .hero / .site-footer rules. */

body.support-page {
  /* The support page uses simpler header/footer (no fixed nav, no grid).
     Reset what apps-specific rules would interfere. */
}

.support-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--pad-x) 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.support-header .wordmark { width: 124px; }

.support-header .header-meta {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  gap: 1.5rem;
}

.support-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem var(--pad-x);
  border-top: 1px solid var(--rule);
}

.support-hero .hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.support-hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 1.5rem;
}

.support-hero h1 .dot {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--ink);
  border-radius: 50%;
  margin-left: 0.04em;
  transform: translateY(-0.05em);
}

.support-hero .hero-lead {
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 38rem;
  color: var(--ink);
}

.app-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  font-size: 0.85rem;
}
.app-banner .label { display: inline-block; flex-shrink: 0; }
.app-banner a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.25s ease;
}
.app-banner a:hover { border-bottom-color: var(--ink); }

/* ----- Form layout ----- */
.support-form-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x) 5rem;
}

.form-section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}

.form-section-head {
  margin-bottom: 2.5rem;
}

.form-section-head .label { display: block; margin-bottom: 0.6rem; }

.form-section-head h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.row {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 2rem;
}
.row.one { grid-template-columns: 1fr; }
.row:last-child { margin-bottom: 0; }

.support-form-wrap .field { display: flex; flex-direction: column; }

.support-form-wrap .field label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
  font-weight: 400;
}

.req { color: var(--ink); }

.support-form-wrap input,
.support-form-wrap textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.75rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.25s ease;
  border-radius: 0;
}

.support-form-wrap input::placeholder,
.support-form-wrap textarea::placeholder { color: var(--ink-quiet); }

.support-form-wrap input:hover,
.support-form-wrap textarea:hover { border-bottom-color: var(--ink-soft); }

.support-form-wrap input:focus,
.support-form-wrap textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.support-form-wrap textarea {
  resize: vertical;
  min-height: 10rem;
  padding: 1rem;
  border: 1px solid var(--rule-strong);
}

/* ----- Tag chips ----- */
.tags-block { margin-top: 0.55rem; }

.tags-loading {
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 0.4rem 0;
  font-style: italic;
}

.tags-error {
  color: #B91C1C;
  font-size: 0.8rem;
  background: #FFF0F0;
  border: 1px solid #FCA5A5;
  padding: 0.7rem 1rem;
  line-height: 1.5;
}

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--rule-strong);
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}
.tag-chip input[type=checkbox] { display: none; }
.tag-chip:hover { border-color: var(--ink); }
.tag-chip.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg) !important;
}

/* ----- Submit & feedback ----- */
.form-actions {
  padding: 3rem 0 0;
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.form-note {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36rem;
}
.form-note a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.25s ease;
}
.form-note a:hover { border-bottom-color: var(--ink); }

.support-btn-submit {
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.5rem;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  min-width: 14rem;
  justify-content: space-between;
  transition: background 0.25s ease, transform 0.25s ease;
}
.support-btn-submit:hover:not(:disabled) {
  background: #222;
  transform: translateY(-1px);
}
.support-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.support-btn-submit .arrow {
  font-size: 1.1rem;
  font-weight: 400;
  transition: transform 0.25s ease;
}
.support-btn-submit:hover:not(:disabled) .arrow { transform: translateX(4px); }

.support-btn-submit .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: support-spin 0.6s linear infinite;
}
.support-btn-submit.loading .spinner { display: block; }
.support-btn-submit.loading .arrow   { display: none; }
@keyframes support-spin { to { transform: rotate(360deg); } }

.feedback {
  display: none;
  padding: 0.9rem 1.2rem;
  font-size: 0.85rem;
  line-height: 1.5;
  border: 1px solid #FCA5A5;
  background: #FFF0F0;
  color: #B91C1C;
}
.feedback.show { display: block; }

/* ----- Success screen ----- */
.success-screen {
  display: none;
  padding: 5rem var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.success-screen.show { display: block; }

.success-screen .check {
  width: 64px;
  height: 64px;
  margin: 0 auto 2rem;
  border: 1px solid var(--rule-strong);
  background: #F0FDF4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-screen .check svg {
  width: 28px; height: 28px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-screen h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.success-screen p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 32rem;
  margin: 0 auto 2.5rem;
}

.btn-new {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.85rem 1.5rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn-new:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-1px);
}

/* ----- Support footer (simple, single line) ----- */
.support-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--pad-x) 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.support-footer a { transition: opacity 0.25s ease; }
.support-footer a:hover { opacity: 0.6; }
.support-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero { padding: 7.5rem var(--pad-x) 3rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .app-hero { padding: 7rem var(--pad-x) 3rem; }
  .app-hero .hero-grid { grid-template-columns: 1fr; }
  .hero-grid-narrow { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .req-row { grid-template-columns: 1fr; gap: 0.4rem; padding: 1.1rem 0; }
  .features-grid { grid-template-columns: 1fr; }
  .feature { border-right: none; border-bottom: 1px solid var(--rule); }
  .feature:last-child { border-bottom: none; }
  .release { grid-template-columns: 1fr; gap: 1rem; padding: 1.6rem 0; }
  .script-desc, .script-code { margin-left: 0; }
  .legal-body { grid-template-columns: 1fr; gap: 0; }
  .legal-toc {
    position: static;
    max-height: none;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
  }
  .legal-section-body { padding-left: 0; }
  .legal-section-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .support-body { grid-template-columns: 1fr; gap: 3rem; }
  .support-side {
    position: static;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .form-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .field-half { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  .nav-meta { display: none; }
  .wordmark { width: 92px; }
  .site-header nav { grid-template-columns: 1fr auto; }
  .hero-meta-top { flex-direction: column; gap: 0.5rem; align-items: flex-start; margin-bottom: 2rem; }
  .apps-grid { grid-template-columns: 1fr; }
  .app { border-right: none; min-height: auto; }
  .ctas { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: none; }
  .script-head { flex-wrap: wrap; }
  .copy-btn { margin-top: 0.5rem; }
  .support-side { grid-template-columns: 1fr; gap: 1.5rem; }
  .faq-q { grid-template-columns: 2rem 1fr 1.5rem; gap: 0.75rem; }
  .faq-a { padding-left: calc(2rem + 0.75rem); }
  .support-header { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.5rem var(--pad-x); }
  .support-header .header-meta { display: none; }
  .support-hero { padding: 2rem var(--pad-x); }
  .support-hero .hero-meta { flex-direction: column; gap: 0.5rem; align-items: flex-start; margin-bottom: 1.5rem; }
  .row { grid-template-columns: 1fr; gap: 2rem; }
  .support-btn-submit { width: 100%; }
  .support-footer { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .app-banner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .footer-bottom .right { flex-direction: column; gap: 0.5rem; }
}
