/* Kalmerio — editorial information design system */
:root {
  --bg: #FFFFFF;
  --bg-soft: #F6F8FA;
  --primary: #174A7E;
  --primary-hover: #123A64;
  --text: #17212B;
  --text-muted: #5F6B76;
  --border: #E2E7EC;
  --accent: #D8A83E;
  --accent-soft: #F7F0DE;
  --danger: #C83D3D;
  --success: #1F6B4A;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(23, 33, 43, 0.06), 0 8px 24px rgba(23, 33, 43, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, "Source Sans 3", "Helvetica Neue", sans-serif;
  --container: 1120px;
  --prose: 760px;
  --header-h: 72px;
  --focus: 0 0 0 3px rgba(23, 74, 126, 0.35);
  --transition: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.prose-width { max-width: var(--prose); }

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin: 0 0 0.85rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.65rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
strong { font-weight: 650; }

.muted { color: var(--text-muted); }
.small { font-size: 0.925rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  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;
  min-height: var(--header-h);
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.logo img, .logo svg { width: 36px; height: 36px; }
.logo span { letter-spacing: -0.03em; }
.logo .logo-mark { color: var(--primary); }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-desktop a {
  display: block;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 560;
  border-radius: var(--radius-sm);
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  background: var(--bg-soft);
  color: var(--primary);
}
.nav-cta {
  display: none;
  margin-left: 0.5rem;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 0.75rem 0 1rem;
}
.nav-mobile.is-open { display: block; }
.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-mobile a {
  display: block;
  padding: 0.85rem 0;
  text-decoration: none;
  color: var(--text);
  font-weight: 560;
  border-bottom: 1px solid var(--border);
}
.nav-mobile a[aria-current="page"] { color: var(--primary); }

@media (min-width: 1024px) {
  .nav-desktop, .nav-cta { display: flex; }
  .menu-toggle, .nav-mobile { display: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 650;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  color: var(--primary-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 3rem;
  background:
    linear-gradient(180deg, #F6F8FA 0%, #FFFFFF 100%);
}
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.hero p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 38rem;
}
.hero-media {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.trust-row {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}
@media (min-width: 700px) {
  .trust-row { grid-template-columns: repeat(3, 1fr); }
}
.trust-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.trust-item svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--primary);
}
.trust-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.trust-item span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-soft { background: var(--bg-soft); }
.section-header {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}
.section-header p { color: var(--text-muted); margin: 0; }

.card-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .card-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
}

.topic-card, .feature-card, .article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
a.topic-card:hover, a.article-card:hover {
  border-color: #c9d4df;
  box-shadow: var(--shadow);
}
.topic-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
  color: var(--primary);
}
.topic-card p, .feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.feature-card {
  padding: 1.35rem 1.3rem;
}
.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: var(--primary);
}
.feature-card .icon svg { width: 22px; height: 22px; }

.article-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.article-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--bg-soft);
}
.article-card .card-body { padding: 1.1rem 1.2rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.article-card .meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.article-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  flex: 1;
}
.article-card .read-more {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--primary);
  text-decoration: none;
}

.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; }
  .split.reverse { grid-template-columns: 0.85fr 1.15fr; }
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checklist li {
  position: relative;
  padding: 0.75rem 0.85rem 0.75rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  margin-bottom: 0.55rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1rem;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid var(--primary);
  background:
    linear-gradient(var(--primary), var(--primary)) center/8px 2px no-repeat,
    linear-gradient(var(--primary), var(--primary)) center/2px 8px no-repeat;
  background: transparent;
  box-shadow: inset 0 0 0 2px transparent;
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 1.05rem;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}
.callout.accent {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.callout.warning {
  border-left-color: var(--danger);
  background: #FDF5F5;
}
.callout strong { display: block; margin-bottom: 0.25rem; }
.callout p:last-child { margin-bottom: 0; }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

/* FAQ */
.faq-list { display: grid; gap: 0.65rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer {
  padding: 0 1.15rem 1.1rem;
  color: var(--text-muted);
}
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* Article layout */
.page-hero {
  padding: 2rem 0 1.5rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #9aa5b0;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
}
@media (min-width: 980px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 2.75rem;
    align-items: start;
  }
}
.article-content { max-width: var(--prose); }
.article-content > p:first-of-type { font-size: 1.08rem; }
.article-content h2 { margin-top: 2.25rem; }
.article-content h3 { margin-top: 1.5rem; }
.article-content img.lead-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0.5rem 0 1.5rem;
  border: 1px solid var(--border);
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  background: #fff;
}
.toc h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}
.toc a {
  text-decoration: none;
  color: var(--text-muted);
}
.toc a:hover { color: var(--primary); }
.author-card {
  margin-top: 2rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.sources {
  margin-top: 2rem;
}
.sources ul { margin-bottom: 0; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.25rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table.data-table th,
table.data-table td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data-table th {
  background: var(--bg-soft);
  font-weight: 650;
}
table.data-table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
}
.form-row { display: grid; gap: 0.4rem; }
.form-row label { font-weight: 650; font-size: 0.95rem; }
.form-row .hint { font-size: 0.85rem; color: var(--text-muted); }
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
}
.form-row input:user-invalid,
.form-row textarea:user-invalid {
  border-color: var(--danger);
}
.form-error {
  color: var(--danger);
  font-size: 0.88rem;
  display: none;
}
.form-row.has-error .form-error { display: block; }
.form-row.has-error input,
.form-row.has-error textarea { border-color: var(--danger); }
.checkbox-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.92rem;
}
.checkbox-row input { margin-top: 0.3rem; }
.honeypot {
  position: absolute;
  left: -10000px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}
.form-status {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  display: none;
}
.form-status.success {
  display: block;
  background: #EAF6F0;
  color: var(--success);
  border: 1px solid #B7DFC9;
}
.form-status.error {
  display: block;
  background: #FDF5F5;
  color: var(--danger);
  border: 1px solid #F0C4C4;
}
.contact-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}
/* Footer */
.site-footer {
  background: #122433;
  color: #D7DEE5;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.site-footer a { color: #E8EEF4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.65rem;
}
.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 0.45rem; }
.footer-disclaimer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem;
  color: #A8B4C0;
}
.footer-disclaimer p { margin-bottom: 0.75rem; }
.footer-bottom {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: #8E9CAA;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  max-width: 720px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(23, 33, 43, 0.18);
  padding: 1.15rem 1.2rem;
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cookie-settings {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.cookie-settings.is-open { display: block; }
.cookie-settings .opt {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.cookie-settings .opt:last-child { border-bottom: none; }

/* Misc pages */
.legal-content { padding: 2.5rem 0 3.5rem; max-width: var(--prose); }
.legal-content h2 { margin-top: 2rem; }
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1rem 1rem 3.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 0.75rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.values-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 700px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
}

.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}
.error-page .code {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 359px) {
  body { font-size: 16px; }
  .btn { width: 100%; }
  .btn-group .btn { width: 100%; }
}
