:root {
  color: #111827;
  background: #ffffff;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --resource-blue: #1d4ed8;
  --resource-muted: #4b5563;
  --resource-border: #dbe3ef;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 78px; }
body { margin: 0; }
a { color: var(--resource-blue); }
a:focus-visible, button:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.wrap { width: min(100% - 48px, 1050px); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: -64px;
  left: 12px;
  padding: 8px 14px;
  color: #ffffff;
  background: #111827;
  border-radius: 8px;
}
.skip-link:focus { top: 10px; }
nav[data-site-nav] {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffff;
  border-bottom: 1px solid var(--resource-border);
}
.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - 48px, 1192px);
  min-height: 60px;
  margin-inline: auto;
}
.brand, .nav-right, .nav-links { display: flex; align-items: center; }
.brand { gap: 10px; color: #111827; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand b { color: #2563eb; }
.brand img { border-radius: 8px; }
.nav-right { min-width: 0; gap: 12px; }
.nav-links { gap: 14px; overflow-x: auto; white-space: nowrap; font-size: 13px; }
.nav-links a { color: var(--resource-muted); text-decoration: none; }
.nav-links a:hover { color: var(--resource-blue); }
.nav-links .nav-cta {
  padding: 7px 13px;
  border-radius: 8px;
  color: #ffffff;
  background: #2563eb;
}
.nav-links .nav-cta:hover { color: #ffffff; background: var(--resource-blue); }

.resource-hero { padding: 44px 0 36px; background: linear-gradient(180deg, #eff6ff, #ffffff); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--resource-muted); }
.resource-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.resource-hero p { max-width: 680px; margin: 0; color: var(--resource-muted); font-size: 18px; }
.resource-main { padding-bottom: 60px; }
.resource-main > section + section { margin-top: 36px; }
.resource-main h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.3; }
.resource-main p { margin: 0 0 16px; }
.resource-main h3 { margin: 25px 0 8px; font-size: 18px; }

.resource-table, .wiki-preview { overflow-x: auto; }
.resource-table table, .wiki-preview table { width: 100%; border-collapse: collapse; }
.resource-table th, .resource-table td, .wiki-preview th, .wiki-preview td {
  padding: 10px 12px;
  border: 1px solid var(--resource-border);
  text-align: left;
  vertical-align: top;
}
.resource-table th, .wiki-preview th {
  background: #eff6ff;
  color: #172b4d;
  font-weight: 700;
}
.resource-table code, .wiki-preview code {
  overflow-wrap: anywhere;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #1e3a8a;
}
.resource-table code { white-space: pre-wrap; }
.resource-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0; }
.resource-button {
  display: inline-block;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--resource-blue);
  color: #ffffff;
  line-height: 1.5;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.resource-button:hover { background: #1e40af; }
.resource-button.secondary { background: #ffffff; color: var(--resource-blue); border-color: var(--resource-border); }
.resource-button.secondary:hover { background: #eff6ff; }
.resource-button:disabled { background: #e2e8f0; color: #475569; cursor: default; }
.copy-status { min-height: 23px; color: var(--resource-muted); font-size: 14px; }
.template-sheet, .wiki-workbench {
  padding: clamp(15px, 3vw, 26px);
  border: 1px solid var(--resource-border);
  border-radius: 14px;
  background: #f8fafc;
}
.template-sheet h2 { margin-bottom: 14px; font-size: 22px; }
.template-sheet table { background: #ffffff; }
.template-sheet .resource-table { margin-bottom: 20px; }
.template-sheet .resource-table:last-child { margin-bottom: 0; }
.template-sheet table { min-width: 420px; }
.wiki-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wiki-label { display: block; margin-bottom: 6px; font-weight: 700; }
.wiki-input, .wiki-output {
  width: 100%;
  min-height: 235px;
  padding: 14px;
  border: 1px solid var(--resource-border);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  overflow-wrap: anywhere;
}
.wiki-input { resize: vertical; font: 14px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.wiki-output { max-height: 560px; overflow: auto; }
.wiki-output .wiki-empty { color: var(--resource-muted); }
.wiki-preview a:not([href]) { text-decoration: underline; cursor: text; }
.wiki-preview > :first-child { margin-top: 0; }
.wiki-preview > :last-child { margin-bottom: 0; }
.wiki-preview :is(h1,h2,h3,h4,h5,h6) { margin: 10px 0 8px; line-height: 1.3; }
.wiki-preview :is(h1,h2) { font-size: 21px; }
.wiki-preview :is(h3,h4,h5,h6) { font-size: 17px; }
.wiki-preview pre { overflow-x: auto; padding: 10px; background: #eff6ff; }
.wiki-preview blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid #93c5fd; }
.resource-related { margin: 0; padding-left: 21px; }

footer { padding: 42px 0 28px; background: #f8fafc; border-top: 1px solid var(--resource-border); }
.footer-grid { display: grid; grid-template-columns: minmax(160px, 1.4fr) repeat(3, 1fr); gap: 22px; }
.footer-column { display: flex; flex-direction: column; gap: 6px; }
.footer-column h2 { font-size: 13px; margin: 0; }
.footer-grid p, .footer-grid a { color: var(--resource-muted); font-size: 14px; }

@media (max-width: 960px) {
  html { scroll-padding-top: 164px; }
  .site-nav-inner { flex-wrap: wrap; padding-block: 8px; }
  .nav-right { flex-wrap: wrap; width: 100%; }
  .nav-links { order: 2; width: 100%; padding-block: 5px; }
}
@media (max-width: 700px) {
  .wrap, .site-nav-inner { width: min(100% - 32px, 1050px); }
  .resource-hero { padding: 30px 0; }
  .wiki-columns { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}
