@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:wght@600;700;800&display=swap");

:root {
  --bg: #f5f7fb;
  --bg-deep: #e8eef8;
  --surface: #ffffff;
  --surface-muted: #f0f4fb;
  --surface-strong: #e3ecf8;
  --text: #162033;
  --heading: #0f1a2d;
  --text-soft: #4f607b;
  --primary: #0e4fa8;
  --primary-strong: #083a80;
  --secondary: #14866d;
  --accent: #f08d3a;
  --border: #d9e1ef;
  --ok: #1f8d51;
  --link: #0f4ea1;
  --shadow-sm: 0 10px 26px rgba(11, 30, 66, 0.08);
  --shadow-md: 0 20px 48px rgba(9, 27, 59, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(circle at 4% 8%, rgba(14, 79, 168, 0.11), transparent 34%),
    radial-gradient(circle at 95% 5%, rgba(20, 134, 109, 0.1), transparent 30%),
    radial-gradient(circle at 78% 92%, rgba(240, 141, 58, 0.09), transparent 35%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(14, 79, 168, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 79, 168, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.8), transparent 82%);
  z-index: -1;
}

h1,
h2,
h3,
h4 {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--heading);
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.65rem;
}

p {
  margin-top: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  z-index: 9999;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 253, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand toggle"
    "search search"
    "nav nav";
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
}

.brand {
  grid-area: brand;
  display: flex;
  flex-direction: column;
  color: var(--heading);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.06;
}

.brand small {
  font-size: 0.73rem;
  color: var(--text-soft);
  font-weight: 600;
  margin-top: 0.18rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nav-toggle {
  grid-area: toggle;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(11, 30, 66, 0.08);
}

.main-nav {
  grid-area: nav;
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.2rem;
}

.main-nav a {
  font-weight: 700;
  color: var(--heading);
  padding: 0.5rem 0.6rem;
  border-radius: 9px;
}

.main-nav a[aria-current="page"] {
  background: var(--surface-strong);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--surface-muted);
  text-decoration: none;
}

.search-bar {
  grid-area: search;
  position: relative;
  width: 100%;
}

.search-bar input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.58rem 0.95rem;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(9, 27, 59, 0.05);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  display: none;
  max-height: 330px;
  overflow-y: auto;
  z-index: 350;
}

.search-results.show {
  display: block;
}

.search-results a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--surface-muted);
  color: var(--heading);
}

.search-results a:last-child {
  border-bottom: 0;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(1.1rem, 2vw + 0.8rem, 2rem);
  background:
    linear-gradient(135deg, rgba(14, 79, 168, 0.15), rgba(20, 134, 109, 0.15)),
    linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -140px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 141, 58, 0.26), transparent 62%);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.hero p:last-child {
  margin-bottom: 0;
}

.hero figure {
  margin: 0;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dfe8f5;
  border-radius: var(--radius-sm);
}

.badge {
  display: inline-block;
  margin-bottom: 0.78rem;
  background: #dff3ec;
  color: #0f6a57;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.26rem 0.72rem;
  letter-spacing: 0.02em;
}

.disclaimer-box {
  border-left: 4px solid var(--accent);
  background: #fff6ef;
  padding: 0.78rem 0.85rem;
  border-radius: 10px;
  color: #7d3e19;
  font-size: 0.94rem;
}

