/*
Theme Name: The Essential Review — Elegant
Theme URI: https://theessentialreview.com/
Description: A polished, conversion-focused child theme built specifically for The Essential Review. Requires the HybridMag parent theme.
Author: OpenAI
Template: hybridmag
Version: 1.0.0
Text Domain: essential-review-elegant
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --ter-ink: #0f172a;
  --ter-text: #334155;
  --ter-muted: #64748b;
  --ter-soft: #94a3b8;
  --ter-bg: #faf9f6;
  --ter-surface: #ffffff;
  --ter-surface-alt: #f4f7f6;
  --ter-accent: #0f766e;
  --ter-accent-dark: #115e59;
  --ter-accent-soft: #dff3ef;
  --ter-gold: #b78636;
  --ter-gold-soft: #f6ecd9;
  --ter-border: #e2e8f0;
  --ter-danger: #9f1239;
  --ter-success: #166534;
  --ter-radius-sm: 10px;
  --ter-radius: 16px;
  --ter-radius-lg: 26px;
  --ter-shadow-sm: 0 7px 22px rgba(15, 23, 42, 0.06);
  --ter-shadow: 0 18px 54px rgba(15, 23, 42, 0.09);
  --ter-container: 1180px;
  --ter-reading: 760px;
  --ter-transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--ter-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--ter-accent-dark);
}

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

img {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
.ter-brand__name {
  margin-top: 0;
  color: var(--ter-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.026em;
  line-height: 1.18;
}

h1 {
  font-size: clamp(2.25rem, 5.2vw, 4.4rem);
}

h2 {
  font-size: clamp(1.72rem, 3vw, 2.45rem);
}

h3 {
  font-size: clamp(1.28rem, 2vw, 1.62rem);
}

p,
ul,
ol,
blockquote,
pre,
table {
  margin-top: 0;
}

::selection {
  background: var(--ter-accent-soft);
  color: var(--ter-ink);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  top: 8px;
  left: 8px;
  z-index: 99999;
  width: auto;
  height: auto;
  padding: 0.8rem 1rem;
  clip: auto;
  background: var(--ter-ink);
  color: #fff;
  border-radius: 8px;
}

.ter-container {
  width: min(calc(100% - 2rem), var(--ter-container));
  margin-inline: auto;
}

.ter-reading-width {
  width: min(calc(100% - 2rem), var(--ter-reading));
  margin-inline: auto;
}

.ter-site-main {
  min-height: 58vh;
}

.ter-section {
  padding-block: clamp(3.4rem, 7vw, 6.8rem);
}

.ter-section--compact {
  padding-block: clamp(2.4rem, 4.5vw, 4.2rem);
}

.ter-section--white {
  background: var(--ter-surface);
}

.ter-section--soft {
  background: var(--ter-surface-alt);
}

.ter-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.ter-section__header h2,
.ter-section__header p {
  margin-bottom: 0;
}

.ter-section__intro {
  max-width: 680px;
  color: var(--ter-muted);
  font-size: 1.06rem;
}

.ter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: var(--ter-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ter-eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: currentColor;
}

.ter-kicker {
  color: var(--ter-muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ter-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ter-accent);
  color: #fff !important;
  box-shadow: none;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ter-transition), background var(--ter-transition), box-shadow var(--ter-transition);
}

.ter-button:hover,
.ter-button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
button[type="submit"]:hover,
button[type="submit"]:focus {
  background: var(--ter-accent-dark);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.ter-button--secondary {
  border-color: var(--ter-border);
  background: #fff;
  color: var(--ter-ink) !important;
}

.ter-button--secondary:hover,
.ter-button--secondary:focus {
  border-color: var(--ter-accent);
  background: var(--ter-accent-soft);
  color: var(--ter-accent-dark) !important;
}

.ter-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 760;
  text-decoration: none;
}

.ter-text-link::after {
  content: "→";
  transition: transform var(--ter-transition);
}

.ter-text-link:hover::after,
.ter-text-link:focus::after {
  transform: translateX(3px);
}

/* Header */
.ter-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.ter-header__inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 78px;
}

.ter-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--ter-ink);
  text-decoration: none;
}

.ter-brand:hover,
.ter-brand:focus {
  color: var(--ter-ink);
}

.ter-brand__mark {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--ter-ink);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.ter-brand__text {
  min-width: 0;
}

