:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --accent: #0f766e;
  --focus: #0f766e;
  --header-height: 68px;
  --container-max: 1040px;
  --sidebar-width: 272px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

body.drawer-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 300;
  transform: translateY(-200%);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.container {
  width: min(var(--container-max), calc(100% - 2rem));
  margin-inline: auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.header__inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__link {
  text-decoration: none;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 500;
}

.header__link:hover {
  color: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  text-decoration: none;
  color: var(--text);
}

.brand__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand__name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.62rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__product {
  font-weight: 700;
  font-size: 1.3em;
}

.brand__context {
  white-space: nowrap;
}

.tabs-wrap {
  border-top: 1px solid #f3f4f6;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tabs__button {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.85rem 0.1rem 0.75rem;
  cursor: pointer;
}

.tabs__button:hover {
  color: var(--muted-strong);
}

.tabs__button.is-active,
.tabs__button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

.privacy-main {
  padding-block: 2rem 2.5rem;
}

.privacy-hero {
  margin-bottom: 1.6rem;
}

.privacy-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.privacy-hero p {
  margin: 0.7rem 0 0;
  max-width: 70ch;
  color: var(--muted);
}

.tab-panel[hidden] {
  display: none;
}

.section-title {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0.55rem 0 1.25rem;
  color: var(--muted);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.intro-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 1rem 1.1rem;
}

.intro-block:hover {
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06);
}

.intro-block h2 {
  margin: 0;
  font-size: 1.13rem;
  font-weight: 600;
}

.intro-block p {
  margin: 0.45rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.inline-link:hover {
  text-decoration: underline;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.doc-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.doc-item h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.doc-item p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.doc-state {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
}

.menu-toggle--doc {
  border: 0;
  border-radius: 12px;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
}

.reading-progress {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 119;
  background: #f1f5f9;
}

.reading-progress__bar {
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding-block: 1.6rem 2.2rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  z-index: 50;
}

.sidebar__inner {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  max-height: calc(100vh - var(--header-height) - 2rem);
  overflow: auto;
  background: #fff;
}

.sidebar__search-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted-strong);
}

.input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.input::placeholder {
  color: #9ca3af;
}

.sidebar__list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
}

.sidebar__list li + li {
  margin-top: 0.14rem;
}

.sidebar__item--major {
  margin-top: 0.45rem;
}

.sidebar__item--major:first-child {
  margin-top: 0;
}

.sidebar__list a {
  display: block;
  text-decoration: none;
  color: #374151;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
}

.sidebar__list a:hover {
  background: #f8fafc;
}

.sidebar__list a.is-active {
  color: #111827;
  background: #f3f4f6;
  font-weight: 700;
  font-size: 0.97rem;
}

.sidebar__empty {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.content {
  min-width: 0;
}

.card {
  padding: 0.2rem 0 1.1rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.card + .card {
  margin-top: 1.15rem;
}

.card h1,
.card h2,
.card h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.card h1 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  font-weight: 600;
}

.card h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  font-weight: 600;
}

.card h3 {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
}

.card p,
.card blockquote,
.card ul,
.card ol,
.card .md-table-wrap {
  margin: 0.8rem 0 0;
}

.card p {
  color: #111827;
}

.card ul,
.card ol {
  padding-left: 1.15rem;
}

.card li + li {
  margin-top: 0.35rem;
}

.card a {
  color: var(--accent);
}

.card a:hover {
  text-decoration: underline;
}

.card blockquote {
  border-left: 3px solid #d1d5db;
  padding-left: 0.8rem;
  color: #4b5563;
}

.card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
}

.md-table-wrap {
  overflow-x: auto;
}

.card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.card th,
.card td {
  text-align: left;
  vertical-align: top;
  border: 1px solid #e5e7eb;
  padding: 0.45rem 0.55rem;
}

.card th {
  background: #f9fafb;
  font-weight: 600;
}

.subtitle {
  margin: 0.5rem 0 0.8rem;
  color: var(--muted);
}

.updated {
  margin: 0 0 0.85rem;
  color: var(--muted-strong);
}

.chip {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.topic {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 40px;
  padding: 0.5rem 0.95rem;
  color: var(--text);
  background: #fff;
  font-weight: 500;
  font-size: 0.9rem;
}

.button:hover,
.button--secondary:hover {
  background: #f9fafb;
}

.button--secondary {
  border-color: var(--border);
}

.drawer-overlay {
  display: none;
}

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

@media (min-width: 768px) {
  .intro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .container {
    width: min(var(--container-max), calc(100% - 1.5rem));
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .layout {
    display: block;
    padding-top: 1rem;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(90vw, 340px);
    height: 100dvh;
    padding: calc(var(--header-height) + 0.7rem) 0.75rem 0.8rem;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar__inner {
    max-height: calc(100dvh - var(--header-height) - 1.5rem);
  }

  .drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(17, 24, 39, 0.32);
  }

  .drawer-overlay.is-active {
    display: block;
  }

  .doc-item {
    flex-direction: column;
    gap: 0.4rem;
  }

  .header__link {
    font-size: 0.85rem;
  }

  .header__actions--doc {
    gap: 0.95rem;
  }

  .header__link--doc {
    display: none;
  }

  .header__link--doc:hover {
    color: var(--muted-strong);
  }

  .header__link--doc:active {
    color: var(--muted);
  }

  .menu-toggle--doc {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    border-radius: 12px;
    font-size: 1.2rem;
    color: var(--text);
  }

  .menu-toggle--doc:hover {
    background: rgba(15, 23, 42, 0.08);
  }

  .menu-toggle--doc:active {
    background: rgba(15, 23, 42, 0.14);
  }

  .header__link--doc:focus-visible,
  .menu-toggle--doc:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }

}

@media (min-width: 1024px) {
  .drawer-overlay,
  .drawer-overlay.is-active {
    display: none;
  }
}

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