/*
Theme Name:  HowToGuideIt
Theme URI:   https://howtoguideit.com
Author:      HowToGuideIt
Author URI:  https://howtoguideit.com
Description: A clean, modern, SEO-optimised WordPress blogging theme for HowToGuideIt.com. Crafted with Tailwind CSS for fast, responsive design — covering how-to guides, recipes, tech tips, and more.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: howtoguideit
Tags:        blog, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, responsive-layout, rtl-language-support, sticky-post, threaded-comments, translation-ready, two-columns, wide-blocks
*/

/* =============================================================
   ROOT / CUSTOM PROPERTIES
   These complement Tailwind and are used in components that
   require dynamic values (e.g. Customizer colours).
   ============================================================= */
:root {
  --color-primary: #0f766e; /* teal-700  */
  --color-primary-dark: #0d6b5e;
  --color-primary-light: #ccfbf1; /* teal-100  */
  --color-accent: #f97316; /* orange-500 */
  --color-accent-dark: #ea6c0a;
  --color-text: #1e293b; /* slate-800 */
  --color-text-muted: #64748b; /* slate-500 */
  --color-border: #e2e8f0; /* slate-200 */
  --color-bg: #f8fafc; /* slate-50  */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-card: 0.75rem;
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-card-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition-base: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================
   GLOBAL RESETS / BASE
   ============================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover {
  color: var(--color-primary-dark);
}
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-text);
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.25rem;
}
p:last-child {
  margin-bottom: 0;
}

blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--color-primary-light);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-style: italic;
  font-size: 1.1rem;
  color: #0f4c45;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

pre,
code {
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius-card);
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}

code:not(pre code) {
  background: #f1f5f9;
  color: #b91c1c;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  border: 1px solid var(--color-border);
}

/* =============================================================
   ENTRY CONTENT (WordPress rich-text / Gutenberg)
   ============================================================= */
.entry-content > * {
  max-width: 75ch;
}
.entry-content > .alignwide {
  max-width: 90ch;
}
.entry-content > .alignfull {
  max-width: 100%;
}

.entry-content h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}
.entry-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.entry-content ul {
  list-style: disc;
  margin: 0 0 1.25rem 0;
  padding-left: 1.625rem;
}
.entry-content ol {
  list-style: decimal;
  margin: 0 0 1.25rem 0;
  padding-left: 1.625rem;
}
.entry-content ul ul {
  list-style: circle;
  margin-bottom: 0.25rem;
}
.entry-content ol ol {
  list-style: lower-alpha;
  margin-bottom: 0.25rem;
}
.entry-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}
.entry-content li::marker {
  color: var(--color-primary);
  font-weight: 600;
}
/* Inline text elements */
.entry-content strong,
.entry-content b {
  font-weight: 700;
  color: var(--color-text);
}
.entry-content em,
.entry-content i {
  font-style: italic;
}
.entry-content s {
  text-decoration: line-through;
  opacity: 0.7;
}
/* Inline code */
.entry-content code {
  font-family: var(--font-mono, 'Fira Code', 'Cascadia Code', monospace);
  font-size: 0.875em;
  background: #f1f5f9;
  color: #be185d;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}
/* Code blocks */
.entry-content pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.875rem;
  line-height: 1.7;
}
.entry-content pre code {
  background: none;
  color: inherit;
  border: none;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}
/* Blockquote */
.entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 2rem 0;
  padding: 1rem 1.25rem 1rem 1.5rem;
  background: rgba(15, 118, 110, 0.05);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: #475569;
  font-style: italic;
  font-size: 1.0625rem;
}
.entry-content blockquote p {
  margin-bottom: 0;
}
.entry-content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--color-text-muted);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.entry-content th {
  background: var(--color-primary);
  color: #fff;
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
}
.entry-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.entry-content tr:nth-child(even) td {
  background: #f8fafc;
}

.entry-content hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2rem 0;
}

.entry-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-content a:hover {
  color: var(--color-primary-dark);
}

/* --- Single post — improved reading typography --- */
.single-post .entry-content {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #334155;
}
.single-post .entry-content > * {
  max-width: 72ch;
}
.single-post .entry-content p {
  margin-bottom: 1.5rem;
}
.single-post .entry-content h2 {
  margin-top: 2.75rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-light);
}
.single-post .entry-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
/* Single post blockquote is already styled via .entry-content blockquote above;
   keep only overrides needed for the wider reading layout */
.single-post .entry-content blockquote {
  margin: 2.25rem 0;
  font-size: 1.125rem;
}
.single-post .entry-content img {
  border-radius: var(--radius-card);
  max-width: 100%;
}

/* WordPress image alignment */
.alignleft {
  float: left;
  margin: 0.25rem 1.5rem 1rem 0;
}
.alignright {
  float: right;
  margin: 0.25rem 0 1rem 1.5rem;
}
.aligncenter {
  display: block;
  margin: 1rem auto;
}
.alignfull {
  margin-left: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}
.alignwide {
  margin-left: -3rem;
  width: calc(100% + 6rem);
}

/* Gallery */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.gallery-item {
  flex: 1 1 200px;
  overflow: hidden;
  border-radius: 0.5rem;
}
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Captions */
.wp-caption {
  max-width: 100%;
  text-align: center;
}
.wp-caption-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* =============================================================
   COMPONENTS
   ============================================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(15 118 110 / 0.35);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(249 115 22 / 0.35);
}

.btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --- Category Badge --- */
.cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.625rem;
  border-radius: 4px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  transition:
    background var(--transition-base),
    opacity var(--transition-base);
}
.cat-badge:hover {
  background: var(--color-accent-dark);
  color: #fff;
}
/* Never stretch to fill a flex/grid column */
.cat-badge {
  align-self: flex-start;
  width: fit-content;
}
/* On dark/featured card backgrounds use a softer tint */
.post-card--featured .cat-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fed7aa;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* --- Post Card --- */
.post-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
  box-shadow: var(--shadow-card);
}
.post-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.post-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.post-card:hover .post-card__thumb img {
  transform: scale(1.05);
}

.post-card__body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.post-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}
.post-card__title a {
  color: var(--color-text);
  text-decoration: none;
}
.post-card__title a:hover {
  color: var(--color-primary);
}
.post-card__excerpt {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* --- Featured (Hero) Post Card --- */
.post-card--featured {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
}
@media (min-width: 768px) {
  .post-card--featured {
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
  }
}
.post-card--featured .post-card__thumb {
  aspect-ratio: auto;
  min-height: 280px;
}
.post-card--featured .post-card__body {
  padding: 2.5rem;
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
  color: #fff;
  justify-content: center;
}
.post-card--featured .post-card__title a {
  color: #fff;
}
.post-card--featured .post-card__excerpt {
  color: rgba(255, 255, 255, 0.8);
}
.post-card--featured .post-card__meta {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding: 0.5rem 0 0.75rem;
}
.breadcrumbs a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs .sep {
  color: var(--color-border);
  margin: 0 0.1rem;
}

/* Breadcrumbs inside the teal page-header banner — override to white palette */
.page-header .breadcrumbs {
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.5rem;
}
.page-header .breadcrumbs a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.page-header .breadcrumbs a:hover {
  color: #fff;
  text-decoration: underline;
}
.page-header .breadcrumbs .sep {
  color: rgba(255, 255, 255, 0.35);
}
/* Current page (last non-link item) */
.page-header .breadcrumbs span[itemprop='name']:last-of-type {
  color: rgba(255, 255, 255, 0.55);
}

/* --- Author Bio Card --- */
.author-bio {
  display: flex;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin: 3rem 0;
  align-items: flex-start;
}
.author-bio__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-bio__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}
.author-bio__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* --- Table of Contents --- */
.toc {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-card);
  margin: 0 0 2rem;
  overflow: hidden;
  max-width: 72ch;
}
.toc__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.125rem;
  background: var(--color-primary-light);
  border-bottom: 1px solid #99f6e4;
}
.toc__icon {
  width: 1rem;
  height: 1rem;
  color: var(--color-primary);
  flex-shrink: 0;
}
.toc__title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-text);
  flex: 1;
  margin: 0;
}
.toc__toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  transition: opacity var(--transition-base);
}
.toc__toggle:hover {
  opacity: 0.7;
}
.toc__toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.2s ease;
}
.toc__toggle[aria-expanded='false'] svg {
  transform: rotate(180deg);
}
.toc__list {
  margin: 0;
  padding: 0.75rem 1.25rem 0.75rem 1rem;
  list-style: none;
  counter-reset: toc-h2;
}
.toc__list--hidden {
  display: none;
}
.toc__item {
  counter-increment: toc-h2;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.toc__item::before {
  content: counter(toc-h2) '.';
  font-weight: 700;
  color: var(--color-primary);
  min-width: 1.5rem;
  flex-shrink: 0;
  font-size: 0.875rem;
}
.toc__item--sub {
  counter-increment: none;
  margin-left: 1.5rem;
  margin-bottom: 0.3rem;
  position: relative;
}
.toc__item--sub::before {
  content: '↳';
  font-weight: 400;
  color: var(--color-text-muted);
  min-width: auto;
}
.toc a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-base);
}
.toc__item--sub a {
  color: var(--color-text-muted);
}
.toc a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: all var(--transition-base);
  text-decoration: none;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.pagination .page-numbers.dots {
  border: none;
  cursor: default;
}
.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 1rem;
  gap: 0.35rem;
}