.ter-brand__name {
  display: block;
  overflow: hidden;
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ter-brand__tagline {
  display: block;
  margin-top: 0.22rem;
  overflow: hidden;
  color: var(--ter-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ter-brand .custom-logo {
  display: block;
  width: auto;
  max-height: 48px;
}

.ter-brand--logo .custom-logo-link {
  display: block;
}

.ter-nav ul {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ter-nav li {
  position: relative;
}

.ter-nav a {
  display: block;
  padding-block: 0.6rem;
  color: var(--ter-ink);
  font-size: 0.93rem;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}

.ter-nav a:hover,
.ter-nav a:focus,
.ter-nav .current-menu-item > a,
.ter-nav .current-category-ancestor > a,
.ter-nav .current-post-ancestor > a {
  color: var(--ter-accent);
}

.ter-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: -1rem;
  display: none;
  min-width: 220px;
  padding: 0.75rem;
  border: 1px solid var(--ter-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ter-shadow);
}

.ter-nav li:hover > .sub-menu,
.ter-nav li:focus-within > .sub-menu {
  display: block;
}

.ter-nav .sub-menu a {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
}

.ter-nav .sub-menu a:hover,
.ter-nav .sub-menu a:focus {
  background: var(--ter-surface-alt);
}

.ter-header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ter-icon-button,
.ter-menu-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ter-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ter-ink);
  cursor: pointer;
}

.ter-icon-button:hover,
.ter-icon-button:focus,
.ter-menu-toggle:hover,
.ter-menu-toggle:focus {
  border-color: var(--ter-accent);
  color: var(--ter-accent);
}

.ter-menu-toggle {
  display: none;
}

.ter-search-panel {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--ter-border);
  background: #fff;
}

.ter-search-panel.is-open {
  display: block;
}

.ter-search-form {
  display: flex;
  gap: 0.65rem;
  max-width: 720px;
  margin-inline: auto;
}

.ter-search-form label {
  flex: 1;
}

.ter-search-form input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 1rem;
  border: 1px solid var(--ter-border);
  border-radius: 999px;
  background: var(--ter-bg);
  color: var(--ter-ink);
}

/* Hero */
.ter-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 8vw, 7.5rem);
  background:
    radial-gradient(circle at 12% 18%, rgba(15, 118, 110, 0.13), transparent 34%),
    radial-gradient(circle at 88% 16%, rgba(183, 134, 54, 0.12), transparent 30%),
    linear-gradient(180deg, #fff 0%, var(--ter-bg) 100%);
}

.ter-hero::after {
  position: absolute;
  right: -120px;
  bottom: -190px;
  width: 430px;
  height: 430px;
  content: "";
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(15, 118, 110, 0.035), 0 0 0 110px rgba(15, 118, 110, 0.025);
}

.ter-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}

.ter-hero__copy h1 {
  max-width: 820px;
  margin-bottom: 1.25rem;
}

.ter-hero__lede {
  max-width: 700px;
  margin-bottom: 1.65rem;
  color: var(--ter-muted);
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
}

.ter-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ter-hero__panel {
  position: relative;
  padding: 1.1rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--ter-radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--ter-shadow);
  backdrop-filter: blur(10px);
}

.ter-hero__panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.ter-hero-mini {
  min-height: 142px;
  padding: 1.1rem;
  border: 1px solid var(--ter-border);
  border-radius: 18px;
  background: #fff;
}

.ter-hero-mini:nth-child(1) {
  background: linear-gradient(145deg, #ecf8f6, #fff);
}

.ter-hero-mini:nth-child(2) {
  background: linear-gradient(145deg, #fbf3e6, #fff);
}

.ter-hero-mini:nth-child(3) {
  background: linear-gradient(145deg, #f1f5f9, #fff);
}

.ter-hero-mini:nth-child(4) {
  background: linear-gradient(145deg, #edf4ff, #fff);
}

.ter-hero-mini__icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 10px;
  background: var(--ter-ink);
  color: #fff;
}

.ter-hero-mini strong {
  display: block;
  color: var(--ter-ink);
  font-size: 0.96rem;
  line-height: 1.25;
}

.ter-hero-mini span {
  display: block;
  margin-top: 0.35rem;
  color: var(--ter-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.ter-trust-strip {
  border-block: 1px solid var(--ter-border);
  background: #fff;
}

.ter-trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.ter-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 74px;
  padding: 1rem;
  color: var(--ter-muted);
  font-size: 0.92rem;
  font-weight: 680;
  text-align: center;
}

.ter-trust-item + .ter-trust-item {
  border-left: 1px solid var(--ter-border);
}

.ter-trust-item svg {
  color: var(--ter-accent);
}

/* Cards */
.ter-grid {
  display: grid;
  gap: 1.35rem;
}

.ter-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ter-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ter-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ter-border);
  border-radius: var(--ter-radius);
  background: #fff;
  box-shadow: var(--ter-shadow-sm);
  transition: transform var(--ter-transition), box-shadow var(--ter-transition), border-color var(--ter-transition);
}

.ter-card:hover,
.ter-card:focus-within {
  border-color: rgba(15, 118, 110, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--ter-shadow);
}

.ter-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #e7efee, #f8f4eb);
}

.ter-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.ter-card:hover .ter-card__media img,
.ter-card:focus-within .ter-card__media img {
  transform: scale(1.025);
}

.ter-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--ter-accent);
}

