:root {
  color-scheme: dark;
  --page: #0c0e0f;
  --surface: #111416;
  --surface-raised: #15191b;
  --surface-hover: #1b2023;
  --border: #363c40;
  --border-subtle: #252a2d;
  --text: #d3d8db;
  --text-strong: #f0f2f3;
  --muted: #91999e;
  --muted-quiet: #737c82;
  --accent: #86b5c7;
  --accent-bright: #a8cfdd;
  --accent-surface: #17313b;
  --focus: #b7dce9;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-size: 14px;
  line-height: 1.58;
}

::selection {
  background: var(--accent-surface);
  color: var(--text-strong);
}

a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--text-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

code,
pre {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums slashed-zero;
}

h1,
h2,
h3 {
  color: var(--text-strong);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 6px 9px;
  transform: translateY(-160%);
  border: 1px solid var(--text-strong);
  background: var(--page);
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 12px;
}

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

.site-header {
  min-height: 38px;
  border-bottom: 1px solid var(--border);
  background: var(--page);
}

.site-header-inner {
  width: min(1600px, calc(100% - 32px));
  min-height: inherit;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  flex: 0 0 auto;
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.site-nav a {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text-strong);
  text-decoration: underline;
}

.workspace-frame,
.workspace-section {
  width: min(1800px, calc(100% - 24px));
  margin-inline: auto;
}

.utility-intro {
  padding: 15px 0 13px;
  border-bottom: 1px solid var(--border-subtle);
}

.utility-intro h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.utility-description {
  margin: 2px 0 0;
  color: var(--text);
}

.utility-facts {
  display: flex;
  flex-wrap: wrap;
  margin: 4px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.utility-facts span + span::before {
  content: "/";
  margin: 0 7px;
  color: var(--muted-quiet);
}

.workspace-section {
  margin-top: 10px;
  margin-bottom: 42px;
  scroll-margin-top: 8px;
}

.workspace-caption {
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px;
}

.workspace-caption h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

#root {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.manual-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto 76px;
}

.manual-section {
  padding: 30px 0 34px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 12px;
}

.manual-heading {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 18px;
}

.manual-heading h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-transform: uppercase;
}

.manual-heading p {
  margin: 0;
  color: var(--muted);
}

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

.directory-list li {
  min-height: 40px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: baseline;
  gap: 28px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.directory-list a {
  font-family: var(--mono);
  font-size: 12px;
}

.directory-list span {
  color: var(--muted);
  font-size: 13px;
}

.format-table-wrap,
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
}

.format-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.format-table {
  min-width: 650px;
}

.data-table {
  min-width: 560px;
}