/* --- Post Navigation --- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
}
.post-nav__link {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.post-nav__link:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.post-nav__link--next {
  text-align: right;
}
.post-nav__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.post-nav__title {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

/* --- Reading Progress Bar --- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--color-accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* --- Social Share Buttons --- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: all var(--transition-base);
}
.share-btn:hover {
  transform: translateY(-2px);
  color: #fff;
}
.share-btn--twitter {
  background: #1da1f2;
}
.share-btn--facebook {
  background: #1877f2;
}
.share-btn--linkedin {
  background: #0a66c2;
}
.share-btn--copy {
  background: var(--color-text);
  cursor: pointer;
  border: none;
}

/* --- Tag Cloud --- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-pill {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition-base);
}
.tag-pill:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* --- Search Box --- */
.search-form {
  display: flex;
  gap: 0;
}
.search-form__input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition-base);
  font-family: var(--font-body);
}
.search-form__input:focus {
  border-color: var(--color-primary);
}
.search-form__btn {
  padding: 0.65rem 1.125rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  cursor: pointer;
  transition: background var(--transition-base);
  font-family: var(--font-body);
  font-weight: 600;
}
.search-form__btn:hover {
  background: var(--color-primary-dark);
}

/* --- Widgets --- */
.widget {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.widget-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-primary);
  font-family: var(--font-body);
}
.widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-bg);
  font-size: 0.9375rem;
}
.widget ul li:last-child {
  border-bottom: none;
}
.widget ul li a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-base);
}
.widget ul li a:hover {
  color: var(--color-primary);
}

/* --- Sidebar About Block --- */
.sidebar-about {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border: 1px solid #99f6e4;
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.sidebar-about__logo-link {
  display: inline-block;
  margin-bottom: 0.75rem;
}
.sidebar-about__logo-link img {
  height: 28px;
  width: auto;
}
.sidebar-about__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* --- Widget title with icon --- */
.widget-title svg {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.1em;
  margin-right: 0.35rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* --- Sidebar Recent Posts --- */
.sidebar-posts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-posts__item {
  border-bottom: 1px solid var(--color-bg);
  padding: 0;
}
.sidebar-posts__item:last-child {
  border-bottom: none;
}
.sidebar-posts__link {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-base);
}
.sidebar-posts__link:hover {
  opacity: 0.8;
}
.sidebar-posts__thumb {
  width: 68px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}
.sidebar-posts__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-posts__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-posts__cat {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
}
.sidebar-posts__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-base);
}
.sidebar-posts__link:hover .sidebar-posts__title {
  color: var(--color-primary);
}
.sidebar-posts__date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* --- Sidebar Categories --- */
.sidebar-cats {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-cats li {
  border-bottom: 1px solid var(--color-bg);
}
.sidebar-cats li:last-child {
  border-bottom: none;
}
.sidebar-cats__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  text-decoration: none;
  transition: color var(--transition-base);
}
.sidebar-cats__name {
  font-size: 0.9375rem;
  color: var(--color-text);
  transition: color var(--transition-base);
}
.sidebar-cats__link:hover .sidebar-cats__name {
  color: var(--color-primary);
}
.sidebar-cats__count {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-bg);
  color: var(--color-text-muted);
  border-radius: 9999px;
  padding: 0.1rem 0.55rem;
  min-width: 1.5rem;
  text-align: center;
  transition:
    background var(--transition-base),
    color var(--transition-base);
}
.sidebar-cats__link:hover .sidebar-cats__count {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* --- Newsletter block: icon --- */
.newsletter-block__icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* --- Comments --- */
.comments-area {
  margin-top: 3rem;
}
.comments-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}
.comment .children {
  padding-left: 2rem;
  list-style: none;
  margin-top: 1rem;
}
.comment__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}
.comment__body {
  flex: 1;
}
.comment__author {
  font-weight: 700;
  font-size: 0.9375rem;
}
.comment__date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-left: 0.5rem;
}
.comment__text {
  margin: 0.5rem 0;
  font-size: 0.9375rem;
}
.comment__reply {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}
.comment__reply:hover {
  text-decoration: underline;
}

.comment-respond {
  margin-top: 2.5rem;
}
.comment-reply-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.comment-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}
.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-family: var(--font-body);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color var(--transition-base);
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--color-primary);
}
.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}
.comment-form .form-submit input {
  width: auto;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 9999px;
  padding: 0.625rem 1.75rem;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: background var(--transition-base);
}
.comment-form .form-submit input:hover {
  background: var(--color-primary-dark);
}

/* --- Cookie Consent / Notice --- */
.site-notice {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-card);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  max-width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.site-notice a {
  color: #7dd3fc;
}
.site-notice__ok {
  background: var(--color-accent);
  border: none;
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* --- Back to Top --- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgb(15 118 110 / 0.35);
}
#back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
}
#back-to-top.visible {
  display: flex;
}

/* =============================================================
   SITE STRUCTURE
   ============================================================= */

/* --- Site Header --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex !important; /* belt-and-suspenders: ensure flex is never overridden */
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.site-branding__logo {
  height: 52px;
  width: auto;
  max-width: min(260px, 58vw);
}

@media (max-width: 640px) {
  .site-branding__logo {
    height: 42px;
    max-width: 220px;
  }
}
.site-branding__texts {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.site-branding__name {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
}
.site-branding__tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Primary Nav --- */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
/* The <ul> output by wp_nav_menu */
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.primary-nav__list > li {
  display: block;
  list-style: none;
  position: relative;
}
.primary-nav a,
.primary-nav__list a {
  padding: 0.45rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav__list a:hover,
.primary-nav .current-menu-item > a,
.primary-nav__list .current-menu-item > a {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.header-submit-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.header-submit-tool:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

@media (max-width: 640px) {
  .header-submit-tool {
    min-height: 2.15rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
  }
}

/* Dropdown */
.primary-nav .menu-item-has-children,
.primary-nav__list .menu-item-has-children {
  position: relative;
  display: flex;
  align-items: center;
}

/* Dropdown toggle button — arrow icon next to the nav link */
.dropdown-parent {
  background: none;
  border: none;
  padding: 0.2rem 0.25rem;
  cursor: pointer;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  border-radius: 0.25rem;
  transition: color var(--transition-base);
  line-height: 1;
}
.dropdown-parent:hover,
.menu-item-has-children:hover .dropdown-parent {
  color: var(--color-primary);
}
.primary-nav .sub-menu,
.primary-nav__list .sub-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 0.5rem;
  min-width: 220px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all var(--transition-base);
  z-index: 100;
  list-style: none;
  margin: 0;
}
.primary-nav .menu-item-has-children:hover .sub-menu,
.primary-nav__list .menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu a,
.primary-nav__list .sub-menu a {
  display: block;
  border-radius: 0.375rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}
.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}
.menu-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all var(--transition-base);
}

@media (max-width: 1023px) {
  .menu-toggle {
    display: flex;
    align-items: center;
  }
  .primary-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  }
  .primary-nav.is-open {
    display: flex;
  }
  /* The ul inside nav on mobile */
  .primary-nav__list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .primary-nav__list > li {
    width: 100%;
  }
  .primary-nav .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-left: 1rem;
    display: none;
  }
  .primary-nav .menu-item-has-children.is-open .sub-menu {
    display: block;
  }
}

/* --- Main Layout --- */
.site-main {
  /* No padding here — the hero section needs full viewport width.
     Inner sections use .container or .page-inner for spacing. */
}
.page-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.content-area {
  flex: 1;
  min-width: 0;
}
.sidebar {
  width: 320px;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .has-sidebar {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
  }
}
@media (max-width: 1023px) {
  .sidebar {
    width: 100%;
    margin-top: 2rem;
  }
}

/* --- Blog Grid --- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

/* --- Footer --- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: 4rem;
}
.site-footer__widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
}
.site-footer .widget {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 0;
}
.site-footer .widget-title {
  color: #fff;
  border-bottom-color: var(--color-accent);
  font-size: 0.9rem;
}
.site-footer .widget ul li {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.site-footer .widget ul li a {
  color: #94a3b8;
}
.site-footer .widget ul li a:hover {
  color: var(--color-primary-light);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #94a3b8;
  text-decoration: none;
  transition: color var(--transition-base);
}
.footer-nav a:hover {
  color: #fff;
}
.social-links {
  display: flex;
  gap: 0.75rem;
}
.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: #94a3b8;
  transition: all var(--transition-base);
  text-decoration: none;
}
.social-link:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --- Page Header / Hero --- */
.page-header {
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.page-header__title {
  color: #fff;
  margin: 0;
}
.page-header__desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  margin-top: 0.75rem;
}

