/* ==========================================================================
   Agent Teams · hyzhbj.cn
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f4f1eb;
  --ink: #171512;
  --ink-2: #413d36;
  --muted: #7c766b;
  --line: #e8e3d9;
  --line-2: #d8d2c6;
  --accent: #d9591f;
  --accent-ink: #a8420f;
  --accent-soft: #fbeade;
  --green: #1f7a4d;
  --dark: #141311;
  --dark-2: #1c1a17;
  --dark-line: #2e2b26;
  --dark-muted: #a09a8f;
  --radius: 18px;
  --radius-lg: 26px;
  --max: 1140px;
  --shadow-sm: 0 1px 2px rgba(23, 21, 18, 0.05), 0 10px 26px -16px rgba(23, 21, 18, 0.28);
  --shadow-md: 0 2px 4px rgba(23, 21, 18, 0.04), 0 24px 60px -28px rgba(23, 21, 18, 0.35);
  --shadow-lg: 0 40px 100px -40px rgba(23, 21, 18, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 17px;
  flex: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
}

.brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--ink-2);
}

.nav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--accent-ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}

.menu-toggle span::before {
  top: -5px;
}

.menu-toggle span::after {
  top: 5px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px -14px rgba(23, 21, 18, 0.9);
}

.btn-primary:hover {
  background: #2b2822;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(217, 89, 31, 0.9);
}

.btn-accent:hover {
  background: #c94e17;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 550;
  color: var(--accent-ink);
  font-size: 15px;
}

.btn-link svg {
  transition: transform 0.2s ease;
}

.btn-link:hover svg {
  transform: translateX(3px);
}

/* ---------- Shared section bits ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section {
  padding: 96px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 52px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-top: 16px;
}

h3 {
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.lede {
  margin: 18px 0 0;
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.75;
}

.section-head.center .lede {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 620px;
  background: radial-gradient(58% 60% at 62% 38%, rgba(217, 89, 31, 0.13), transparent 70%),
    radial-gradient(40% 50% at 8% 10%, rgba(31, 122, 77, 0.07), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  color: var(--ink-2);
}

.hero-badge b {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin: 22px 0 0;
  max-width: 520px;
  font-size: 17.5px;
  color: var(--ink-2);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta svg {
  color: var(--green);
  flex: none;
}

/* Hero visual */

.hero-visual {
  position: relative;
}

.window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf8;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd8cd;
}

.window-title {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 auto;
  letter-spacing: 0.02em;
}

.window img {
  width: 100%;
  height: auto;
}

.chip-float {
  position: absolute;
  right: -14px;
  bottom: -26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 13px 16px;
  width: 250px;
  font-size: 12.5px;
  line-height: 1.55;
  animation: floaty 6s ease-in-out infinite;
}

.chip-float .chip-k {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 5px;
}

.chip-float .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.chip-float p {
  margin: 0;
  color: var(--muted);
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ---------- Logos / agents strip ---------- */

.agents-strip {
  padding: 34px 0 0;
}

.agents-inner {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.agents-label {
  font-size: 13px;
  color: var(--muted);
  flex: none;
}

.agents-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agent-tag {
  font-size: 13px;
  font-weight: 520;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 11px;
}

/* ---------- Layers ---------- */

.layers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: layer;
}

.layer {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.layer:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}

.layer .tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  margin-bottom: 14px;
}

.layer.is-you .tag {
  background: #eef3ec;
  color: var(--green);
}

.layer.is-coord .tag {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.layer h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.layer p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}

.layer .role-count {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.layer-arrow {
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  width: 16px;
  height: 1px;
  background: var(--line-2);
  z-index: 1;
}

.layer-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -2.5px;
  border: 3px solid transparent;
  border-left-color: var(--line-2);
}

.flow-strip {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.flow-strip b {
  color: var(--ink);
  font-weight: 550;
}

.flow-strip .sep {
  color: var(--line-2);
}

/* ---------- Bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 26px 26px 0;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.68;
}

.card-media {
  margin-top: 22px;
  padding: 0 18px 18px;
  margin-top: auto;
}

.card-media img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.card.w-3 {
  grid-column: span 3;
}

.card.w-2 {
  grid-column: span 2;
}

.card.w-4 {
  grid-column: span 4;
}

.card.w-6 {
  grid-column: span 6;
}

.card.dark {
  background: var(--dark);
  border-color: var(--dark-line);
  color: #f4f2ec;
}

.card.dark p {
  color: var(--dark-muted);
}

.card.tint {
  background: linear-gradient(160deg, #fff8f2, #fdfbf8);
}

.card.center {
  justify-content: center;
  padding-bottom: 26px;
}

.card.center .card-media {
  margin-top: 26px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.pill-list span {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--ink-2);
  background: var(--surface);
}

.mini-points {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.mini-points li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.mini-points svg {
  flex: none;
  margin-top: 4px;
  color: var(--green);
}

/* ---------- Security dark ---------- */

.dark-wrap {
  background: var(--dark);
  color: #f6f4ef;
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}

.dark-wrap::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 480px;
  background: radial-gradient(closest-side, rgba(217, 89, 31, 0.22), transparent);
  pointer-events: none;
}

