/*
  Final editorial theme — blue slate / muted amber palette
  - no green palette
  - one .review-content wrapper styles review content semantically
  - tables stay inside the layout and scroll horizontally on small screens
  - minimal hover effects
*/

:root {
  --page: #e5e9ed;
  --page-deep: #d5dce3;
  --surface: rgba(255, 255, 255, .38);
  --ink: #172534;
  --text: #344555;
  --muted: #687988;
  --line: rgba(43, 66, 88, .24);
  --line-strong: rgba(35, 60, 84, .38);
  --navy: #245778;
  --navy-dark: #173f5b;
  --accent: #b37a39;
  --accent-soft: #f0dfc7;
  --container: 1180px;
  --reading-width: 845px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(980px 470px at 7% -12%, rgba(255, 255, 255, .7), transparent 68%),
    radial-gradient(780px 460px at 100% 8%, rgba(160, 181, 201, .35), transparent 72%),
    linear-gradient(145deg, #e9edf1 0%, var(--page) 48%, var(--page-deep) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

a {
  color: var(--navy-dark);
  font-weight: 600;
  text-decoration-color: rgba(23, 63, 91, .42);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: currentColor; }

.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid rgba(35, 60, 84, .24);
  background: rgba(239, 243, 247, .92);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  min-height: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration: none;
  white-space: nowrap;
}

.brand::before { display: none; content: none; }

.brand-logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: 280px;
  object-fit: contain;
  object-position: left center;
}

.brand-name { color: var(--ink); font: inherit; }
.brand:has(.brand-logo) .brand-name { display: none; }

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

.primary-nav a {
  padding: 7px 0;
  color: #445b6d;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover { color: var(--ink); }

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.age-badge,
.footer-age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  min-height: 25px;
  padding: 2px 7px;
  border: 1px solid rgba(149, 100, 39, .56);
  border-radius: 4px;
  background: rgba(240, 223, 199, .78);
  color: #66451d;
  font-size: 11px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform .18s ease, opacity .18s ease;
}

.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Page and article header */
.page-grid { padding: 48px 0 70px; }