.format-table th,
.format-table td,
.data-table th,
.data-table td {
  padding: 8px 10px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

.format-table tr:last-child > *,
.data-table tr:last-child > * {
  border-bottom: 0;
}

.format-table tr > *:last-child,
.data-table tr > *:last-child {
  border-right: 0;
}

.format-table thead th,
.data-table thead th {
  background: var(--surface-raised);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.format-table tbody th {
  font-family: var(--mono);
  font-weight: 600;
}

.format-table td:nth-child(2),
.format-table td:nth-child(3),
.data-table td:first-child,
.data-table td:nth-child(2) {
  font-family: var(--mono);
  white-space: nowrap;
}

.manual-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manual-columns > div {
  padding-right: 32px;
}

.manual-columns > div + div {
  padding-right: 0;
  padding-left: 32px;
  border-left: 1px solid var(--border-subtle);
}

.manual-columns h3 {
  margin: 0 0 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.manual-columns p,
.manual-columns ol {
  margin: 0;
  color: var(--muted);
}

.manual-columns ol {
  padding-left: 19px;
}

.manual-columns li + li {
  margin-top: 6px;
}

.site-footer {
  min-height: 44px;
  border-top: 1px solid var(--border);
  background: #090b0c;
}

.footer-content p {
  margin: 0;
  color: var(--muted-quiet);
  font-family: var(--mono);
  font-size: 10px;
}

.footer-content nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
}

.footer-content a {
  color: var(--muted);
}

.noscript-note {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 30;
  max-width: 420px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
}

/* Tool and file-format references */
.reference-column {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
}

.reference-header {
  padding: 19px 0 24px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 15px;
  padding: 0;
  color: var(--muted-quiet);
  font-family: var(--mono);
  font-size: 10px;
  list-style: none;
}

.breadcrumb-list a {
  color: var(--muted);
}

.reference-header h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(24px, 3.4vw, 31px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-lead {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.reference-actions {
  min-height: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  font-size: 12px;
}

.button-link {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
}

.button-link:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  color: var(--text-strong);
}

.button-link.is-primary {
  border-color: #4e7583;
  background: var(--accent-surface);
  color: var(--text-strong);
}

.page-main {
  padding: 28px 0 70px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: start;
  gap: 54px;
}

.article-main {
  min-width: 0;
}

.article-section {
  padding: 0 0 31px;
  scroll-margin-top: 12px;
}

.article-section + .article-section,
.related-section {
  padding-top: 31px;
  border-top: 1px solid var(--border-subtle);
}

.article-section h2,
.related-section h2 {
  margin: 0 0 13px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.015em;
  line-height: 1.35;
}

.article-section h3 {
  margin: 22px 0 7px;
  font-size: 14px;
}

.article-section p,
.article-section li {
  color: var(--muted);
}

.article-section p {
  margin: 0 0 12px;
}

.article-section ul,
.article-section ol {
  margin: 12px 0;
  padding-left: 20px;
}

.article-section li + li {
  margin-top: 6px;
}

.article-aside {
  position: sticky;
  top: 16px;
  padding-left: 17px;
  border-left: 1px solid var(--border);
}

.article-aside h2 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-aside nav {
  display: grid;
}

.article-aside a {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 3px 0;
  color: var(--muted);
  font-size: 11px;
}

.code-signature {
  margin: 13px 0 16px;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  background: #080a0b;
}

.code-signature code {
  color: var(--accent-bright);
  font-size: 15px;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.data-table-wrap {
  margin: 15px 0;
}

.faq-list {
  margin-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.faq-list > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.faq-list h3 {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 12px;
}

.faq-list p {
  margin: 0;
}

.source-note {
  margin: 0 0 31px;
  color: var(--muted-quiet);
  font-size: 11px;
}

.source-note a {
  overflow-wrap: anywhere;
}

.related-section {
  margin-top: 0;
}

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

.related-list li {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.related-list a {
  font-family: var(--mono);
  font-size: 11px;
}

.related-list span {
  color: var(--muted);
  font-size: 11px;
}

.notice {
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

.error-header {
  min-height: 320px;
}

.error-code {
  margin: 0 0 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 820px) {
  .manual-heading {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .directory-list li {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .article-aside {
    position: static;
    order: -1;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--border);
    border-left: 0;
  }

  .article-aside nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }
}

@media (max-width: 620px) {
  .site-header-inner {
    width: calc(100% - 20px);
    gap: 14px;
  }

  .site-nav {
    max-width: calc(100vw - 104px);
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    min-height: 42px;
  }

  .workspace-frame {
    width: calc(100% - 20px);
  }

  .utility-intro h1 {
    font-size: 18px;
  }

  .utility-description {
    font-size: 13px;
  }

  .workspace-section {
    width: calc(100% - 8px);
    margin-top: 6px;
  }

  .workspace-caption {
    min-height: 34px;
    padding: 0 4px;
  }

  .workspace-caption p {
    max-width: 65vw;
    text-align: right;
  }

  .manual-shell,
  .reference-column {
    width: calc(100% - 24px);
  }

  .manual-section {
    padding: 26px 0;
  }

  .manual-heading {
    display: block;
  }

  .manual-heading h2 {
    margin-bottom: 4px;
  }

  .directory-list li {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
  }

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

  .manual-columns > div {
    padding-right: 0;
  }

  .manual-columns > div + div {
    margin-top: 22px;
    padding-top: 22px;
    padding-left: 0;
    border-top: 1px solid var(--border-subtle);
    border-left: 0;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 10px 0;
  }

  .reference-header {
    padding: 15px 0 20px;
  }

  .reference-header h1 {
    font-size: 23px;
  }

  .page-lead {
    font-size: 14px;
  }

  .button-link {
    min-height: 40px;
  }

  .page-main {
    padding: 24px 0 54px;
  }

  .article-aside nav {
    grid-template-columns: 1fr;
  }

  .article-aside a {
    min-height: 36px;
  }

  .related-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