/* --- Section Labels --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* --- Newsletter Signup --- */
.newsletter-block {
  background: linear-gradient(135deg, #0f766e, #134e4a);
  border-radius: var(--radius-card);
  padding: 2rem;
  color: #fff;
  text-align: center;
}
.newsletter-block h3 {
  color: #fff;
  margin: 0 0 0.5rem;
}
.newsletter-block p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}
.newsletter-form input[type='email'] {
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius-card);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  outline: none;
  color: var(--color-text);
}
.newsletter-form button {
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.125rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-card);
  font-family: var(--font-body);
  transition: background var(--transition-base);
}
.newsletter-form button:hover {
  background: var(--color-accent-dark);
}

/* --- Single Post Specific --- */
.post-hero {
  margin-bottom: 2.5rem;
}
.post-hero__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-card);
}

.post-header__title {
  margin: 0.75rem 0 1.25rem;
  line-height: 1.2;
}
.post-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
.post-header__meta a {
  color: var(--color-primary);
  text-decoration: none;
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- Category Page --- */
.category-header {
  padding: 0;
  margin-bottom: 2rem;
}
.category-header__name {
  margin: 0.5rem 0 0.5rem;
}
.category-header__desc {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  max-width: 60ch;
}

/* =============================================================
   UTILITIES
   ============================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.text-muted {
  color: var(--color-text-muted);
}
.text-primary {
  color: var(--color-primary);
}
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 1.5rem 0;
}
.sticky-sidebar {
  position: sticky;
  top: 90px;
}

/* =============================================================
   PRINT
   ============================================================= */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  #back-to-top,
  .share-bar,
  .comment-respond,
  .post-nav,
  .pagination {
    display: none !important;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
  .entry-content a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
  }
}

/* =============================================================
   CUSTOM SCROLLBAR
   ============================================================= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* =============================================================
   ANIMATIONS
   ============================================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* =============================================================
   POLICY PAGES  (privacy-policy, disclaimer)
   ============================================================= */
.policy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .policy-layout {
    grid-template-columns: 220px 1fr;
    align-items: start;
    gap: 3rem;
  }
}

/* Sticky sidebar nav */
.policy-nav {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  position: sticky;
  top: 90px;
}
.policy-nav__title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.policy-nav ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
}
.policy-nav li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
}
.policy-nav a {
  color: var(--color-text);
  text-decoration: none;
}
.policy-nav a:hover {
  color: var(--color-primary);
}

/* Policy article content */
.policy-content section {
  margin-top: 2.25rem;
}
.policy-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}
.policy-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 1rem 0 0.4rem;
}
.policy-content p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 0.875rem;
}
.policy-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.policy-content ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.policy-content li {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}
.policy-content li::marker {
  color: var(--color-primary);
}
.policy-content a {
  color: var(--color-primary);
  text-decoration: underline;
}
.policy-intro {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  border-left: 4px solid var(--color-primary);
  padding: 0.75rem 1rem;
  background: rgba(15, 118, 110, 0.05);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  margin-bottom: 2rem;
}

/* =============================================================
   CONTACT PAGE
   ============================================================= */

/* Contact channel cards — stacked column list */
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.contact-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  transition: box-shadow 0.15s ease;
}
.contact-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.contact-card__icon {
  font-size: 1.375rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.contact-card__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
  display: block;
}
.contact-card__value {
  font-size: 0.9375rem;
  color: var(--color-text);
  font-weight: 500;
}

/* Contact form container */
.contact-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .contact-form__row {
    grid-template-columns: 1fr;
  }
}
.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.contact-form__group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
}
.contact-form__group input,
.contact-form__group select,
.contact-form__group textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input, 6px);
  padding: 0.6rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: #fafafa;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  width: 100%;
}
.contact-form__group input:focus,
.contact-form__group select:focus,
.contact-form__group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  background: #fff;
}
.contact-form__group textarea {
  resize: vertical;
  min-height: 140px;
}

/* =============================================================
   FRONT PAGE  (front-page.php)
   ============================================================= */

/* ── 1. Editorial Hero ───────────────────────────────────────── */
.fp-editorial-hero {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

/* Top bar */
.fp-editorial-hero__topbar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 0;
}
.fp-editorial-hero__topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.fp-editorial-hero__tagline {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* Inline search in top bar */
.fp-editorial-hero__search-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.3rem 0.3rem 0.3rem 0.875rem;
  gap: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fp-editorial-hero__search-wrap:focus-within {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.fp-editorial-hero__search-wrap svg {
  color: #94a3b8;
  flex-shrink: 0;
}
.fp-editorial-hero__search-wrap input[type="search"] {
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: #1e293b;
  background: transparent;
  width: 210px;
  min-width: 0;
}
.fp-editorial-hero__search-wrap button {
  background: #0f766e;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: 9999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.fp-editorial-hero__search-wrap button:hover {
  background: #0d6b5e;
}

/* Main two-column grid */
.fp-editorial-hero__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}

/* ── Featured article (left column) ─────────────────────────── */
.fp-editorial-featured {
  display: flex;
  flex-direction: column;
}
.fp-editorial-featured__img-wrap {
  display: block;
  position: relative;
  border-radius: 0.875rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 1.5rem;
  background: #f1f5f9;
}
.fp-editorial-featured__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.fp-editorial-featured__img-wrap:hover img {
  transform: scale(1.03);
}
.fp-editorial-featured__meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}
.fp-editorial-featured__readtime {
  font-size: 0.8125rem;
  color: #64748b;
}
.fp-editorial-featured__readtime::before {
  content: '·';
  margin-right: 0.35rem;
  color: #cbd5e1;
}
.fp-editorial-featured__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.fp-editorial-featured__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.fp-editorial-featured__title a:hover {
  color: #0f766e;
}
.fp-editorial-featured__excerpt {
  font-size: 1rem;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.fp-editorial-featured__meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}
.fp-editorial-featured__meta-bottom time {
  font-size: 0.875rem;
  color: #64748b;
}
.fp-editorial-featured__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f766e;
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
}
.fp-editorial-featured__cta:hover {
  gap: 0.65rem;
  color: #0d6b5e;
}

/* ── Sidebar (right column) ─────────────────────────────────── */
.fp-editorial-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.fp-editorial-sidebar__section {
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
}
.fp-editorial-sidebar__heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0f766e;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #0f766e;
}

/* Trending / latest numbered list */
.fp-trending-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
}
.fp-trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.fp-trending-item:hover .fp-trending-item__title {
  color: #0f766e;
}
.fp-trending-item__num {
  font-size: 1.25rem;
  font-weight: 900;
  color: #e2e8f0;
  line-height: 1;
  min-width: 1.75rem;
  flex-shrink: 0;
}
.fp-trending-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.fp-trending-item__cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f97316;
}
.fp-trending-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fp-trending-item__date {
  font-size: 0.75rem;
  color: #94a3b8;
}
.fp-trending-item__thumb {
  width: 58px;
  height: 58px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
}
.fp-trending-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Category pills in sidebar */
.fp-editorial-sidebar__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.fp-editorial-sidebar__cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 0.35rem 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
}
.fp-editorial-sidebar__cat-pill:hover {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.fp-editorial-sidebar__cat-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  transition: color 0.2s;
}
.fp-editorial-sidebar__cat-pill:hover .fp-editorial-sidebar__cat-count {
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 1023px) {
  .fp-editorial-hero__inner {
    grid-template-columns: 1fr;
  }
  .fp-editorial-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .fp-editorial-sidebar__section {
    flex: 1;
    min-width: 260px;
  }
}
@media (max-width: 639px) {
  .fp-editorial-hero__topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .fp-editorial-hero__search-wrap input[type="search"] {
    width: 130px;
  }
  .fp-editorial-sidebar {
    flex-direction: column;
  }
}

/* ── 2. Shared section shell ──────────────────────────────────── */
.fp-section {
  padding: 5rem 0;
}
.fp-section--alt {
  background: #f8fafc;
}
.fp-section__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.fp-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.fp-section__head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.fp-section__title {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-text);
}
.fp-section__subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  max-width: 520px;
}
.fp-section__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.fp-section__more:hover {
  color: var(--color-primary-dark);
}
.fp-section__cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ── 3. Category Cards ────────────────────────────────────────── */
.fp-cats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .fp-cats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .fp-cats-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.fp-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base),
    border-color var(--transition-base);
}
.fp-cat-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-primary-light);
  transform: translateY(-3px);
}
.fp-cat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}
.fp-cat-card__icon img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}
.fp-cat-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fp-cat-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}
.fp-cat-card__count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.fp-cat-card__arrow {
  display: none; /* shown only in list variant — hidden in column layout */
}
@media (min-width: 1024px) {
  .fp-cats-grid .fp-cat-card {
    flex-direction: column;
  }
}

