:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --accent: #14b8a6;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
}

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

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 700;
}
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}

p { margin: 0 0 16px; max-width: 70ch; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* long-form content inside tool and guide pages */
.content-section h2 { margin-top: 48px; margin-bottom: 14px; }
.content-section h2:first-child { margin-top: 0; }
.content-section ul { padding-left: 20px; margin: 0 0 20px; }
.content-section li { margin-bottom: 10px; max-width: 70ch; }
.content-section li p { margin: 0 0 8px; }
.content-section code {
  background: #eef2f7;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 28px;
  font-size: 15px;
  line-height: 1.45;
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.content-section th,
.content-section td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
}
.content-section th {
  background: #f1f5f9;
  font-weight: 600;
  color: var(--text);
}
.content-section tr:last-child td { border-bottom: 0; }
.content-section td:not(:first-child),
.content-section th:not(:first-child) { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .content-section table { display: block; overflow-x: auto; white-space: nowrap; }
  .content-section th, .content-section td { padding: 8px 12px; font-size: 14px; }
}

/* table emphasis: readable header row and rhythm on long tables */
.content-section table thead th { background: #e8edf4; color: #0f172a; font-weight: 700; padding: 12px 16px; border-bottom: 2px solid #d7dde6; }
.content-section table tbody tr:nth-child(even) td { background: #f4f7fa; }
.content-section table tbody tr:last-child td { border-bottom: 0; }

/* mobile: one-row scrolling nav instead of a two-line wrap */
@media (max-width: 900px) {
  .site-header-inner { gap: 14px; }
  .site-brand { flex: 0 0 auto; }
  .site-nav {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; font-size: 15px; }
}

@media (max-width: 640px) {
  .hero { padding: 32px 0 24px; }
  .hero h1, main h1 { font-size: 30px !important; line-height: 1.22; margin-bottom: 10px; }
  .hero-sub { font-size: 16px; line-height: 1.5; margin-bottom: 20px; }
  .container { padding: 0 20px; }
  input, select, textarea { font-size: 16px; }
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid #e2e8f0;
}
.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  font-size: 18px;
}
.site-brand img, .site-brand svg { width: 28px; height: 28px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.site-nav a { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.site-nav a:hover { color: var(--primary); }

.hero {
  padding: 48px 0 32px;
}
.hero h1 { margin-bottom: 8px; }
.hero-sub {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 24px;
  max-width: 70ch;
}

.content-section { padding: 16px 0 48px; }
.content-section h2 { margin-top: 48px; }
.content-section ul, .content-section ol { padding-left: 24px; }
.content-section li { margin-bottom: 8px; }

.faq-section { padding-bottom: 64px; }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
}
.faq-item p { margin: 12px 0 0; color: var(--text-muted); }

.narrow-page { padding: 48px 0 64px; }
.narrow-page p, .narrow-page li { color: var(--text-muted); }

.site-footer {
  border-top: 1px solid #e2e8f0;
  background: var(--card);
  margin-top: 32px;
}
.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer-nav { display: flex; gap: 16px; }
.site-footer-nav a { color: var(--text-muted); }

@media (max-width: 640px) {
  .site-header-inner, .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero { padding: 32px 0 24px; }
}