/*
Theme Name: HowToSA
Theme URI: https://howtosa.co.za
Author: HowToSA
Author URI: https://howtosa.co.za
Description: A fast, accessible editorial theme for South Africa's practical life-admin guide.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: howtosa
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, blog, accessibility-ready, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --htsa-navy-950: #07172c;
  --htsa-navy-900: #0b1f3a;
  --htsa-navy-800: #12345a;
  --htsa-green-700: #087a4e;
  --htsa-green-600: #0f9460;
  --htsa-green-500: #18a66a;
  --htsa-green-100: #dff7ea;
  --htsa-gold-500: #f2c84b;
  --htsa-gold-100: #fff4c6;
  --htsa-sky-100: #e9f3ff;
  --htsa-ink: #142238;
  --htsa-muted: #5d6a7b;
  --htsa-line: #dce3ea;
  --htsa-paper: #ffffff;
  --htsa-canvas: #f5f7f8;
  --htsa-danger: #a43838;
  --htsa-shadow-sm: 0 1px 2px rgb(7 23 44 / 6%), 0 4px 14px rgb(7 23 44 / 5%);
  --htsa-shadow-md: 0 12px 40px rgb(7 23 44 / 11%);
  --htsa-radius-sm: 10px;
  --htsa-radius-md: 18px;
  --htsa-radius-lg: 28px;
  --htsa-width: 1180px;
  --htsa-reading: 760px;
  --htsa-transition: 180ms ease;
}

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

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

body {
  margin: 0;
  color: var(--htsa-ink);
  background: var(--htsa-canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

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

a {
  color: var(--htsa-green-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--htsa-navy-900);
}

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

button,
[type="submit"] {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--htsa-gold-500);
  outline-offset: 3px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 12px;
  padding: 12px 18px;
  top: 12px;
  width: auto;
  z-index: 100000;
  background: var(--htsa-paper);
  color: var(--htsa-navy-900);
  border-radius: 8px;
  box-shadow: var(--htsa-shadow-md);
}

.htsa-container {
  width: min(calc(100% - 40px), var(--htsa-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgb(255 255 255 / 95%);
  border-bottom: 1px solid rgb(11 31 58 / 10%);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.site-branding {
  flex: 0 0 auto;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--htsa-navy-900);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: var(--htsa-paper);
  background: var(--htsa-green-600);
  border-radius: 12px 12px 12px 4px;
  box-shadow: 0 5px 14px rgb(15 148 96 / 24%);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-word {
  font-size: 1.38rem;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.brand-word span {
  color: var(--htsa-green-600);
}

.primary-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-menu,
.footer-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  color: var(--htsa-ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: var(--htsa-green-700);
}

.header-search-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--htsa-navy-900);
  background: var(--htsa-canvas);
  border: 1px solid var(--htsa-line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: var(--htsa-navy-900);
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: 11px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin-block: 5px;
  background: currentColor;
  border-radius: 4px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 126px) 0 clamp(62px, 8vw, 108px);
  color: var(--htsa-paper);
  background:
    radial-gradient(circle at 86% 18%, rgb(24 166 106 / 30%), transparent 32%),
    radial-gradient(circle at 8% 88%, rgb(242 200 75 / 14%), transparent 28%),
    linear-gradient(135deg, var(--htsa-navy-950), var(--htsa-navy-800));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgb(255 255 255 / 7%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 7%) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  padding: 7px 12px;
  color: #d9ffec;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--htsa-green-500);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgb(24 166 106 / 18%);
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto 20px;
  font-size: clamp(2.45rem, 6vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.062em;
}

.hero h1 em {
  color: var(--htsa-gold-500);
  font-style: normal;
}

.hero-copy {
  max-width: 680px;
  margin: 0 auto 34px;
  color: #d6e1ee;
  font-size: clamp(1.04rem, 2vw, 1.24rem);
}

.hero-search {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px;
  display: flex;
  gap: 8px;
  background: var(--htsa-paper);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgb(0 0 0 / 28%);
}

.hero-search label {
  flex: 1 1 auto;
}

.hero-search input[type="search"] {
  width: 100%;
  min-height: 58px;
  padding: 10px 18px 10px 50px;
  color: var(--htsa-ink);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%235d6a7b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.2-3.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 17px center;
  border: 0;
  outline: 0;
}

.hero-search button,
.search-submit,
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 22px;
  color: var(--htsa-paper);
  background: var(--htsa-green-600);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background var(--htsa-transition), transform var(--htsa-transition);
}

.hero-search button:hover,
.search-submit:hover,
.button-primary:hover {
  color: var(--htsa-paper);
  background: var(--htsa-green-700);
  transform: translateY(-1px);
}

.hero-suggestions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 22px;
  color: #bfcddd;
  font-size: 0.86rem;
}

.hero-suggestions a {
  color: var(--htsa-paper);
  text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / 35%);
}

.trust-strip {
  position: relative;
  z-index: 2;
  margin-top: -29px;
}

.trust-strip-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--htsa-line);
  border: 1px solid var(--htsa-line);
  border-radius: var(--htsa-radius-md);
  box-shadow: var(--htsa-shadow-md);
}

.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 84px;
  padding: 18px;
  background: var(--htsa-paper);
}

.trust-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--htsa-green-700);
  background: var(--htsa-green-100);
  border-radius: 11px;
}

.trust-item strong,
.trust-item span {
  display: block;
}

.trust-item strong {
  color: var(--htsa-navy-900);
  font-size: 0.92rem;
}

.trust-item span {
  color: var(--htsa-muted);
  font-size: 0.78rem;
}

.section {
  padding: clamp(64px, 8vw, 104px) 0;
}

.section-white {
  background: var(--htsa-paper);
}

.section-header {
  max-width: 740px;
  margin-bottom: 38px;
}

.section-header.centered {
  margin-inline: auto;
  text-align: center;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--htsa-green-700);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-header h2,
.archive-header h1,
.search-header h1 {
  margin: 0 0 12px;
  color: var(--htsa-navy-900);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-header p,
.archive-description {
  margin: 0;
  color: var(--htsa-muted);
  font-size: 1.03rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  position: relative;
  min-height: 210px;
  padding: 25px;
  overflow: hidden;
  color: var(--htsa-ink);
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: var(--htsa-radius-md);
  box-shadow: var(--htsa-shadow-sm);
  text-decoration: none;
  transition: transform var(--htsa-transition), box-shadow var(--htsa-transition), border var(--htsa-transition);
}

.category-card:hover {
  color: var(--htsa-ink);
  border-color: rgb(15 148 96 / 35%);
  box-shadow: var(--htsa-shadow-md);
  transform: translateY(-4px);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 30px;
  color: var(--htsa-green-700);
  background: var(--htsa-green-100);
  border-radius: 14px;
  font-size: 1.45rem;
}

.category-card:nth-child(3n+2) .category-icon {
  color: #805e00;
  background: var(--htsa-gold-100);
}

.category-card:nth-child(3n+3) .category-icon {
  color: #1d5f9b;
  background: var(--htsa-sky-100);
}

.category-card h3 {
  margin: 0 0 7px;
  color: var(--htsa-navy-900);
  font-size: 1.05rem;
  line-height: 1.3;
}

.category-card p {
  margin: 0;
  color: var(--htsa-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.category-arrow {
  position: absolute;
  right: 22px;
  top: 25px;
  color: var(--htsa-muted);
  font-size: 1.2rem;
  transition: transform var(--htsa-transition);
}

.category-card:hover .category-arrow {
  color: var(--htsa-green-700);
  transform: translateX(3px);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: var(--htsa-radius-md);
  box-shadow: var(--htsa-shadow-sm);
  transition: transform var(--htsa-transition), box-shadow var(--htsa-transition);
}

.guide-card:hover {
  box-shadow: var(--htsa-shadow-md);
  transform: translateY(-4px);
}

.guide-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--htsa-navy-900), var(--htsa-green-700));
}

.guide-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.guide-card:hover .guide-card-media img {
  transform: scale(1.035);
}

.guide-card-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(255 255 255 / 85%);
}

.guide-card-placeholder svg {
  width: 62px;
  height: 62px;
}

.guide-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.guide-card-category {
  margin-bottom: 9px;
  color: var(--htsa-green-700);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.guide-card h3 {
  margin: 0 0 10px;
  color: var(--htsa-navy-900);
  font-size: 1.14rem;
  line-height: 1.35;
  letter-spacing: -0.018em;
}

.guide-card h3 a {
  color: inherit;
  text-decoration: none;
}

.guide-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.guide-card-body {
  position: relative;
}

.guide-card-meta,
.guide-card-category {
  position: relative;
  z-index: 1;
}

.guide-card-excerpt {
  margin: 0 0 18px;
  color: var(--htsa-muted);
  font-size: 0.89rem;
  line-height: 1.55;
}

.guide-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--htsa-muted);
  border-top: 1px solid var(--htsa-line);
  font-size: 0.76rem;
}

.verified-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--htsa-green-700);
  font-weight: 800;
}

.process-band {
  color: var(--htsa-paper);
  background: var(--htsa-navy-900);
}

.process-band .section-header h2 {
  color: var(--htsa-paper);
}

.process-band .section-kicker {
  color: var(--htsa-gold-500);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: process;
}

.process-step {
  position: relative;
  padding: 26px 26px 28px 74px;
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: var(--htsa-radius-md);
  counter-increment: process;
}

.process-step::before {
  content: counter(process);
  position: absolute;
  left: 24px;
  top: 24px;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--htsa-navy-950);
  background: var(--htsa-gold-500);
  border-radius: 10px;
  font-weight: 900;
}

.process-step h3 {
  margin: 0 0 7px;
  color: var(--htsa-paper);
  font-size: 1rem;
}

.process-step p {
  margin: 0;
  color: #bdcbd9;
  font-size: 0.88rem;
}

.article-shell {
  padding: 54px 0 90px;
}

.breadcrumbs {
  margin-bottom: 27px;
  color: var(--htsa-muted);
  font-size: 0.79rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: #9aa5b2;
}

.breadcrumbs a {
  color: var(--htsa-muted);
  text-decoration: none;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 46px;
  align-items: start;
}

.article-main {
  min-width: 0;
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: var(--htsa-radius-lg);
  box-shadow: var(--htsa-shadow-sm);
}

.article-header {
  padding: clamp(30px, 5vw, 58px) clamp(25px, 6vw, 68px) 32px;
  border-bottom: 1px solid var(--htsa-line);
}

.article-category {
  display: inline-flex;
  margin-bottom: 15px;
  padding: 6px 10px;
  color: var(--htsa-green-700);
  background: var(--htsa-green-100);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.article-header h1 {
  margin: 0 0 18px;
  color: var(--htsa-navy-900);
  font-size: clamp(2.12rem, 5vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.052em;
}

.article-deck {
  margin: 0 0 25px;
  color: var(--htsa-muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--htsa-muted);
  font-size: 0.78rem;
}

.article-byline span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.verification-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
  background: var(--htsa-line);
  border-bottom: 1px solid var(--htsa-line);
}

.verification-item {
  padding: 17px 22px;
  background: #f9fbfa;
}

.verification-item span,
.verification-item strong {
  display: block;
}

.verification-item span {
  color: var(--htsa-muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.verification-item strong {
  margin-top: 3px;
  color: var(--htsa-navy-900);
  font-size: 0.82rem;
}

.article-content {
  padding: clamp(30px, 5vw, 58px) clamp(25px, 6vw, 68px) clamp(46px, 6vw, 74px);
}

.article-content > * {
  max-width: var(--htsa-reading);
  margin-inline: auto;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--htsa-navy-900);
  line-height: 1.2;
  letter-spacing: -0.028em;
  scroll-margin-top: 105px;
}

.article-content h2 {
  margin-top: 2.3em;
  margin-bottom: 0.65em;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.article-content h3 {
  margin-top: 1.8em;
  margin-bottom: 0.55em;
  font-size: 1.32rem;
}

.article-content p,
.article-content ul,
.article-content ol {
  margin-top: 0;
  margin-bottom: 1.35em;
}

.article-content li + li {
  margin-top: 0.5em;
}

.article-content a {
  font-weight: 650;
}

.article-content blockquote {
  padding: 20px 24px;
  color: var(--htsa-navy-900);
  background: var(--htsa-sky-100);
  border-left: 5px solid #5c9bd5;
  border-radius: 0 var(--htsa-radius-sm) var(--htsa-radius-sm) 0;
}

.article-content .wp-block-table {
  overflow-x: auto;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.article-content th,
.article-content td {
  padding: 13px 14px;
  text-align: left;
  border: 1px solid var(--htsa-line);
}

.article-content th {
  color: var(--htsa-paper);
  background: var(--htsa-navy-900);
}

.article-content img {
  height: auto;
  border-radius: var(--htsa-radius-md);
}

.article-featured-image {
  margin: 0;
  border-bottom: 1px solid var(--htsa-line);
}

.article-featured-image img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.article-content .wp-caption-text,
.article-content figcaption {
  color: var(--htsa-muted);
  font-size: 0.76rem;
  text-align: center;
}

.guide-summary {
  max-width: var(--htsa-reading);
  margin: 0 auto 34px;
  padding: 23px 24px;
  background: #f8fbf9;
  border: 1px solid #cce7d8;
  border-radius: var(--htsa-radius-md);
}

.guide-summary h2 {
  margin: 0 0 14px;
  font-size: 1.08rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  margin: 0;
}

.summary-grid div {
  padding: 11px 12px;
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: 9px;
}

.summary-grid dt {
  color: var(--htsa-muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-grid dd {
  margin: 2px 0 0;
  color: var(--htsa-navy-900);
  font-size: 0.84rem;
  font-weight: 700;
}

.official-source-box {
  max-width: var(--htsa-reading);
  margin: 38px auto 0;
  padding: 20px 22px;
  background: var(--htsa-gold-100);
  border: 1px solid #ead176;
  border-radius: var(--htsa-radius-md);
}

.official-source-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--htsa-navy-900);
}

.official-source-box p {
  margin: 0 0 10px;
  color: #64531f;
  font-size: 0.84rem;
}

.official-source-box a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.article-updated-note {
  max-width: var(--htsa-reading);
  margin: 38px auto 0;
  padding-top: 20px;
  color: var(--htsa-muted);
  border-top: 1px solid var(--htsa-line);
  font-size: 0.8rem;
}

.article-updated-note p {
  margin: 0;
}

.related-guides {
  margin-top: 56px;
}

.related-guides h2 {
  margin: 0 0 22px;
  color: var(--htsa-navy-900);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.article-sidebar {
  position: sticky;
  top: 108px;
}

.sidebar-card {
  padding: 23px;
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: var(--htsa-radius-md);
  box-shadow: var(--htsa-shadow-sm);
}

.sidebar-card + .sidebar-card {
  margin-top: 18px;
}

.sidebar-card h2 {
  margin: 0 0 12px;
  color: var(--htsa-navy-900);
  font-size: 1rem;
}

.sidebar-card p,
.sidebar-card li {
  color: var(--htsa-muted);
  font-size: 0.81rem;
  line-height: 1.55;
}

.sidebar-card ul {
  margin: 0;
  padding-left: 19px;
}

.sidebar-disclaimer {
  border-top: 4px solid var(--htsa-gold-500);
}

.page-shell,
.archive-shell,
.search-shell,
.error-shell {
  padding: 58px 0 90px;
}

.page-card {
  max-width: 940px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 70px);
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: var(--htsa-radius-lg);
  box-shadow: var(--htsa-shadow-sm);
}

.page-card h1 {
  margin: 0 0 22px;
  color: var(--htsa-navy-900);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-card .article-content {
  padding: 0;
}

.page-card .article-content > * {
  margin-inline: 0;
}

.archive-header,
.search-header {
  max-width: 780px;
  margin-bottom: 36px;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  color: var(--htsa-navy-900);
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: 10px;
  text-decoration: none;
}

.pagination .current {
  color: var(--htsa-paper);
  background: var(--htsa-green-600);
  border-color: var(--htsa-green-600);
}

.empty-state,
.error-card {
  padding: 50px;
  text-align: center;
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: var(--htsa-radius-lg);
}

.empty-state h2,
.error-card h1 {
  margin-top: 0;
  color: var(--htsa-navy-900);
}

.site-footer {
  color: #c3cfdb;
  background: var(--htsa-navy-950);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 1fr 1fr;
  gap: 56px;
  padding: 65px 0 45px;
}

.footer-brand .brand-link {
  color: var(--htsa-paper);
}

.footer-brand p {
  max-width: 430px;
  margin: 18px 0 0;
  color: #aab9c8;
  font-size: 0.88rem;
}

.footer-column h2 {
  margin: 4px 0 15px;
  color: var(--htsa-paper);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-links,
.footer-menu {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a,
.footer-menu a {
  color: #bdc9d5;
  font-size: 0.84rem;
  text-decoration: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 30px;
  border-top: 1px solid rgb(255 255 255 / 10%);
  font-size: 0.74rem;
}

.footer-bottom p {
  margin: 0;
}

.search-form:not(.hero-search) {
  display: flex;
  max-width: 620px;
  gap: 9px;
}

.search-form:not(.hero-search) label {
  flex: 1;
}

.search-field {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: 11px;
}

.post-tags {
  max-width: var(--htsa-reading);
  margin: 34px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags a {
  padding: 6px 10px;
  color: var(--htsa-muted);
  background: var(--htsa-canvas);
  border: 1px solid var(--htsa-line);
  border-radius: 999px;
  font-size: 0.75rem;
  text-decoration: none;
}

.htsa-contact-form {
  max-width: 680px;
  margin-top: 30px;
}

.htsa-contact-form p {
  margin: 0 0 20px;
}

.htsa-contact-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--htsa-navy-900);
  font-size: 0.9rem;
  font-weight: 750;
}

.htsa-contact-form input,
.htsa-contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--htsa-ink);
  background: var(--htsa-paper);
  border: 1px solid var(--htsa-line);
  border-radius: 11px;
}

.htsa-contact-form input:focus,
.htsa-contact-form textarea:focus {
  border-color: var(--htsa-green-600);
  box-shadow: 0 0 0 3px rgb(15 148 96 / 12%);
  outline: 0;
}

.htsa-contact-privacy {
  color: var(--htsa-muted);
  font-size: 0.8rem;
}

.htsa-contact-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.htsa-form-notice {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: var(--htsa-radius-sm);
  font-weight: 700;
}

.htsa-form-success {
  color: #075d3b;
  background: var(--htsa-green-100);
  border: 1px solid #a9dec2;
}

.htsa-form-error {
  color: #7b2525;
  background: #fff0f0;
  border: 1px solid #efc2c2;
}

.alignwide {
  max-width: 1040px !important;
}

.alignfull {
  max-width: none !important;
  margin-inline: calc(50% - 50vw) !important;
  width: 100vw;
}

@media (max-width: 1020px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .sidebar-card + .sidebar-card {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .primary-navigation {
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 10px);
    display: none;
    align-items: stretch;
    padding: 20px;
    background: var(--htsa-paper);
    border: 1px solid var(--htsa-line);
    border-radius: var(--htsa-radius-md);
    box-shadow: var(--htsa-shadow-md);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-menu {
    display: grid;
    gap: 3px;
  }

  .primary-menu a {
    display: block;
    padding: 10px 8px;
  }

  .header-search-link {
    margin-top: 12px;
  }

  .trust-strip-inner,
  .verification-bar {
    grid-template-columns: 1fr;
  }

  .trust-item {
    justify-content: flex-start;
  }

  .process-grid,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-main {
    gap: 34px;
  }
}

@media (max-width: 650px) {
  body {
    font-size: 16px;
  }

  .htsa-container {
    width: min(calc(100% - 28px), var(--htsa-width));
  }

  .header-inner {
    min-height: 68px;
  }

  .hero {
    padding-top: 62px;
  }

  .hero-search {
    display: block;
    padding: 7px;
  }

  .hero-search button {
    width: 100%;
  }

  .category-grid,
  .guide-grid,
  .article-sidebar,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 185px;
  }

  .article-shell {
    padding-top: 32px;
  }

  .article-main {
    border-radius: var(--htsa-radius-md);
  }

  .footer-bottom {
    display: grid;
  }
}

/* HowToSA advertising placements: labelled, uncluttered and mobile-safe. */
.htsa-ad {
  text-align: center;
}
.htsa-ad-label {
  display: block;
  margin-bottom: 9px;
  color: var(--htsa-muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.htsa-ad-leaderboard {
  width: 728px;
  max-width: 100%;
  min-height: 116px;
  margin: 0 auto 34px;
}
.htsa-ad-leaderboard-slot {
  width: 728px;
  height: 90px;
  max-width: 100%;
  margin-inline: auto;
}
.htsa-ad-native {
  width: 100%;
  min-width: 0;
  max-width: var(--htsa-reading);
  margin: 38px auto 18px;
  padding: 23px 0 8px;
  border-top: 1px solid var(--htsa-line);
}
#container-ddcbd686b103f86a0566d5fd1a983981 {
  max-width: 100%;
  overflow-x: clip;
}
@media (max-width: 819px) {
  .htsa-ad-leaderboard {
    display: none;
  }
}

/* Size-specific ad placements for mobile and article sidebars. */
.htsa-ad-mobile {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  min-height: 75px;
  max-width: none;
  margin: 12px 0 28px;
}
.htsa-ad-mobile-slot {
  width: 320px;
  height: 50px;
}
.htsa-ad-rectangle {
  width: 300px;
  max-width: 100%;
  min-height: 280px;
  margin-top: 18px;
}
.htsa-ad-rectangle-slot {
  width: 300px;
  height: 250px;
}
@media (max-width: 319px) {
  .htsa-ad-mobile { display: none; }
}
@media (max-width: 1020px) {
  .htsa-ad-rectangle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