.dark-wrap .eyebrow {
  color: #e9a077;
}

.dark-wrap h2 {
  color: #fbf9f4;
}

.dark-wrap .lede {
  color: var(--dark-muted);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  position: relative;
}

.sec-item {
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: var(--radius);
  padding: 26px;
}

.sec-item h3 {
  font-size: 17px;
  color: #fbf9f4;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-item h3 svg {
  color: #e9a077;
  flex: none;
}

.sec-item p {
  margin: 0;
  font-size: 14px;
  color: var(--dark-muted);
  line-height: 1.7;
}

.sec-note {
  margin-top: 26px;
  font-size: 13px;
  color: var(--dark-muted);
  border-top: 1px solid var(--dark-line);
  padding-top: 20px;
  position: relative;
}

/* ---------- Self-host / code ---------- */

.selfhost {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.code-card {
  background: #16150f;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid #29271f;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid #29271f;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #918b7c;
}

.code-head .dots {
  display: flex;
  gap: 5px;
  margin-right: 6px;
}

.code-head .dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a372e;
}

.code-body {
  margin: 0;
  padding: 20px 20px 24px;
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.95;
  color: #ded8c8;
  overflow-x: auto;
  white-space: pre;
}

.code-body .c {
  color: #7e786a;
}

.code-body .p {
  color: #e9a077;
}

.code-body .s {
  color: #a8c79a;
}

.code-body .k {
  color: #e2c285;
}

/* ---------- App / mobile ---------- */

.app-section {
  padding: 96px 0;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.app-features {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 18px;
}

.app-features li {
  display: flex;
  gap: 14px;
}

.app-features .ic {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
}

.app-features b {
  display: block;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.app-features span {
  font-size: 14px;
  color: var(--muted);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 10px 18px;
  height: 52px;
  transition: background 0.2s;
}

.store-btn:hover {
  background: #2b2822;
}

.store-btn .txt {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.store-btn .txt small {
  font-size: 10.5px;
  opacity: 0.7;
  letter-spacing: 0.04em;
}

.store-btn .txt strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.store-btn[aria-disabled="true"] {
  cursor: default;
  background: #d9d4c9;
  color: #6d685e;
}

.store-btn.light {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
}

.store-btn.light:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.store-btn.light .txt small {
  opacity: 0.55;
}

.store-note {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 260px;
  line-height: 1.5;
}

/* Phone mock */

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-stage::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  background: radial-gradient(closest-side, rgba(217, 89, 31, 0.18), transparent 75%);
  filter: blur(10px);
}

.phone {
  position: relative;
  width: 300px;
  height: 614px;
  border-radius: 46px;
  background: #0f0e0c;
  padding: 11px;
  box-shadow: 0 50px 90px -50px rgba(23, 21, 18, 0.7), 0 0 0 1px #2a2823;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  background: #fbfaf7;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 11px;
}

.phone-screen::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 20px;
  border-radius: 999px;
  background: #0f0e0c;
  z-index: 3;
}

.ps-status {
  height: 36px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.ps-head {
  padding: 2px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.ps-head strong {
  font-size: 12.5px;
  letter-spacing: -0.01em;
}

.ps-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  overflow: hidden;
}

.ps-tabs span {
  font-size: 9px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1eee7;
  white-space: nowrap;
}

.ps-tabs span.on {
  background: var(--ink);
  color: #fff;
}

.ps-body {
  padding: 0 12px;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.ps-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
}

.ps-card .q {
  font-size: 10px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 550;
}

.ps-opt {
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 9px;
  color: var(--muted);
}

.ps-opt em {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f2efe8;
  color: var(--ink-2);
  font-style: normal;
  font-size: 8.5px;
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 600;
}

.ps-opt.on {
  border-color: #e7c3ad;
  background: #fdf6f1;
}

.ps-opt.on em {
  background: var(--accent);
  color: #fff;
}

.ps-thread {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ps-thread .st {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 4px;
  flex: none;
}

.ps-thread .st.wait {
  background: var(--accent);
}

.ps-thread .st.run {
  background: #3b7fd4;
}

.ps-thread .st.done {
  background: #96a394;
}

.ps-thread div {
  min-width: 0;
}

.ps-thread b {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-thread small {
  font-size: 8.5px;
  color: var(--muted);
}

.ps-input {
  margin-top: auto;
  padding: 10px 12px 16px;
}

.ps-input div {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 9px;
  color: #a9a397;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.ps-input i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-block;
}

/* ---------- Doc pages ---------- */

.doc-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf9, var(--bg));
}

.doc-hero h1 {
  font-size: clamp(30px, 4.2vw, 44px);
  margin-top: 14px;
}

.doc-meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  padding: 56px 0 96px;
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  font-size: 13.5px;
}

.toc-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  color: var(--ink-2);
  display: flex;
  gap: 8px;
  line-height: 1.45;
  transition: color 0.2s;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: #b4aea3;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  flex: none;
}