.kpi {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.kpi span {
  background: #e8f3ff;
  border: 1px solid #cddff7;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-size: 0.82rem;
  color: #0f4f8a;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.cards-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.cards-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid.cards-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.section {
  margin-top: 2rem;
  position: relative;
}

.section h2 {
  margin-bottom: 0.62rem;
}

.section h2::after {
  content: "";
  display: block;
  width: 74px;
  height: 3px;
  border-radius: 999px;
  margin-top: 0.45rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-head a {
  font-weight: 700;
}

.trust-strip {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(9, 27, 59, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin-bottom: 0.55rem;
  opacity: 0.85;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #bccde7;
  box-shadow: 0 14px 30px rgba(9, 27, 59, 0.09);
}

.card h3,
.card h4 {
  margin-top: 0.45rem;
  margin-bottom: 0.35rem;
}

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

.credit {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.credit a {
  color: var(--text-soft);
  text-decoration: underline;
}

.btn,
button.btn,
a.btn {
  display: inline-block;
  border: 1px solid var(--primary);
  background: linear-gradient(180deg, #1b63c0, var(--primary));
  color: #fff;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(14, 79, 168, 0.22);
}

.btn:hover,
.btn:focus-visible {
  background: linear-gradient(180deg, #1757a7, var(--primary-strong));
  text-decoration: none;
}

.btn.alt {
  background: #fff;
  color: var(--primary);
  border-color: #bed1ee;
  box-shadow: none;
}

.btn.alt:hover,
.btn.alt:focus-visible {
  background: #edf3fc;
}

.breadcrumbs {
  font-size: 0.89rem;
  margin: 0.65rem 0 1rem;
  color: var(--text-soft);
}

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

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.article-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.4rem);
  box-shadow: var(--shadow-sm);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.article-body section {
  margin-top: 1.3rem;
}

.article-body h2,
.article-body h3 {
  scroll-margin-top: 88px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  background: #fff;
  border: 1px solid #d5e1f1;
  border-radius: 10px;
  overflow: hidden;
}

.article-body th,
.article-body td {
  border: 1px solid #dce6f3;
  padding: 0.6rem;
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: #edf3fd;
}

.article-body ul,
.article-body ol {
  padding-left: 1.12rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 6px 16px rgba(9, 27, 59, 0.06);
}

.toc ul {
  margin: 0;
  padding-left: 1rem;
}

.toc a {
  color: var(--heading);
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0.7rem 0.76rem;
  margin-bottom: 0.6rem;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.notice {
  border: 1px solid #ffdcbf;
  background: #fff8f2;
  color: #7d3a16;
  border-radius: 12px;
  padding: 0.8rem;
}

.tool-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
}

.tool-grid .full {
  grid-column: 1 / -1;
}

.tool-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 7px 18px rgba(9, 27, 59, 0.06);
}

.tool-box label {
  display: block;
  margin-top: 0.6rem;
  margin-bottom: 0.22rem;
  font-weight: 700;
}

.tool-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.5rem 0.58rem;
}

.result {
  margin-top: 0.8rem;
  padding: 0.72rem;
  border-radius: 9px;
  background: #ecf6ff;
  border: 1px solid #caddf8;
  color: #18365f;
}

.form-grid {
  display: grid;
  gap: 0.88rem;
}

.form-grid label {
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.22rem;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.64rem;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
}

.site-footer {
  margin-top: 2.3rem;
  border-top: 1px solid var(--border);
  background:
    linear-gradient(180deg, #f4f8ff, #edf3fb);
}

.site-footer .container {
  padding-top: 1.25rem;
  padding-bottom: 1.55rem;
}

.footer-links {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.cookie-banner {
  position: fixed;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 1.2rem));
  background: rgba(14, 29, 56, 0.95);
  color: #fff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.95rem;
  box-shadow: 0 22px 44px rgba(5, 14, 30, 0.34);
  display: none;
  z-index: 550;
}

.cookie-banner.show {
  display: grid;
  gap: 0.72rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cookie-actions button,
.cookie-actions a {
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: transparent;
  color: #fff;
  padding: 0.44rem 0.78rem;
  border-radius: 8px;
  text-decoration: none;
}

.cookie-actions .accept {
  background: #2ebd89;
  border-color: #2ebd89;
  color: #08271d;
  font-weight: 800;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: #ecf3ff;
  color: #0f4f8c;
  font-size: 0.8rem;
  font-weight: 700;
}

.news-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: 0 7px 18px rgba(9, 27, 59, 0.06);
}

.news-item::before {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin-bottom: 0.58rem;
}

.news-item h3 {
  margin-top: 0.2rem;
}

.news-item ul {
  padding-left: 1rem;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.inline-list a {
  padding: 0.24rem 0.56rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-soft);
  background: #fff;
}

.inline-list a:hover,
.inline-list a:focus-visible {
  background: var(--surface-muted);
  text-decoration: none;
}

.highlight {
  background: #fffbea;
  border: 1px solid #f5e6b5;
  border-radius: 10px;
  padding: 0.72rem;
}

.meta-note {
  font-size: 0.88rem;
  color: var(--text-soft);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.section,
.article-main,
.tool-box,
.news-item {
  animation: fade-up 0.55s ease both;
}

@media (min-width: 780px) {
  .hero {
    grid-template-columns: 1.08fr 0.92fr;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid textarea,
  .form-grid .full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .nav-wrap {
    grid-template-columns: auto 1fr minmax(250px, 300px);
    grid-template-areas: "brand nav search";
    gap: 1rem;
  }

  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.36rem;
    padding-top: 0;
  }
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 92px;
  }
}

@media (max-width: 640px) {
  .btn,
  button.btn,
  a.btn {
    width: 100%;
    text-align: center;
    margin-bottom: 0.45rem;
  }

  .section-head {
    align-items: start;
  }

  .cookie-banner {
    bottom: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
