@font-face {
  font-family: Manrope;
  src: url("./manrope.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #171619;
  --muted: #58565d;
  --border: #e9e7e9;
  --quiet: #f7f6f7;
  --red: #ce092b;
  --red-dark: #a70721;
  --accent-light: #ffe8ec;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1rem/1.6 Manrope, sans-serif;
  accent-color: var(--red);
}
body:has(dialog[open]) { overflow: hidden; }
::selection { background: var(--accent-light); color: var(--ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
svg { width: 22px; height: 22px; flex: none; }

.shell { width: min(1320px, calc(100% - 96px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 2;
  inset: 12px auto auto 12px;
  padding: 12px 18px;
  background: var(--ink);
  color: white;
}

.site-header { border-bottom: 1px solid var(--border); }
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 11px; font-size: 1.55rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.brand-light { font-weight: 600; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 35px;
  border-radius: 9px;
  background: var(--red);
}
.brand-mark::before {
  content: "";
  width: 15px;
  height: 15px;
  background: white;
  clip-path: polygon(20% 0, 100% 50%, 20% 100%);
}
.main-nav { display: flex; align-items: stretch; gap: clamp(20px, 3vw, 42px); align-self: stretch; }
.main-nav a { display: grid; place-items: center; position: relative; min-height: 44px; font-size: .875rem; font-weight: 750; color: var(--muted); }
.main-nav a:hover, .main-nav a.is-active { color: var(--red); }
.main-nav a.is-active::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--red); }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}
.icon-button:hover { background: var(--quiet); color: var(--red); }
.header-search { justify-self: end; }

.ad-slot {
  display: grid;
  place-content: center;
  gap: 2px;
  padding: 12px;
  text-align: center;
  background: var(--quiet);
  color: var(--muted);
  border: 1px dashed #d5d2d6;
  border-radius: 10px;
  font-size: .875rem;
}
.ad-slot span { color: var(--ink); font-weight: 750; }
.ad-slot small { font-size: .8125rem; }
.ad-banner { min-height: 90px; max-width: 970px; margin: 24px auto 28px; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  min-height: 358px;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  background: #161416;
  color: white;
}
.feature-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(30px, 4vw, 56px);
}
.feature h1 { max-width: 14ch; font-size: clamp(2.25rem, 4.1vw, 3.65rem); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; text-wrap: wrap; }
.feature p { margin-top: 17px; max-width: 38ch; color: #e4dce2; }
.feature-image { width: 100%; height: 100%; min-height: 0; aspect-ratio: 1.85; object-fit: cover; object-position: center 53%; background: #280d16; }
.primary-button { display: inline-flex; align-items: center; min-height: 46px; margin-top: 24px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--red); color: white; font-size: .875rem; font-weight: 800; }
.feature :focus-visible { outline-color: white; }
.primary-button:hover { background: var(--red-dark); }

.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 23vw, 300px); gap: clamp(24px, 3vw, 42px); align-items: start; margin-block: 36px 70px; }
.posts, .widget-search { scroll-margin-top: 24px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.section-heading h2 { font-size: clamp(1.55rem, 2.3vw, 2rem); font-weight: 800; letter-spacing: -.035em; }
.text-button { min-height: 44px; padding: 4px; background: none; border: 0; color: var(--red); font-size: .875rem; font-weight: 800; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.featured-result { display: block; width: 100%; margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--quiet); color: var(--ink); text-align: left; font-weight: 800; }
.featured-result:hover { color: var(--red); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
.plano-card { position: relative; min-width: 0; display: flex; flex-direction: column; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.plano-card img { width: 100%; height: auto; aspect-ratio: 1.6; object-fit: cover; border-radius: 10px; background: var(--quiet); }
.post-content { display: flex; flex-direction: column; flex: 1; align-items: start; padding-top: 13px; }
.plano-card .category, .article-meta .category { color: var(--red); font-size: .8125rem; font-weight: 800; }
.plano-card h3 { margin-top: 5px; font-size: clamp(1.05rem, 1.45vw, 1.25rem); font-weight: 800; letter-spacing: -.023em; text-wrap: pretty; line-height: 1.3; }
.plano-card h3 button { border: 0; padding: 0; background: none; color: inherit; text-align: left; }
.plano-card h3 button::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.plano-card:hover h3, .plano-card:focus-within h3 { color: var(--red); }
.plano-card p { margin: 7px 0 13px; color: var(--muted); }
.plano-card time { margin-top: auto; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.empty-state { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.empty-state p { margin-top: 6px; color: var(--muted); }

.sidebar { display: grid; gap: 20px; }
.widget { min-width: 0; overflow: hidden; padding: 19px; border: 1px solid var(--border); border-radius: var(--radius); }
.widget h2 { font-size: 1.125rem; font-weight: 800; letter-spacing: -.02em; }
.widget-search form { display: flex; gap: 6px; margin-top: 12px; }
.widget-search input {
  padding: 9px 11px;
  min-width: 0;
  width: 100%;
  border: 1px solid #dedbe0;
  border-radius: 8px;
  background: var(--quiet);
  color: var(--ink);
  caret-color: var(--red);
}
.widget-search input::placeholder { color: var(--muted); opacity: 1; }
.widget-search button { display: grid; place-items: center; flex: 0 0 44px; min-height: 44px; border: 0; border-radius: 8px; background: var(--ink); color: white; }
.widget-search button:hover { background: var(--red-dark); }
.ad-sidebar { min-height: 250px; }
.widget-categories ul { list-style: none; padding: 0; margin: 11px 0 0; }
.widget-categories li + li { border-top: 1px solid var(--border); }
.widget-categories a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 12px; padding-block: 9px; font-size: .9375rem; font-weight: 750; }
.widget-categories a:hover, .widget-categories .is-active { color: var(--red); }
.widget-categories a span { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }

.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; min-height: 92px; padding-block: 16px; color: var(--muted); font-size: .875rem; }
.footer-inner .brand { color: var(--ink); font-size: 1.2rem; }
.footer-inner .brand-mark { width: 31px; height: 29px; }

dialog { width: min(660px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: clamp(20px, 4vw, 42px); border: 0; border-radius: var(--radius); color: var(--ink); background: var(--paper); box-shadow: 0 16px 50px #0004; }
dialog::backdrop { background: #161416bd; }
.dialog-controls { display: flex; justify-content: flex-end; margin-bottom: 10px; }
#dialog-title { margin-bottom: 18px; font-size: clamp(1.65rem, 4vw, 2.4rem); letter-spacing: -.03em; }
#dialog-body { color: var(--muted); }
#dialog-body > * + * { margin-top: 16px; }
#dialog-body h3 { color: var(--ink); }

@media (max-width: 1100px) {
  .shell { width: calc(100% - 56px); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ad-sidebar { grid-column: 2; grid-row: 1 / span 2; }
  .feature { min-height: 320px; }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; padding-top: 12px; }
  .header-search { grid-column: 2; grid-row: 1; }
  .main-nav { grid-column: 1 / -1; gap: 20px; overflow-x: auto; }
  .ad-banner { margin-block: 16px 18px; min-height: 76px; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-image { grid-row: 1; height: auto; aspect-ratio: 2; }
  .feature-content { padding: 22px 20px 25px; }
  .feature p { margin-top: 12px; }
  .primary-button { margin-top: 18px; }
  .home-layout { margin-block: 28px 44px; }
  .post-grid, .sidebar { grid-template-columns: minmax(0, 1fr); }
  .ad-sidebar { grid-area: auto; }
  .post-grid { gap: 22px; }
  .plano-card h3 { font-size: 1.2rem; }
}