/* ── 4. Why/Pillars ───────────────────────────────────────────── */
.fp-trust-section {
  background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%);
}
.fp-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .fp-pillars {
    grid-template-columns: repeat(4, 1fr);
  }
}
.fp-pillar {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: box-shadow var(--transition-base);
}
.fp-pillar:hover {
  box-shadow: var(--shadow-card-hover);
}
.fp-pillar__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.125rem;
}
.fp-pillar__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.fp-pillar__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ── 6. Newsletter banner ─────────────────────────────────────── */
.fp-newsletter-section {
  background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
  padding: 5rem 1.5rem;
}
.fp-newsletter-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .fp-newsletter-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.fp-newsletter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fed7aa;
  margin-bottom: 0.875rem;
}
.fp-newsletter-copy h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.fp-newsletter-copy p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}
.fp-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fp-newsletter-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition-base);
}
.fp-newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
.fp-newsletter-input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.18);
}
.fp-newsletter-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition:
    background var(--transition-base),
    transform var(--transition-base);
}
.fp-newsletter-btn:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

/* =============================================================
   AD SLOTS
   ============================================================= */

/* Wrapper for every ad unit */
.ad-slot {
  clear: both;
  overflow: visible; /* never clip ads */
  text-align: center;
  margin: 1.75rem auto;
  max-width: 100%;
}

/* "Advertisement" label */
.ad-slot__label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
  opacity: 0.6;
}

/* Horizontal banner (after post) */
.ad-slot--horizontal {
  max-width: 728px;
}

/* Rectangle (sidebar 300×250) */
.ad-slot--rectangle {
  max-width: 336px;
  margin-left: auto;
  margin-right: auto;
}

/* Auto / responsive */
.ad-slot--auto {
  max-width: 100%;
}

/* In-content: tighten spacing inside article prose */
.entry-content .ad-slot {
  margin: 2rem -0.5rem; /* bleed slightly wider than text for banner feel */
  padding: 0.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

/* Make AdSense <ins> never overflow its container */
.ad-slot ins.adsbygoogle {
  display: block !important;
  max-width: 100%;
}

/* Sidebar: prevent the widget from expanding too wide */
.sidebar .ad-slot {
  margin: 0 auto;
}

/* =============================================================
   FREE TOOLS PAGE  (page-tools.php)
   ============================================================= */

/* ── Tools Grid (2-up on md+) ──────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Tool Card Shell ────────────────────────────────────────── */
.tool-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-base);
}
.tool-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.tool-card__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
}
.tool-card__icon {
  font-size: 1.375rem;
  line-height: 1;
  flex-shrink: 0;
}
.tool-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin: 0;
}
.tool-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* ── Shared Inputs & Buttons ────────────────────────────────── */
.tool-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: #fafafa;
  outline: none;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  resize: vertical;
}
.tool-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
  background: #fff;
}
.tool-input--mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5625rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border: 1.5px solid transparent;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--transition-base),
    color var(--transition-base);
  white-space: nowrap;
}
.tool-btn:hover {
  background: var(--color-primary-dark);
}
.tool-btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.tool-btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}
.tool-btn--sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}
.tool-btn--success {
  background: #16a34a;
}
.tool-btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Word Counter ───────────────────────────────────────────── */
.tool-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
@media (min-width: 480px) {
  .tool-stats {
    grid-template-columns: repeat(6, 1fr);
  }
}
.tool-stat {
  text-align: center;
  background: #f0fdfa;
  border-radius: 0.5rem;
  padding: 0.5rem 0.25rem;
}
.tool-stat span {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.tool-stat small {
  font-size: 0.625rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
  display: block;
}

/* ── Password Generator ─────────────────────────────────────── */
.pg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.125rem;
}
.pg-option {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
}
.pg-option input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.pg-length-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pg-length-row input[type='range'] {
  flex: 1;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.pg-length-val {
  font-weight: 800;
  color: var(--color-primary);
  min-width: 2rem;
  text-align: right;
  font-size: 0.9375rem;
}
.pg-output-row {
  display: flex;
  gap: 0.5rem;
}
.pg-output-row .tool-input {
  flex: 1;
  min-width: 0;
}
.pg-strength-bar {
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}
.pg-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition:
    width 0.3s ease,
    background 0.3s ease;
}
.pg-strength-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
}

/* ── Case Converter ─────────────────────────────────────────── */
.cc-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Percentage Calculator ──────────────────────────────────── */
.pct-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pct-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
  flex-wrap: wrap;
  background: #f8fafc;
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
}
.pct-row input.tool-input {
  width: 4.5rem;
  flex: none;
  padding: 0.35rem 0.5rem;
  text-align: center;
}
.pct-result {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.0625rem;
  min-width: 3rem;
}

/* ── Age Calculator ─────────────────────────────────────────── */
.age-result {
  background: #f0fdfa;
  border-radius: 0.5rem;
  padding: 1rem;
  min-height: 4rem;
}
.age-output {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.age-stat {
  text-align: center;
  flex: 1;
}
.age-stat span {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.age-stat small {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.age-extra {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
  text-align: center;
}

/* ── Random Number Generator ────────────────────────────────── */
.rng-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}
.rng-inputs label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-bottom: 0.3rem;
}
.rng-result {
  background: #f0fdfa;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rng-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary);
  background: rgba(15, 118, 110, 0.08);
  padding: 0.125rem 0.5rem;
  border-radius: 0.35rem;
}

/* ── Unit Converter ─────────────────────────────────────────── */
.uc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}
.uc-grid label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-bottom: 0.3rem;
}
.tool-select {
  width: 100%;
  padding: 0.55rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: #fafafa;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-base);
}
.tool-select:focus {
  border-color: var(--color-primary);
}
.uc-result {
  background: #f0fdfa;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--color-primary);
  min-height: 3rem;
  display: flex;
  align-items: center;
}
.uc-result:empty::before {
  content: 'Enter a value above';
  font-weight: 400;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* ── Resources Grid ─────────────────────────────────────────── */
.resources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.125rem;
}
@media (min-width: 560px) {
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .resources-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.resource-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.125rem 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
}
.resource-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.resource-card__icon {
  font-size: 1.625rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}
.resource-card__name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}
.resource-card__desc {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}
.resource-card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: #f0fdfa;
  color: var(--color-primary);
  margin-top: 0.4rem;
}

/* ── Tools page intro strip ─────────────────────────────────── */
.tools-intro {
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
  border: 1px solid #99f6e4;
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.9375rem;
  color: #0f766e;
}
.tools-intro svg {
  flex-shrink: 0;
}

/* =============================================================
   PREGNANCY DUE DATE CALCULATOR
   ============================================================= */

.preg-calc {
  max-width: 780px;
  margin: 0 auto;
}

/* ── Method tabs ─────────────────────────────────────────────── */
.preg-tabs {
  display: flex;
  gap: 0;
  border-radius: 0.625rem;
  background: #f1f5f9;
  padding: 4px;
  margin-bottom: 1.5rem;
  width: fit-content;
}
.preg-tab {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
  white-space: nowrap;
}
.preg-tab--active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ── Input panel ─────────────────────────────────────────────── */
.preg-calc__panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
}
@media (max-width: 600px) {
  .preg-calc__panel { padding: 1.25rem 1rem; }
}
.preg-calc__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.preg-calc__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.preg-calc__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
}
.preg-date-input {
  max-width: 260px;
}
.preg-error {
  font-size: 0.8125rem;
  color: #ef4444;
  margin: 0;
}
.preg-calc__submit {
  align-self: flex-start;
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.preg-calc__note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.6;
}