.ter-card__body {
  padding: 1.25rem;
}

.ter-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  color: var(--ter-muted);
  font-size: 0.78rem;
  font-weight: 680;
}

.ter-card__category {
  color: var(--ter-accent);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ter-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.34rem;
}

.ter-card h3 a {
  color: var(--ter-ink);
  text-decoration: none;
}

.ter-card h3 a:hover,
.ter-card h3 a:focus {
  color: var(--ter-accent);
}

.ter-card__excerpt {
  margin-bottom: 1rem;
  color: var(--ter-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.ter-category-card {
  position: relative;
  display: flex;
  min-height: 310px;
  overflow: hidden;
  align-items: end;
  border-radius: 20px;
  background: var(--ter-ink);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--ter-shadow-sm);
}

.ter-category-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 15%, rgba(15, 23, 42, 0.92) 100%);
}

.ter-category-card__image,
.ter-category-card__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ter-category-card__image {
  object-fit: cover;
  transition: transform 300ms ease;
}

.ter-category-card__fallback {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 28%),
    linear-gradient(145deg, var(--ter-accent), var(--ter-ink));
}

.ter-category-card:nth-child(2) .ter-category-card__fallback {
  background: linear-gradient(145deg, #8a6423, var(--ter-ink));
}

.ter-category-card:nth-child(3) .ter-category-card__fallback {
  background: linear-gradient(145deg, #475569, var(--ter-ink));
}

.ter-category-card:nth-child(4) .ter-category-card__fallback {
  background: linear-gradient(145deg, #1d4ed8, var(--ter-ink));
}

.ter-category-card:hover .ter-category-card__image,
.ter-category-card:focus .ter-category-card__image {
  transform: scale(1.035);
}

.ter-category-card__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 1.45rem;
}

.ter-category-card__content h3 {
  margin-bottom: 0.45rem;
  color: #fff;
  font-size: 1.48rem;
}

.ter-category-card__content p {
  margin-bottom: 0.85rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

.ter-category-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 760;
}

.ter-card--featured {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100%;
}

.ter-card--featured .ter-card__media {
  height: 100%;
  aspect-ratio: auto;
}

.ter-card--featured .ter-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.6rem);
}

.ter-card--featured h3 {
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
}

.ter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-bottom: 0.85rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: var(--ter-gold-soft);
  color: #76541d;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Methodology */
.ter-method-card {
  padding: 1.7rem;
  border: 1px solid var(--ter-border);
  border-radius: var(--ter-radius);
  background: #fff;
}

.ter-method-card__number {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 1.1rem;
  place-items: center;
  border-radius: 12px;
  background: var(--ter-accent-soft);
  color: var(--ter-accent-dark);
  font-weight: 820;
}

.ter-method-card h3 {
  margin-bottom: 0.55rem;
}

.ter-method-card p {
  margin-bottom: 0;
  color: var(--ter-muted);
  font-size: 0.95rem;
}

.ter-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4.5rem);
  border-radius: var(--ter-radius-lg);
  background: var(--ter-ink);
  color: #fff;
}

.ter-cta::after {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 310px;
  height: 310px;
  content: "";
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.22);
}

.ter-cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.ter-cta h2 {
  max-width: 680px;
  margin-bottom: 0.65rem;
  color: #fff;
}

.ter-cta p {
  max-width: 680px;
  margin-bottom: 0;
  color: #cbd5e1;
}

/* Archive and page hero */
.ter-page-hero {
  padding-block: clamp(3rem, 6vw, 5.8rem);
  border-bottom: 1px solid var(--ter-border);
  background: #fff;
}

.ter-page-hero__inner {
  max-width: 840px;
}

.ter-page-hero h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.ter-page-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--ter-muted);
  font-size: 1.12rem;
}

