:root {
  color-scheme: light;
  --ink: #151817;
  --muted: #626966;
  --paper: #fbf5e8;
  --panel: #ffffff;
  --wine: #8e244d;
  --river: #2e7fa4;
  --gold: #f0c35a;
  --leaf: #3a7d55;
  --coral: #e86c4c;
  --line: #171918;
  --light-gray: #eee8dc;
  --border-light: rgba(21, 24, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px clamp(18px, 4vw, 58px);
  background: rgba(251, 245, 232, 0.94);
  border-bottom: 2px solid var(--border-light);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 276px;
}

.logo-canvas {
  width: 46px;
  height: 46px;
  background: #fbf5e8;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.04rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 850;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s;
}

.site-nav a.active {
  color: var(--wine);
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wine);
  border-radius: 2px;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--wine);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  min-width: 40px;
  min-height: 40px;
  justify-content: center;
  align-items: center;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== Buttons ===== */
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 7px;
  font-weight: 950;
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  padding: 0 22px;
  background: var(--wine);
  color: #fff;
}

.secondary-button {
  padding: 0 20px;
  background: #fff;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

/* ===== Main ===== */
main {
  overflow: hidden;
  min-height: 60vh;
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.94fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: clamp(38px, 6vw, 88px) clamp(18px, 5vw, 74px) 48px;
  border-bottom: 2px solid var(--border-light);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  max-width: 990px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7.25vw, 7.55rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.category-header h1 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.2vw, 4.55rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  font-size: clamp(1.16rem, 1.55vw, 1.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-text {
  max-width: 730px;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.5vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-visual {
  position: relative;
  min-height: 590px;
}

#paperCanvas {
  display: block;
  width: min(100%, 500px);
  height: auto;
  margin-left: auto;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 16px 18px 0 var(--line);
}

.floating-card {
  position: absolute;
  width: min(78%, 330px);
  padding: 16px 18px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--line);
}

.top-card {
  top: 72px;
  left: 0;
}

.bottom-card {
  right: 16px;
  bottom: 34px;
  background: #fff0bd;
}

.floating-card span,
.topic-grid p {
  display: block;
  margin-bottom: 6px;
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.floating-card strong {
  display: block;
  font-size: clamp(1rem, 1.4vw, 1.24rem);
  line-height: 1.08;
}

/* ===== Section Blocks ===== */
.section-block,
.feature-row,
.site-footer {
  padding: clamp(54px, 8vw, 112px) clamp(18px, 5vw, 74px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(280px, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: 34px;
}

.section-heading p:last-child {
  max-width: 730px;
  color: var(--muted);
  font-size: 1.08rem;
}

.muted {
  background: var(--light-gray);
}

/* ===== Topic Grid (Home Categories) ===== */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.topic-grid article {
  min-height: 282px;
  padding: 24px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--line);
}

.topic-grid article:nth-child(1) { background: #f3dbe5; }
.topic-grid article:nth-child(2) { background: #dff0f6; }
.topic-grid article:nth-child(3) { background: #e4f2e6; }
.topic-grid article:nth-child(4) { background: #fff0bd; }
.topic-grid article:nth-child(5) { background: #fde8d0; }
.topic-grid article:nth-child(6) { background: #d8e8e8; }
.topic-grid article:nth-child(7) { background: #f5e0e8; }

.topic-grid h3 {
  margin-bottom: 42px;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
}

.topic-grid span {
  color: var(--muted);
  font-weight: 650;
}

.topic-grid span a {
  color: var(--wine);
  font-weight: 850;
}

.topic-grid span a:hover {
  text-decoration: underline;
}

/* ===== Article Grid (Home) ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.article-card {
  padding: 24px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--line);
  display: flex;
  flex-direction: column;
}

.article-card:nth-child(3n+1) { background: #f3dbe5; }
.article-card:nth-child(3n+2) { background: #dff0f6; }
.article-card:nth-child(3n) { background: #e4f2e6; }

.card-category {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: 4px;
  align-self: flex-start;
}

.article-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1rem, 1.3vw, 1.25rem);
}

.article-card h3 a:hover {
  color: var(--wine);
}

.article-card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(21, 24, 23, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
}

.section-footer-link {
  margin-top: 28px;
  text-align: center;
}

.section-footer-link a {
  display: inline-block;
  padding: 8px 24px;
  background: var(--wine);
  color: #fff;
  border-radius: 6px;
  font-weight: 900;
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.section-footer-link a:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

/* ===== Feature Row ===== */
.feature-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 94px);
  align-items: start;
  border-top: 2px solid var(--border-light);
}

.feature-copy {
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-copy p {
  max-width: 730px;
  margin-bottom: 18px;
}

/* ===== Content Layout: Main + Sidebar ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: clamp(28px, 4vw, 54px) clamp(18px, 5vw, 74px);
  max-width: 1280px;
  margin: 0 auto;
}

.content-main {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar-widget {
  margin-bottom: 28px;
  padding: 20px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--line);
}

.widget-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--wine);
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
  color: var(--wine);
}

.sidebar-article-list,
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-article-list li,
.category-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(21, 24, 23, 0.08);
}

.sidebar-article-list li:last-child,
.category-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sidebar-article-list a {
  display: block;
  font-weight: 850;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: color 0.2s;
}

.sidebar-article-list a:hover {
  color: var(--wine);
}

.article-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.category-list a {
  display: block;
  font-weight: 850;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.category-list a:hover,
.category-list li.active a {
  color: var(--wine);
}

/* ===== Category Page ===== */
.category-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-light);
}

.category-description {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 700px;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-list-item {
  padding: 24px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--line);
  transition: transform 0.15s;
}

.article-list-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 var(--line);
}

.list-item-date {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 800;
}

.article-list-item h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin-bottom: 8px;
}

.article-list-item h2 a:hover {
  color: var(--wine);
}

.article-list-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

.list-item-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(21, 24, 23, 0.1);
  font-size: 0.82rem;
  font-weight: 850;
  color: var(--wine);
}

/* ===== Single Article ===== */
.single-article {
  max-width: 800px;
}

.article-breadcrumb {
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 800;
}

.article-breadcrumb a {
  color: var(--wine);
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.single-article h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
  margin-bottom: 16px;
}

.article-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 850;
  color: var(--muted);
}

.article-header-meta .author {
  color: var(--wine);
}

.category-tag a {
  display: inline-block;
  padding: 2px 10px;
  background: var(--wine);
  color: #fff;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
}

.article-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin: 32px 0 14px;
}

.article-content p {
  margin-bottom: 16px;
}

.related-articles {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 2px solid var(--border-light);
}

.related-articles h3 {
  margin-bottom: 18px;
  color: var(--wine);
  font-size: 1.1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.related-item {
  padding: 16px;
  background: var(--light-gray);
  border: 2px solid var(--line);
  border-radius: 6px;
}

.related-item a {
  display: block;
  font-weight: 900;
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.related-item a:hover {
  color: var(--wine);
}

.related-item span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 800;
}

/* ===== Legal Pages ===== */
.legal-page {
  max-width: 800px;
}

.legal-page h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: 28px;
}

.legal-content h2 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin: 32px 0 14px;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
  color: var(--wine);
}

.legal-content p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== Error Page ===== */
.error-page {
  text-align: center;
  padding: 80px clamp(18px, 5vw, 74px);
}

.error-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* ===== Footer ===== */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  color: var(--paper);
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 2px solid rgba(251, 245, 232, 0.3);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  color: rgba(251, 245, 232, 0.72);
  font-size: 0.85rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  color: rgba(251, 245, 232, 0.78);
  font-weight: 850;
  font-size: 0.9rem;
}

.site-footer nav a:hover {
  color: var(--gold);
}

/* ===== No Articles ===== */
.no-articles {
  padding: 40px 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .content-with-sidebar {
    grid-template-columns: 1fr 280px;
    gap: 28px;
  }
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .section-heading,
  .feature-row,
  .news-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 560px;
  }

  #paperCanvas {
    margin: 0 auto;
  }

  .top-card {
    left: 6%;
  }

  .topic-grid,
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .site-nav {
    display: none;
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    z-index: 30;
    overflow-y: auto;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.1rem;
  }

  .site-nav a.active::after {
    display: none;
  }

  .brand {
    min-width: auto;
  }

  .logo-canvas {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 660px) {
  .site-header {
    padding: 12px 14px;
  }

  .nav-action {
    padding: 0 12px;
  }

  h1 {
    font-size: clamp(2.46rem, 15vw, 4.12rem);
  }

  .hero-actions,
  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 470px;
  }

  #paperCanvas {
    box-shadow: 9px 10px 0 var(--line);
  }

  .floating-card {
    width: 88%;
  }

  .top-card {
    top: 42px;
    left: 0;
  }

  .bottom-card {
    right: 0;
    bottom: 18px;
  }

  .topic-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid article,
  .article-card {
    min-height: auto;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-block,
  .feature-row,
  .site-footer {
    padding: 40px 18px;
  }

  .content-with-sidebar {
    padding: 20px 14px;
  }
}