/* ── Results panel ───────────────────────────────────────────── */
.preg-calc__results {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

/* Due date hero */
.preg-due-hero {
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
  padding: 2rem 2.25rem;
  text-align: center;
}
@media (max-width: 600px) {
  .preg-due-hero { padding: 1.5rem 1rem; }
}
.preg-due-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 0.5rem;
}
.preg-due-date {
  font-family: var(--font-heading);
  font-size: clamp(1.375rem, 4vw, 2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.preg-trimester-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
}
.preg-t1 { background: rgba(249,115,22,.25); color: #fed7aa; }
.preg-t2 { background: rgba(99,102,241,.25); color: #c7d2fe; }
.preg-t3 { background: rgba(236,72,153,.25); color: #fbcfe8; }

/* Stats row */
.preg-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--color-border);
}
@media (max-width: 480px) {
  .preg-stats-row { grid-template-columns: repeat(2, 1fr); }
}
.preg-stat-box {
  text-align: center;
  padding: 1.25rem 0.5rem;
  border-right: 1px solid var(--color-border);
}
.preg-stat-box:last-child { border-right: none; }
.preg-stat-box span {
  display: block;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.preg-stat-box small {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

/* Progress bar */
.preg-progress-wrap {
  padding: 1.25rem 2.25rem;
  border-bottom: 1px solid var(--color-border);
}
@media (max-width: 600px) {
  .preg-progress-wrap { padding: 1rem; }
}
.preg-progress-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.preg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.preg-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: #94a3b8;
}

/* Milestones */
.preg-milestones {
  padding: 1.5rem 2.25rem;
}
@media (max-width: 600px) {
  .preg-milestones { padding: 1rem; }
}
.preg-milestones__heading {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  margin-bottom: 1rem;
}
.preg-milestone {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.preg-milestone:last-child { border-bottom: none; }
.preg-milestone__dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}
.preg-milestone--past .preg-milestone__dot {
  background: #d1fae5;
  color: #059669;
  font-size: 0.875rem;
  font-weight: 800;
}
.preg-milestone--current .preg-milestone__dot {
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(15,118,110,.2);
  font-size: 1rem;
}
.preg-milestone__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}
.preg-milestone--past .preg-milestone__label {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}
.preg-milestone--current .preg-milestone__label {
  color: var(--color-primary);
  font-weight: 700;
}
.preg-milestone__date {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

/* Recalculate button */
.preg-recalc-btn {
  margin: 0 2.25rem 1.5rem;
}
@media (max-width: 600px) {
  .preg-recalc-btn { margin: 0 1rem 1rem; }
}

/* =============================================================
   TOOLS DIRECTORY
   ============================================================= */
.tools-directory-page {
  background: #f8fafc;
}

.about-topic-icon,
.about-team-mark {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  background: #ecfeff;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-size: 0.95rem;
  font-weight: 900;
}

.about-team-mark {
  margin: 0 auto 1rem;
  width: 3.5rem;
  height: 3.5rem;
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.tools-hero {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 48%, #1f2937 100%);
  color: #fff;
  border-bottom: 1px solid #0f766e;
}

.tools-hero--directory {
  background:
    linear-gradient(115deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.28)),
    #12685f;
}

.tools-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 2rem;
  align-items: center;
}

.tools-hero .breadcrumbs,
.tool-review-hero .breadcrumbs {
  color: rgba(255, 255, 255, 0.78);
  justify-content: flex-start;
}

.tools-hero .breadcrumbs a,
.tool-review-hero .breadcrumbs a {
  color: #fff;
}

.tools-hero .breadcrumbs .sep,
.tool-review-hero .breadcrumbs .sep {
  color: rgba(255, 255, 255, 0.55);
}

.tools-hero__eyebrow,
.tool-review-hero__category {
  display: inline-flex;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
  font-size: 0.78rem;
  font-weight: 800;
}

.tools-hero h1,
.tool-review-hero h1 {
  color: #fff;
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 3.5rem, 4.15rem);
}

.tools-hero p,
.tool-review-hero p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 720px;
  margin-top: 1rem;
  font-size: 1.08rem;
  line-height: 1.75;
}

.tools-hero__actions,
.tool-review-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tools-hero__outline,
.tool-review-hero__outline {
  border-color: rgba(255, 255, 255, 0.56);
  color: #fff;
}

.tools-hero__outline:hover,
.tool-review-hero__outline:hover {
  background: #fff;
  border-color: #fff;
  color: #0f766e;
}

.tools-hero__panel,
.tool-review-summary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 1.25rem;
  backdrop-filter: blur(12px);
}

.tools-hero__stat {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.tools-hero__stat span {
  display: block;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.tools-hero__stat small,
.tools-hero__rule span {
  color: rgba(255, 255, 255, 0.74);
}

.tools-hero__rule {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0;
}

.tools-hero__rule strong {
  color: #fff;
}

.tools-section {
  padding: 4rem 0;
}

.tools-section--compact {
  padding-bottom: 2rem;
}

.tools-section--criteria {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.tools-section__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.tools-section__head {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.tools-section__head h2,
.tools-directory-toolbar h2,
.submit-tool-main h2,
.tools-criteria h2 {
  margin: 0;
}

.tools-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.875rem;
}

.tools-category-card {
  display: grid;
  gap: 0.35rem;
  min-height: 132px;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: var(--color-text);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.tools-category-card:hover {
  border-color: #0f766e;
  color: var(--color-text);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgb(15 23 42 / 0.08);
}

.tools-category-card span {
  font-weight: 800;
  color: #0f172a;
}

.tools-category-card small {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.tools-directory-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tools-directory-search {
  position: relative;
  min-width: min(100%, 320px);
}

.tools-directory-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 1.05rem;
  height: 1.05rem;
  transform: translateY(-50%);
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.tools-directory-search input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.72rem 0.9rem 0.72rem 2.45rem;
  background: #fff;
  color: var(--color-text);
  outline: none;
}

.tools-directory-search input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.tools-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.tools-filter {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 150ms ease;
}

.tools-filter:hover,
.tools-filter.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.tools-count {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.tools-count span {
  color: #0f172a;
  font-weight: 800;
}

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

.directory-tool-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 310px;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.directory-tool-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 14px 28px rgb(15 23 42 / 0.08);
}

.directory-tool-card__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.directory-tool-card__logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ecfeff;
  color: #0f766e;
  font-weight: 900;
  border: 1px solid #99f6e4;
}

.directory-tool-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.directory-tool-card h3 a {
  color: #0f172a;
}

.directory-tool-card h3 a:hover {
  color: #0f766e;
}

.directory-tool-card__top span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.directory-tool-card p {
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.directory-tool-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.directory-tool-card__meta span,
.tool-alt-list span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.directory-tool-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}

.directory-tool-card__actions a,
.tool-sidebar-link {
  color: #0f766e;
  font-weight: 800;
  font-size: 0.9rem;
}

.tools-empty-state {
  margin-top: 1.5rem;
  padding: 2rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.tools-empty-state h3 {
  margin: 0 0 0.5rem;
}

.tools-empty-state p {
  color: #64748b;
  max-width: 520px;
  margin: 0 auto 1rem;
}

.tools-criteria {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 2rem;
  align-items: start;
}

.tools-criteria p {
  color: #475569;
  line-height: 1.7;
  margin-top: 1rem;
}

.tools-criteria__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

.tools-criteria__grid div,
.submit-tool-guidelines,
.tool-sidebar-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.1rem;
}

.tools-criteria__grid strong,
.tools-criteria__grid span {
  display: block;
}

.tools-criteria__grid strong {
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.tools-criteria__grid span {
  color: #64748b;
  font-size: 0.93rem;
  line-height: 1.55;
}

/* Submit tool page */
.submit-tool-layout {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}

.submit-tool-main h2 {
  margin-bottom: 1rem;
}

.submit-tool-form {
  display: grid;
  gap: 1rem;
}

.submit-tool-markdown {
  font-family: var(--font-mono, 'Courier New', monospace);
  line-height: 1.65;
}

.submit-tool-markdown.is-over-limit {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgb(239 68 68 / 0.12);
}

.submit-tool-word-count,
.submit-tool-field-note {
  color: #64748b;
  font-size: 0.82rem;
  margin: 0.25rem 0 0;
}

.submit-tool-word-count span,
.submit-tool-field-note span {
  font-weight: 800;
  color: #0f172a;
}

.submit-tool-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-tool-form__button {
  justify-content: center;
  width: fit-content;
}

.submit-tool-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6rem;
}

.submit-tool-guidelines h2,
.tool-sidebar-card h2 {
  font-size: 1.12rem;
  margin: 0 0 0.75rem;
}

.submit-tool-guidelines ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #475569;
}

.submit-tool-guidelines li {
  margin-bottom: 0.65rem;
}

.submit-tool-guidelines li:last-child {
  margin-bottom: 0;
}

.submit-tool-guidelines--warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.tools-notice {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid;
}

.tools-notice--success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #14532d;
}

.tools-notice--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

/* Single tool review */
.tool-review-hero {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 50%, #111827 100%);
  color: #fff;
}

.tool-review-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: center;
}

.tool-review-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tool-review-hero__meta .tool-review-hero__category {
  margin: 0;
}

.tool-review-summary dl {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.tool-review-summary__brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.tool-review-summary__brand strong,
.tool-review-summary__brand small {
  display: block;
}

.tool-review-summary__brand strong {
  color: #fff;
  font-size: 1rem;
}

.tool-review-summary__brand small {
  color: rgba(255, 255, 255, 0.68);
  margin-top: 0.1rem;
  font-weight: 700;
}

.tool-review-summary__logo {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 10px;
  background: #fff;
  color: #0f766e;
  overflow: hidden;
  font-weight: 900;
}

.tool-review-summary__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.45rem;
}