.article-card {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 34px) 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a { color: #53697a; font-weight: 500; }

.article-header {
  max-width: 940px;
  padding-bottom: 31px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 11px;
  color: #946225;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.18;
}

h1 {
  max-width: 930px;
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
}

h2 {
  margin: 60px 0 18px;
  font-size: clamp(27px, 3.5vw, 37px);
  scroll-margin-top: 24px;
}

h3 {
  margin: 42px 0 16px;
  font-size: clamp(24px, 3vw, 30px);
}

p { margin: 0 0 18px; }

.lead {
  max-width: 875px;
  margin: 22px 0 20px;
  color: #3c5060;
  font-size: clamp(19px, 2.3vw, 23px);
  line-height: 1.58;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  color: var(--muted);
  font-size: 13px;
}

.article-meta span:not(:last-child)::after {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 18px;
  border-radius: 50%;
  background: #a58a68;
  content: "";
  vertical-align: middle;
}

/* Intro-only elements before .review-content */
.quick-answer,
.table-of-contents,
.affiliate-disclosure,
.author-bio {
  max-width: var(--reading-width);
}

.quick-answer {
  margin: 34px 0;
  padding: 22px 25px;
  border-top: 1px solid rgba(179, 122, 57, .64);
  border-bottom: 1px solid rgba(179, 122, 57, .64);
  background: rgba(240, 223, 199, .48);
}

.quick-answer h2 { margin: 0 0 10px; font-size: 24px; }
.quick-answer p:last-child { margin-bottom: 0; }

.affiliate-disclosure {
  margin: 28px 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.affiliate-disclosure summary {
  position: relative;
  padding: 15px 30px 15px 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

.affiliate-disclosure summary::-webkit-details-marker { display: none; }

.affiliate-disclosure summary::after {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--navy-dark);
  border-bottom: 1px solid var(--navy-dark);
  content: "";
  transform: translateY(-65%) rotate(45deg);
}

.affiliate-disclosure[open] summary { border-bottom: 1px solid var(--line); }
.affiliate-disclosure[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.disclosure-content { padding: 16px 0 1px; color: #576c7b; font-size: 14px; }

.table-of-contents {
  margin: 35px 0 42px;
  padding: 19px 0 18px 23px;
  border-left: 2px solid var(--accent);
  background: rgba(255, 255, 255, .18);
}

.table-of-contents p {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.table-of-contents ol {
  margin: 0;
  padding-left: 19px;
  columns: 2;
  column-gap: 42px;
}

.table-of-contents li { break-inside: avoid; margin: 5px 0; padding-right: 10px; font-size: 14px; }
.table-of-contents a { color: #365b75; font-weight: 500; }

/* One semantic review wrapper. */
.review-content {
  max-width: var(--reading-width);
  margin-top: 46px;
}

.review-content > :first-child { margin-top: 0; }
.review-content h2 { margin-top: 60px; }
.review-content h3 { margin-top: 42px; }

/*
  Tables scroll within their own width rather than expanding the page.
  display: block lets overflow-x work without a class wrapper.
*/
.review-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 680px;
  margin: 29px 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid rgba(37, 86, 117, .38);
  border-bottom: 1px solid rgba(37, 86, 117, .38);
  border-collapse: collapse;
  background: rgba(255, 255, 255, .28);
  color: var(--text);
  font-size: 14px;
  line-height: 1.58;
}

.review-content th,
.review-content td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.review-content th {
  background: rgba(194, 211, 226, .86);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.review-content tbody tr:nth-child(even) { background: rgba(255, 255, 255, .30); }
.review-content tbody tr:last-child td { border-bottom: 0; }

.review-content figure {
  margin: 0 0 23px;
  overflow: hidden;
  border: 1px solid rgba(37, 86, 117, .34);
  border-radius: 5px;
  background: rgba(255, 255, 255, .34);
  box-shadow: 0 10px 24px rgba(28, 52, 75, .08);
}

.review-content figure img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.review-content aside {
  margin: 31px 0;
  padding: 19px 21px;
  border: 1px solid rgba(47, 95, 124, .34);
  border-radius: 5px;
  background: rgba(218, 229, 239, .72);
  color: #3e5667;
}

.review-content aside p:last-child { margin-bottom: 0; }

.review-content details {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.review-content summary {
  position: relative;
  padding: 17px 32px 17px 0;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.review-content summary::-webkit-details-marker { display: none; }

.review-content summary::after {
  position: absolute;
  top: 50%;
  right: 5px;
  color: var(--navy-dark);
  content: "+";
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-52%);
}

.review-content details[open] { border-color: var(--line-strong); }
.review-content details[open] summary::after { content: "−"; }
.review-content details p { margin: 0; padding: 0 0 17px; }

/* Author */
.author-bio {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 21px;
  align-items: start;
  margin-top: 64px;
  padding-top: 25px;
  border-top: 1px solid var(--line-strong);
}

.author-photo,
.author-monogram {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(47, 95, 124, .34);
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  color: var(--navy-dark);
  font-size: 19px;
  font-weight: 700;
}

.author-photo img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.author-bio h2 { margin: 0 0 9px; font-size: 25px; }
.author-bio p { color: #576c7b; font-size: 14px; }
.author-link { font-size: 14px; }

/* Footer */
.site-footer {
  padding: 47px 0 0;
  border-top: 1px solid rgba(35, 60, 84, .26);
  background: rgba(195, 210, 224, .90);
  color: #526a7a;
}

.site-footer .brand-logo {
  width: auto;
  height: 42px;
  max-width: 260px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(145px, 1fr));
  gap: 38px;
  padding-bottom: 38px;
}

.footer-brand p { max-width: 310px; margin: 14px 0; font-size: 14px; line-height: 1.65; }
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.footer-column h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.footer-column a,
.footer-bottom a {
  color: #365b75;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.footer-column a:hover,
.footer-bottom a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 65px;
  border-top: 1px solid var(--line);
  color: #587083;
  font-size: 12px;
}

.footer-bottom p { margin: 0; }

/* Responsive */
@media (max-width: 1040px) {
  .header-inner { gap: 17px; }
  .primary-nav { gap: 15px; }
  .primary-nav a { font-size: 13px; }
}

@media (max-width: 820px) {
  .site-header { position: sticky; top: 0; z-index: 20; }
  .header-inner { grid-template-columns: 1fr auto; min-height: 76px; }
  .header-status { display: none; }
  .menu-toggle { display: block; }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 7px 20px 15px;
    border-top: 1px solid var(--line);
    background: #e9eff4;
    box-shadow: 0 11px 22px rgba(28, 52, 75, .08);
  }

  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .primary-nav a:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 26px), var(--container)); }
  .page-grid { padding: 24px 0 45px; }
  .article-card { padding: 0; }
  .brand-logo { height: 36px; max-width: 220px; }
  .site-footer .brand-logo { height: 34px; max-width: 210px; }
  .article-meta span:not(:last-child)::after { display: none; }
  .table-of-contents ol { columns: 1; }
  .review-content { margin-top: 40px; }
  .review-content h2 { margin-top: 47px; }
  .review-content h3 { margin-top: 36px; }

  /* Keep the page width intact; the table itself gets a finger-scroll area. */
  .review-content table {
    width: 100%;
    max-width: 100%;
    min-width: 620px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .review-content aside { padding: 17px 18px; }
  .author-bio { grid-template-columns: 1fr; gap: 15px; }
  .author-photo,
  .author-monogram { width: 68px; height: 68px; }
  .footer-grid { gap: 29px 20px; padding-bottom: 31px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding: 15px 0; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .menu-toggle span { transition: none; }
}

/*
  Mobile table overflow fix.
  Add this at the VERY END of styles.css.

  Why the former rule failed:
  a <table> cannot reliably be both a real CSS table and the scroll container.
  This turns the table into an internal scroll box at mobile widths,
  while rows and cells retain their table display types.
*/

@media (max-width: 720px) {
  .review-content {
    min-width: 0;
    overflow-x: hidden;
  }

  .review-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 24px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    white-space: nowrap;
  }

  .review-content table thead,
  .review-content table tbody,
  .review-content table tr {
    display: table;
    width: 620px;
    min-width: 620px;
    table-layout: auto;
  }

  .review-content table th,
  .review-content table td {
    white-space: normal;
  }
}



/*
  Author profile page additions for ClubMaiden.no
  Add this block at the very end of your existing styles.css.
  Uses only the current blue slate / muted amber variables.
*/

.author-profile-page {
  max-width: 940px;
}

.author-profile-header {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  max-width: 940px;
  padding: 0 0 32px;
  border-bottom: 1px solid var(--line);
}

.author-profile-image-wrap {
  width: 190px;
  height: 190px;
  overflow: hidden;
  border: 1px solid rgba(47, 95, 124, .38);
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  box-shadow: 0 10px 24px rgba(28, 52, 75, .10);
}

.author-profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.author-profile-intro .eyebrow {
  margin-bottom: 10px;
}

.author-profile-intro h1 {
  max-width: none;
  font-size: clamp(36px, 4.5vw, 52px);
}

.author-profile-role {
  margin: 10px 0 0;
  color: var(--navy-dark);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.author-profile-lead {
  max-width: 690px;
  margin: 15px 0 0;
  font-size: 18px;
}

.author-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.author-profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid rgba(37, 86, 117, .46);
  border-radius: 5px;
  background: rgba(255, 255, 255, .34);
  color: var(--navy-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.author-profile-links a:first-child {
  border-color: rgba(179, 122, 57, .58);
  background: rgba(240, 223, 199, .58);
  color: #66451d;
}

.author-profile-links a:hover,
.author-profile-links a:focus-visible {
  border-color: var(--navy-dark);
  text-decoration: underline;
}

.author-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 940px;
  margin: 26px 0 0;
}

.author-profile-fact {
  min-height: 104px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 2px solid rgba(179, 122, 57, .70);
  border-radius: 5px;
  background: rgba(255, 255, 255, .24);
}

.author-profile-fact span {
  display: block;
  margin-bottom: 7px;
  color: #687988;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.author-profile-fact strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.42;
}

.author-profile-page .review-content {
  margin-top: 49px;
}

.author-profile-page .review-content > h2:first-child {
  margin-top: 0;
}

.author-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.author-expertise span {
  display: inline-flex;
  align-items: center;
  min-height: 33px;
  padding: 5px 11px;
  border: 1px solid rgba(47, 95, 124, .32);
  border-radius: 999px;
  background: rgba(218, 229, 239, .54);
  color: #3d586c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

@media (max-width: 720px) {
  .author-profile-header {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .author-profile-image-wrap {
    width: 156px;
    height: 156px;
    margin: 0 auto;
  }

  .author-profile-links {
    justify-content: center;
  }

  .author-profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 21px;
  }

  .author-profile-page .review-content {
    margin-top: 41px;
  }
}

@media (max-width: 460px) {
  .author-profile-facts {
    grid-template-columns: 1fr;
  }

  .author-profile-links a {
    width: 100%;
  }
}