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

:root {
  color-scheme: dark;
  --bg: #0c0617;
  --bg-deep: #08030f;
  --surface: rgba(31, 17, 53, 0.82);
  --surface-strong: #24133b;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.14);
  --line-bright: rgba(255, 130, 218, 0.38);
  --text: #fff9ff;
  --text-soft: #ded3e6;
  --muted: #a99ab6;
  --pink: #ff42b3;
  --pink-soft: #ff86ce;
  --cyan: #58e6e0;
  --violet: #9f72ff;
  --shadow: 0 24px 70px rgba(4, 0, 12, 0.42);
  --font: "Avenir Next", "Trebuchet MS", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(900px 620px at 96% -8%, rgba(255, 66, 179, 0.18), transparent 66%),
    radial-gradient(780px 650px at -12% 28%, rgba(109, 67, 210, 0.2), transparent 68%),
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.54) 0 1px, transparent 1.5px) 0 0 / 420px 420px,
    radial-gradient(circle at 78% 71%, rgba(108, 230, 224, 0.35) 0 1px, transparent 1.7px) 0 0 / 590px 590px,
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  top: -80px;
  left: 18px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: #160b24;
  font-weight: 700;
}
.skip-link:focus { top: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 4, 20, 0.76);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
}
.header-inner { min-height: 70px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; font-weight: 750; letter-spacing: -0.04em; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--pink), #bd31f2);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 66, 179, 0.32);
}
.site-header nav { display: flex; gap: 24px; margin-right: auto; }
.site-header nav a, .site-footer nav a { color: var(--text-soft); font-size: 14px; font-weight: 650; text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--pink-soft); }

.button, .copy-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: linear-gradient(135deg, #e72c9b, #9d3cdf);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(205, 38, 166, 0.22);
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}
.button:hover, .copy-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.button-small { min-height: 40px; padding: 0 18px; font-size: 14px; }

.help-hero { padding: 92px 0 74px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr); gap: 70px; align-items: end; }
.eyebrow { margin: 0 0 12px; color: var(--pink-soft); font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.help-hero h1, .article-header h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 6.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.058em;
}
.help-hero h1 span { color: var(--pink); }
.hero-lead, .article-lead { max-width: 740px; margin: 24px 0 0; color: var(--text-soft); font-size: clamp(18px, 2.1vw, 22px); line-height: 1.55; }

.search-box { max-width: 720px; margin-top: 38px; }
.search-box > label { display: block; margin-bottom: 9px; color: var(--text-soft); font-size: 13px; font-weight: 720; }
.search-control {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--line-bright);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.18);
}
.search-control span { color: var(--pink-soft); font-size: 23px; transform: rotate(-20deg); }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 17px; }
.search-control input::placeholder { color: #9d8eaa; }
.search-hint { display: flex; gap: 8px; margin: 10px 2px 0; color: var(--muted); font-size: 12px; }
.search-hint [data-result-count] { margin-left: auto; }
kbd { min-width: 22px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text-soft); font: 11px var(--mono); text-align: center; }

