:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #14213d;
  --text-soft: #4a5568;
  --border: #e2e8f0;
  --brand: #0077b6;
  --brand-dark: #005f8f;
  --accent: #16a34a;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 10%, rgba(0, 119, 182, 0.1), transparent 38%),
    radial-gradient(circle at 15% 0%, rgba(22, 163, 74, 0.09), transparent 32%),
    var(--bg);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

.container {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 1.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
}

.nav a[aria-current="page"],
.nav a:hover {
  background: #edf2f7;
}

.hero {
  padding: 2rem 0 1rem;
}

.kicker {
  margin: 0;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
}

h1 {
  margin: 0.25rem 0 0.5rem;
  line-height: 1.2;
  font-size: clamp(1.8rem, 3.7vw, 2.55rem);
}

.lead {
  margin-top: 0;
  color: var(--text-soft);
  max-width: 72ch;
}

.hero-media {
  margin: 1rem 0 0;
}

.hero-media img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.hero-media figcaption {
  margin-top: 0.5rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 1rem 0;
}

.card-body {
  padding: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

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

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

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

.field label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
}

.muted {
  color: var(--text-soft);
}

.btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 20px rgba(0, 95, 143, 0.25);
}

.btn-ghost {
  background: #fff;
}

.result-panel {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border-left: 4px solid var(--brand);
}

.result {
  display: grid;
  gap: 0.6rem;
}

.result-row {
  border: 1px dashed #d5deea;
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-row strong {
  font-variant-numeric: tabular-nums;
}

.prose h2,
.prose h3 {
  line-height: 1.25;
}

.prose ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

pre.code {
  border-radius: 10px;
  border: 1px solid #0b1328;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  padding: 1rem;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.site-footer a {
  color: var(--brand-dark);
}

.ad-top { margin: 0.8rem 0; }
.ad-inarticle { margin-top: 1rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  z-index: 1000;
}