.ter-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.ter-pagination {
  margin-top: 2.2rem;
}

.ter-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.ter-pagination .page-numbers {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding-inline: 0.7rem;
  border: 1px solid var(--ter-border);
  border-radius: 10px;
  background: #fff;
  color: var(--ter-ink);
  font-weight: 700;
  text-decoration: none;
}

.ter-pagination .current,
.ter-pagination .page-numbers:hover,
.ter-pagination .page-numbers:focus {
  border-color: var(--ter-accent);
  background: var(--ter-accent);
  color: #fff;
}

/* Single article */
.ter-article-hero {
  padding-block: clamp(2.8rem, 6vw, 5.6rem) 2rem;
  background: #fff;
}

.ter-article-hero__inner {
  max-width: 930px;
}

.ter-article-hero h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.3rem, 5vw, 4.25rem);
}

.ter-article-deck {
  max-width: 800px;
  margin-bottom: 1.2rem;
  color: var(--ter-muted);
  font-size: clamp(1.08rem, 1.7vw, 1.24rem);
}

.ter-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  color: var(--ter-muted);
  font-size: 0.88rem;
}

.ter-article-meta a {
  color: var(--ter-text);
  font-weight: 720;
  text-decoration: none;
}

.ter-article-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.ter-article-image {
  width: min(calc(100% - 2rem), 1040px);
  margin: 0 auto clamp(2rem, 5vw, 3.6rem);
}

.ter-article-image img {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--ter-shadow-sm);
}

.ter-article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--ter-reading)) 250px;
  justify-content: center;
  gap: 3rem;
  padding-bottom: clamp(3.5rem, 7vw, 6.5rem);
}

.ter-article-main {
  min-width: 0;
}

.ter-disclosure {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--ter-border);
  border-left: 4px solid var(--ter-accent);
  border-radius: 12px;
  background: #fff;
  color: var(--ter-muted);
  font-size: 0.91rem;
  line-height: 1.55;
}

.ter-disclosure strong {
  color: var(--ter-ink);
}

.ter-disclosure p:last-child {
  margin-bottom: 0;
}

.ter-toc {
  display: none;
  margin-bottom: 1.75rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--ter-border);
  border-radius: var(--ter-radius);
  background: #fff;
}

.ter-toc.is-ready {
  display: block;
}

.ter-toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  color: var(--ter-ink);
  font-weight: 780;
}

.ter-toc ol {
  margin: 0;
  padding-left: 1.15rem;
}

.ter-toc li + li {
  margin-top: 0.35rem;
}

.ter-toc a {
  color: var(--ter-text);
  font-size: 0.92rem;
  text-decoration: none;
}

.ter-toc a:hover,
.ter-toc a:focus {
  color: var(--ter-accent);
}

.ter-entry-content {
  color: var(--ter-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.82;
}

.ter-entry-content > * {
  max-width: 100%;
}

.ter-entry-content p,
.ter-entry-content ul,
.ter-entry-content ol {
  margin-bottom: 1.35em;
}

.ter-entry-content h2,
.ter-entry-content h3,
.ter-entry-content h4 {
  scroll-margin-top: 110px;
}

.ter-entry-content h2 {
  margin-top: 2.2em;
  margin-bottom: 0.75em;
  padding-top: 0.15em;
}

.ter-entry-content h3 {
  margin-top: 1.7em;
  margin-bottom: 0.62em;
}

.ter-entry-content a {
  color: var(--ter-accent);
  font-weight: 650;
}

.ter-entry-content > p:first-of-type {
  color: var(--ter-text);
  font-size: 1.13em;
}

.ter-entry-content blockquote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.35rem;
  border-left: 4px solid var(--ter-gold);
  background: var(--ter-gold-soft);
  color: var(--ter-ink);
  font-style: italic;
}

.ter-entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.ter-entry-content img {
  border-radius: 14px;
}

.ter-entry-content figure {
  margin-block: 1.8rem;
}

