:root {
  color-scheme: light;
  --ink: #2f2935;
  --muted: #6d6472;
  --night: #211a32;
  --night-2: #302343;
  --plum: #5a3d68;
  --plum-light: #8e6a96;
  --gold: #d6b777;
  --gold-light: #f0dfb9;
  --paper: #f7f4ef;
  --paper-2: #eee8e1;
  --white: #fff;
  --line: rgba(57, 43, 67, .13);
  --shadow: 0 18px 55px rgba(38, 25, 45, .11);
  --shadow-soft: 0 8px 26px rgba(38, 25, 45, .08);
  --radius: 20px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px;
}
.skip-link {
  position: absolute; z-index: 1000; left: -9999px; top: 12px;
  padding: 10px 16px; border-radius: 10px; color: var(--night); background: var(--white);
}
.skip-link:focus { left: 12px; }
.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }

/* Cabeçalho e navegação */
.site-header {
  position: sticky; top: 0; z-index: 50;
  color: #f8f3ec;
  background: rgba(33, 26, 50, .96);
  border-bottom: 1px solid rgba(240, 223, 185, .16);
  box-shadow: 0 5px 24px rgba(22, 16, 31, .12);
  backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 78px; display: flex; align-items: center; justify-content: space-between;
  gap: 22px; padding-block: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto;
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 800;
  letter-spacing: .17em;
}
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(214, 183, 119, .75); border-radius: 50%;
  color: var(--gold); font: 25px Georgia, serif;
  box-shadow: inset 0 0 0 4px rgba(214, 183, 119, .07);
}
.brand small {
  display: block; margin-top: 2px; color: #d0c5d8; font-size: 9px;
  font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
}
.main-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px 17px; }
.main-nav a {
  color: #e9e0ed; font-size: 11px; font-weight: 650; letter-spacing: .025em;
  text-decoration: none; transition: color .2s ease;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--gold-light); }
