:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f3ed;
  color: #14211d;
  --ink: #14211d;
  --muted: #66736e;
  --line: #ded7cb;
  --gold: #c49a42;
  --teal: #0d4f47;
  --sage: #dfe7dd;
  --paper: #fffdf8;
  --rust: #a44d32;
  --blue: #315a82;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  background: rgba(255, 253, 248, 0.93);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0; }
.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  border: 2px solid var(--gold);
  font-size: 13px;
}

nav { display: flex; align-items: center; gap: 24px; color: #30443e; font-weight: 700; font-size: 14px; }
nav a:hover, footer a:hover, .section-title a:hover { color: var(--rust); }
.icon-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 8px; align-items: center; justify-content: center; }
.icon-btn svg { width: 19px; }

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  position: relative;
  overflow: hidden;
  background: #0b1f1a;
  color: #fff;
  padding: 8vw 5vw 4vw;
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,31,26,.9), rgba(11,31,26,.56), rgba(11,31,26,.25)),
    url("https://images.unsplash.com/photo-1518684079-3c830dcef090?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.hero-copy, .hero-ad { position: relative; z-index: 1; }
.hero-copy { max-width: 880px; }
.kicker { margin: 0 0 12px; color: var(--gold); text-transform: uppercase; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px, 6vw, 82px); line-height: .96; letter-spacing: 0; margin-bottom: 22px; }
h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.05; letter-spacing: 0; }
h3 { line-height: 1.18; letter-spacing: 0; }
.hero p { max-width: 720px; color: rgba(255,255,255,.82); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  font-weight: 850;
  cursor: pointer;
}
.primary { background: var(--gold); color: #17130a; border-color: var(--gold); }
.ghost { background: rgba(255,255,255,.12); color: inherit; border-color: rgba(255,255,255,.35); }
.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.hero-ad {
  align-self: end;
  background: rgba(255,253,248,.94);
  color: var(--ink);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
.hero-ad span, .article-card span, .developer-card span, .area-card span { color: var(--rust); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.mini-link { display: inline-flex; margin-top: 10px; font-weight: 900; color: var(--teal); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.metric { min-height: 150px; padding: 30px 5vw; border-right: 1px solid var(--line); display: grid; align-content: center; gap: 8px; background: #f9f7f1; }
.metric svg { color: var(--teal); }
.metric strong { font-size: 34px; }
.metric span { color: var(--muted); font-weight: 700; }

.band, .page, .split { padding: 72px 5vw; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-title h2 { margin-bottom: 0; }
.section-title a { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-weight: 900; }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.article-card, .developer-card, .area-card, .event-card, .calculator-panel, .promo-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.article-card img { height: 210px; width: 100%; object-fit: cover; background: var(--sage); }
.article-card div, .developer-card, .area-card, .event-card, .calculator-panel, .promo-panel { padding: 22px; }
.article-card p, .developer-card p, .area-card p, .event-card p, .promo-panel p { color: var(--muted); line-height: 1.6; }
.article-card small, .area-card small, .event-card small { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 34px;
  align-items: center;
  background: var(--sage);
}
.split p { color: #44564f; line-height: 1.7; }
.promo-panel svg { color: var(--gold); width: 34px; height: 34px; }

.area-strip, .area-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.area-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.area-card { min-height: 164px; }

.article-detail > img { width: 100%; height: 430px; object-fit: cover; }
.article-shell { max-width: 860px; margin: 0 auto; padding: 56px 24px; }
.article-shell h1 { color: var(--ink); font-size: clamp(38px, 5vw, 68px); }
.lead { color: #43524d; font-size: 20px; line-height: 1.65; }
.article-shell p { line-height: 1.75; color: #33433e; }
.author-box { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #f9f7f1; margin: 26px 0; }
.author-box span { display: block; color: var(--muted); line-height: 1.5; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 36px; }
.share-row a, .card-actions a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); font-weight: 800; background: #fff; }
.area-hero { background: var(--ink); color: #fff; padding: 78px 5vw; }
.area-hero div { max-width: 900px; }
.area-hero p { color: rgba(255,255,255,.76); line-height: 1.7; }
.project-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.empty, .notice { color: var(--muted); font-size: 14px; line-height: 1.6; }

.searchbar { display: flex; align-items: center; gap: 10px; max-width: 620px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; margin-bottom: 24px; }
.searchbar input { border: 0; outline: 0; width: 100%; }
.developer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; }
dt { color: var(--muted); font-weight: 800; }
dd { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.calculator-panel label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; margin-bottom: 16px; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; color: var(--ink); }
.result { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.result span { color: var(--muted); }
.guide-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.guide-list div { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; font-weight: 800; }
.guide-list svg { color: var(--teal); flex: 0 0 auto; }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.event-card svg { color: var(--blue); }
.narrow { max-width: 900px; margin: 0 auto; }
.contact-form { display: grid; gap: 12px; margin-top: 24px; }

footer {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  padding: 46px 5vw;
  background: var(--ink);
  color: #fff;
}
footer p { color: rgba(255,255,255,.7); line-height: 1.6; max-width: 560px; margin-top: 18px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; color: rgba(255,255,255,.78); }
.whatsapp { position: fixed; right: 22px; bottom: 22px; width: 54px; height: 54px; border-radius: 50%; background: #1fa463; color: #fff; display: grid; place-items: center; z-index: 25; box-shadow: 0 14px 32px rgba(0,0,0,.22); }

.login-screen { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 24px; }
.login-screen form { width: min(420px, 100%); display: grid; gap: 14px; padding: 26px; background: #fff; border-radius: 8px; }
.admin { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; background: #f5f6f3; }
.admin aside { position: sticky; top: 0; height: 100vh; padding: 22px; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 10px; }
.admin aside button, .admin aside a { width: 100%; text-align: left; padding: 12px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: rgba(255,255,255,.78); border-radius: 8px; text-transform: capitalize; cursor: pointer; }
.admin aside .active { background: var(--gold); color: #19140b; font-weight: 900; }
.admin section { padding: 30px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-top h1 { text-transform: capitalize; font-size: 40px; margin: 0; }
.admin-top div { display: flex; gap: 10px; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.editor-grid label { display: grid; gap: 8px; font-weight: 850; color: #46544f; text-transform: capitalize; }
.editor-grid textarea { min-height: 112px; resize: vertical; }
.collection-editor { display: grid; grid-template-columns: 270px 1fr; gap: 18px; }
.item-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 150px); overflow: auto; }
.item-list button, .item-list a { padding: 11px; border: 1px solid var(--line); background: #fff; border-radius: 8px; text-align: left; cursor: pointer; display: flex; gap: 8px; align-items: center; color: var(--ink); }
.item-list button.active, .item-list a.active { border-color: var(--teal); color: var(--teal); font-weight: 900; }
.editor-form { display: grid; gap: 18px; }
.admin-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.danger-form { margin-top: 14px; }
.danger { background: #9d2f22; border-color: #9d2f22; color: #fff; }
.password-panel { margin-top: 34px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.password-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; }

@media (max-width: 980px) {
  .hero, .split, footer, .tool-grid, .developer-grid, .admin, .collection-editor { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 120px; }
  .metrics, .article-grid, .area-grid, .area-strip, .guide-list, .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin aside { position: static; height: auto; }
}

@media (max-width: 720px) {
  .site-header { height: 66px; padding: 0 18px; }
  .icon-btn { display: inline-flex; }
  nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 14px 18px 20px;
    border-bottom: 1px solid var(--line);
  }
  nav.open { display: flex; }
  .hero, .band, .page, .split { padding-left: 18px; padding-right: 18px; }
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: 42px; }
  .metrics, .article-grid, .area-grid, .area-strip, .guide-list, .event-grid, .editor-grid { grid-template-columns: 1fr; }
  .metric { min-height: 120px; border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 18px; }
  .section-title { align-items: start; flex-direction: column; }
  dl { grid-template-columns: 1fr; }
  .article-detail > img { height: 260px; }
  .footer-links { grid-template-columns: 1fr; }
  .admin section { padding: 18px; }
  .admin-top { align-items: stretch; flex-direction: column; }
}
