:root {
  --bg: #0b0b0d;
  --panel: #121216;
  --panel-2: #17171c;
  --line: #29292f;
  --text: #f3f3f5;
  --muted: #a8a8b3;
  --orange: #ff8a00;
  --orange-soft: #ffb35a;
  --green: #56d884;
  --red: #ff7777;
  --content: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange-soft); }
img { max-width: 100%; }
button, input { font: inherit; }

.site-shell {
  width: min(var(--content), calc(100% - 36px));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 9px 12px;
  background: var(--orange);
  color: #111;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #111;
  border-radius: 7px;
  font-size: 15px;
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.site-nav a[aria-current="page"] { color: var(--text); }

main { padding: 48px 0 24px; }

.hero {
  max-width: 760px;
  padding: 38px 0 54px;
}
.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1;
  letter-spacing: -0.045em;
}
.hero h1 span,
.page-hero h1 span,
.accent { color: var(--orange); }
.hero-copy,
.page-hero p {
  margin: 18px 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  background: var(--panel);
}
.button:hover { border-color: #4a4a52; color: var(--text); }
.button.primary { background: var(--orange); border-color: var(--orange); color: #111; }

.section {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}
.section-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.025em;
}
.section-heading p {
  margin: 0;
  max-width: 500px;
  color: var(--muted);
  font-size: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  display: block;
  min-height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
a.card:hover {
  color: var(--text);
  border-color: #505058;
  background: var(--panel-2);
}
.card-icon { display: none; }
.card h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.card p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.card-meta { display: none; }
.card-link { display: inline-block; margin-top: 14px; color: var(--orange-soft); font-size: 13px; font-weight: 700; }

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.service {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.service h3 { margin: 0 0 7px; font-size: 18px; }
.service p { margin: 0; color: var(--muted); font-size: 14px; }
.service a { color: var(--orange-soft); }

.address-list { display: grid; gap: 8px; margin-top: 12px; }
.address-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.address-row span { color: var(--muted); }

.page-hero {
  max-width: 820px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(38px, 7vw, 62px); }
.breadcrumbs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 32px;
  align-items: start;
  padding-top: 30px;
}
.article { min-width: 0; }
.article h2 {
  margin: 42px 0 12px;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 20px;
}
.article h2:first-child { margin-top: 0; }
.article h3 { margin: 28px 0 8px; font-size: 20px; }
.article p,
.article li { color: #c5c5ce; }
.article ul,
.article ol { padding-left: 22px; }
.article li + li { margin-top: 6px; }
.article a { color: var(--orange-soft); text-decoration: underline; text-underline-offset: 3px; }
.article pre {
  overflow-x: auto;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08080a;
  color: #ededf1;
  line-height: 1.55;
  font-size: 13px;
}
code, kbd {
  color: var(--orange-soft);
  font-family: Consolas, "Liberation Mono", monospace;
}
.article pre code { color: inherit; }
.inline-code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #202025;
}
.callout {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--orange);
  background: #151519;
  color: var(--muted);
}
.callout strong { color: var(--text); }
.callout.warning { border-left-color: var(--red); }
.toc {
  position: sticky;
  top: 18px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.toc strong { display: block; margin-bottom: 9px; font-size: 14px; }
.toc a { display: block; padding: 5px 0; color: var(--muted); font-size: 13px; }
.source-list { padding: 0 !important; list-style: none; }
.source-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.panel h2, .panel h3 { margin-top: 0; }
.panel p, .clean-list li { color: var(--muted); }
.clean-list { margin: 0; padding-left: 20px; }

.form-card { max-width: 680px; }
.form-grid { display: grid; gap: 15px; margin-top: 24px; }
.form-grid label { font-size: 14px; font-weight: 700; }
.form-grid input {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #0f0f12;
}
.form-grid input:focus { border-color: var(--orange); }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.hidden-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-grid button { cursor: pointer; }
.form-grid button:disabled { opacity: .6; cursor: not-allowed; }
.form-message { display: none; margin-top: 14px; padding: 12px; border-radius: 7px; }
.form-message.good { display: block; border: 1px solid #2d7045; background: #102117; color: #9ce7b8; }
.form-message.bad { display: block; border: 1px solid #743d3d; background: #241313; color: #ffb5b5; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 42px;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

@media (max-width: 820px) {
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; padding: 16px 0; }
  .site-nav { gap: 14px; }
  main { padding-top: 34px; }
  .card-grid, .card-grid.two, .service-list, .split { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; padding-left: 0; border-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
}

@media (max-width: 520px) {
  .site-shell { width: min(var(--content), calc(100% - 24px)); }
  .site-nav { gap: 11px; font-size: 13px; }
  .hero { padding-top: 20px; }
  .actions .button { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .address-row { flex-direction: column; gap: 3px; }
}
