/*
Theme Name: Everyday Help Hub
Version: 8.1.0
Text Domain: everyday-help
*/

:root {
  --ink: #111827;
  --soft: #374151;
  --mute: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --bg: #f8faf9;
  --surface: #ffffff;
  --brand: #0f766e;
  --brand-ink: #115e59;
  --brand-soft: #ecfdf5;
  --country: #0f766e;
  --wide: 68rem;
  --read: 42rem;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --display: "DM Sans", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 0.75rem;
}

body.theme-navy { --country: #1d4ed8; --brand: #1d4ed8; --brand-ink: #1e40af; --brand-soft: #eff6ff; }
body.theme-burgundy { --country: #be123c; --brand: #be123c; --brand-ink: #9f1239; --brand-soft: #fff1f2; }
body.theme-maple { --country: #dc2626; --brand: #dc2626; --brand-ink: #b91c1c; --brand-soft: #fef2f2; }
body.theme-ochre { --country: #d97706; --brand: #0f766e; --brand-ink: #115e59; }
body.theme-gold { --country: #ca8a04; --brand: #0f766e; --brand-ink: #115e59; }
body.theme-orange { --country: #ea580c; --brand: #0f766e; --brand-ink: #115e59; }
body.theme-belgian { --country: #ca8a04; --brand: #0f766e; --brand-ink: #115e59; }
body.theme-swiss { --country: #dc2626; --brand: #0f766e; --brand-ink: #115e59; }
body.theme-austria { --country: #e11d48; --brand: #0f766e; --brand-ink: #115e59; }
body.theme-emerald { --country: #059669; --brand: #059669; --brand-ink: #047857; --brand-soft: #ecfdf5; }
body.theme-sweden { --country: #0284c7; --brand: #0284c7; --brand-ink: #0369a1; --brand-soft: #f0f9ff; }
body.theme-norway { --country: #e11d48; --brand: #0f766e; --brand-ink: #115e59; }
body.theme-denmark { --country: #e11d48; --brand: #0f766e; --brand-ink: #115e59; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }
img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 2rem, var(--read));
  margin-inline: auto;
}

/* Header — compact, clean */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-branding a {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--mute);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-menu a:hover { color: var(--ink); }

/* Country dropdown */
.country-dd { position: relative; z-index: 50; }

.country-dd__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  border-radius: 0.5rem;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.country-dd__btn::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--country);
  flex-shrink: 0;
}

.country-dd__btn:hover,
.country-dd.is-open .country-dd__btn {
  border-color: color-mix(in srgb, var(--country) 40%, var(--line-2));
}

.country-dd__flag { font-size: 0.9rem; line-height: 1; }
.country-dd__name {
  max-width: 8.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-dd__chev {
  width: 0.32rem;
  height: 0.32rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
}

.country-dd.is-open .country-dd__chev { transform: rotate(-135deg); }

.country-dd__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 14rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 0.65rem;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
}

.country-dd__menu[hidden] { display: none; }

.country-dd__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.4rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 560;
  font-size: 0.9rem;
}

.country-dd__option:hover { background: var(--bg); }
.country-dd__option.is-active {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* Hero — compact, light, readable */
.hero {
  position: relative;
  overflow: hidden;
  padding: 2.25rem 0 2rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f7f5 100%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--country);
}

.hero::after { display: none; }
.hero__glow { display: none; }

.hero--compact { padding: 1.75rem 0 1.5rem; }
.hero--article { padding: 1.75rem 0 1.5rem; }

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.hero__brand {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ink);
  max-width: 28ch;
}

.hero__title--article {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  max-width: 28ch;
  line-height: 1.28;
}

.hero__lead {
  margin: 0;
  color: var(--mute);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 46ch;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.7rem;
  font-size: 0.84rem;
  color: var(--mute);
}

.crumbs a {
  color: var(--mute);
  text-decoration: none;
}

.crumbs a:hover { color: var(--brand); }

.section { padding: 2.5rem 0; }

.band {
  padding: 2.5rem 0;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.band--soft {
  background: #f3f6f4;
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.25rem;
  max-width: 36rem;
}

.section-head--row {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--mute);
  font-size: 0.95rem;
}

.text-link {
  font-weight: 650;
  text-decoration: none;
  color: var(--brand);
  white-space: nowrap;
  font-size: 0.92rem;
}

.text-link:hover { color: var(--brand-ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.05rem;
  border-radius: 0.55rem;
  font-weight: 650;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-ink);
  color: #fff;
}

.btn-soft {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-soft:hover {
  background: #fff;
  color: var(--ink);
  border-color: #9ca3af;
}

/* Countries */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
}

.country-tile {
  position: relative;
  display: grid;
  gap: 0.15rem;
  padding: 0.95rem 0.9rem 0.95rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.country-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--mark, var(--brand));
}

.country-tile[data-country="us"] { --mark: #1d4ed8; }
.country-tile[data-country="uk"] { --mark: #be123c; }
.country-tile[data-country="ca"] { --mark: #dc2626; }
.country-tile[data-country="au"] { --mark: #d97706; }
.country-tile[data-country="de"] { --mark: #ca8a04; }
.country-tile[data-country="nl"] { --mark: #ea580c; }
.country-tile[data-country="be"] { --mark: #ca8a04; }
.country-tile[data-country="ch"] { --mark: #dc2626; }
.country-tile[data-country="at"] { --mark: #e11d48; }
.country-tile[data-country="ie"] { --mark: #059669; }
.country-tile[data-country="se"] { --mark: #0284c7; }
.country-tile[data-country="no"] { --mark: #e11d48; }
.country-tile[data-country="dk"] { --mark: #e11d48; }

.country-tile:hover {
  border-color: var(--line-2);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  color: inherit;
}

.country-tile__flag { display: none; }
.country-tile__code {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.country-tile__name {
  color: var(--mute);
  font-size: 0.86rem;
}

/* Topics */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.topic-tile {
  display: block;
  padding: 1.15rem 1.15rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topic-tile:hover {
  border-color: var(--line-2);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  color: inherit;
}

.topic-tile__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  height: 1.45rem;
  padding: 0 0.4rem;
  margin-bottom: 0.55rem;
  border-radius: 0.35rem;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.topic-tile h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.topic-tile p {
  margin: 0;
  color: var(--mute);
  font-size: 0.9rem;
  max-width: 36ch;
  line-height: 1.45;
}

/* Guides — clean aligned rows */
.guide-stack {
  display: grid;
  gap: 0.55rem;
}

.guide-card {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guide-card:hover {
  border-color: var(--line-2);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  color: inherit;
}

.guide-card__body { min-width: 0; }

.guide-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--ink);
}

.guide-card span {
  display: block;
  margin-top: 0.2rem;
  color: var(--mute);
  font-size: 0.88rem;
  line-height: 1.45;
}

.guide-card__go {
  color: var(--brand);
  font-weight: 600;
  font-size: 1.05rem;
  opacity: 0.45;
}

.guide-card:hover .guide-card__go { opacity: 1; }

.brand-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.35rem;
  overflow: hidden;
}

.brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-note { color: var(--mute); padding: 0.5rem 0; }

.pagination-wrap { margin-top: 1.25rem; }
.pagination-wrap .nav-links { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.pagination-wrap a,
.pagination-wrap span {
  padding: 0.4rem 0.65rem;
  border-radius: 0.4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
}

.pagination-wrap .current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.article-body { padding: 1.75rem 0 3.5rem; }

.article-back {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.related-guides {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.related-guides__title {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.related-guides__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.related-guides__list a {
  display: block;
  text-decoration: none;
  color: var(--soft);
  font-weight: 600;
  line-height: 1.4;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.related-guides__list li:last-child a { border-bottom: 0; }

.related-guides__list a:hover { color: var(--brand); }

.article-back a {
  font-weight: 650;
  text-decoration: none;
  color: var(--soft);
}

.article-back a:hover { color: var(--brand); }

.entry-content {
  font-size: 1.05rem;
  color: var(--soft);
  line-height: 1.7;
}

.entry-content > *:first-child { margin-top: 0; }

.entry-content h2 {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 2rem 0 0.6rem;
}

.entry-content h3 {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 1.4rem 0 0.45rem;
}

.entry-content p { margin: 0.8rem 0; }

.entry-content ul {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0;
}

.entry-content ul li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
}

.entry-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: var(--brand);
}

.entry-content ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1rem 0;
}

.entry-content ol li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 0 0.85rem 2.9rem;
  border-bottom: 1px solid var(--line);
}

.entry-content ol li:last-child { border-bottom: 0; }

.entry-content ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
}

.entry-content strong { color: var(--ink); }

.entry-content em {
  font-style: normal;
  background: var(--brand-soft);
  padding: 0.05em 0.22em;
  border-radius: 0.2rem;
  color: var(--ink);
}

.quick-answer,
.disclaimer,
.template-box,
.situations {
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.2rem 0;
}

.quick-answer {
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.quick-answer strong { color: #1d4ed8; }

.situations {
  background: var(--brand-soft);
  border: 1px solid #bbf7d0;
}

.situations strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--brand-ink);
  font-weight: 700;
}

.situations ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.situations ul li {
  padding: 0.3rem 0 0.3rem 1rem !important;
  border: 0 !important;
}
.situations ul li::before {
  content: "" !important;
  width: 0.28rem !important;
  height: 0.28rem !important;
  background: var(--brand) !important;
  border-radius: 50% !important;
  top: 0.75rem !important;
}

.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.94rem;
}

.template-box {
  background: #111827;
  color: #e5e7eb;
  white-space: pre-wrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

.content-area {
  width: min(100% - 2rem, var(--read));
  margin: 0 auto;
  padding: 1.75rem 0 3.5rem;
}

.article-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
}

.entry-title {
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
  line-height: 1.25;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--mute);
  font-size: 0.9rem;
  background: var(--surface);
}

.footer-inner {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

.footer-inner strong {
  font-weight: 700;
  color: var(--ink);
}

.footer-links {
  margin: 0.65rem 0;
}

.footer-links a {
  color: var(--soft);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover { color: var(--brand); }

@media (max-width: 900px) {
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7rem 0;
    min-height: 0;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .topic-grid { grid-template-columns: 1fr; }
  .guide-card { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .guide-card__go { display: none; }
  .hero__title--article { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