.ter-entry-content figcaption {
  margin-top: 0.6rem;
  color: var(--ter-muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  text-align: center;
}

.ter-entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ter-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ter-entry-content th,
.ter-entry-content td {
  min-width: 130px;
  padding: 0.85rem;
  border-right: 1px solid var(--ter-border);
  border-bottom: 1px solid var(--ter-border);
  text-align: left;
  vertical-align: top;
}

.ter-entry-content th {
  background: var(--ter-ink);
  color: #fff;
  font-weight: 760;
}

.ter-entry-content tr:last-child td {
  border-bottom: 0;
}

.ter-entry-content th:last-child,
.ter-entry-content td:last-child {
  border-right: 0;
}

.ter-entry-content .wp-block-separator {
  margin-block: 2.4rem;
  border-color: var(--ter-border);
}

.ter-entry-content .wp-block-group,
.ter-entry-content .ter-product-box,
.ter-product-box {
  margin-block: 1.6rem;
  padding: 1.35rem;
  border: 1px solid var(--ter-border);
  border-radius: var(--ter-radius);
  background: #fff;
  box-shadow: var(--ter-shadow-sm);
}

.ter-buy-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  margin: 1.3rem 0 1.8rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--ter-border);
  border-radius: 14px;
  background: var(--ter-surface-alt);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.ter-buy-box__label {
  flex: 1 1 190px;
  color: var(--ter-ink);
  font-size: 0.95rem;
  font-weight: 760;
}

.ter-buy-box .ter-button {
  min-height: 44px;
  padding: 0.68rem 1.05rem;
  font-size: 0.9rem;
}

.ter-buy-box small {
  flex-basis: 100%;
  color: var(--ter-muted);
  font-size: 0.76rem;
}

.ter-article-aside {
  align-self: start;
}

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

.ter-side-card {
  padding: 1.1rem;
  border: 1px solid var(--ter-border);
  border-radius: 14px;
  background: #fff;
}

.ter-side-card + .ter-side-card {
  margin-top: 1rem;
}

.ter-side-card h3 {
  margin-bottom: 0.7rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0;
}

.ter-side-card p,
.ter-side-card li {
  color: var(--ter-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.ter-side-card ul {
  margin: 0;
  padding-left: 1rem;
}

.ter-author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-top: 2.4rem;
  padding: 1.35rem;
  border: 1px solid var(--ter-border);
  border-radius: var(--ter-radius);
  background: #fff;
}

.ter-author-box img {
  border-radius: 50%;
}

.ter-author-box h2 {
  margin-bottom: 0.35rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.02rem;
  letter-spacing: 0;
}

.ter-author-box p {
  margin-bottom: 0.5rem;
  color: var(--ter-muted);
  font-size: 0.92rem;
}

.ter-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.ter-post-nav a {
  display: block;
  padding: 1rem;
  border: 1px solid var(--ter-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ter-ink);
  font-weight: 720;
  text-decoration: none;
}

.ter-post-nav a:hover,
.ter-post-nav a:focus {
  border-color: var(--ter-accent);
  color: var(--ter-accent);
}

.ter-post-nav__next {
  text-align: right;
}

.ter-related {
  padding-block: 3.5rem;
  border-top: 1px solid var(--ter-border);
  background: #fff;
}

/* Pages and forms */
.ter-page-content {
  width: min(calc(100% - 2rem), 820px);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.ter-page-content .ter-entry-content {
  font-size: 1.04rem;
}

.ter-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.ter-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ter-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--ter-ink);
  font-size: 0.88rem;
  font-weight: 720;
}

.ter-form input,
.ter-form select,
.ter-form textarea,
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--ter-border);
  border-radius: 10px;
  background: #fff;
  color: var(--ter-ink);
}

.ter-form input:focus,
.ter-form select:focus,
.ter-form textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.14);
  border-color: var(--ter-accent);
}

.ter-form textarea {
  min-height: 180px;
  resize: vertical;
}

.ter-form__consent {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 0.6rem !important;
  color: var(--ter-muted) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}

.ter-form__consent input {
  width: auto;
  margin-top: 0.25rem;
}

.ter-alert {
  margin-bottom: 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
}

.ter-alert--success {
  background: #ecfdf3;
  color: var(--ter-success);
}

.ter-alert--error {
  background: #fff1f2;
  color: var(--ter-danger);
}

/* Comments */
.ter-comments {
  margin-top: 2.5rem;
}

.ter-comments-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.ter-comments-list .comment {
  padding: 1rem 0;
  border-top: 1px solid var(--ter-border);
}

.comment-author img {
  border-radius: 50%;
}

/* Footer */
.ter-footer {
  background: var(--ter-ink);
  color: #cbd5e1;
}

.ter-footer__main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 3rem;
  padding-block: 4rem 3rem;
}

.ter-footer .ter-brand {
  margin-bottom: 1rem;
  color: #fff;
}

.ter-footer .ter-brand__name {
  color: #fff;
}

.ter-footer .ter-brand__tagline {
  color: #94a3b8;
}

