:root {
  --bg: #f3f6f1;
  --surface: #ffffff;
  --surface-alt: #e8efe5;
  --ink: #1d2a1f;
  --muted: #4b5c4e;
  --brand: #246b40;
  --brand-hover: #1b5231;
  --accent: #b45309;
  --danger: #b91c1c;
  --border: #d3dfd0;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
[hidden] { display: none !important; }

a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius);
}
.main-nav a:hover {
  background: var(--surface-alt);
  color: var(--brand);
}

/* Hero & Page Head */
.page-shell {
  padding: 32px 0 64px;
}
.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); }
.hero-head {
  margin-bottom: 24px;
}
.kicker-stamp {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink);
}
.lead-summary {
  font-size: 18px;
  color: var(--muted);
  max-width: 70ch;
  margin: 0;
}


/* Harmonized Golden Ad Slots (Top Banner + Below Hero Tool) — silent when empty, blended with theme variables when active */
.gfs-ad-slot:empty, .gfs-ad-slot-wrap:empty, .ad-third-party:empty {
  display: none;
}
.gfs-ad-slot, .gfs-ad-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}
.gfs-ad-slot-top {
  padding: 8px 12px;
  margin-bottom: 16px;
}

/* Tool Stage */
.tool-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 24px;
}

/* Action Bar (Like / Share) */
.engage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 48px;
}
.engage-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand);
  color: var(--surface);
  border: 1px solid var(--brand);
}
.btn-primary:hover { background: var(--brand-hover); color: var(--surface); }
.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface-alt); }
.btn-outline[data-gf-liked], .btn-outline[aria-pressed="true"] {
  background: var(--surface-alt);
  border-color: var(--brand);
  color: var(--brand);
}
.share-feedback {
  font-size: 14px;
  color: var(--brand);
  font-weight: 600;
}

/* Hub Links Strip */
.guide-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 48px;
}
.guide-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.hero-banner-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
}
.guide-card-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.guide-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.guide-card h3 a { text-decoration: none; color: var(--ink); }
.guide-card h3 a:hover { color: var(--brand); }
.guide-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Editorial Prose */
.prose-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}
.prose {
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.6;
}
.prose h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin: 48px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--ink);
}
.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.prose h3 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--ink);
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 24px 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--ink);
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

/* Signature Rule Stamp Steps */
.rule-steps-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.rule-steps-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.rule-stamp {
  flex-shrink: 0;
  background: var(--brand);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}

/* FAQ Section */
.faq-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
}
.faq-section h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 24px;
}
.faq-item {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item:first-of-type { border-top: none; padding-top: 0; }
.faq-item h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--ink);
}
.faq-item p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

/* Comments Section */
.comments-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
}
.comments-box h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.comments-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
}
.comment-form {
  display: grid;
  gap: 12px;
  max-width: 640px;
  margin-bottom: 24px;
}
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}
.comment-list[data-gf-empty]::before {
  content: "Hosting a holiday swap this week? Share your favorite house rule or funniest stolen gift below.";
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}
.comment-card {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.comment-card[data-gf-owner] {
  background: var(--surface-alt);
  padding: 16px;
  border-radius: var(--radius);
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
}
.owner-badge {
  background: var(--brand);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  font-size: 14px;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
  margin: 0 0 12px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h1 { font-size: 28px; }
  .prose h2, .faq-section h2, .comments-box h2 { font-size: 22px; }
  .tool-stage, .prose-wrap, .faq-section, .comments-box { padding: 16px; }
  .guide-strip, .footer-grid { grid-template-columns: 1fr; }
  .btn-primary, .btn-outline { width: 100%; }
}

@media print {
  .site-header, .engage-bar, .guide-strip, .prose-wrap, .faq-section, .comments-box, .site-footer, .no-print {
    display: none !important;
  }
  body, .page-shell, .tool-stage {
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