.ai-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line-bright);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(61, 27, 85, 0.92), rgba(29, 16, 48, 0.88));
  box-shadow: var(--shadow);
}
.ai-card::before { content: ""; position: absolute; width: 180px; height: 180px; top: -90px; right: -65px; border-radius: 50%; background: rgba(255, 66, 179, 0.18); filter: blur(2px); }
.ai-card h2 { position: relative; margin: 0; font-size: 25px; line-height: 1.16; letter-spacing: -0.035em; }
.ai-card p:not(.card-label) { color: var(--text-soft); font-size: 14px; }
.ai-card code { display: block; overflow-wrap: anywhere; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(7, 2, 14, 0.54); color: #f6dcf2; font: 12px/1.55 var(--mono); }
.copy-button { min-height: 40px; margin-top: 14px; padding: 0 16px; font-size: 13px; }
.copy-button.is-copied { background: linear-gradient(135deg, #157f78, #2e9f92); }

.guide-section { padding-block: 82px 96px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.section-heading h2, .machine-section h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.06; letter-spacing: -0.045em; }
.section-heading > p { margin: 0 0 7px; color: var(--muted); font-size: 13px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.filter-row button {
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.filter-row button:hover { border-color: var(--line-bright); }
.filter-row button[aria-pressed="true"] { border-color: transparent; background: var(--pink); color: #fff; }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide-card {
  display: flex;
  min-width: 0;
  min-height: 300px;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: linear-gradient(150deg, rgba(39, 22, 61, 0.82), rgba(19, 10, 33, 0.84));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.guide-card:hover { transform: translateY(-3px); border-color: var(--line-bright); background: linear-gradient(150deg, rgba(51, 27, 77, 0.92), rgba(23, 12, 39, 0.9)); }
.guide-card[hidden] { display: none; }
.card-label { margin: 0 0 12px; color: var(--pink-soft); font-size: 10px; font-weight: 820; letter-spacing: 0.13em; text-transform: uppercase; }
.guide-card h2, .guide-card h3 { margin: 0; font-size: 23px; line-height: 1.18; letter-spacing: -0.035em; }
.guide-card h2 a, .guide-card h3 a { text-decoration: none; }
.guide-card > p:not(.card-label) { color: var(--text-soft); font-size: 14px; }
.card-link { display: inline-flex; gap: 7px; align-items: center; margin-top: auto; color: var(--pink-soft); font-size: 13px; font-weight: 800; text-decoration: none; }
.card-link:hover { color: #fff; }
.empty-state { padding: 64px; border: 1px dashed var(--line); border-radius: 24px; text-align: center; }
.empty-state h2 { margin: 0; }
.empty-state p { color: var(--muted); }

.machine-section { padding-block: 72px; border-top: 1px solid var(--line); background: rgba(31, 17, 52, 0.38); }
.machine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.machine-grid > div > p:not(.eyebrow) { max-width: 610px; color: var(--text-soft); }
.machine-links { display: grid; gap: 12px; }
.machine-links a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); text-decoration: none; }
.machine-links a:hover { border-color: var(--line-bright); }
.machine-links strong { color: var(--pink-soft); font: 700 14px var(--mono); }
.machine-links span { color: var(--muted); font-size: 13px; text-align: right; }

.article-main { padding: 52px 0 96px; }
.article-layout { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 78px; justify-content: center; align-items: start; }
.article-nav { position: sticky; top: 100px; }
.article-nav .back-link { display: inline-block; margin-bottom: 38px; color: var(--pink-soft); font-size: 13px; font-weight: 780; text-decoration: none; }
.article-nav nav { display: grid; gap: 8px; }
.article-nav nav a { padding: 7px 0; color: var(--muted); font-size: 13px; text-decoration: none; }
.article-nav nav a:hover { color: var(--text); }
.help-article { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 38px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--text-soft); text-decoration: none; }
.article-header { padding-bottom: 46px; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(42px, 6vw, 67px); }
.article-meta { margin: 20px 0 0; color: var(--muted); font-size: 12px; }
.help-article section { padding-block: 42px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.help-article section:last-child { border-bottom: 0; }
.help-article h2 { margin: 0 0 20px; font-size: 29px; letter-spacing: -0.035em; }
.help-article h3 { margin: 30px 0 12px; font-size: 18px; }
.help-article p, .help-article li { color: var(--text-soft); font-size: 16px; }
.help-article ul, .help-article ol { display: grid; gap: 13px; margin: 0; padding-left: 24px; }
.help-article li::marker { color: var(--pink-soft); font-weight: 800; }
.path-callout { display: grid; grid-template-columns: 62px 1fr; gap: 16px; padding: 19px 21px; border: 1px solid var(--line-bright); border-radius: 16px; background: rgba(255, 66, 179, 0.07); }
.path-callout span { color: var(--pink-soft); font-size: 11px; font-weight: 820; letter-spacing: 0.1em; text-transform: uppercase; }
.path-callout p { margin: 0; }
.prompt-box { padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: rgba(5, 2, 10, 0.54); }
.prompt-box code { display: block; overflow-wrap: anywhere; color: #f7e3f4; font: 13px/1.65 var(--mono); }
.safety-note { margin-top: 25px; padding: 20px; border-left: 3px solid var(--cyan); border-radius: 0 14px 14px 0; background: rgba(88, 230, 224, 0.07); }
.safety-note strong { color: var(--cyan); }
.safety-note p { margin: 6px 0 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-card-compact { min-height: 215px; padding: 18px; border-radius: 17px; }
.guide-card-compact h3 { font-size: 16px; }
.guide-card-compact > p:not(.card-label) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 12px; }

.site-footer { padding-block: 52px; border-top: 1px solid var(--line); background: rgba(5, 2, 10, 0.45); }
.footer-inner { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.footer-inner > div > p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .ai-card { max-width: 680px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-nav { position: static; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
  .article-nav .back-link, .article-nav .card-label { margin: 0; }
  .article-nav nav { display: none; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 32px, 1160px); }
  .header-inner { gap: 14px; }
  .site-header nav { display: none; }
  .header-inner .button { margin-left: auto; }
  .help-hero { padding: 58px 0 52px; }
  .help-hero h1 { font-size: 44px; }
  .hero-lead { font-size: 17px; }
  .ai-card { padding: 23px; }
  .guide-section { padding-block: 58px 68px; }
  .section-heading { align-items: start; flex-direction: column; gap: 6px; }
  .guide-grid, .machine-grid, .related-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 240px; }
  .machine-grid { gap: 30px; }
  .article-main { padding-top: 30px; }
  .article-nav { margin-bottom: 20px; }
  .article-header h1 { font-size: 42px; }
  .help-article section { padding-block: 34px; }
  .path-callout { grid-template-columns: 1fr; gap: 5px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
}

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