:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #526176;
  --line: #d8e0ea;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --accent: #075985;
  --accent-strong: #0c4a6e;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; }
a:hover, a:focus-visible { color: var(--accent-strong); }

.site-header, .site-footer {
  background: #0f172a;
  color: #e2e8f0;
}

.site-header { border-bottom: 4px solid #38bdf8; }
.site-header-inner, .site-footer-inner, .page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}
.site-header-inner { padding: 1rem 0; }
.brand { color: #f8fafc; text-decoration: none; font-weight: 800; letter-spacing: .02em; font-size: 1.25rem; }
.brand span { color: #7dd3fc; }
.site-nav { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .7rem; }
.site-nav a { color: #cbd5e1; padding: .25rem 0; }
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; }

.page-shell { padding: 2rem 0 3rem; }
.hero, .panel, .tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .75rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.hero { padding: clamp(1.25rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.hero h1 { margin: 0 0 .35rem; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; }
.hero p { max-width: 70ch; color: var(--muted); margin: .5rem 0 0; }
.panel { padding: 1rem; margin: 1rem 0; overflow-x: auto; }
.panel h2 { margin-top: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.tool-card { padding: 1rem; }
.tool-card h3 { margin-top: 0; }
.tool-card p { color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
td, th { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { background: #e0f2fe; color: #0c4a6e; }
tr:nth-child(even) td { background: #f8fafc; }

form { max-width: 70rem; }
input, textarea, select, button { font: inherit; max-width: 100%; }
input, textarea, select { border: 1px solid #94a3b8; border-radius: .35rem; padding: .55rem .65rem; }
button, input[type="button"], input[type="submit"] { cursor: pointer; border: 0; border-radius: .35rem; padding: .55rem .8rem; background: var(--accent); color: white; }
button:hover, input[type="button"]:hover, input[type="submit"]:hover { background: var(--accent-strong); }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #7dd3fc; outline-offset: 2px; }

.site-footer { padding: 1.25rem 0; font-size: .9rem; }
.site-footer a { color: #bae6fd; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  .site-header-inner, .site-footer-inner, .page-shell { width: min(100% - 1rem, 1120px); }
  .page-shell { padding-top: 1rem; }
  td, th { padding: .45rem; font-size: .92rem; }
  textarea { width: 100%; }
}
