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

:root {
  --blue: oklch(44% 0.13 222);
  --blue-lt: oklch(56% 0.13 222);
  --teal: oklch(62% 0.13 188);
  --orange: oklch(66% 0.17 52);
  --dark: oklch(13% 0.015 222);
  --dark2: oklch(18% 0.015 222);
  --mid: oklch(35% 0.02 222);
  --muted: oklch(55% 0.02 222);
  --light: oklch(96% 0.005 220);
  --border: oklch(90% 0.005 220);
  --white: oklch(99% 0.002 220);
  --ff-head: 'Barlow Condensed', system-ui, sans-serif;
  --ff-body: 'Barlow', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--ff-body); background: var(--white); color: var(--dark); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--dark); color: var(--white); padding: 12px 16px; z-index: 9999; }
.skip:focus { left: 16px; top: 16px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--dark);
  box-shadow: 0 2px 24px oklch(0% 0 0 / 0.35);
}
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { width: 48px; height: 48px; object-fit: contain; }
.nav-brand-name { font-family: var(--ff-head); font-weight: 800; color: var(--white); text-transform: uppercase; letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-family: var(--ff-head); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); text-decoration: none; opacity: 0.82; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-cta { background: var(--teal); opacity: 1 !important; padding: 10px 20px; border-radius: 6px; }

.hero {
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--orange) 0 32px, var(--dark) 32px 44px); }
.hero-inner { min-height: 360px; padding: 92px 24px 78px; display: grid; align-content: center; }
.tag { display: inline-block; font-family: var(--ff-head); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
.hero-title, .section-title {
  font-family: var(--ff-head);
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  font-weight: 900;
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.accent { color: var(--teal); }
.hero-sub { max-width: 680px; margin-top: 18px; color: oklch(78% 0.02 220); font-size: 1.08rem; line-height: 1.7; }

.section { padding: 78px 0; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--white); box-shadow: 0 8px 24px oklch(0% 0 0 / 0.05); display: flex; flex-direction: column; min-height: 100%; }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--light); }
.post-card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-date { font-family: var(--ff-head); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); }
.post-card h2 { font-family: var(--ff-head); font-size: 1.65rem; line-height: 1.05; text-transform: uppercase; }
.post-card p { color: var(--muted); line-height: 1.65; }
.read-more { margin-top: auto; font-family: var(--ff-head); font-size: 0.9rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); text-decoration: none; }

.pagination { margin-top: 34px; display: flex; gap: 12px; justify-content: center; }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--teal);
  color: var(--white);
  font-family: var(--ff-head);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.btn.secondary { background: var(--dark); }
.empty { border: 1px solid var(--border); border-radius: 8px; padding: 38px; background: var(--light); color: var(--muted); line-height: 1.7; }