.tool-review-summary__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tool-review-summary__metrics div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0.65rem;
}

.tool-review-summary__metrics strong,
.tool-review-summary__metrics span {
  display: block;
}

.tool-review-summary__metrics strong {
  color: #fff;
  font-size: 1.05rem;
}

.tool-review-summary__metrics span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
}

.tool-review-summary dl > div {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.tool-review-summary dl > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tool-review-summary dt {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.tool-review-summary dd {
  color: #fff;
  margin: 0.2rem 0 0;
  font-weight: 700;
}

.tool-review-layout {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.tool-review-content {
  min-width: 0;
}

.tool-review-media {
  margin: 0 0 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.tool-review-media img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.tool-review-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
}

.tool-review-gallery img {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
}

.tool-review-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.tool-review-section h2 {
  margin: 0 0 1rem;
}

.tool-review-list,
.tool-pro-con ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #475569;
}

.tool-review-list li,
.tool-pro-con li {
  margin-bottom: 0.55rem;
}

.tool-pro-con-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tool-pro-con {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.tool-pro-con h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.tool-pro-con--pros {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.tool-pro-con--cons {
  background: #fff7ed;
  border-color: #fed7aa;
}

.tool-alt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-verdict {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.tool-review-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6rem;
}

.tool-sidebar-button {
  width: 100%;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.tool-sidebar-card--score {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.tool-sidebar-rating {
  display: grid;
  gap: 0.35rem;
}

.tool-sidebar-rating .tools-rating {
  gap: 0.18rem;
}

.tool-sidebar-rating strong {
  color: #0f172a;
  font-size: 1.7rem;
  line-height: 1;
}

.tool-sidebar-rating span {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
}

.tool-sidebar-deal {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.tool-sidebar-deal strong,
.tool-sidebar-deal span {
  display: block;
}

.tool-related-guides {
  display: grid;
  gap: 0.75rem;
}

.tool-related-guides a {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.tool-related-guides a:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tool-related-guides span {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.35;
}

.tool-related-guides small {
  color: #64748b;
}

/* Single tool profile redesign */
.tool-profile-page {
  background: #f8fafc;
  color: #0f172a;
}

.tool-profile-hero {
  position: relative;
  background: linear-gradient(180deg, #f7fffd 0%, #ecfaf7 72%, #f8fafc 100%);
  border-bottom: 1px solid #dbeeea;
  overflow: hidden;
}

.tool-profile-hero__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.4rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 2.4rem;
  align-items: center;
}

.tool-profile-hero__main {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 2.6rem;
  align-items: center;
}

.tool-profile-logo-card {
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  border: 1px solid #dbe7ef;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 38px rgb(15 23 42 / 0.1);
  overflow: hidden;
}

.tool-profile-logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.1rem;
}

.tool-profile-logo-card span {
  color: #0f766e;
  font-size: 4rem;
  font-weight: 900;
}

.tool-profile-hero .breadcrumbs {
  justify-content: flex-start;
  color: #475569;
  margin-bottom: 1.45rem;
}

.tool-profile-hero .breadcrumbs a {
  color: #334155;
}

.tool-profile-hero .breadcrumbs a:hover,
.tool-profile-hero .breadcrumbs span:last-child {
  color: #047f70;
}

.tool-profile-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 1.45rem;
  margin-bottom: 0.35rem;
}

.tool-profile-hero h1 {
  margin: 0;
  max-width: 760px;
  color: #0f172a;
  font-size: 3.9rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.tool-profile-hero__copy > p {
  max-width: 680px;
  margin: 1rem 0 0;
  color: #334155;
  font-size: 1.1rem;
  line-height: 1.75;
}

.tool-profile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.tool-profile-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 2.05rem;
  border-radius: 999px;
  background: #d9f5ef;
  color: #047f70;
  padding: 0.35rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.tool-profile-categories a.is-primary {
  background: #08796e;
  color: #fff;
}

.tool-profile-categories a:hover {
  transform: translateY(-1px);
}

.tool-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.tool-profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.15rem;
  border-radius: 8px;
  padding: 0.75rem 1.7rem;
  border: 1px solid #0d7f73;
  font-weight: 850;
  text-decoration: none;
  transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}

.tool-profile-button svg,
.tool-profile-summary svg,
.tool-profile-section-heading svg,
.tool-profile-side-card svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-profile-button--primary {
  background: linear-gradient(180deg, #0b887b, #067064);
  color: #fff;
  box-shadow: 0 12px 22px rgb(4 127 112 / 0.24);
}

.tool-profile-button--primary:hover {
  background: #065f56;
  color: #fff;
  transform: translateY(-1px);
}

.tool-profile-button--secondary {
  background: #fff;
  color: #047f70;
}

.tool-profile-button--secondary:hover {
  background: #ecfdf5;
  color: #065f56;
}

.tool-profile-button--full {
  width: 100%;
}

.tool-profile-summary {
  border: 1px solid #dbe7ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.35rem;
  box-shadow: 0 18px 45px rgb(15 23 42 / 0.09);
}

.tool-profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding-bottom: 1.3rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.tool-profile-metrics div {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.35rem;
}

.tool-profile-metrics span {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: #047f70;
}

.tool-profile-metrics strong {
  color: #0f172a;
  font-size: 1.14rem;
  line-height: 1;
}

.tool-profile-metrics small {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-profile-facts {
  margin: 0;
}

.tool-profile-facts div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.05rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.tool-profile-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0.2rem;
}

.tool-profile-facts dt {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #475569;
  font-weight: 700;
}

.tool-profile-facts dt svg {
  color: #64748b;
}

.tool-profile-facts dd {
  margin: 0;
  color: #047f70;
  font-weight: 850;
  text-align: right;
}

.tool-profile-fact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  justify-content: flex-end;
}

.tool-profile-fact-links a {
  color: #047f70;
  text-decoration: none;
}

.tool-profile-fact-links a:hover {
  text-decoration: underline;
}

.tool-profile-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.tool-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 385px;
  gap: 2rem;
  align-items: start;
}

.tool-profile-content {
  min-width: 0;
}

.tool-profile-card,
.tool-profile-side-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.045);
}

.tool-profile-card {
  padding: 2rem;
  margin-bottom: 1.4rem;
}

.tool-profile-section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.tool-profile-section-heading > span {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  background: #d9f5ef;
  color: #047f70;
}

.tool-profile-section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.7rem;
  line-height: 1.2;
}

.tool-profile-markdown h2,
.tool-profile-markdown h3,
.tool-profile-markdown h4 {
  color: #047f70;
  font-family: var(--font-body);
  font-size: 1.05rem;
  margin: 1.45rem 0 0.55rem;
}

.tool-profile-markdown p,
.tool-profile-markdown li {
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.75;
}

.tool-profile-markdown > p:first-of-type {
  margin-top: 0;
}

.tool-profile-markdown ul,
.tool-profile-markdown ol {
  margin: 0.7rem 0 1.1rem;
  padding-left: 1.25rem;
}

.tool-profile-markdown blockquote {
  margin: 1.2rem 0;
  border-left: 3px solid #0f8f7e;
  background: #f0fdfa;
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
}

.tool-profile-markdown code {
  border-radius: 5px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.12rem 0.3rem;
  font-size: 0.9em;
}

.tool-profile-markdown a {
  color: #047f70;
  font-weight: 800;
}

.tool-profile-table-wrap {
  width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid #dbe7f0;
  border-radius: 12px;
  background: #fff;
}

.tool-profile-markdown table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.tool-profile-markdown th {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #cfeee7;
  background: #eefcf8;
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: left;
}

.tool-profile-markdown td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: top;
}

.tool-profile-markdown tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.tool-profile-markdown tbody tr:last-child td {
  border-bottom: 0;
}

.tool-profile-media-card--featured {
  margin-bottom: 2rem;
  padding: 1.75rem;
}

.tool-profile-media-card--featured .tool-profile-section-heading {
  margin-bottom: 1.25rem;
}

.tool-profile-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.tool-profile-media-card--featured .tool-profile-gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}

.tool-profile-gallery figure {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.tool-profile-media-card--featured .tool-profile-gallery figure {
  border-color: #dbe7f0;
  box-shadow: 0 14px 28px rgb(15 23 42 / 0.06);
}

.tool-profile-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.tool-profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.3rem;
}

.tool-profile-detail-grid div {
  display: grid;
  gap: 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.9rem;
}

.tool-profile-detail-grid strong,
.tool-profile-details-card h3 {
  color: #0f172a;
  font-size: 0.95rem;
}

.tool-profile-detail-grid span {
  color: #475569;
  line-height: 1.55;
}

