:root {
  --color-primary: #5f5546;
  --color-accent: #c62828;
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-surface-muted: #f9f8f6;
  --color-border: #e0dbd5;
  --color-border-light: #f0ece8;
  --color-text: #222222;
  --color-text-muted: #555555;
  --color-success: #2e7d32;
  --color-success-hover: #1b5e20;
  --color-top-pick: #e5a000;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* ── HEADER ── */
header {
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem 1rem;
}

.header-inner,
.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.logo-img {
  display: block;
  width: auto;
  height: 40px;
}

header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

header nav a,
footer nav a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

header nav a:hover,
footer nav a:hover {
  text-decoration: underline;
}

header nav a.active,
footer nav a.active {
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
}

/* ── MAIN ── */
main {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
  background: var(--color-surface);
  border-radius: 4px;
}

main > h1 {
  margin: 0;
  padding: 1.5rem 0 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ── AUTHOR BLOCK ── */
.author-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f0f0f0;
  border-radius: 8px;
}

.author-block img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-block div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.author-block strong {
  font-size: 0.95rem;
  line-height: 1.3;
}

.author-block span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ── CONTENT ── */
.content {
  padding-bottom: 2rem;
}

.content p {
  margin: 0 0 1rem;
}

.content h2 {
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--color-accent);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.content h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.content h4 {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.content ul,
.content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.25rem;
}

.content a {
  color: var(--color-accent);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

.content blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--color-accent);
  color: var(--color-text-muted);
}

/* ── OFFERS ── */
.content .offers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}

.content .offers-list a.offer-card {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  text-decoration: none;
  transition: box-shadow 0.18s ease, transform 0.15s ease, border-color 0.15s ease;
}

.content .offers-list a.offer-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}

.content .offers-list a.offer-card:first-child {
  border-color: var(--color-top-pick);
}

.content .offers-list a.offer-card:first-child::before {
  content: "TOP PICK";
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 0 0 6px 0;
  background: var(--color-top-pick);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.content .offers-list .offer-rank {
  flex: 0 0 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--color-border-light);
  color: #b0a898;
  font-size: 0.82rem;
  font-weight: 700;
}

.content .offers-list .offer-logo-wrap {
  flex: 0 0 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.75rem;
  background: var(--color-surface-muted);
  border-right: 1px solid var(--color-border-light);
}

.content .offers-list .offer-logo {
  display: block;
  width: 96px;
  height: 48px;
  object-fit: contain;
  object-position: center;
}

.content .offers-list .offer-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.7rem 1rem;
}

.content .offers-list .offer-name {
  display: block;
  margin-bottom: 0.2rem;
  color: #1a1a1a;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.content .offers-list .offer-bonus {
  display: block;
  color: var(--color-success);
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.35;
}

.content .offers-list .offer-cta-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
}

.content .offers-list .offer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  background: var(--color-success);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.content .offers-list a.offer-card:hover .offer-cta {
  background: var(--color-success-hover);
}

/* ── TABLES ── */
table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead tr {
  background: var(--color-primary);
  color: #ffffff;
}

thead th {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

tbody tr:nth-child(odd) {
  background: #f9f9f9;
}

tbody tr:nth-child(even) {
  background: #ffffff;
}

tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e8e8e8;
  vertical-align: top;
}

/* ── FAQ ── */
.faq {
  padding: 1rem 0 2rem;
}

.faq h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--color-accent);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.faq-item {
  border-bottom: 1px solid #dddddd;
}

.faq-question {
  position: relative;
  width: 100%;
  padding: 0.75rem 2rem 0.75rem 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.faq-question::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: var(--color-accent);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding: 0.5rem 0 1rem;
  color: #444444;
}

.faq-answer p {
  margin-bottom: 0.5rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ── FOOTER ── */
footer {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--color-primary);
  color: #ffffff;
}

footer .logo {
  font-size: 0.9rem;
}

.footer-copyright {
  max-width: 860px;
  margin: 0.75rem auto 0;
  padding: 0.6rem 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  line-height: 1.5;
}

.footer-copyright a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-copyright a:hover {
  text-decoration: underline;
}

/* ── FOCUS ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  main {
    margin: 1rem auto;
    padding: 0 0.75rem 1.5rem;
  }

  main > h1 {
    font-size: 1.5rem;
  }

  .content {
    padding: 0 0.25rem 1.5rem;
  }

  .content h2,
  .faq h2 {
    font-size: 1.25rem;
  }

  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.82rem;
  }

  thead th,
  tbody td {
    padding: 0.45rem 0.5rem;
  }

  .content .offers-list a.offer-card {
    flex-wrap: wrap;
  }

  .content .offers-list .offer-rank {
    flex: 0 0 2rem;
    font-size: 0.78rem;
  }

  .content .offers-list .offer-logo-wrap {
    flex: 0 0 86px;
    padding: 0.5rem;
  }

  .content .offers-list .offer-logo {
    width: 76px;
    height: 40px;
  }

  .content .offers-list .offer-body {
    flex: 1 1 0;
    padding: 0.55rem 0.65rem;
  }

  .content .offers-list .offer-name {
    font-size: 0.88rem;
  }

  .content .offers-list .offer-bonus {
    font-size: 0.78rem;
    white-space: normal;
  }

  .content .offers-list .offer-cta-wrap {
    flex: 0 0 100%;
    padding: 0 0.65rem 0.65rem;
    padding-left: calc(2rem + 86px + 2px);
  }

  .content .offers-list .offer-cta {
    width: 100%;
    min-width: unset;
    justify-content: center;
    padding: 0.48rem 0.75rem;
    font-size: 0.84rem;
  }

  .author-block {
    align-items: flex-start;
  }

  .logo-img {
    height: 34px;
  }
}