:root {
  --bg: #000000;
  --surface: #1d1d1f;
  --surface-2: #272729;
  --text: #f5f5f7;
  --body: #d2d2d7;
  --muted: #a1a1a6;
  --dim: #6e6e73;
  --link: #2997ff;
  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-soft: rgba(255, 255, 255, 0.08);
  --font-sf: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sf);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ TOP NAV (black, centered) ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  max-width: 1024px; margin: 0 auto; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
  gap: 34px; padding: 0 24px;
}
.logo { color: var(--text); font-weight: 600; font-size: 18px; letter-spacing: -0.4px; }
.logo:hover { text-decoration: none; }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu > a,
.nav-trigger {
  color: var(--muted); font-size: 14px; letter-spacing: -0.2px;
  font-family: inherit; background: none; border: none; padding: 0; cursor: pointer;
  transition: color .2s ease;
}
.nav-menu > a:hover,
.nav-trigger:hover,
.has-drop:hover .nav-trigger,
.has-drop.open .nav-trigger { color: var(--text); text-decoration: none; }
.nav-trigger::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .3s ease;
}
.has-drop:hover .nav-trigger::after,
.has-drop.open .nav-trigger::after { transform: translateY(0) rotate(225deg); }

/* ---- Dropdown (Apple-style descend) ---- */
.has-drop { position: static; }
.dropdown {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  max-height: 0; opacity: 0; visibility: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s ease, visibility .4s;
}
.has-drop:hover .dropdown,
.has-drop:focus-within .dropdown,
.has-drop.open .dropdown {
  max-height: 460px; opacity: 1; visibility: visible;
}
.drop-inner {
  max-width: 1024px; margin: 0 auto; padding: 40px 24px 46px;
  display: flex; gap: 92px; flex-wrap: wrap;
}
.drop-col { display: flex; flex-direction: column; gap: 2px; }
.drop-label {
  color: var(--dim); font-size: 12px; letter-spacing: -0.1px;
  margin-bottom: 14px; font-weight: 400;
}
.drop-col a {
  color: var(--text); font-size: 22px; font-weight: 600; letter-spacing: -0.5px;
  padding: 7px 0; display: flex; flex-direction: column;
}
.drop-col a:hover { color: var(--link); text-decoration: none; }
.drop-col a small { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: -0.1px; margin-top: 3px; }

/* ============ HERO (home) ============ */
.hero {
  text-align: center; padding: 120px 24px 100px;
  max-width: 720px; margin: 0 auto;
}
.hero .eyebrow { color: var(--muted); font-size: 19px; font-weight: 600; letter-spacing: -0.2px; margin: 0 0 8px; }
.hero h1 {
  font-size: clamp(44px, 8vw, 72px); font-weight: 600; line-height: 1.05;
  letter-spacing: -0.5px; margin: 0; text-wrap: balance;
}
.hero p {
  font-size: clamp(19px, 3vw, 24px); font-weight: 400; line-height: 1.4;
  color: var(--body); margin: 22px auto 0; max-width: 600px;
}
.hero .links { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero .links a { font-size: 19px; }
.hero .links a::after { content: " ›"; }

/* ============ HOME doc list (no boxes) ============ */
.section { max-width: 760px; margin: 0 auto; padding: 0 24px 100px; }
.section > h2 {
  font-size: clamp(28px, 5vw, 40px); font-weight: 600; letter-spacing: -0.4px;
  text-align: center; margin: 0 0 40px; text-wrap: balance;
}
.doclist { display: flex; flex-direction: column; }
.doclist a {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 4px; border-top: 1px solid var(--hairline); color: var(--text);
}
.doclist a:last-child { border-bottom: 1px solid var(--hairline); }
.doclist a:hover { text-decoration: none; }
.doclist a:hover .dl-t { color: var(--link); }
.dl-t { font-size: 20px; font-weight: 600; letter-spacing: -0.4px; }
.dl-d { color: var(--muted); font-size: 14px; margin-top: 4px; letter-spacing: -0.2px; }
.dl-chev { color: var(--link); font-size: 24px; flex: none; }

/* ============ DOC (support-manual layout) ============ */
.doc { max-width: 1040px; margin: 0 auto; padding: 44px 24px 40px; }
.doc-title {
  font-size: 24px; font-weight: 600; letter-spacing: -0.4px; color: var(--text);
  margin: 0 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--hairline);
}
.doc-inner { max-width: 760px; margin: 0 auto; }