.tool-profile-check-list,
.tool-profile-procon ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: #334155;
}

.tool-profile-check-list li,
.tool-profile-procon li {
  margin-bottom: 0.45rem;
}

.tool-profile-procon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.tool-profile-procon > div {
  border: 1px solid #dbe7ef;
  border-radius: 10px;
  padding: 1rem;
}

.tool-profile-procon > div:first-child {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.tool-profile-procon > div:last-child {
  background: #fff7ed;
  border-color: #fed7aa;
}

.tool-profile-alt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-profile-alt-list span {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  padding: 0.25rem 0.7rem;
  font-weight: 700;
}

.tool-profile-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6rem;
}

.tool-profile-side-card {
  padding: 1.35rem;
}

.tool-profile-side-card h2 {
  margin: 0 0 1rem;
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.tool-profile-rating-card {
  position: relative;
  overflow: hidden;
}

.tool-profile-rating-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.tool-profile-rating-row > strong {
  color: #047f70;
  font-size: 2rem;
  line-height: 1;
}

.tool-profile-rating-row span {
  display: block;
  color: #64748b;
  margin-top: 0.45rem;
  font-size: 0.85rem;
}

.tool-profile-side-card__title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.tool-profile-side-card__title a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #d9f5ef;
  color: #047f70;
}

.tool-profile-deal {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.tool-profile-deal strong,
.tool-profile-deal span {
  display: block;
}

.tool-profile-suggest-link,
.tool-profile-view-guides {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  color: #047f70;
  font-weight: 850;
  text-decoration: none;
}

.tool-profile-guides {
  display: grid;
  gap: 0.75rem;
}

.tool-profile-guides a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.65rem;
  row-gap: 0.12rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-decoration: none;
}

.tool-profile-guides a:last-child {
  border-bottom: 0;
}

.tool-profile-guides a > span {
  grid-row: span 2;
  color: #047f70;
  margin-top: 0.08rem;
}

.tool-profile-guides strong {
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.25;
}

.tool-profile-guides small {
  color: #64748b;
}

.tool-related-listings {
  margin-top: 2rem;
}

.tool-related-listings__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tool-related-listings__header h2 {
  margin: 0.25rem 0 0;
  color: #0f172a;
  font-size: 1.6rem;
}

.tool-related-listings__header > a {
  color: #047f70;
  font-weight: 850;
  text-decoration: none;
}

.tool-related-listings__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-related-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  min-height: 148px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 1rem;
  text-decoration: none;
  box-shadow: 0 8px 22px rgb(15 23 42 / 0.04);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.tool-related-card:hover {
  transform: translateY(-2px);
  border-color: #99d8ce;
  box-shadow: 0 14px 30px rgb(15 23 42 / 0.08);
}

.tool-related-card__logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #047f70;
  overflow: hidden;
  font-weight: 900;
}

.tool-related-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.45rem;
}

.tool-related-card__body {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.tool-related-card__body strong {
  color: #0f172a;
  font-size: 1rem;
}

.tool-related-card__body small {
  color: #475569;
  line-height: 1.5;
}

.tool-related-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.tool-related-card__meta b,
.tool-related-card__meta em {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 0.12rem 0.5rem;
  font-size: 0.76rem;
  font-style: normal;
}

.tool-related-card__meta b {
  color: #92400e;
  background: #fef3c7;
}

.tool-category-hero {
  background: #12685f;
  color: #fff;
  border-bottom: 1px solid #0f766e;
}

.tool-category-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.3rem 1.5rem;
  text-align: center;
}

.tool-category-hero .breadcrumbs {
  justify-content: center;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.2rem;
}

.tool-category-hero .breadcrumbs a {
  color: #fff;
}

.tool-category-hero .section-label {
  color: #fed7aa;
}

.tool-category-hero h1 {
  margin: 0.5rem auto 0;
  max-width: 860px;
  color: #fff;
  font-size: 3rem;
  line-height: 1.12;
}

.tool-category-hero p {
  max-width: 720px;
  margin: 1rem auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  line-height: 1.7;
}

.tool-category-archive {
  padding-top: 1.5rem;
}

.tools-page-button.current {
  border-color: #99d8ce;
  background: #ecfdf5;
  color: #047f70;
}

@media (max-width: 1024px) {
  .tools-hero__inner,
  .tool-review-hero__inner,
  .tools-criteria,
  .submit-tool-layout,
  .tool-review-layout,
  .tool-profile-hero__inner,
  .tool-profile-layout {
    grid-template-columns: 1fr;
  }

  .tool-profile-sidebar {
    position: static;
  }

  .tool-profile-hero__main {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 1.5rem;
  }

  .tool-profile-logo-card {
    width: 150px;
    height: 150px;
    border-radius: 22px;
  }

  .tools-category-grid,
  .tools-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submit-tool-sidebar,
  .tool-review-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .tools-hero h1,
  .tool-review-hero h1,
  .tool-profile-hero h1 {
    font-size: 2.35rem;
  }

  .tools-hero__inner,
  .tool-review-hero__inner {
    padding: 3rem 1rem;
  }

  .tools-section {
    padding: 3rem 0;
  }

  .tools-section__inner {
    padding: 0 1rem;
  }

  .tool-profile-hero__inner,
  .tool-profile-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tool-profile-hero__main {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .tool-profile-logo-card {
    width: 120px;
    height: 120px;
    border-radius: 18px;
  }

  .tool-profile-actions,
  .tool-profile-button {
    width: 100%;
  }

  .tool-profile-summary,
  .tool-profile-card,
  .tool-profile-side-card {
    border-radius: 10px;
  }

  .tool-profile-card {
    padding: 1.2rem;
  }

  .tool-profile-facts div,
  .tool-profile-detail-grid,
  .tool-profile-procon,
  .tool-profile-gallery {
    grid-template-columns: 1fr;
  }

  .tool-profile-facts dd {
    text-align: left;
  }

  .tool-profile-fact-links {
    justify-content: flex-start;
  }

  .tool-related-listings__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-related-listings__grid {
    grid-template-columns: 1fr;
  }

  .tool-category-hero__inner {
    padding: 2.6rem 1rem;
  }

  .tool-category-hero h1 {
    font-size: 2.2rem;
  }

  .tools-directory-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tools-directory-search {
    min-width: 100%;
  }

  .tools-category-grid,
  .tools-list-grid,
  .tools-criteria__grid,
  .tool-pro-con-grid {
    grid-template-columns: 1fr;
  }

  .directory-tool-card {
    min-height: auto;
  }

  .submit-tool-form__button {
    width: 100%;
  }
}

/* =============================================================
   TOOLS DIRECTORY ARCHIVE ROW LAYOUT
   ============================================================= */
.tools-archive-page {
  background: #f8fafc;
  color: #0f172a;
}

.tools-archive-header,
.tools-archive {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.tools-archive-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

.tools-archive-header h1,
.tools-archive-header h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #020617;
}

.tools-archive-header--compact {
  padding-top: 2.4rem;
}

.tools-archive-header p {
  max-width: 620px;
  margin: 0;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.55;
}

.tools-archive-header__actions,
.tools-archive-controls,
.tools-archive-tabs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tools-lite-button,
.tools-subscribe-button,
.tools-filter-toggle,
.tools-sort-submit,
.tools-sort-select,
.tools-star-button,
.tools-page-button {
  min-height: 2.55rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
}

.tools-lite-button,
.tools-subscribe-button,
.tools-filter-toggle,
.tools-sort-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid #dbe3eb;
  background: #fff;
  color: #0f172a;
  padding: 0.55rem 1rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  text-decoration: none;
  cursor: pointer;
}

.tools-lite-button svg,
.tools-subscribe-button svg,
.tools-filter-toggle svg,
.tools-list-visits svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tools-lite-button svg {
  fill: currentColor;
  stroke: none;
}

.tools-subscribe-button {
  background: #0f8f7e;
  border-color: #0f8f7e;
  color: #fff;
}

.tools-subscribe-button:hover {
  background: #0f766e;
  color: #fff;
}

.tools-lite-button:hover,
.tools-filter-toggle:hover,
.tools-sort-submit:hover {
  border-color: #b6c2cf;
  color: #0f766e;
}

.tools-archive-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #dbe3eb;
}

.tools-archive-tab {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #475569;
  padding: 0 0.85rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.tools-archive-tab:hover,
.tools-archive-tab.is-active {
  color: #0f8f7e;
  border-bottom-color: #0f8f7e;
}

.tools-sort-select {
  border: 1px solid #dbe3eb;
  background: #fff;
  color: #0f172a;
  padding: 0.55rem 2.4rem 0.55rem 0.9rem;
  min-width: 140px;
}

.tools-archive-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.tools-archive-sidebar {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.tools-sidebar-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.035);
}

.tools-sidebar-panel h2,
.tools-results-summary h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
  color: #020617;
}