.toc a:hover {
  color: var(--accent-ink);
}

.doc {
  max-width: 760px;
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.85;
}

.doc section {
  margin-bottom: 44px;
  scroll-margin-top: 96px;
}

.doc h2 {
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 14px;
  padding-bottom: 0;
  letter-spacing: -0.02em;
}

.doc h3 {
  font-size: 16.5px;
  color: var(--ink);
  margin: 24px 0 8px;
}

.doc p {
  margin: 0 0 12px;
}

.doc ul,
.doc ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 7px;
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

.doc a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.doc-note {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--ink-2);
  margin: 18px 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0 22px;
}

.doc th,
.doc td {
  border: 1px solid var(--line);
  text-align: left;
  padding: 10px 12px;
  vertical-align: top;
}

.doc th {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Support ---------- */

.help-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 28px;
  align-items: start;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 550;
  font-size: 15.5px;
  color: var(--ink);
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq .answer {
  padding: 0 20px 20px 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.8;
}

.faq .answer p {
  margin: 0 0 10px;
}

.faq .answer ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 92px;
}

.contact-card h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.contact-card > p {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.contact-row {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}

.contact-row .k {
  color: var(--muted);
  width: 62px;
  flex: none;
}

.contact-row .v {
  color: var(--ink);
  word-break: break-all;
}

.contact-row .v a:hover {
  color: var(--accent-ink);
}

.support-callout {
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff8f2, #fff);
  padding: 26px 28px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.support-callout p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- CTA band ---------- */

.cta-band {
  padding: 20px 0 96px;
}

.cta-inner {
  border-radius: 30px;
  background: var(--dark);
  color: #f7f5f0;
  padding: 64px 56px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-inner::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -60%;
  width: 560px;
  height: 560px;
  background: radial-gradient(closest-side, rgba(217, 89, 31, 0.3), transparent);
  pointer-events: none;
}

.cta-inner h2 {
  color: #fbf9f4;
  font-size: clamp(26px, 3vw, 34px);
  position: relative;
}

.cta-inner p {
  margin: 12px 0 0;
  color: var(--dark-muted);
  font-size: 15px;
  position: relative;
  max-width: 480px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

.cta-inner .btn-ghost {
  background: transparent;
  border-color: #413d36;
  color: #f4f2ec;
}

.cta-inner .btn-ghost:hover {
  border-color: #8c8578;
}

.cta-inner .btn-primary {
  background: #f7f5f0;
  color: #17150f;
}

.cta-inner .btn-primary:hover {
  background: #fff;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 36px;
  background: #f7f5f0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.footer-brand p {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.75;
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 14px;
  color: var(--ink-2);
}

.footer-col a:hover {
  color: var(--accent-ink);
}

.footer-company {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.8;
}

.footer-company span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 6px;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
}

.footer-bottom .legal-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-bottom a:hover {
  color: var(--accent-ink);
}

/* ---------- 404 ---------- */

.err {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 0;
}

.err .code {
  font-size: 76px;
  font-weight: 650;
  letter-spacing: -0.05em;
  color: var(--line-2);
  line-height: 1;
}

.err h1 {
  font-size: 26px;
  margin: 12px 0 10px;
}

.err p {
  color: var(--muted);
  margin: 0 0 26px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-inner {
    gap: 36px;
  }

  .layers {
    grid-template-columns: repeat(2, 1fr);
  }

  .layer-arrow {
    display: none;
  }

  .card.w-3,
  .card.w-2,
  .card.w-4 {
    grid-column: span 3;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .doc-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 36px;
  }
}

@media (max-width: 880px) {
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 18px;
    box-shadow: var(--shadow-sm);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-sub {
    max-width: none;
  }

  .chip-float {
    right: 8px;
    bottom: -18px;
    width: 230px;
  }

  .section {
    padding: 72px 0;
  }

  .card.w-3,
  .card.w-2,
  .card.w-4,
  .card.w-6 {
    grid-column: span 6;
  }

  .security-grid,
  .selfhost,
  .app-grid,
  .help-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-card {
    position: static;
  }

  .doc-layout {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .toc {
    position: static;
    border-bottom: 1px solid var(--line);
    padding-bottom: 22px;
  }

  .toc ol {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }

  .cta-inner {
    padding: 44px 30px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-sub {
    font-size: 16px;
  }

  .layers {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 22px 20px 0;
  }

  .card-media {
    padding: 0 12px 12px;
  }

  .doc {
    font-size: 15px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .phone {
    width: 272px;
    height: 558px;
  }

  .cta-inner {
    padding: 36px 24px;
    border-radius: 22px;
  }

  .store-row {
    gap: 10px;
  }

  .agents-inner {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
