/* TruceAI's site: the app's own dark world (its ground, hairlines, warm white and TruceAI), with light entering as
   white-to-graphite gradients. Blue marks what's live, orange what's being made, as in the app. */
@font-face {
  font-family: 'TruceAI';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(/fonts/TruceAI.woff2) format('woff2');
}
@font-face {
  font-family: 'TruceAI';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url(/fonts/TruceAI-Italic.woff2) format('woff2');
}

:root {
  --ground: #0e0e0d;
  --bg: #141413;
  --sidebar: #1a1a19;
  --surface: #1e1e1d;
  --surface-2: #232322;
  --border: #2d2d2b;
  --border-strong: #3a3a37;
  --text: #ecebe6;
  --text-2: #c4c2bb;
  --muted: #8f8d86;
  --accent: #7b9bff;
  --spark: #f2a05c;
  --good: #4cc38a;
  --bad: #f0706a;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(20px, 4vw, 56px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  /* The glows reach past the edge: nothing may widen the page, or phones open it shifted (header half hidden).
     clip, not hidden, so the sticky header keeps working. */
  overflow-x: clip;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 17px/1.55 'TruceAI', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: rgba(123, 155, 255, 0.32);
  color: #fff;
}
/* No scroll bars: the page (and the tips deck) scroll without one. */
html {
  scrollbar-width: none;
}
::-webkit-scrollbar {
  display: none;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
img,
video,
svg {
  display: block;
}
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.02em;
  font-weight: 600;
}
p {
  margin: 0;
}
code,
kbd {
  font: 0.86em/1 ui-monospace, 'Cascadia Code', Consolas, monospace;
  padding: 0.18em 0.42em;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* ---------- top bar ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter)));
  background: linear-gradient(180deg, rgba(14, 14, 13, 0.96), rgba(14, 14, 13, 0.9));
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand img {
  border-radius: 7px;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.top nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}
.top nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.top nav .nav-get {
  margin-left: 8px;
  color: var(--bg);
  background: var(--text);
  font-weight: 600;
}
.top nav .nav-get:hover {
  color: var(--bg);
  background: var(--text);
  opacity: 0.88;
}

/* ---------- buttons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.actions.center {
  justify-content: center;
}
/* The app's own buttons (.btn, .btn.primary): flat ink fill or a hairline surface, hover by tone only, at the site's size. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 11px;
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 550;
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}
.btn:hover {
  background: #2a2a28;
}
.btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.btn svg.logo path {
  fill: currentColor;
  stroke: none;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--text);
  opacity: 0.88;
}
.btn-ghost:hover {
  background: #2a2a28;
}
.btn-big {
  height: 56px;
  padding: 0 28px;
  font-size: 17px;
  border-radius: 14px;
}
.fine {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- hero: the headline over the app itself ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vh, 104px) var(--gutter) 0;
  text-align: center;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(255, 255, 255, 0.09), transparent 70%),
    linear-gradient(180deg, #121211 0%, var(--ground) 60%);
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 14ch;
  margin: 0 auto;
}
.lede {
  max-width: 34em;
  margin: 22px auto 0;
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--text-2);
}
.hero .actions {
  justify-content: center;
  margin-top: 30px;
}

.stage {
  position: relative;
  max-width: 1180px;
  margin: clamp(44px, 7vh, 72px) auto 0;
  padding-bottom: clamp(56px, 9vh, 110px);
}
.glow {
  position: absolute;
  inset: -14% -8% auto;
  height: 78%;
  background: radial-gradient(closest-side, rgba(236, 235, 230, 0.26), rgba(123, 155, 255, 0.12) 55%, transparent);
  filter: blur(36px);
  pointer-events: none;
}

/* the window: the app's own chrome */
.win {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 40px 90px rgba(0, 0, 0, 0.6), 0 12px 30px rgba(0, 0, 0, 0.4);
  text-align: left;
  font-size: 15px;
}
.win::after {
  /* light along the top edge, as on glass */
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}
/* The real app (/demo/, its own bundle) drawn at desktop size and scaled to the window (site.js sets --s). */
.win-app {
  position: relative;
  aspect-ratio: 1180 / 700;
}
.win-app iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1180px;
  height: 700px;
  border: 0;
  transform: scale(var(--s, 1));
  transform-origin: 0 0;
  pointer-events: none;
  background: var(--bg);
}

@media (max-width: 600px) {
  .win-app {
    aspect-ratio: 390 / 660;
  }
  .win-app iframe {
    width: 390px;
    height: 660px;
  }
}

