*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #1c1b22;
  --ink-soft: #3d3a45;
  --gold: #b8860b;
  --gold-light: #d4a843;
  --coral: #d4654a;
  --cream: #f7f3eb;
  --cream-deep: #ede6d9;
  --paper: #fffcf7;
  --line: #ddd4c4;
  --muted: #6f6a62;
  --header-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  background-image:
    linear-gradient(90deg, rgba(184, 134, 11, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(184, 134, 11, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
  padding: 0 clamp(16px, 4vw, 40px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: auto;
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
}

.primary-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ——— Main ——— */
.site-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px) 40px;
}

.page { max-width: 780px; }
.page-home,
.page-category,
.page-service { max-width: 1180px; }

.page h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-bottom: 16px;
  border-bottom: 3px solid var(--gold);
}

.page-category h1,
.page-home h1 {
  border-bottom: none;
  padding-bottom: 0;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  margin-bottom: 36px;
  padding: clamp(28px, 5vw, 44px);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold-light), var(--coral));
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  transform: rotate(15deg);
}

.hero-label {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0;
  font-size: clamp(17px, 2.5vw, 20px);
  line-height: 1.55;
  color: rgba(255, 252, 247, 0.88);
}

/* ——— Categories ——— */
.category-list {
  margin: 0 0 40px;
}

.category-list h2,
.article-grid > h2,
.section-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.category-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-list a {
  display: inline-block;
  padding: 10px 18px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.category-list a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ——— Article grid ——— */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.article-grid > h2 {
  grid-column: 1 / -1;
  padding: 20px 24px 0;
  background: var(--paper);
}

.card {
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--paper);
  transition: background 0.15s;
}

.card:nth-child(odd) { background: rgba(247, 243, 235, 0.5); }

.card:hover {
  background: var(--cream);
}

.card h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.card h2 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.card h2 a:hover { color: var(--coral); }

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}

.card-link:hover { color: var(--coral); }

/* ——— Content ——— */
.content {
  font-size: 17px;
  line-height: 1.75;
}

.content > *:first-child { margin-top: 0; }

.content p { margin: 0 0 18px; }

.content h2 {
  font-family: Georgia, "Times New Roman", serif;
  margin: 36px 0 14px;
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink);
}

.content h3 {
  margin: 28px 0 12px;
  font-size: 20px;
  color: var(--ink-soft);
}

.content a {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content ul,
.content ol {
  padding-left: 22px;
  margin: 0 0 20px;
}

.content li { margin: 6px 0; }

.content img {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
}

.content table {
  max-width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.content td,
.content th {
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.content .quads-location,
.content .adsbygoogle,
.content ins.adsbygoogle { display: none !important; }

/* ——— Related ——— */
.related {
  max-width: 780px;
  margin: 48px 0 0;
  padding: 28px 0 0;
  border-top: 3px double var(--line);
}

.related h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  margin: 0 0 18px;
}

.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
}

.related li {
  border-bottom: 1px solid var(--line);
}

.related li:last-child { border-bottom: none; }

.related a {
  display: block;
  padding: 14px 18px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  transition: background 0.15s, padding-left 0.15s;
}

.related a:hover {
  background: var(--cream-deep);
  padding-left: 24px;
  color: var(--coral);
}

/* ——— Pagination ——— */
.pagination {
  display: flex;
  gap: 0;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0 8px;
  border: 2px solid var(--ink);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-right: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.pagination a:last-child,
.pagination span:last-child { border-right: none; }

.pagination span {
  background: var(--ink);
  color: var(--paper);
}

.pagination a:hover {
  background: var(--gold-light);
  color: var(--ink);
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 56px;
  padding: 0;
  background: var(--ink);
  color: rgba(255, 252, 247, 0.75);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px clamp(16px, 3vw, 32px);
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 8px;
}

.footer-text {
  margin: 0;
  font-size: 14px;
  max-width: 360px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-links a:hover { color: var(--paper); }

.sitemap-list {
  columns: 2;
  gap: 32px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sitemap-list li { break-inside: avoid; margin-bottom: 8px; }

.sitemap-list a {
  color: var(--coral);
  text-decoration: none;
}

.sitemap-list a:hover { text-decoration: underline; }

/* ——— Mobile ——— */
@media (max-width: 760px) {
  .site-header { position: static; }

  .header-inner {
    min-height: auto;
    padding: 14px 0;
  }

  .menu-toggle { display: inline-flex; }

  .primary-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0 4px;
    border-top: 1px solid var(--line);
  }

  .primary-nav.is-open { display: flex; }

  .primary-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
  }

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

  .card { border-right: none; }

  .pagination {
    width: 100%;
    max-width: 100%;
  }

  .footer-inner {
    flex-direction: column;
  }

  .sitemap-list { columns: 1; }
}