.search-form { display: flex; flex: 0 0 auto; align-items: center; overflow: hidden; border: 1px solid rgba(240, 223, 185, .3); border-radius: 999px; }
.search-form input {
  width: 125px; min-width: 0; padding: 8px 10px 8px 14px; border: 0; outline: 0;
  color: white; background: transparent; font: inherit; font-size: 11px;
}
.search-form input::placeholder { color: #cfc3d5; }
.search-form button {
  width: 36px; height: 34px; border: 0; color: var(--gold-light); background: transparent;
  font-size: 21px; cursor: pointer; transition: background .2s ease;
}
.search-form button:hover { background: rgba(240, 223, 185, .12); }

/* Estrutura e títulos */
.main-content { min-height: 62vh; padding-top: 34px; padding-bottom: 76px; }
h1, h2, h3 { color: #34283d; line-height: 1.2; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.025em; }
h1 { font-size: clamp(36px, 5vw, 58px); }
h2 { font-size: clamp(25px, 3vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; color: #8b6b37;
  font-size: 10px; line-height: 1.4; font-weight: 800; letter-spacing: .19em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 27px; height: 1px; background: var(--gold); }
.lead { max-width: 790px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.7; }
.text-link { color: #65466f; font-size: 13px; font-weight: 750; text-decoration: none; }
.text-link:hover { color: #9b7440; text-decoration: underline; text-underline-offset: 4px; }

/* Destaque inicial */
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr); align-items: center;
  min-height: 390px; margin: 0 0 70px; padding: clamp(36px, 6vw, 76px);
  color: #f8f3ec; border: 1px solid rgba(240, 223, 185, .2); border-radius: 28px;
  background:
    radial-gradient(ellipse at 82% 16%, rgba(177, 132, 164, .28), transparent 35%),
    radial-gradient(ellipse at 10% 90%, rgba(214, 183, 119, .17), transparent 34%),
    linear-gradient(125deg, #211a32 0%, #3b2b4e 55%, #57405f 100%);
  box-shadow: var(--shadow);
  animation: rise-in .7s both;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border: 1px solid rgba(240, 223, 185, .19);
  border-radius: 50%; pointer-events: none;
}
.hero::before {
  width: 440px; height: 440px; right: -120px; top: -215px;
  box-shadow: 0 0 0 28px rgba(240, 223, 185, .025), 0 0 0 58px rgba(240, 223, 185, .025), 0 0 0 88px rgba(240, 223, 185, .02);
}
.hero::after { width: 260px; height: 260px; left: -160px; bottom: -190px; box-shadow: 0 0 0 27px rgba(240, 223, 185, .035), 0 0 0 55px rgba(240, 223, 185, .025); }
.hero-copy { max-width: 720px; position: relative; z-index: 1; }
.hero .eyebrow { color: var(--gold-light); }
.hero h1 { max-width: 760px; margin: 19px 0 17px; color: #fffaf3; font-size: clamp(38px, 5.2vw, 64px); }
.hero-copy > p:not(.hero-footnote) { max-width: 690px; color: #e5dce8; font-size: clamp(16px, 1.8vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.hero-footnote { max-width: 650px; margin: 25px 0 0; color: #cfc3d5; font-size: 11px; }
.hero-symbol { display: grid; place-items: center; justify-self: center; width: min(230px, 100%); aspect-ratio: 1; border: 1px solid rgba(240, 223, 185, .27); border-radius: 50%; color: var(--gold-light); text-align: center; box-shadow: 0 0 0 16px rgba(240, 223, 185, .035), 0 0 0 34px rgba(240, 223, 185, .025); animation: float-gently 6s ease-in-out infinite; }
.hero-symbol span { display: block; align-self: end; font: 90px/1 Georgia, serif; text-shadow: 0 0 35px rgba(240, 223, 185, .28); }
.hero-symbol small { align-self: start; margin-top: -15px; color: #e5dce8; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

/* Botões */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 19px; border: 1px solid transparent; border-radius: 999px;
  color: #302434; background: var(--gold-light); font: inherit; font-size: 12px;
  font-weight: 800; letter-spacing: .035em; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(18, 12, 27, .1); transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); background: #f6e9cc; box-shadow: 0 10px 22px rgba(18, 12, 27, .15); }
.button-light { color: #fff; border-color: rgba(248, 243, 236, .43); background: transparent; box-shadow: none; }
.button-light:hover { color: var(--night); background: #fff8eb; }
.button-secondary { color: #fff; background: var(--plum); }
.button-secondary:hover { background: #704d7d; }
.button-ghost { color: #5a3d68; border-color: rgba(90, 61, 104, .2); background: transparent; box-shadow: none; }
.button-ghost:hover { background: #f2ebf3; }

/* Introdução, citações, temas e artigos */
.intro-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 48px; align-items: center; margin: 0 0 76px; }
.intro-grid h2 { margin: 12px 0 14px; }
.intro-grid p { max-width: 700px; color: var(--muted); }
.quote-card {
  position: relative; padding: 30px 32px; border: 1px solid rgba(214, 183, 119, .5);
  border-radius: var(--radius); background: linear-gradient(145deg, #f3e8d0, #f8f3e9);
  box-shadow: var(--shadow-soft);
}
.quote-card > span { display: block; height: 38px; color: #a78045; font: 64px/.9 Georgia, serif; }
.quote-card p { margin: 7px 0 12px; color: #4d4051; font: italic 21px/1.5 Georgia, serif; }
.quote-card small { color: #806c55; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.section-block { margin: 0 0 76px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.section-heading h2 { margin: 8px 0 0; }
.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.topic-card {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 225px;
  padding: 23px 21px; border: 1px solid var(--line); border-radius: 17px;
  color: var(--ink); background: rgba(255, 255, 255, .8); text-decoration: none;
  box-shadow: 0 5px 18px rgba(38, 25, 45, .035);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.topic-card:hover { transform: translateY(-6px); border-color: rgba(214, 183, 119, .72); box-shadow: var(--shadow-soft); }
.topic-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 12px; border-radius: 50%; color: #8b6b37; background: #f4ead5; font: 23px Georgia, serif; }
.topic-card h3 { margin: 0 0 8px; font: 500 20px/1.25 Georgia, serif; }
.topic-card p { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.topic-card .text-link { margin-top: auto; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.article-card {
  display: flex; flex-direction: column; min-height: 245px; padding: 24px;
  border: 1px solid var(--line); border-radius: 17px; background: #fff;
  box-shadow: 0 5px 18px rgba(38, 25, 45, .035);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.article-card:hover { transform: translateY(-5px); border-color: rgba(142, 106, 150, .4); box-shadow: var(--shadow-soft); }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 13px; color: #8b6b37; font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.article-card h2 { margin: 0 0 10px; font: 500 22px/1.25 Georgia, serif; }
.article-card h2 a { color: #382b42; text-decoration: none; }
.article-card h2 a:hover { color: #8a6840; }
.article-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.article-card .text-link { margin-top: auto; }
.category-strip { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; align-items: center; padding: 30px; border: 1px solid rgba(214, 183, 119, .45); border-radius: var(--radius); background: #f1e8da; }
.category-strip h2 { margin: 7px 0; font-size: 28px; }
.category-strip p { margin: 0; color: var(--muted); font-size: 13px; }
.category-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.category-pills a { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid rgba(90, 61, 104, .16); border-radius: 999px; color: #50385c; background: rgba(255,255,255,.65); font-size: 11px; font-weight: 750; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.category-pills a:hover { transform: translateY(-2px); background: white; }
.category-pills span { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; color: #3b2b4e; background: var(--gold-light); font-size: 10px; }

/* Páginas de leitura, artigos e listagens */
.listing-page, .reading-page { max-width: 900px; margin: 0 auto; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 30px; color: #8a7e8e; font-size: 11px; }
.breadcrumb a { color: #694d74; font-weight: 750; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.listing-page > h1, .reading-page > h1 { margin: 10px 0 14px; }
.listing-page .article-grid { margin-top: 32px; }
.reading-page { padding: 12px 0 30px; }
.reading-page > .card-meta { justify-content: flex-start; gap: 18px; margin-top: 12px; }
.reading-page .lead { margin: 0 0 34px; }
.prose { max-width: 780px; padding-top: 8px; color: #49424d; font-size: 16px; line-height: 1.9; }
.prose p { margin: 0 0 1.45em; }
.prose p:first-child::first-letter { color: #8a6840; font: 52px/.8 Georgia, serif; float: left; padding: 8px 8px 0 0; }
.reading-end { margin-top: 40px; padding-top: 23px; border-top: 1px solid var(--line); }
.search-large { display: flex; gap: 10px; max-width: 700px; margin: 25px 0; }
.search-large input { flex: 1; min-width: 0; }
.result-count { color: var(--muted); font-size: 13px; }
.result-list { display: grid; gap: 12px; margin-top: 18px; }
.result-item { display: grid; gap: 5px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 15px; background: white; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.result-item:hover { transform: translateX(4px); box-shadow: var(--shadow-soft); }
.result-item strong { color: #382b42; font: 500 21px Georgia, serif; }
.result-item > span:last-child { color: var(--muted); font-size: 13px; }
.empty-state { padding: 36px; border: 1px dashed rgba(90, 61, 104, .3); border-radius: var(--radius); background: rgba(255,255,255,.65); }
.empty-state h1, .empty-state h2 { margin-top: 8px; }

/* Formulários e mensagens */
input, select, textarea {
  width: 100%; min-height: 45px; padding: 11px 13px; border: 1px solid rgba(57, 43, 67, .2);
  border-radius: 10px; color: var(--ink); background: #fff; font: inherit; font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: #9876a0; outline: none; box-shadow: 0 0 0 3px rgba(142, 106, 150, .13); }
textarea { min-height: 125px; resize: vertical; }
.search-form input { width: 125px; min-height: 34px; border-radius: 0; box-shadow: none; }
.search-large input { min-height: 46px; }
.notice { margin: 0 0 22px; padding: 13px 17px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; }
.notice-success { color: #24543c; border-color: #b8dec8; background: #eaf6ef; }
.notice-error { color: #853b3b; border-color: #edc3c3; background: #fff0f0; }
.notice-info { color: #51406a; border-color: #d8cbe2; background: #f4eff8; }

/* Administração */
.auth-wrap { display: grid; place-items: center; min-height: 60vh; padding: 28px 0; }
.auth-card { width: min(100%, 480px); padding: clamp(26px, 5vw, 43px); border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.auth-card h1 { margin: 10px 0; font-size: 39px; }
.auth-card > p { color: var(--muted); font-size: 13px; }
.stack-form, .editor-form { display: grid; gap: 17px; }
.stack-form { margin-top: 24px; }
.stack-form label, .editor-form > label { display: grid; gap: 7px; color: #45394c; font-size: 12px; font-weight: 800; }
.stack-form .button { justify-self: start; margin-top: 4px; }
.stack-form small, .editor-form small { color: var(--muted); font-size: 11px; font-weight: 450; }
.small-note { margin: 20px 0 0 !important; padding-top: 15px; border-top: 1px solid var(--line); color: #807584 !important; font-size: 11px !important; }
.admin-shell { max-width: 1000px; margin: 0 auto; }
.admin-shell > h1 { margin: 10px 0 22px; }
.admin-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.admin-heading h1 { margin: 8px 0; }
.admin-heading p { color: var(--muted); }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 26px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-nav a, .link-button { padding: 8px 12px; border: 0; border-radius: 8px; color: #5a3d68; background: transparent; font: inherit; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.admin-nav a:hover, .link-button:hover { background: #f3edf4; }
.admin-nav form { margin-left: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 25px 0; }
.stat-card { display: grid; gap: 3px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, #fff, #f8f4f8); }
.stat-card strong { color: #60436c; font: 500 35px Georgia, serif; }
.stat-card span { color: var(--muted); font-size: 11px; font-weight: 750; }
.admin-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.panel-card { margin-top: 25px; padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow-soft); }
.panel-card h2 { margin-top: 0; font-size: 25px; }
.panel-card p { color: var(--muted); font-size: 13px; }
.editor-form { max-width: 800px; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); }
.editor-form label { margin-bottom: 1px; }
.editor-form textarea[name="body"] { min-height: 310px; }
.checkbox-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 10px !important; }
.checkbox-label input { width: 18px; min-height: 18px; accent-color: var(--plum); }
.form-actions { margin-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: #60436c; background: #f5f0f5; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td small { display: block; color: #8c8290; }
tr:last-child td { border-bottom: 0; }
.actions { white-space: nowrap; }
.actions a, .danger-link { margin-right: 9px; color: #65466f; font-size: 11px; font-weight: 800; text-decoration: none; }
.danger-link { padding: 0; border: 0; color: #a23c3c; background: transparent; cursor: pointer; }
.status { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-published { color: #24543c; background: #e4f3e9; }
.status-draft { color: #765a2c; background: #f8efd9; }

/* Rodapé */
.site-footer { color: #e9e0ed; background: var(--night); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 45px; padding-top: 48px; padding-bottom: 38px; }
.footer-brand { display: inline-block; margin-bottom: 10px; color: var(--gold-light); font: 700 17px Georgia, serif; letter-spacing: .18em; text-decoration: none; }
.footer-grid p { max-width: 330px; color: #cfc3d5; font-size: 12px; }
.footer-grid strong { display: block; margin-bottom: 12px; color: var(--gold-light); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.footer-grid > div:not(:first-child) a { display: block; width: fit-content; margin: 6px 0; color: #e9e0ed; font-size: 12px; text-decoration: none; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-note { display: block; max-width: 240px; margin-top: 9px; color: #b6aaba; font-size: 10px; }
.footer-bottom { padding-top: 17px; padding-bottom: 20px; border-top: 1px solid rgba(240, 223, 185, .16); color: #b6aaba; font-size: 10px; }

@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float-gently { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1050px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; flex: 1 0 100%; justify-content: flex-start; padding: 3px 0 5px; }
  .search-form { margin-left: auto; }
  .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .container { width: min(var(--max), calc(100% - 32px)); }
  .header-inner { gap: 10px 14px; }
  .main-nav { gap: 8px 13px; }
  .main-nav a { font-size: 10px; }
  .search-form { display: none; }
  .main-content { padding-top: 20px; padding-bottom: 50px; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-bottom: 48px; padding: 34px 27px; border-radius: 21px; }
  .hero-symbol { width: 145px; margin: 36px auto 8px; }
  .hero-symbol span { font-size: 59px; }
  .hero-symbol small { font-size: 8px; }
  .intro-grid { grid-template-columns: 1fr; gap: 22px; margin-bottom: 52px; }
  .section-block { margin-bottom: 52px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-strip { grid-template-columns: 1fr; padding: 23px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 25px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 26px); }
  .brand-mark { width: 37px; height: 37px; }
  .brand { font-size: 12px; }
  .main-nav { gap: 7px 12px; }
  .hero { padding: 29px 22px; }
  .hero h1 { font-size: 37px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .topic-grid, .article-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 0; }
  .article-card { min-height: 0; }
  .category-pills { gap: 7px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }
  .stats-grid { grid-template-columns: 1fr; }
  .admin-nav form { margin-left: 0; }
  .search-large { flex-direction: column; }
  .auth-card { padding: 25px 20px; }
  .editor-form { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
