:root {
  --bg-1: #f5f5f6;
  --bg-2: #eceef1;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #475569;
  --border: rgba(120, 138, 173, 0.34);
  --shadow: 0 18px 36px rgba(24, 39, 75, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(145deg, var(--bg-1), var(--bg-2));
  padding: clamp(12px, 2.5vw, 24px);
  padding-left: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-left));
  padding-right: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-right));
  padding-bottom: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-bottom));
}
.site-header {
  width: min(1100px, 100%);
  margin: 0 auto 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 39, 75, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}
.site-brand {
  text-decoration: none;
  border: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 8px;
}
.site-brand img { display: block; height: 34px; width: auto; }
.menu-toggle {
  display: none;
  border: 1px solid rgba(120, 138, 173, 0.42);
  background: #ffffff;
  color: #334155;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.menu-toggle .bar {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  display: block;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}
.site-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.site-links a {
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  color: #334155;
  font-weight: 600;
}
.site-links a:hover { background: rgba(45, 109, 207, 0.1); color: #234f97; }
main {
  width: min(1100px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.5vw, 26px);
  display: grid;
  gap: 16px;
}
.breadcrumbs { font-size: 0.82rem; color: var(--muted); }
.breadcrumbs a { color: #1d4ed8; text-decoration: none; border-bottom: 1px solid rgba(45, 109, 207, 0.35); }
h1 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h2 { font-size: 1.12rem; margin-top: 4px; }
h3 { font-size: 1rem; margin-top: 4px; color: #334155; }
p, li { color: var(--muted); line-height: 1.55; }
ul, ol { padding-left: 20px; display: grid; gap: 6px; }
.section-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: #ffffff;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.related-grid a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
}
.related-grid a span {
  color: #1d4ed8;
  font-weight: 600;
  border-bottom: 1px solid rgba(45, 109, 207, 0.35);
  justify-self: start;
}
.cta-inline a, .page-footer a {
  color: #1d4ed8;
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 109, 207, 0.35);
}
.cta-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.retention {
  border: 1px dashed rgba(120, 138, 173, 0.55);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}
.page-footer {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}
.page-footer a { margin: 0 6px; }
@media (max-width: 760px) {
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .site-brand img { height: 30px; }
  .menu-toggle { display: inline-flex; }
  .site-links {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
  }
  .site-header.menu-open .site-links { display: flex; }
  .site-links a { display: block; width: 100%; }
}