/* ---------- tips deck ---------- */
.tips {
  padding: clamp(80px, 12vh, 140px) 0 clamp(64px, 10vh, 120px);
  background: linear-gradient(180deg, var(--ground), #121211 50%, var(--ground));
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.tips-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px 32px;
  padding: 0 var(--gutter);
  max-width: 1280px;
  margin: 0 auto 40px;
}
.tips-head h2,
.models h2,
.get h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.tips-head p {
  grid-column: 1;
  color: var(--text-2);
  max-width: 40em;
}
.deck-ctl {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.round:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.round:disabled {
  opacity: 0.3;
  cursor: default;
}
.round svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.deck-count {
  min-width: 52px;
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.deck {
  list-style: none;
  margin: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(860px, 84vw);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter)));
  padding: 4px max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter))) 24px;
  padding-right: max(var(--gutter), calc(100vw - min(860px, 84vw) - max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter)))));
  scrollbar-width: none;
}
.deck::-webkit-scrollbar {
  display: none;
}
.deck:focus-visible {
  outline-offset: -2px;
}
.tip {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
  min-height: 340px;
  padding: 36px;
  border-radius: 22px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, 0.07), transparent 70%),
    linear-gradient(160deg, #1c1c1b, #121211 70%);
}
.tip h3 {
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.tip p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 16px;
}
/* the app fragments inside the tips */
.frag {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 18px;
  font-size: 14.5px;
}
.line {
  color: var(--text);
}
.caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--text);
  animation: blink 1.1s steps(2, start) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}