.ter-footer__about {
  max-width: 520px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.ter-footer h2 {
  margin-bottom: 0.9rem;
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ter-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ter-footer li + li {
  margin-top: 0.5rem;
}

.ter-footer a {
  color: #cbd5e1;
  font-size: 0.9rem;
  text-decoration: none;
}

.ter-footer a:hover,
.ter-footer a:focus {
  color: #fff;
}

.ter-footer__disclosure {
  margin-top: 1.1rem;
  color: #94a3b8;
  font-size: 0.78rem;
}

.ter-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.78rem;
}

.ter-footer__bottom nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
}

/* Utility and WordPress alignment */
.alignwide {
  width: min(100vw - 2rem, 1040px);
  max-width: none !important;
  margin-left: 50%;
  transform: translateX(-50%);
}

.alignfull {
  width: 100vw;
  max-width: none !important;
  margin-left: 50%;
  transform: translateX(-50%);
}

.wp-caption-text,
.gallery-caption {
  color: var(--ter-muted);
  font-size: 0.82rem;
}

.sticky {
  position: relative;
}

.bypostauthor {
  position: relative;
}

.ter-empty-state {
  padding: 2rem;
  border: 1px solid var(--ter-border);
  border-radius: var(--ter-radius);
  background: #fff;
  text-align: center;
}

.ter-empty-state h2 {
  margin-bottom: 0.55rem;
}

/* Responsive */
@media (max-width: 1080px) {
  .ter-header__inner {
    grid-template-columns: 1fr auto;
  }

  .ter-menu-toggle {
    display: inline-grid;
  }

  .ter-nav {
    position: fixed;
    top: 78px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
    padding: 0.75rem 1rem 1.2rem;
    border-bottom: 1px solid var(--ter-border);
    background: #fff;
  }

  body.admin-bar .ter-nav {
    top: 110px;
  }

  .ter-nav.is-open {
    display: block;
  }

  .ter-nav ul {
    display: block;
  }

  .ter-nav a {
    padding: 0.8rem 0.6rem;
    border-bottom: 1px solid var(--ter-border);
  }

  .ter-nav .sub-menu {
    position: static;
    display: block;
    padding: 0 0 0 1rem;
    border: 0;
    box-shadow: none;
  }

  .ter-hero__grid {
    grid-template-columns: 1fr;
  }

  .ter-hero__panel {
    max-width: 720px;
  }

  .ter-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ter-archive-grid,
  .ter-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ter-article-layout {
    grid-template-columns: minmax(0, var(--ter-reading));
  }

  .ter-article-aside {
    display: none;
  }
}

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

  .ter-section__header,
  .ter-cta__inner,
  .ter-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .ter-trust-strip__grid {
    grid-template-columns: 1fr;
  }

  .ter-trust-item + .ter-trust-item {
    border-top: 1px solid var(--ter-border);
    border-left: 0;
  }

  .ter-card--featured {
    grid-template-columns: 1fr;
  }

  .ter-card--featured .ter-card__media {
    aspect-ratio: 16 / 10;
  }

  .ter-footer__main {
    grid-template-columns: 1fr 1fr;
  }

  .ter-footer__main > :first-child {
    grid-column: 1 / -1;
  }

  .ter-form__row,
  .ter-post-nav {
    grid-template-columns: 1fr;
  }

  .ter-post-nav__next {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .ter-container,
  .ter-reading-width,
  .ter-page-content {
    width: min(calc(100% - 1.2rem), var(--ter-container));
  }

  .ter-header__inner {
    min-height: 70px;
    gap: 0.75rem;
  }

  .ter-brand__tagline {
    display: none;
  }

  .ter-brand__name {
    font-size: 1.05rem;
  }

  .ter-brand__mark {
    width: 38px;
    height: 38px;
  }

  .ter-grid--4,
  .ter-grid--3,
  .ter-archive-grid {
    grid-template-columns: 1fr;
  }

  .ter-hero__panel-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ter-hero-mini {
    min-height: 128px;
  }

  .ter-article-image {
    width: min(calc(100% - 1.2rem), 1040px);
  }

  .ter-article-image img {
    border-radius: 16px;
  }

  .ter-entry-content {
    font-size: 1rem;
    line-height: 1.76;
  }

  .ter-footer__main {
    grid-template-columns: 1fr;
  }

  .ter-footer__main > :first-child {
    grid-column: auto;
  }

  .ter-search-form {
    flex-direction: column;
  }

  .ter-search-form .ter-button {
    width: 100%;
  }
}

@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;
  }
}
