:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --soft: #f7f9fc;
  --line: #e2e8f0;
  --line-strong: #cfd8e3;
  --text: #172033;
  --muted: #64748b;
  --accent: #1767d1;
  --accent-soft: #eaf3ff;
  --hero-tone: linear-gradient(135deg, #f7fbff 0%, #ecf4ff 55%, #f4f8fd 100%);
  --shadow: 0 14px 30px rgba(23, 32, 51, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --font-body: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(23, 103, 209, 0.08), transparent 30%),
    linear-gradient(180deg, #f9fbfe 0%, var(--bg) 200px, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

code,
pre {
  font-family: var(--font-mono);
}

.hidden {
  display: none !important;
}

.brand-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(4px);
}

.brand-loading-card {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  box-shadow: var(--shadow);
}

body.brand-loading .app-shell {
  visibility: hidden;
}

.fatal-state,
.loading-state,
.error-state,
.empty-state {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 230px minmax(260px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand strong {
  font-size: 16px;
  font-weight: 700;
}

.brand span,
.sidebar-head span,
.home-page-subtitle,
.release-step-item span,
.product-chip,
.product-sidebar-text,
.country-title-sub,
.doc-bar-text,
.result-meta,
.tool-page-head p,
.search-result-meta,
.hub-note p,
.hub-hero p,
.home-card p {
  color: var(--muted);
}

.topbar-search input,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  outline: none;
}

.topbar-search input {
  height: 40px;
  padding: 0 14px;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 240px;
  padding: 12px;
  resize: vertical;
}

.topbar-search input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.topbar-actions,
.topbar-nav,
.env-switch,
.locale-switch,
.doc-bar-actions,
.product-meta-row,
.hub-chip-row,
.product-meta-row,
.hub-chip-row,
.result-meta-row,
.doc-toc-grid {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 12px;
}

.topbar-nav {
  gap: 8px;
}

.topbar-nav-button,
.env-button,
.locale-button,
.sidebar-button,
.doc-nav-button,
.back-button,
.product-card-button,
.code-tab,
.doc-link-button,
.toc-chip,
.search-result-card,
.action-button,
.hub-card {
  border: 0;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.topbar-nav-button,
.env-button,
.locale-button {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
}

.topbar-nav-button.active,
.env-button.active,
.locale-button.active,
.sidebar-button.active,
.doc-nav-button.active,
.code-tab.active,
.doc-link-button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.env-switch,
.locale-switch {
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  overflow: auto;
}

.sidebar-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.sidebar-body {
  padding: 14px;
}

.sidebar-button,
.doc-nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
}

.sidebar-button:hover,
.doc-nav-button:hover,
.product-card-button:hover,
.search-result-card:hover,
.hub-card:hover,
.topbar-nav-button:hover,
.env-button:hover,
.doc-link-button:hover,
.toc-chip:hover,
.action-button:hover {
  transform: translateY(-1px);
  transition: transform 0.18s ease;
}

.sidebar-country-switcher {
  display: grid;
  gap: 8px;
}

.sidebar-country-switcher-standalone {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.sidebar-section {
  display: grid;
  gap: 10px;
}

.sidebar-section + .sidebar-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-section-head {
  display: grid;
  gap: 4px;
}

.sidebar-section-head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-section-head span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.sidebar-section-docs .product-sidebar-summary-compact {
  margin-top: -2px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-empty-state {
  margin-top: 8px;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
}

.country-sidebar-button {
  justify-content: flex-start;
  gap: 12px;
}

.country-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.country-sidebar-button.active .country-code-pill {
  background: var(--accent);
  color: #fff;
}

.country-code-pill,
.card-code-pill,
.search-country-pill,
.hub-pill,
.search-kind-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.country-title-block {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-badge,
.search-kind-pill {
  white-space: nowrap;
}

.content-area {
  padding: 24px;
}

.page-view {
  display: block;
}

.home-page,
.tool-page,
.doc-page {
  display: grid;
  gap: 24px;
}

.home-page-simple {
  gap: 0;
}

.release-banner,
.home-country-highlight,
.doc-bar,
.tool-page,
.tool-panel,
.hub-card,
.hub-note,
.home-card,
.search-result-card,
.home-stat-card {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.release-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 18px;
  padding: 24px;
  background: var(--hero-tone);
}

.release-eyebrow,
.doc-eyebrow,
.country-highlight-title,
.hub-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.release-banner h1,
.hub-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.release-step-card {
  height: 100%;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.release-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.release-step-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  margin-top: 14px;
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-stat-card {
  padding: 18px;
}

.home-stat-card strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.home-country-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 16px;
  padding: 18px 20px;
}

.country-highlight-main strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 22px;
}

.country-highlight-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2,
.hub-note h3 {
  margin: 0;
  font-size: 20px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-count {
  color: var(--muted);
  font-weight: 600;
}

.country-card-grid,
.search-result-list,
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.home-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card-button,
.search-result-card {
  width: 100%;
  padding: 0;
  background: transparent;
}

.home-capability-card,
.home-card {
  height: 100%;
  padding: 18px;
  text-align: left;
}

.home-capability-card {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.home-capability-card h3 {
  margin: 14px 0 8px;
  font-size: 20px;
}

.home-capability-card p {
  margin: 0;
  color: var(--muted);
}

.home-capability-highlight {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.home-card-top,
.hub-card-top,
.search-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-card h3,
.hub-card h2,
.search-result-card h3 {
  margin: 12px 0 6px;
  font-size: 22px;
}

.card-cta,
.hub-link {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.home-card p {
  margin: 0 0 14px;
}

.country-card-detail-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.country-card-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247, 249, 252, 0.92);
}

.country-card-detail span {
  color: var(--muted);
}

.country-card-detail strong {
  text-align: right;
}

.home-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--muted);
}

.product-chip,
.meta-pill,
.hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.meta-pill strong {
  color: var(--text);
}

.sidebar-section-countries {
  gap: 0;
}

.sidebar-section-head-compact {
  gap: 0;
}

.sidebar-section-head-compact strong {
  font-size: 14px;
}

.sidebar-section-tool {
  margin-bottom: 0;
}

.sidebar-section-tool + .sidebar-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.doc-sidebar-top {
  margin-bottom: 14px;
}

.back-button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.product-sidebar-summary,
.doc-sidebar-group {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.product-sidebar-name {
  font-size: 18px;
  font-weight: 700;
}

.doc-sidebar-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doc-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  min-height: 148px;
}

.doc-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
  flex-wrap: wrap;
  min-height: 42px;
}

.doc-bar-title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.doc-bar-text {
  min-height: 22px;
}

.doc-bar-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.doc-link,
.doc-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.doc-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px 16px;
  align-items: stretch;
}

.doc-meta .meta-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 0;
  height: 100%;
  padding: 12px 14px;
  border-radius: 14px;
}

.doc-meta .meta-pill span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.doc-meta .meta-pill strong {
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.doc-alternate-links {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.doc-alternate-links > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.doc-alternate-links .doc-link-button,
.doc-alternate-links .locale-button {
  min-height: 34px;
  padding: 0 16px;
}

.doc-toc {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.doc-toc-title {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.doc-toc-grid {
  gap: 10px;
  flex-wrap: wrap;
}

.toc-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.toc-level-3 {
  opacity: 0.86;
}

.markdown-body {
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.6em 0 0.65em;
  line-height: 1.25;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body h1 {
  font-size: 30px;
}

.markdown-body h2 {
  font-size: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.markdown-body h3 {
  font-size: 18px;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote {
  margin: 0 0 14px;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 22px;
}

.markdown-body blockquote {
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-soft);
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.markdown-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f1f5f9;
}

.preview-pane {
  margin-top: 4px;
}

.md-code,
.preview-pane pre,
.tool-result-block pre {
  overflow: auto;
  padding: 16px;
  border-radius: 14px;
  background: #1f2a37;
  color: #eef4fb;
  font-size: 13px;
  line-height: 1.6;
}

.md-code code,
.preview-pane code,
.tool-result-block code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.table-wrap {
  overflow: auto;
  margin-bottom: 14px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body thead th {
  background: #f8fbff;
  font-weight: 700;
}

.tool-page {
  padding: 22px;
}

.tool-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tool-page-head h1 {
  margin: 0;
  font-size: 30px;
}

.tool-page-head p {
  margin: 8px 0 0;
}

.tool-page-head-side {
  width: min(320px, 100%);
  display: grid;
  gap: 12px;
}

.tool-context-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.tool-context-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tool-context-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.tool-context-meta {
  color: var(--muted);
}

.tool-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-inline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-inline-grid-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tool-inline-grid label,
.param-editor-row {
  display: grid;
  gap: 8px;
}

.param-editor-row small {
  color: var(--muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.request-layout {
  align-items: start;
}

.tool-panel {
  padding: 18px;
}

.tool-panel-title {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.tool-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.tool-preview-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.product-meta-row,
.hub-chip-row {
  gap: 10px;
  flex-wrap: wrap;
}

.tool-sidebar {
  display: grid;
  gap: 14px;
}

.tool-sidebar-head {
  display: grid;
  gap: 4px;
}

.tool-sidebar-head strong {
  font-size: 16px;
  font-weight: 700;
}

.tool-sidebar-head span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.tool-sidebar-actions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.code-tab,
.action-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.action-button-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.action-button-secondary {
  background: #fff;
}

.tool-result-block {
  margin-top: 18px;
}

.result-meta-row {
  gap: 12px;
  margin-bottom: 10px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-weight: 700;
}

.result-badge.is-running {
  background: #eaf3ff;
  color: #1767d1;
}

.result-badge.is-success {
  background: #eaf7ef;
  color: #15803d;
}

.result-badge.is-error {
  background: #fff1f2;
  color: #be123c;
}

.result-badge.is-stale {
  background: #fff7ed;
  color: #c2410c;
}

.search-result-card {
  padding: 18px;
  text-align: left;
}

.search-result-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.hub-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 18px;
}

.hub-shell {
  width: min(1120px, 100%);
  display: grid;
  gap: 22px;
}

.hub-hero,
.hub-note,
.hub-card {
  padding: 24px;
}

.hub-hero {
  border-radius: 28px;
  background: var(--hero-tone);
  box-shadow: var(--shadow);
}

.hub-grid {
  gap: 18px;
}

.hub-card {
  display: block;
  text-align: left;
}

.hub-card-ipay {
  --accent: #1767d1;
}

.hub-card-legend {
  --accent: #dd6b20;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.92);
  color: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 1200px) {
  .topbar {
    grid-template-columns: 210px minmax(220px, 1fr);
  }

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

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .tool-inline-grid-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

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

  .content-area {
    padding: 18px;
  }

  .release-banner,
  .home-country-highlight,
  .home-capability-grid,
  .doc-bar,
  .tool-page-head,
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-page-head {
    display: grid;
  }

  .tool-page-head-side {
    width: 100%;
  }

  .tool-head-actions {
    justify-content: flex-start;
  }

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

  .tool-inline-grid,
  .tool-inline-grid-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .home-stat-grid {
    grid-template-columns: 1fr;
  }

  .markdown-body {
    padding: 18px;
  }

  .tool-preview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-action-row {
    margin-left: 0;
    justify-content: flex-start;
  }

  .doc-meta {
    grid-template-columns: 1fr;
  }

  .doc-bar-actions,
  .country-highlight-meta {
    justify-content: flex-start;
  }
}