.tools-sidebar-panel h3 {
  margin: 1.15rem 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
}

.tools-category-nav,
.tools-pricing-list {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.85rem;
}

.tools-sidebar-button,
.tools-pricing-list label,
.tools-pricing-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  padding: 0.48rem 0.45rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.tools-sidebar-button:hover,
.tools-sidebar-button.is-active,
.tools-pricing-filter:hover,
.tools-pricing-filter.is-active {
  background: #eefaf7;
  color: #047f70;
}

.tools-sidebar-button small,
.tools-pricing-list small {
  justify-self: end;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
}

.tools-sidebar-button.is-active small,
.tools-pricing-filter.is-active small {
  background: #d4f3ed;
  color: #047f70;
}

.tools-sidebar-icon {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 900;
}

.tools-sidebar-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tools-pricing-list input {
  width: 1rem;
  height: 1rem;
  accent-color: #0f8f7e;
}

.tools-results-panel {
  min-width: 0;
}

.tools-results-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 0.9rem;
}

.tools-results-summary a {
  color: #047f70;
  font-weight: 800;
  text-decoration: none;
}

.tools-results-summary a:hover {
  text-decoration: underline;
}

.tools-list-table {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.035);
}

.tools-list-row {
  display: grid;
  grid-template-columns: 44px 84px minmax(240px, 1fr) minmax(170px, 200px) 120px 110px;
  gap: 1rem;
  align-items: center;
  min-height: 104px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.tools-list-row.is-featured {
  background: linear-gradient(90deg, #fff 0%, #fff 70%, #f0fdfa 100%);
}

.tools-list-row:last-child {
  border-bottom: 0;
}

.tools-list-rank {
  display: grid;
  place-items: center;
  height: 3.5rem;
  border-right: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 800;
}

.tools-list-logo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
}

.tools-list-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tools-list-logo span {
  display: block;
  max-width: 100%;
  padding: 0.25rem;
  font-size: 1.15rem;
}

.tool-logo--canva { background: linear-gradient(135deg, #10c5d8, #7c3aed); }
.tool-logo--rankmath { background: linear-gradient(135deg, #6d5ba6, #3e2d73); font-size: 0.85rem; }
.tool-logo--notion { background: #fff; color: #111827; border: 1px solid #d1d5db; }
.tool-logo--wordpress { background: linear-gradient(135deg, #2786b8, #155e75); }
.tool-logo--mailchimp { background: #ffe01b; color: #111827; }
.tool-logo--trello { background: linear-gradient(135deg, #2f9cff, #0052cc); }
.tool-logo--default { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.tool-logo--remote {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}

.tool-logo--remote img {
  object-fit: contain;
  padding: 0.55rem;
}

.tools-list-main {
  min-width: 0;
}

.tools-list-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.18rem;
}

.tools-list-main h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 850;
  color: #020617;
}

.tools-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  border-radius: 999px;
  padding: 0.12rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tools-status-badge--featured {
  background: #fef3c7;
  color: #92400e;
}

.tools-status-badge--sponsored {
  background: #e0f2fe;
  color: #075985;
}

.tools-list-main h3 a {
  color: inherit;
}

.tools-list-main h3 a:hover {
  color: #0f8f7e;
}

.tools-list-main p {
  margin: 0;
  max-width: 560px;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.42;
}

.tools-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.tools-list-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.3rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.tools-list-rating {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #0f172a;
  font-weight: 800;
}

.tools-list-rating small {
  color: #475569;
  font-weight: 600;
}

.tools-rating {
  display: flex;
  gap: 0.12rem;
  color: #cbd5e1;
}

.tools-rating__star {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.tools-rating__star.is-filled {
  color: #f59e0b;
}

.tools-star-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid #dbe3eb;
  background: #fff;
  color: #020617;
  padding: 0.45rem 1rem;
  cursor: pointer;
}

.tools-star-button:hover {
  border-color: #b6c2cf;
  color: #0f8f7e;
}

.tools-star-button.is-starred {
  background: #ecfdf5;
  border-color: #99d8ce;
  color: #047f70;
}

.tools-star-button__icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.tools-star-button.is-starred .tools-star-button__icon {
  fill: currentColor;
}

.tools-list-visits {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.55rem;
  row-gap: 0.15rem;
  align-items: center;
  padding-left: 1.25rem;
  border-left: 1px solid #e2e8f0;
  color: #334155;
}

.tools-list-visits svg {
  grid-row: span 2;
  color: #0f8f7e;
}

.tools-list-visits strong {
  font-size: 0.95rem;
}

.tools-list-visits span {
  color: #475569;
  font-size: 0.82rem;
}

.tools-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px solid #e2e8f0;
  border-top: 0;
  background: #fff;
  border-radius: 0 0 6px 6px;
}

.tools-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.55rem;
  border: 1px solid transparent;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
}

.tools-page-button--wide {
  min-width: 6.25rem;
  border-color: #dbe3eb;
  background: #fff;
}

.tools-page-button.is-active {
  border-color: #99d8ce;
  background: #ecfdf5;
  color: #047f70;
}

.tools-page-button:disabled,
.tools-page-button.is-disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  pointer-events: none;
}

.tools-page-ellipsis {
  color: #475569;
  padding: 0 0.25rem;
}

.tools-empty-state {
  border-radius: 6px;
}

.tools-rating-open {
  overflow: hidden;
}

.tools-rating-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.52);
}

.tools-rating-modal[hidden] {
  display: none;
}

.tools-rating-modal__dialog {
  position: relative;
  width: min(100%, 420px);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 24px 70px rgb(15 23 42 / 0.24);
}

.tools-rating-modal__dialog h2 {
  margin: 0.25rem 0 0.35rem;
  font-family: var(--font-body);
  font-size: 1.35rem;
}

.tools-rating-modal__dialog p {
  margin: 0;
  color: #475569;
  font-weight: 700;
}

.tools-rating-modal__dialog small {
  display: block;
  color: #64748b;
  margin-top: 0.75rem;
}

.tools-rating-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.tools-rating-modal__close:hover {
  border-color: #99d8ce;
  color: #047f70;
}

.tools-rating-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
}

.tools-rating-picker button {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #cbd5e1;
  cursor: pointer;
}

.tools-rating-picker button:hover,
.tools-rating-picker button:focus-visible,
.tools-rating-picker button.is-selected {
  border-color: #fde68a;
  background: #fffbeb;
  color: #f59e0b;
}

.tools-rating-picker svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.tools-rating-remove {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff;
  color: #b91c1c;
  padding: 0.62rem 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.tools-rating-remove:hover {
  background: #fef2f2;
}

.tools-rating-remove[hidden] {
  display: none;
}

@media (max-width: 1180px) {
  .tools-list-row {
    grid-template-columns: 42px 78px minmax(220px, 1fr) 168px 118px;
  }

  .tools-list-visits {
    grid-column: 4 / 6;
    grid-row: 2;
    justify-self: start;
    border-left: 0;
    padding-left: 0;
    display: flex;
  }
}

@media (max-width: 920px) {
  .tools-archive-header,
  .tools-archive-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tools-archive-shell {
    grid-template-columns: 1fr;
  }

  .tools-archive-sidebar {
    display: none;
  }

  .tools-archive-shell.is-filter-open .tools-archive-sidebar {
    display: grid;
  }

  .tools-sidebar-panel {
    padding: 0.9rem;
  }

  .tools-list-row {
    grid-template-columns: 42px 72px minmax(0, 1fr);
    gap: 0.9rem;
  }

  .tools-list-rating,
  .tools-star-button,
  .tools-list-visits {
    grid-column: 3;
  }

  .tools-list-rating {
    margin-top: 0.25rem;
  }

  .tools-list-visits {
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .tools-archive-header,
  .tools-archive {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tools-archive-header h1,
  .tools-archive-header h2 {
    font-size: 1.75rem;
  }

  .tools-archive-header__actions,
  .tools-archive-controls {
    width: 100%;
  }

  .tools-lite-button,
  .tools-subscribe-button,
  .tools-filter-toggle,
  .tools-sort-submit,
  .tools-sort-select {
    flex: 1 1 auto;
  }

  .tools-archive-tabs {
    gap: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tools-archive-tab {
    flex: 0 0 auto;
    padding: 0 0.75rem;
  }

  .tools-list-row {
    grid-template-columns: 34px 62px minmax(0, 1fr);
    padding: 0.85rem;
  }

  .tools-list-logo {
    width: 58px;
    height: 58px;
    border-radius: 10px;
  }

  .tools-list-main h3 {
    font-size: 0.98rem;
  }

  .tools-list-main p {
    font-size: 0.86rem;
  }

  .tools-list-rating {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .tools-star-button {
    width: fit-content;
  }

  .tools-pagination {
    flex-wrap: wrap;
  }
}
