:root {
  --ink: #16211f;
  --muted: #60716d;
  --paper: #f6f3ec;
  --panel: #fffdf8;
  --line: #d8d0c2;
  --green: #0b6f5c;
  --blue: #234e70;
  --red: #a63d2f;
  --gold: #b27812;
  --shadow: 0 18px 45px rgba(22, 33, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

p,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

code,
pre {
  font-family: "Cascadia Code", "Courier New", monospace;
}

.docs-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100%;
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(14px);
  max-width: 100%;
  min-width: 0;
}

.brand {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--panel);
  background: var(--ink);
  border-radius: 6px;
  font: 700 20px "Times New Roman", Times, serif;
  letter-spacing: 0;
}

.brand strong,
h1,
h2,
h3 {
  font-family: "Times New Roman", Times, serif;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.language-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 22px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.lang-button {
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: 700 13px "Times New Roman", Times, serif;
  letter-spacing: 0;
}

.lang-button:hover,
.lang-button:focus {
  background: rgba(11, 111, 92, 0.09);
  outline: none;
}

.lang-button.active {
  color: var(--panel);
  background: var(--green);
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-input {
  width: 100%;
  height: 38px;
  margin-bottom: 20px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 111, 92, 0.14);
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: var(--ink);
  border-radius: 6px;
  font-size: 16px;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus {
  background: rgba(11, 111, 92, 0.09);
}

.nav-link span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.main {
  width: min(1080px, 100%);
  max-width: 100%;
  min-width: 0;
  padding: 34px clamp(18px, 4vw, 48px) 72px;
}

.hero {
  display: block;
  min-height: auto;
  padding: 34px 0 36px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 100%;
  min-width: 0;
}

.kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(32px, 3.6vw, 42px);
  line-height: 1.18;
  font-weight: 700;
}

h1 span {
  display: inline;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.hero-text {
  max-width: min(700px, 100%);
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  overflow-wrap: break-word;
}

.env-panel {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(22, 33, 31, 0.06);
}

.env-panel div {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.env-panel div:last-child {
  border-bottom: 0;
}

.env-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.env-panel code {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
}

.section-band {
  margin: 0 0 28px;
  padding: 30px 0 26px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

pre {
  margin: 0 0 16px;
  padding: 16px;
  overflow-x: auto;
  color: #f8f1de;
  background: #14201d;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.status-item {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-item strong {
  display: block;
  margin-bottom: 8px;
}

.status-item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 16px;
}

.provider-card {
  min-height: 166px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.provider-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.provider-card p,
.flow-list p,
.security-note {
  color: var(--muted);
  font-size: 15px;
}

.provider-card p,
.flow-list p {
  margin: 8px 0 0;
}

.flow-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.flow-list article {
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(216, 208, 194, 0.72);
}

.flow-list article:last-child {
  border-bottom: 0;
}

.security-note {
  padding: 13px 14px;
  border-left: 4px solid var(--green);
  background: rgba(11, 111, 92, 0.07);
}

.security-note strong {
  color: var(--ink);
}

@media (max-width: 900px) {
  .docs-shell {
    display: block;
    width: 100%;
    overflow-x: hidden;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main,
  .hero,
  .section-band {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .section-heading {
    display: grid;
    gap: 6px;
    align-items: start;
  }

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

@media (max-width: 600px) {
  .main {
    width: 100%;
    max-width: 100%;
    padding: 26px 18px 58px;
    overflow-x: hidden;
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  h1 {
    max-width: 100%;
    font-size: 30px;
    line-height: 1.2;
  }

  h2 {
    font-size: 22px;
  }

  .hero-text {
    max-width: 100%;
    font-size: 16px;
  }

  .env-panel {
    width: 100%;
    max-width: 100%;
  }

  .section-band {
    padding-top: 28px;
  }

  .status-grid,
  .provider-grid {
    grid-template-columns: 1fr;
  }
}