.vm-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}
.vm-bar {
  flex-wrap: wrap;
}
.vm-bar b {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.vm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--spark);
}
.vm-text {
  line-height: 1.75;
}
.t-time,
.t-note,
.t-beh,
.t-quote,
.t-file {
  border-radius: 4px;
  padding: 0 2px;
}
.t-time,
.t-file {
  color: var(--accent);
  background: rgba(123, 155, 255, 0.1);
}
.t-note {
  color: var(--good);
  background: rgba(76, 195, 138, 0.1);
}
.t-beh {
  color: var(--spark);
  background: rgba(242, 160, 92, 0.12);
}
.t-quote {
  background: rgba(236, 235, 230, 0.08);
}
.frag-pic {
  padding: 10px;
}
.frag-pic img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.pic-ask {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px 4px 8px;
  color: var(--text);
}
.pic-ask span {
  flex: 1;
}
.pop {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.pop-k {
  padding: 2px 8px 6px;
  font-size: 12px;
  color: var(--muted);
}
.pop-i {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-2);
}
.pop-i.on {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}
.frag-effort {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 18px 12px;
}
.lvl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.lvl.on {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}
.lvl i {
  width: 26px;
  height: 18px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 3px 25% no-repeat,
    linear-gradient(currentColor, currentColor) 5px 100% / 3px 40% no-repeat,
    linear-gradient(currentColor, currentColor) 10px 100% / 3px 55% no-repeat,
    linear-gradient(currentColor, currentColor) 15px 100% / 3px 70% no-repeat,
    linear-gradient(currentColor, currentColor) 20px 100% / 3px 85% no-repeat,
    linear-gradient(var(--border-strong), var(--border-strong)) 25px 100% / 1px 100% no-repeat;
  opacity: 0.9;
}
.lvl.high {
  color: var(--accent);
}
.lvl.xhigh {
  color: #b39ad8;
}
.lvl.max {
  color: var(--spark);
}
.lvl.ultra {
  color: #f58a62;
}
.frag-shell {
  font: 14px/1.6 ui-monospace, 'Cascadia Code', Consolas, monospace;
  background: #161615;
}
.sh-p {
  color: var(--spark);
}
.sh-out {
  margin-top: 8px;
  color: var(--good);
}
.sh-out em {
  color: var(--muted);
  font-style: normal;
  margin-left: 8px;
}
.btw-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btw-card b {
  font-size: 13px;
  color: var(--muted);
  font-weight: 550;
}
.btw-card span {
  font-weight: 600;
}
.btw-card em {
  font-style: normal;
  color: var(--text-2);
}
.frag-fix s {
  color: var(--bad);
  text-decoration-thickness: 1.5px;
}
.frag-fix b {
  font-weight: 500;
  color: var(--text);
  background: rgba(76, 195, 138, 0.14);
  border-radius: 4px;
  padding: 0 3px;
}
.t-hash {
  color: var(--good);
  font-weight: 700;
}
.saved {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- models ---------- */
.models {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 10vh, 120px) var(--gutter);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.models-lede {
  margin-top: 18px;
  max-width: 40em;
  color: var(--text-2);
  font-size: 18px;
}
.mrows {
  margin-top: 40px;
  border-top: 1px solid var(--border);
}
.mrow {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.mk {
  color: var(--muted);
  font-size: 14px;
}
.mn {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mn i {
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  margin-left: 6px;
}
.mm {
  color: var(--text-2);
  font-size: 15px;
  text-align: right;
}
.private {
  margin-top: 72px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 22px;
  background:
    radial-gradient(700px 260px at 0% 0%, rgba(255, 255, 255, 0.07), transparent 70%),
    linear-gradient(135deg, #1a1a19, #121211);
  border: 1px solid var(--border);
}
.private h3 {
  font-size: clamp(22px, 2.4vw, 30px);
}
.private p {
  margin-top: 12px;
  max-width: 46em;
  color: var(--text-2);
}

/* ---------- get ---------- */
.get {
  position: relative;
  overflow: hidden;
  padding: clamp(96px, 16vh, 180px) var(--gutter);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.get-glow {
  position: absolute;
  inset: 30% -10% -40%;
  background: radial-gradient(closest-side, rgba(236, 235, 230, 0.12), transparent);
  filter: blur(20px);
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 60%);
  mask-image: linear-gradient(to bottom, #000 25%, transparent 60%);
  pointer-events: none;
}
.get h2 {
  position: relative;
  font-size: clamp(2.6rem, 6vw, 5rem);
}
.get > p {
  position: relative;
  margin: 18px auto 0;
  color: var(--text-2);
  font-size: 18px;
}
.get .actions {
  position: relative;
  margin-top: 34px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  justify-content: center;
  align-items: center;
  padding: 16px var(--gutter) 28px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.foot a {
  display: inline-block;
  padding: 12px 4px;
  text-decoration: none;
}
.foot a:hover {
  color: var(--text);
}

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .tip {
    grid-template-columns: 1fr;
    padding: 26px;
  }
  .mrow {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .mm {
    text-align: left;
  }
}
@media (max-width: 640px) {
  .top nav a:not(.nav-get) {
    display: none;
  }
  .tips-head {
    grid-template-columns: 1fr;
  }
  .deck-ctl {
    grid-column: 1;
    grid-row: auto;
  }
  .frag-effort {
    grid-template-columns: repeat(4, 1fr);
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Phones: the phone app under the download (site.js shows it). */
.phone-app {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.phone-app[hidden] {
  display: none;
}
.phone-app-note {
  font-size: 15px;
  color: var(--text-2);
}

/* ---------- Terms of Service (terms.html, made from build/license.txt by scripts/build-terms.mjs) ---------- */
.terms {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px var(--gutter) 72px;
  color: var(--text-2);
  font-size: 16px;
}
.terms h1 {
  color: var(--text);
  font-size: clamp(30px, 5vw, 40px);
}
.terms-version {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.terms h2 {
  margin: 36px 0 10px;
  color: var(--text);
  font-size: 19px;
}
/* The terms' parts (Terms of Service, Privacy Policy, open-source parts) and their numbered sections. */
.terms .terms-part {
  margin: 64px 0 4px;
  padding-top: 28px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  font-size: clamp(22px, 3.4vw, 26px);
}
.terms h3 {
  margin: 34px 0 10px;
  color: var(--text);
  font-size: 18px;
  scroll-margin-top: 24px;
}
.terms h3 a {
  color: inherit;
  text-decoration: none;
}
.terms h3 a:hover {
  color: var(--accent);
}
.terms-toc {
  margin: 28px 0 8px;
  padding: 18px 22px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  font-size: 15px;
}
.terms-toc-part {
  display: block;
  margin-top: 14px;
  color: var(--text) !important;
  font-weight: 600;
  text-decoration: none;
}
.terms-toc-part:first-child {
  margin-top: 0;
}
.terms-toc ol {
  margin: 8px 0 0;
  padding-left: 26px;
  columns: 2 220px;
  column-gap: 28px;
}
.terms-toc li {
  break-inside: avoid;
  margin: 0 0 5px;
  color: var(--muted);
}
.terms-toc li a {
  color: var(--text-2);
  text-decoration: none;
}
.terms-toc li a:hover {
  color: var(--accent);
}
.terms p + p {
  margin-top: 12px;
}
.terms ul {
  margin: 10px 0 0;
  padding-left: 20px;
}
.terms li + li {
  margin-top: 6px;
}
.terms a {
  color: var(--accent);
  overflow-wrap: anywhere;
}
