:root {
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-display: "Literata", Georgia, serif;
  --c-primary: #243044;
  --c-secondary: #3e5568;
  --c-background: #f3efe8;
  --c-surface: #faf7f3;
  --c-text: #1c2330;
  --c-muted: #5d6672;
  --c-border: #e3dbd1;
  --c-button: #6d4452;
  --c-hover: #583643;
  --c-accent: #8d6a62;
  --shadow: 0 18px 40px rgba(36, 48, 68, 0.08);
  --radius: 14px;
  --header: 118px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(141, 106, 98, 0.16), transparent 55%),
    var(--c-background);
  color: var(--c-text);
  font-family: var(--font-body), "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display), Georgia, serif; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.6rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
p { margin: 0 0 0.9rem; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.wrap-narrow { width: min(760px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  background: var(--c-primary);
  color: #f6f1ea;
  font-size: 0.86rem;
}
.topbar-inner, .nav-inner, .footer-grid, .hero-grid, .split, .card-grid, .process, .comment-list {
  display: grid;
  gap: 18px;
}
.topbar-inner {
  min-height: 42px;
  grid-template-columns: 1.4fr auto auto;
  align-items: center;
}
.topbar a { color: #fff; text-decoration: none; }
.niche-line { letter-spacing: 0.04em; opacity: 0.92; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 247, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.site-header.stuck { border-bottom-color: var(--c-border); box-shadow: 0 8px 24px rgba(36, 48, 68, 0.06); }
.nav-inner { grid-template-columns: auto 1fr auto; align-items: center; min-height: 76px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.mark {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--c-primary); color: #f6f1ea;
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.4rem;
}
.brand strong { display: block; font-size: 1.02rem; }
.brand small { color: var(--c-muted); }
.menu { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.menu a { text-decoration: none; color: var(--c-primary); font-weight: 600; font-size: 0.95rem; }
.menu a:hover { color: var(--c-button); }
.actions { display: flex; gap: 8px; align-items: center; }
.icon-btn, .btn, .btn-ghost, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; text-decoration: none; border: 1px solid transparent;
  padding: 0.7rem 1.05rem; cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn { background: var(--c-button); color: white; font-weight: 650; }
.btn:hover { background: var(--c-hover); transform: translateY(-1px); }
.btn-line { background: transparent; border-color: rgba(255,255,255,.4); color: white; }
.btn-ghost { background: white; border-color: var(--c-border); color: var(--c-primary); }
.btn-ghost:hover, .icon-btn:hover { border-color: var(--c-accent); }
.menu-toggle { display: none; background: white; border: 1px solid var(--c-border); border-radius: 12px; padding: 8px 10px; }

.hero { padding: 42px 0 20px; }
.hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: stretch; }
.kicker {
  display: inline-flex; gap: 8px; align-items: center;
  color: var(--c-button); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.78rem; margin-bottom: 12px;
}
.lead { font-size: 1.12rem; color: var(--c-secondary); max-width: 46rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; list-style: none; }
.chips li, .badge {
  background: white; border: 1px solid var(--c-border); border-radius: 999px;
  padding: 0.35rem 0.75rem; font-size: 0.86rem; color: var(--c-secondary);
}
.hero-panel {
  background: linear-gradient(180deg, #2a3a50, #1d2838);
  color: #f7f2eb; border-radius: 28px; padding: 28px;
  min-height: 360px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-panel:before {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); right: -40px; top: -50px;
}
.hero-panel ol { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hero-panel li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 10px; }
.hero-panel span { opacity: .7; font-size: .85rem; }

.section { padding: 56px 0; }
.section.alt { background: rgba(255,255,255,.45); }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 22px; }
.muted { color: var(--c-muted); }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.card, .comment, .post, .panel-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px;
}
.card { min-height: 210px; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover, .post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--c-secondary); flex: 1; }
.card a.more { font-weight: 700; color: var(--c-button); text-decoration: none; }
.process { grid-template-columns: repeat(4, 1fr); }
.step { padding: 8px 4px 8px 0; }
.step b { display: block; font-family: var(--font-display), Georgia, serif; font-size: 1.8rem; color: var(--c-accent); }

.split { grid-template-columns: 1.1fr .9fr; align-items: center; }
.portrait {
  border-radius: 28px; min-height: 320px; padding: 28px;
  background:
    linear-gradient(160deg, rgba(36,48,68,.92), rgba(109,68,82,.78)),
    var(--c-primary);
  color: #f6f1ea; display: flex; flex-direction: column; justify-content: flex-end;
}
.prose a { color: var(--c-button); }
.prose h2, .prose h3 { margin-top: 1.4rem; }

.faq details { border-bottom: 1px solid var(--c-border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 8px 0 0; color: var(--c-secondary); }
.faq details[open] summary { color: var(--c-button); }

.comment-list { grid-template-columns: 1fr; }
.comment header, .reply { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.who-row { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--c-primary); color: #f6f1ea; font-weight: 700;
}
.comment .who { font-weight: 700; }
.comment .meta { color: var(--c-muted); font-size: .86rem; }
.like {
  background: transparent; border: 1px solid var(--c-border); border-radius: 999px;
  padding: 0.25rem 0.7rem; cursor: pointer;
}
.like[aria-pressed="true"] { background: #f4e7ea; border-color: var(--c-button); color: var(--c-button); }
.reply { margin-top: 12px; background: #f4efe8; border-radius: 12px; padding: 10px 12px; }
.note {
  background: #fff; border-left: 3px solid var(--c-accent); padding: 12px 14px; border-radius: 10px; color: var(--c-secondary);
}
form.stack { display: grid; gap: 10px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input, textarea, select {
  width: 100%; border: 1px solid var(--c-border); background: white; border-radius: 12px; padding: 0.75rem 0.8rem;
}
textarea { min-height: 120px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

.site-footer { background: #1c2736; color: #efe8e0; margin-top: 40px; padding: 42px 0 0; }
.footer-grid { grid-template-columns: 1.3fr .8fr .8fr .9fr; }
.site-footer a { color: #efe8e0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.legal-row, .credit {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 22px; padding: 14px 0; font-size: .9rem;
}
.credit a { text-decoration: underline; }

.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: #fff; border-top: 1px solid var(--c-border); grid-template-columns: repeat(3, 1fr);
}
.mobile-cta a { text-align: center; text-decoration: none; padding: 12px 6px; font-weight: 700; color: var(--c-primary); }

.drawer {
  position: fixed; inset: 0; background: rgba(20, 24, 32, .45); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer nav {
  margin-left: auto; height: 100%; width: min(360px, 88vw); background: #faf7f3;
  padding: 22px; display: grid; align-content: start; gap: 14px;
  transform: translateX(24px); transition: transform .28s ease;
}
.drawer.open nav { transform: none; }
.crumb { font-size: .9rem; color: var(--c-muted); margin-bottom: 10px; }
.crumb a { color: var(--c-secondary); }
.pager { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pager a, .pager span { border: 1px solid var(--c-border); border-radius: 10px; padding: 6px 10px; text-decoration: none; background: white; }

.cookie {
  position: fixed; right: 16px; bottom: 16px; z-index: 35; width: min(420px, calc(100% - 32px));
  background: white; border: 1px solid var(--c-border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow);
}
.cookie .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.search-pop { position: relative; }
.search-pop ul { position: absolute; z-index: 5; background: white; border: 1px solid var(--c-border); width: 100%; border-radius: 12px; margin: 4px 0 0; padding: 6px; list-style: none; }
.search-pop a { display: block; padding: 6px 8px; text-decoration: none; }

html.js .rise { opacity: 0; transform: translateY(16px); animation: rise .7s ease forwards; }
html.js .d2 { animation-delay: .12s; }
html.js .d3 { animation-delay: .22s; }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.js .rise, html.js .reveal { opacity: 1; transform: none; animation: none; transition: none; }
}

.panel { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; background: #eef1f4; color: #1c2330; }
.side { background: #1c2736; color: #efe8e0; padding: 18px 12px; }
.side a { color: #efe8e0; text-decoration: none; display: block; padding: 7px 10px; border-radius: 8px; font-size: .92rem; }
.side a.active, .side a:hover { background: rgba(255,255,255,.08); }
.main { padding: 22px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.table-wrap { overflow: auto; background: white; border-radius: 14px; border: 1px solid var(--c-border); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.login-box { width: min(420px, calc(100% - 32px)); margin: 10vh auto; background: white; padding: 24px; border-radius: 18px; }

:focus-visible { outline: 2px solid var(--c-button); outline-offset: 2px; }

@media (max-width: 1024px) {
  .card-grid, .process, .footer-grid, .kpis { grid-template-columns: 1fr 1fr; }
  .hero-grid, .split, .nav-inner { grid-template-columns: 1fr auto; }
  .menu { display: none; }
  .menu-toggle { display: inline-flex; }
  .panel { grid-template-columns: 1fr; }
  .side { display: flex; gap: 8px; overflow: auto; }
  .side a { white-space: nowrap; }
}
@media (max-width: 760px) {
  .topbar-inner { grid-template-columns: 1fr; padding: 8px 0; }
  .hero-grid, .split, .card-grid, .process, .footer-grid, .kpis, .nav-inner { grid-template-columns: 1fr; }
  .actions .btn-ghost { display: none; }
  .mobile-cta { display: grid; }
  body { padding-bottom: 62px; }
  .cookie { bottom: 72px; }
  .section { padding: 36px 0; }
}
.comment.is-hidden { display: none; }
.chips a { text-decoration: none; }