.article { max-width: 860px; margin: 0 auto; }
.article-image { width: 100%; max-height: 520px; object-fit: cover; border-radius: 8px; margin-bottom: 34px; }
.article-meta { font-family: var(--ff-head); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); margin-bottom: 12px; }
.article h1 { font-family: var(--ff-head); font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 0.98; text-transform: uppercase; margin-bottom: 20px; }
.article-excerpt { font-size: 1.15rem; line-height: 1.7; color: var(--mid); margin-bottom: 36px; }
.article-ai-summary { border-left: 5px solid var(--teal); background: var(--light); border-radius: 8px; padding: 22px 24px; margin-bottom: 34px; color: var(--mid); }
.article-ai-summary strong { display: block; font-family: var(--ff-head); font-size: 1.2rem; color: var(--dark); text-transform: uppercase; margin-bottom: 8px; }
.article-ai-summary p { line-height: 1.7; }
.article-content { font-size: 1.06rem; line-height: 1.85; color: var(--mid); }
.article-content h2, .article-content h3 { font-family: var(--ff-head); color: var(--dark); text-transform: uppercase; line-height: 1.05; margin: 38px 0 14px; }
.article-content h2 { font-size: 2rem; }
.article-content h3 { font-size: 1.55rem; }
.article-content p, .article-content ul { margin-bottom: 20px; }
.article-content ul { padding-left: 24px; }
.article-content table { width: 100%; border-collapse: collapse; margin: 28px 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; }
.article-content th, .article-content td { border-bottom: 1px solid var(--border); padding: 13px 14px; text-align: left; vertical-align: top; }
.article-content th { font-family: var(--ff-head); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dark); background: var(--light); }
.article-content tr:last-child td { border-bottom: 0; }
.article-calculator { margin: 42px 0 8px; padding: 28px; border-radius: 8px; background: var(--dark); color: var(--white); }
.article-calculator-tag { display: inline-block; font-family: var(--ff-head); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.article-calculator h2 { font-family: var(--ff-head); font-size: 2rem; line-height: 1.05; text-transform: uppercase; margin-bottom: 12px; }
.article-calculator p { color: oklch(78% 0.02 220); line-height: 1.65; margin-bottom: 22px; }
.article-calculator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.article-calculator label { color: oklch(82% 0.02 220); }
.article-calculator input { margin-top: 8px; border-color: oklch(34% 0.02 222); background: var(--white); }
.article-calculator-result { display: flex; align-items: center; gap: 16px; margin: 22px 0; padding: 20px; border-radius: 8px; background: oklch(18% 0.015 222); }
.article-calculator-result strong { font-family: var(--ff-head); font-size: 4rem; line-height: 0.9; color: var(--teal); }
.article-calculator-result span { color: oklch(82% 0.02 220); line-height: 1.4; }
.article-calculator-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 34px; }
.article-tags li { border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; color: var(--mid); background: var(--white); font-size: 0.92rem; }
.article-faq { margin-top: 42px; }
.article-faq h2 { font-family: var(--ff-head); font-size: 2rem; line-height: 1.05; text-transform: uppercase; margin-bottom: 18px; }
.article-faq details { border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; margin-bottom: 10px; background: var(--white); }
.article-faq summary { cursor: pointer; font-weight: 700; color: var(--dark); }
.article-faq p { color: var(--mid); line-height: 1.7; margin-top: 12px; }
.article-cta { margin-top: 44px; padding: 30px; border-radius: 8px; background: var(--dark); color: var(--white); display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; }
.article-cta strong { display: block; font-family: var(--ff-head); font-size: 1.5rem; text-transform: uppercase; margin-bottom: 6px; }
.article-cta span { color: oklch(76% 0.02 220); line-height: 1.5; }

.admin-shell { min-height: 100vh; background: var(--light); }
.admin-card { max-width: 440px; margin: 80px auto; background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 30px; box-shadow: 0 10px 28px oklch(0% 0 0 / 0.06); }
.admin-wrap { padding: 34px 24px 80px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.admin-title { font-family: var(--ff-head); font-size: 2rem; text-transform: uppercase; }
.table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-family: var(--ff-head); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid); background: var(--white); }
.table td { color: var(--mid); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.link-btn { border: 0; background: transparent; color: var(--teal); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
label { font-family: var(--ff-head); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); }
input, textarea, select { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; font: inherit; background: var(--white); color: var(--dark); }
textarea { min-height: 260px; resize: vertical; }
.error { background: oklch(96% 0.05 30); color: oklch(38% 0.13 30); border: 1px solid oklch(84% 0.09 30); border-radius: 6px; padding: 12px 14px; margin-bottom: 18px; }
.success { background: oklch(96% 0.05 155); color: oklch(35% 0.1 155); border: 1px solid oklch(84% 0.08 155); border-radius: 6px; padding: 12px 14px; margin-bottom: 18px; }
.hint { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

footer { background: var(--dark); color: oklch(62% 0.02 220); padding: 42px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; }
.footer-links a { font-family: var(--ff-head); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.footer-links a:hover { color: var(--teal); }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { gap: 16px; }
}

@media (max-width: 700px) {
  .nav-inner { height: auto; min-height: 72px; flex-wrap: wrap; padding: 14px 0; }
  .nav-links { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .blog-grid, .form-grid { grid-template-columns: 1fr; }
  .article-calculator-grid { grid-template-columns: 1fr; }
  .article-calculator-result { align-items: flex-start; flex-direction: column; }
  .hero-inner { min-height: 300px; padding-top: 64px; }
  .table { display: block; overflow-x: auto; }
}