.doc-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.doc-select { display: inline-flex; flex-direction: column; gap: 6px; }
.doc-select span { font-size: 12px; color: var(--muted); letter-spacing: -0.1px; }
.doc-select select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23a1a1a6' stroke-width='1.5'/></svg>") no-repeat right 14px center;
  color: var(--text); font-family: inherit; font-size: 15px; letter-spacing: -0.2px;
  border: 1px solid var(--hairline); border-radius: 10px; padding: 11px 38px 11px 16px; cursor: pointer;
  min-width: 240px;
}
.doc-select select:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.doc-search { position: relative; flex: 1; min-width: 220px; max-width: 340px; align-self: flex-end; }
.doc-search input {
  width: 100%; background: var(--surface); color: var(--text); font-family: inherit; font-size: 15px;
  border: 1px solid var(--hairline); border-radius: 9999px; padding: 11px 18px 11px 40px; letter-spacing: -0.2px;
}
.doc-search input::placeholder { color: var(--muted); }
.doc-search input:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.doc-search::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='7' cy='7' r='5' fill='none' stroke='%23a1a1a6' stroke-width='1.5'/><path d='M11 11l4 4' stroke='%23a1a1a6' stroke-width='1.5'/></svg>") no-repeat center / contain;
}

.doc-toc {
  display: inline-flex; align-items: center; gap: 9px; color: var(--link);
  font-size: 17px; font-weight: 600; letter-spacing: -0.3px; cursor: pointer; margin: 4px 0 6px;
}
.doc-toc:hover { text-decoration: none; }
.toc-ic {
  width: 20px; height: 20px; border: 1.5px solid var(--link); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1;
  transition: transform .3s ease;
}
.doc-toc.open .toc-ic { transform: rotate(45deg); }
.toc-list { display: none; flex-direction: column; gap: 10px; margin: 8px 0 10px; padding-left: 29px; }
.toc-list.open { display: flex; }
.toc-list a { color: var(--link); font-size: 15px; }

.doc-body { padding-top: 8px; }
.doc-body h1 {
  font-size: clamp(32px, 5.4vw, 40px); font-weight: 600; letter-spacing: -0.4px; line-height: 1.1;
  margin: 26px 0 20px; text-wrap: balance;
}
.doc-body h2 {
  font-size: clamp(26px, 4vw, 32px); font-weight: 600; letter-spacing: -0.4px; line-height: 1.15;
  margin: 0 0 18px; text-wrap: balance;
}
.doc-body h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; margin: 28px 0 8px; }
.doc-body p { font-size: 17px; line-height: 1.62; color: var(--body); margin: 0 0 18px; }
.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 24px; color: var(--body); }
.doc-body li { font-size: 17px; line-height: 1.62; margin-bottom: 10px; }
.doc-body b, .doc-body strong { color: var(--text); font-weight: 600; }
.doc-body .warncount { color: var(--muted); font-weight: 400; font-size: 15px; }
.doc-body .kick { color: #ff6b6b; font-weight: 600; }
.doc-body hr { border: none; height: 1px; background: var(--hairline); margin: 44px 0; }
.doc-body .effective { color: var(--muted); font-size: 15px; margin-top: 24px; }
.doc-back { margin-top: 48px; }
.doc-back a::after { content: " ›"; }

/* ============ FOOTER ============ */
footer { border-top: 1px solid var(--hairline); padding: 48px 24px 40px; }
footer .fwrap { max-width: 1024px; margin: 0 auto; }
footer .fcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--hairline); }
footer h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: -0.1px; color: var(--text); }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { line-height: 2.1; }
footer li a { color: var(--muted); font-size: 12px; }
footer li span { color: var(--muted); font-size: 12px; }
footer li a:hover { color: var(--text); }
footer .legal { padding-top: 20px; color: var(--dim); font-size: 12px; line-height: 1.6; }
footer .legal p { margin: 0 0 6px; }
