/*
Theme Name: Diamnato Blog
Theme URI: http://localhost/
Author: diamnato2011
Author URI: http://localhost/
Description: A fast, modern classic WordPress theme for readable blogs.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
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: diamnato-blog
Tags: blog, one-column, two-columns, custom-menu, featured-images, threaded-comments
*/

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-soft: #eef3ed;
  --surface-warm: #fbfaf6;
  --text: #151816;
  --muted: #606b64;
  --line: #dedbd1;
  --brand: #0d7562;
  --brand-dark: #084b40;
  --accent: #be4a30;
  --ink-soft: #2d352f;
  --shadow: 0 18px 50px rgba(26, 31, 27, 0.09);
  --shadow-hover: 0 24px 70px rgba(26, 31, 27, 0.14);
  --radius: 8px;
  --wrap: min(1180px, calc(100vw - 32px));
  --content: 720px;
  --article: 920px;
  --measure: 76ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #fbfaf6 0, var(--bg) 360px, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(190, 74, 48, 0.35);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link.screen-reader-text:focus {
	left: 12px;
	width: auto;
	height: auto;
	clip: auto;
	margin: 0;
	overflow: visible;
}

.site-header {
  border-bottom: 1px solid rgba(222, 219, 209, 0.8);
  background: rgba(251, 250, 246, 0.86);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner,
.site-footer-inner,
.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

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

.site-branding {
  min-width: 0;
  position: relative;
  padding-left: 46px;
}

.site-branding::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--brand), var(--brand-dark) 58%, var(--accent));
  transform: translateY(-50%);
  box-shadow: 0 10px 24px rgba(13, 117, 98, 0.22);
}

.site-branding.has-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 0;
}

.site-branding.has-logo::before {
  display: none;
}

.site-logo,
.site-logo a {
  display: block;
  flex: 0 0 auto;
}

.site-logo img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  object-fit: cover;
}

.site-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.1;
  font-weight: 820;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-description {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.main-navigation a:hover {
  transform: translateY(-1px);
}

.site-main {
  padding: clamp(34px, 5vw, 72px) 0;
}

.hero {
  width: var(--wrap);
  margin: 0 auto clamp(28px, 5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: stretch;
  padding: clamp(20px, 4vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.78);
  border: 1px solid rgba(222, 219, 209, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(28, 32, 29, 0.06);
}

.home-intro {
  width: var(--wrap);
  margin: 0 auto clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(180px, 0.15fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: end;
  padding-top: clamp(10px, 2vw, 24px);
  padding-bottom: clamp(26px, 5vw, 52px);
  border-bottom: 2px solid var(--text);
}

.home-intro .hero-title {
  max-width: 11em;
  font-size: clamp(3rem, 10vw, 8.2rem);
  line-height: 0.9;
}

.home-intro-meta {
  min-width: 150px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 740;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}

.home-intro-meta span {
  display: block;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.9;
  font-weight: 860;
}

.hero-kicker,
.entry-kicker {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-title,
.page-title,
.entry-title {
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(2rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-text {
  margin: 14px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 24px);
  box-shadow: 0 14px 40px rgba(26, 31, 27, 0.08);
  align-self: end;
}

.hero-panel-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.content-layout {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: clamp(24px, 4vw, 42px);
  align-items: start;
}

.home-feed {
  width: var(--wrap);
  margin: 0 auto;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.post-card {
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
  transition: transform 180ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(22px, 4vw, 42px);
  padding-bottom: clamp(24px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
}

.post-card-featured:not(.has-post-thumbnail) {
  display: block;
}

.post-card-featured .post-card-media {
  min-height: 100%;
  aspect-ratio: auto;
}

.post-card-featured .post-card-body {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.post-card-featured .post-card-title {
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: 0.96;
  max-width: 11em;
}

.post-card-media {
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
  overflow: hidden;
  border-radius: var(--radius);
}

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

.post-card:hover .post-card-media img {
  transform: scale(1.025);
}

.post-card-body {
  padding: 14px 0 0;
}

.entry-meta,
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.single-article .entry-meta,
.single-article .entry-kicker {
  font-size: 0.86rem;
}

.single-article .entry-meta span + span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.12em;
}

.post-card-title {
  margin: 10px 0 8px;
  font-size: clamp(1.16rem, 2vw, 1.42rem);
  line-height: 1.18;
  text-wrap: balance;
}

.post-card-title a {
  color: var(--text);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--brand);
}

.post-card-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
  width: fit-content;
  border-bottom: 2px solid rgba(13, 117, 98, 0.22);
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.read-more:hover {
  border-color: var(--brand);
  transform: translateX(2px);
}

.pagination,
.post-navigation {
  margin-top: 28px;
}

.nav-links,
.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.page-numbers,
.post-page-numbers {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 11px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(26, 31, 27, 0.04);
}

.page-numbers.current,
.post-page-numbers.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 34px rgba(26, 31, 27, 0.05);
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}

.widget-title,
.widget h2,
.widget h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.widget ul {
  margin: 0;
  padding-left: 18px;
}

.widget li + li {
  margin-top: 8px;
}

.content-narrow {
  width: min(var(--content), calc(100vw - 32px));
  margin: 0 auto;
}

.content-article {
  width: var(--wrap);
  margin: 0 auto;
}

.page-article {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 5vw, 54px);
  box-shadow: var(--shadow);
}

.page-article .entry-title {
  font-size: clamp(2.15rem, 5vw, 4.35rem);
  line-height: 1.02;
  max-width: 12.5em;
}

.single-article {
  display: grid;
  grid-template-columns: minmax(96px, 0.25fr) minmax(0, var(--measure)) minmax(0, 1fr);
  column-gap: clamp(20px, 4vw, 44px);
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.single-article .entry-title {
  max-width: 13.5em;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.98;
}

.single-article .entry-header {
  grid-column: 1 / 3;
  max-width: none;
  margin: 0 0 clamp(24px, 4vw, 42px);
}

.single-article .entry-meta {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.entry-thumbnail {
  grid-column: 1 / -1;
  margin: clamp(22px, 4vw, 36px) 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.entry-thumbnail img {
  width: 100%;
}

.entry-content {
  max-width: var(--measure);
  margin: 28px auto 0;
  color: #232824;
  font-size: clamp(1.05rem, 1.2vw, 1.16rem);
  line-height: 1.78;
}

.single-article .entry-content {
  grid-column: 2;
  margin: 8px 0 0;
}

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

.entry-content > .alignwide,
.entry-content > .wp-block-image.alignwide,
.entry-content > .wp-block-gallery.alignwide {
  width: var(--wrap);
  max-width: var(--wrap);
  margin-left: calc(-1 * (min(96px, 12vw) + clamp(20px, 4vw, 44px)));
  transform: none;
}

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

.entry-content ul,
.entry-content ol {
  padding-left: 1.35em;
}

.entry-content li + li {
  margin-top: 0.42em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--text);
  line-height: 1.2;
  text-wrap: balance;
}

.entry-content h2 {
  margin-top: 2em;
  margin-bottom: 0.68em;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.entry-content h3 {
  margin-top: 1.75em;
  margin-bottom: 0.58em;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
}

.entry-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: 1.16rem;
}

.entry-content blockquote {
  margin: 1.8em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  background: var(--surface-soft);
  color: #3c4640;
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  line-height: 1.58;
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

.entry-content a {
  font-weight: 700;
}

.entry-content code,
.entry-content pre {
  border-radius: var(--radius);
  background: #edf0eb;
}

.entry-content code {
  padding: 0.12em 0.32em;
  font-size: 0.92em;
}

.entry-content pre {
  overflow-x: auto;
  padding: 16px;
  line-height: 1.55;
}

.entry-content pre code {
  padding: 0;
  background: transparent;
}

.entry-content table {
  width: min(100%, var(--measure));
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.96rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

.entry-content th {
  background: var(--surface-soft);
}

.entry-footer {
  max-width: var(--measure);
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.93rem;
}

.single-article .entry-footer {
  grid-column: 2;
  margin-left: 0;
  margin-right: 0;
}

.content-article .post-navigation,
.content-article .comments-area {
  max-width: var(--measure);
  margin-left: calc(25% + clamp(20px, 4vw, 44px));
  margin-right: auto;
}

.comments-area {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
}

.comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-body {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.comment-form input:not([type="submit"]),
.comment-form textarea,
.search-form input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.comment-form input:not([type="submit"]):focus,
.comment-form textarea:focus,
.search-form input[type="search"]:focus {
  border-color: rgba(13, 117, 98, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 117, 98, 0.1);
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form label {
  flex: 1;
}

.search-submit,
.form-submit .submit,
.wp-block-search__button {
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(13, 117, 98, 0.18);
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.search-submit:hover,
.form-submit .submit:hover,
.wp-block-search__button:hover {
  background: var(--brand-dark);
  box-shadow: 0 14px 30px rgba(13, 117, 98, 0.24);
  transform: translateY(-1px);
}

.not-found {
  width: min(760px, calc(100vw - 32px));
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 52px);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--muted);
  background: rgba(251, 250, 246, 0.64);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.94rem;
}

.alignwide {
  max-width: var(--wrap);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

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

@media (max-width: 860px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
    gap: 14px;
  }

  .main-navigation ul {
    justify-content: flex-start;
  }

  .hero,
  .home-intro,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .home-intro-meta {
    min-width: 0;
    text-align: left;
  }

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

  .post-card-featured {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .post-card-featured .post-card-media {
    aspect-ratio: 16 / 9;
  }

  .post-card-featured .post-card-body {
    min-height: 0;
  }

  .single-article {
    display: block;
  }

  .single-article .entry-header,
  .entry-content,
  .entry-footer,
  .content-article .post-navigation,
  .content-article .comments-area {
    max-width: var(--measure);
    margin-left: auto;
    margin-right: auto;
  }

  .entry-content > .alignwide,
  .entry-content > .wp-block-image.alignwide,
  .entry-content > .wp-block-gallery.alignwide {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

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

  .page-article,
  .comments-area {
    padding: 20px;
  }

  .hero-title,
  .page-title,
  .entry-title {
    line-height: 1.04;
  }

  .single-article .entry-meta span + span::before {
    display: none;
  }

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

/* Header and AI brand refinements. */
.site-header {
  background: rgba(251, 250, 246, 0.94);
}

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

.site-branding {
  padding-left: 38px;
}

.site-branding::before {
  width: 28px;
  height: 28px;
  box-shadow: 0 8px 18px rgba(13, 117, 98, 0.18);
}

.site-title {
  font-size: 1.05rem;
  letter-spacing: 0;
}

.main-navigation a {
  padding: 7px 10px;
  font-size: 0.9rem;
}

.brand-home {
  align-items: center;
  gap: clamp(22px, 4vw, 48px);
  padding-bottom: clamp(22px, 4vw, 42px);
}

.brand-home-copy h1 {
  max-width: 9.5em;
  font-size: clamp(2.15rem, 4.8vw, 4.15rem);
  line-height: 1.02;
}

.brand-home-copy p:last-child {
  max-width: 720px;
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
}

.brand-home-ai {
  position: relative;
  padding: clamp(16px, 2.4vw, 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(26, 31, 27, 0.08);
  overflow: hidden;
}

.brand-home-ai::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.brand-home-ai h2 {
  margin: 8px 0 14px;
  font-size: clamp(1.28rem, 2.4vw, 1.72rem);
  line-height: 1;
}

.ai-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-map li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px 9px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ai-map span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 860;
}

.ai-map strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.1;
}

.ai-map em {
  grid-column: 2;
  margin-top: -5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.35;
}

.brand-note {
  width: var(--wrap);
  margin: calc(-1 * clamp(10px, 2vw, 20px)) auto clamp(24px, 4vw, 42px);
}

.brand-note div {
  display: grid;
  grid-template-columns: 160px minmax(0, 760px);
  gap: clamp(14px, 3vw, 34px);
  padding-bottom: clamp(20px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
}

.brand-note span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 860;
  text-transform: uppercase;
}

.brand-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.58;
}

@media (max-width: 900px) {
  .brand-note div {
    grid-template-columns: 1fr;
  }

  .ai-map {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 0;
  }
}

.brand-home-copy {
  max-width: 860px;
}

.brand-home-copy > p:not(.brand-home-kicker) {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.45vw, 1.16rem);
  line-height: 1.58;
}

.brand-home-copy > p:not(.brand-home-kicker):first-of-type {
  margin-top: clamp(18px, 3vw, 28px);
  font-size: clamp(1.08rem, 1.7vw, 1.24rem);
}

/* Homepage menu topics and balanced latest posts. */
.topic-nav {
  width: var(--wrap);
  margin: 0 auto clamp(24px, 4vw, 42px);
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: clamp(14px, 3vw, 28px);
  align-items: start;
  padding-bottom: clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}

.topic-nav-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 860;
  text-transform: uppercase;
}

.topic-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-nav-list a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 720;
  text-decoration: none;
}

.topic-nav-list a:hover {
  border-color: rgba(13, 117, 98, 0.4);
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.home-feed {
  width: var(--wrap);
  padding-top: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.post-card,
.post-card-featured,
.post-card-featured:not(.has-post-thumbnail) {
  grid-column: auto;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(26, 31, 27, 0.06);
}

.post-card-featured:not(.has-post-thumbnail)::before {
  content: none;
}

.post-card:hover {
  border-color: rgba(13, 117, 98, 0.28);
  box-shadow: 0 18px 46px rgba(26, 31, 27, 0.1);
  transform: translateY(-3px);
}

.post-card-media,
.post-card-featured .post-card-media {
  min-height: 0;
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.post-card-body,
.post-card-featured .post-card-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px;
}

.post-card:not(.has-post-thumbnail) .post-card-body {
  border-top: 4px solid var(--brand);
}

.post-card-title,
.post-card-featured .post-card-title {
  margin: 8px 0 10px;
  max-width: none;
  font-size: clamp(1.18rem, 2vw, 1.52rem);
  line-height: 1.18;
}

.post-card-summary,
.post-card-featured .post-card-summary {
  max-width: none;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .topic-nav {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Article cover beside the intro, not inside the reading flow. */
.single-article .entry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
  max-width: 980px;
  margin: 0 auto clamp(30px, 5vw, 54px);
}

.single-article .entry-header {
  max-width: none;
  margin: 0;
}

.single-article .entry-title {
  font-size: clamp(2.15rem, 4.8vw, 4.35rem);
  line-height: 1.02;
}

.single-article .entry-thumbnail {
  max-width: none;
  margin: 0;
  align-self: stretch;
}

.single-article .entry-thumbnail img {
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (max-width: 820px) {
  .single-article .entry-hero {
    grid-template-columns: 1fr;
  }

  .single-article .entry-thumbnail img {
    max-height: none;
    aspect-ratio: 16 / 9;
  }
}

/* Final homepage article grid. */
.home-feed {
  width: var(--wrap);
  margin: 0 auto;
}

.home-feed .post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 26px);
  align-items: stretch;
}

.home-feed .post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(26, 31, 27, 0.06);
  transform: none;
}

.home-feed .post-card:hover {
  border-color: rgba(13, 117, 98, 0.32);
  box-shadow: 0 18px 42px rgba(26, 31, 27, 0.1);
  transform: translateY(-2px);
}

.home-feed .post-card-media {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  background: var(--surface-soft);
}

.home-feed .post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-feed .post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
}

.home-feed .post-card-title {
  margin: 8px 0 10px;
  font-size: clamp(1.12rem, 1.6vw, 1.38rem);
  line-height: 1.2;
}

.home-feed .post-card-summary {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.home-feed .post-card:not(.has-post-thumbnail) .post-card-body {
  border-top: 4px solid var(--brand);
}

@media (max-width: 900px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-feed .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Readable standalone pages. */
.page-article.single-article .entry-hero.no-thumbnail {
  grid-template-columns: minmax(0, 780px);
}

.page-article.single-article .entry-hero.no-thumbnail .entry-header {
  max-width: 780px;
}

.page-article.single-article .entry-title {
  max-width: 14em;
}

.page-article.single-article .entry-lead {
  max-width: 680px;
  margin-top: 18px;
}

/* Editorial typography for article blocks. */
.single-article .entry-content p {
  margin-bottom: 1.15em;
}

.single-article .entry-content .wp-block-quote,
.single-article .entry-content blockquote:not(.wp-block-pullquote blockquote) {
  margin: 1.35em 0;
  padding: 14px 0 14px 20px;
  border-left: 4px solid var(--brand);
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.62;
}

.single-article .entry-content .wp-block-quote p {
  margin-bottom: 0.65em;
}

.single-article .entry-content .wp-block-quote p:last-child {
  margin-bottom: 0;
}

.single-article .entry-content .wp-block-pullquote {
  margin: 1.45em 0;
  padding: 18px 0 18px 24px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.single-article .entry-content .wp-block-pullquote blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.single-article .entry-content .wp-block-pullquote p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.18rem, 1.9vw, 1.48rem);
  line-height: 1.44;
  font-weight: 500;
}

.single-article .entry-content ul,
.single-article .entry-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.25em;
}

.single-article .entry-content li {
  padding-left: 0.15em;
}

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

.single-article .entry-content ul li::marker {
  color: var(--brand);
}

.single-article .entry-content ol li::marker {
  color: var(--accent);
  font-weight: 820;
}

/* Topic/category archive pages. */
.archive-intro,
.archive-feed {
  width: var(--wrap);
  margin-right: auto;
  margin-left: auto;
}

.archive-intro {
  margin-bottom: clamp(24px, 5vw, 48px);
  padding-bottom: clamp(22px, 4vw, 38px);
  border-bottom: 2px solid var(--text);
}

.archive-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: clamp(18px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.88rem;
}

.archive-breadcrumbs a {
  color: var(--brand);
  font-weight: 720;
  text-decoration: none;
}

.archive-breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.archive-intro h1 {
  max-width: 11em;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.98;
  text-wrap: balance;
}

.archive-intro p {
  max-width: 760px;
  margin: clamp(14px, 2vw, 22px) 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.58;
}

.archive-feed .post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.archive-feed .post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(26, 31, 27, 0.06);
}

.archive-feed .post-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}

.archive-feed .post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-feed .post-card-body {
  min-height: 0;
  padding: 16px;
}

.archive-feed .post-card-title {
  margin: 8px 0 0;
  font-size: clamp(1.12rem, 1.45vw, 1.34rem);
  line-height: 1.22;
}

.archive-feed .post-card-meta {
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 1120px) {
  .archive-feed .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .archive-feed .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .archive-feed .post-grid {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 1120px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-feed .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Final home grid column count. */
.home-feed .post-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1120px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-feed .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Final compact HubSpot-like home cards. */
.home-feed .post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.home-feed .post-card-body {
  min-height: 0;
  padding: 16px;
}

.home-feed .post-card-title {
  margin: 8px 0 0;
  font-size: clamp(1.12rem, 1.45vw, 1.34rem);
  line-height: 1.22;
}

.home-feed .post-card-meta {
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 1120px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-feed .post-grid {
    grid-template-columns: 1fr;
  }
}

/* HubSpot page-style archive grid. */
.home-feed {
  width: var(--wrap);
  margin: 0 auto;
}

.home-feed .post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 34px);
}

.home-feed .post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(26, 31, 27, 0.06);
}

.home-feed .post-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}

.home-feed .post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-feed .post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.home-feed .post-card-category {
  margin-bottom: 8px;
}

.home-feed .post-card-title {
  margin: 8px 0 12px;
  font-size: clamp(1.12rem, 1.45vw, 1.34rem);
  line-height: 1.22;
}

.home-feed .post-card-summary {
  display: none;
}

.home-feed .post-card-meta {
  margin-top: auto;
  margin-bottom: 0;
}

.home-feed .post-card:not(.has-post-thumbnail) .post-card-body {
  border-top: 4px solid var(--brand);
}

@media (max-width: 900px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-feed .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Final single article layout: meta, cover, content, right TOC. */
.content-article {
  width: min(1180px, calc(100vw - 32px));
}

.single-article {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(240px, 300px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.single-article .entry-hero {
  grid-column: 1 / -1;
  display: block;
  max-width: 820px;
  margin: 0 0 clamp(28px, 4vw, 42px);
}

.single-article .entry-header {
  max-width: none;
  margin: 0;
}

.single-article .entry-title {
  max-width: 12em;
  font-size: clamp(1.95rem, 3.8vw, 3.35rem);
  line-height: 1.06;
}

.single-article .entry-meta {
  gap: 8px 12px;
}

.single-article .entry-thumbnail {
  display: none;
}

.single-article .entry-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.single-article .entry-content {
  grid-column: 1;
  max-width: 720px;
  margin: 0;
}

.single-article .entry-content > .diamnato-article-tools {
  float: right;
  width: min(260px, calc((100vw - 32px - 720px) / 1));
  min-width: 220px;
  margin: 0 calc(-1 * (min(260px, calc((100vw - 32px - 720px) / 1)) + clamp(28px, 5vw, 64px))) 22px 26px;
}

.single-article .entry-footer,
.content-article .post-navigation,
.content-article .comments-area {
  grid-column: 1;
  max-width: 720px;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 1079px) {
  .single-article {
    display: block;
  }

  .single-article .entry-hero {
    grid-template-columns: 1fr;
  }

  .single-article .entry-thumbnail img {
    aspect-ratio: 16 / 9;
  }

  .single-article .entry-content,
  .single-article .entry-footer,
  .content-article .post-navigation,
  .content-article .comments-area {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

  .single-article .entry-content > .diamnato-article-tools {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0 0 2rem;
  }
}

/* HubSpot-like article header: cover beside the title. */
.single-article .entry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: clamp(24px, 4vw, 46px);
  align-items: start;
  max-width: 980px;
  margin: 0 0 clamp(28px, 4vw, 42px);
}

.single-article .entry-thumbnail {
  display: block;
  max-width: none;
  margin: 0;
}

.single-article .entry-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.single-article .entry-title {
  font-size: clamp(1.95rem, 3.7vw, 3.25rem);
  line-height: 1.06;
}

@media (max-width: 820px) {
  .single-article .entry-hero {
    grid-template-columns: 1fr;
  }

  .single-article .entry-thumbnail img {
    aspect-ratio: 16 / 9;
  }
}

/* HubSpot-inspired article composition: 3 cards, then compact feed. */
.home-feed .post-grid {
  margin-bottom: clamp(22px, 4vw, 40px);
}

.home-feed .post-card-media {
  aspect-ratio: 16 / 9;
}

.home-feed .post-card-body {
  min-height: 230px;
}

.home-feed .post-card-title {
  margin-top: 10px;
}

.home-feed .post-card-summary {
  margin-top: 10px;
}

.post-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.post-list-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 26px);
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.post-list-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.post-list-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-list-body {
  min-width: 0;
}

.post-list-title {
  margin: 7px 0 8px;
  font-size: clamp(1.12rem, 2vw, 1.5rem);
  line-height: 1.2;
}

.post-list-title a {
  color: var(--text);
  text-decoration: none;
}

.post-list-title a:hover {
  color: var(--brand);
}

.post-list-item:not(.has-post-thumbnail) {
  grid-template-columns: 1fr;
}

@media (max-width: 640px) {
  .post-list-item {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }
}

@media (max-width: 460px) {
  .post-list-item,
  .post-list-item:not(.has-post-thumbnail) {
    grid-template-columns: 1fr;
  }

  .post-list-media {
    width: 100%;
  }
}

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

/* Editorial layout refinements. */
.home-feed {
  padding-top: clamp(8px, 2vw, 24px);
}

.section-heading {
  margin-bottom: clamp(18px, 3vw, 30px);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--text);
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
  font-weight: 860;
}

.content-article {
  width: min(980px, calc(100vw - 32px));
}

.single-article {
  display: block;
  max-width: none;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.single-article .entry-header {
  max-width: 820px;
  margin: 0 auto clamp(26px, 4vw, 44px);
}

.single-article .entry-title {
  max-width: 12.5em;
  margin: 0;
  font-size: clamp(2.3rem, 5.6vw, 5rem);
  line-height: 0.98;
  font-weight: 860;
}

.single-article .entry-meta {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.entry-lead {
  max-width: 760px;
  margin: clamp(18px, 3vw, 28px) 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.2rem, 2vw, 1.48rem);
  line-height: 1.48;
}

.single-article .entry-thumbnail {
  max-width: 980px;
  margin: 0 auto clamp(28px, 5vw, 52px);
}

.single-article .entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(1.08rem, 1.25vw, 1.18rem);
  line-height: 1.76;
}

.single-article .entry-content > .alignwide,
.single-article .entry-content > .wp-block-image.alignwide,
.single-article .entry-content > .wp-block-gallery.alignwide {
  width: min(980px, calc(100vw - 32px));
  max-width: min(980px, calc(100vw - 32px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.single-article .entry-footer,
.content-article .post-navigation,
.content-article .comments-area {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.single-article .entry-footer {
  margin-top: 38px;
}

@media (max-width: 760px) {
  .content-article,
  .single-article .entry-header,
  .single-article .entry-content,
  .single-article .entry-footer,
  .content-article .post-navigation,
  .content-article .comments-area {
    width: min(100%, calc(100vw - 32px));
    max-width: none;
  }

  .single-article .entry-content > .alignwide,
  .single-article .entry-content > .wp-block-image.alignwide,
  .single-article .entry-content > .wp-block-gallery.alignwide {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }
}

/* Personal AI expert homepage. */
.brand-home {
  width: var(--wrap);
  margin: 0 auto clamp(24px, 5vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding-bottom: clamp(28px, 5vw, 56px);
  border-bottom: 2px solid var(--text);
}

.brand-home-copy {
  max-width: 780px;
}

.brand-home-kicker,
.brand-home-label,
.post-card-category {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-home-copy h1 {
  margin: 10px 0 0;
  max-width: 11em;
  color: var(--text);
  font-size: clamp(2.15rem, 4.8vw, 4.15rem);
  line-height: 1.02;
  text-wrap: balance;
}

.brand-home-copy p:last-child {
  max-width: 680px;
  margin: clamp(18px, 3vw, 28px) 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.52;
}

.brand-home-about {
  padding: clamp(20px, 3vw, 30px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(26, 31, 27, 0.08);
}

.brand-home-about h2 {
  margin: 10px 0 10px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
}

.brand-home-about p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.58;
}

.topic-strip {
  width: var(--wrap);
  margin: 0 auto clamp(28px, 5vw, 54px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-strip span,
.topic-strip a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 720;
  text-decoration: none;
}

.topic-strip a:hover {
  border-color: rgba(13, 117, 98, 0.4);
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.home-feed {
  width: var(--wrap);
  padding-top: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.35fr) minmax(280px, 0.65fr);
  gap: clamp(16px, 4vw, 48px);
  align-items: end;
  margin-bottom: clamp(18px, 4vw, 34px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
  text-transform: none;
}

.section-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.post-card {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.post-card-featured {
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: clamp(24px, 5vw, 56px);
  padding-bottom: clamp(28px, 5vw, 50px);
}

.post-card-featured:not(.has-post-thumbnail) {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr);
}

.post-card-featured:not(.has-post-thumbnail)::before {
  content: "AI";
  min-height: 280px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark) 58%, var(--accent));
  color: #fff;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 1;
}

.post-card-category {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  text-decoration: none;
}

.post-card-meta {
  margin-bottom: 8px;
}

.post-card-featured .post-card-title {
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 0.98;
}

.post-card-featured .post-card-summary {
  max-width: 620px;
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .brand-home,
  .section-heading,
  .post-card-featured,
  .post-card-featured:not(.has-post-thumbnail) {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .brand-home-about {
    padding: 18px;
  }
}
  .post-grid {
    grid-template-columns: 1fr;
  }

/* Final overrides after legacy blocks. */
.home-feed .post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.single-article {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(240px, 300px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.single-article .entry-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: clamp(24px, 4vw, 46px);
  align-items: start;
  max-width: 980px;
  margin: 0 0 clamp(16px, 3vw, 26px);
}

.single-article .entry-header {
  grid-column: 1;
  max-width: none;
  margin: 0;
}

.single-article .entry-thumbnail {
  grid-column: 2;
  display: block;
  max-width: none;
  margin: 0;
}

.single-article .entry-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.single-article .entry-title {
  max-width: 12em;
  font-size: clamp(1.95rem, 3.7vw, 3.25rem);
  line-height: 1.06;
}

.single-article .entry-content {
  grid-column: 1;
  max-width: 720px;
  margin: 0;
}

.single-article .entry-footer,
.content-article .post-navigation,
.content-article .comments-area {
  grid-column: 1;
  max-width: 720px;
  margin-left: 0;
  margin-right: 0;
}

.single-article .breadcrumbs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: 980px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.single-article .breadcrumbs a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 720;
}

.single-article .breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.single-article .breadcrumbs span:last-child {
  min-width: 0;
  max-width: 52ch;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

@media (max-width: 1120px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .home-feed .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .single-article {
    display: block;
  }

  .single-article .entry-hero {
    grid-template-columns: 1fr;
  }

  .single-article .entry-header,
  .single-article .entry-thumbnail {
    grid-column: auto;
  }

  .single-article .entry-thumbnail img {
    aspect-ratio: 16 / 9;
  }

  .single-article .entry-content,
  .single-article .entry-footer,
  .single-article .breadcrumbs,
  .content-article .post-navigation,
  .content-article .comments-area {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 560px) {
  .home-feed .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Unified reading frame. */
:root {
  --wrap: min(1180px, calc(100% - 32px));
  --article-measure: 720px;
  --article-media: 300px;
  --article-gap: clamp(28px, 5vw, 64px);
}

.content-article {
  width: var(--wrap);
  margin-inline: auto;
}

.single-article {
  width: 100%;
  grid-template-columns: minmax(0, var(--article-measure)) minmax(220px, var(--article-media));
  column-gap: var(--article-gap);
  row-gap: 0;
  justify-content: start;
}

.single-article .breadcrumbs,
.single-article .entry-hero {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.single-article .entry-hero {
  grid-template-columns: minmax(0, var(--article-measure)) minmax(220px, var(--article-media));
  column-gap: var(--article-gap);
  width: 100%;
}

.single-article .entry-header,
.single-article .entry-content,
.single-article .entry-footer,
.content-article .post-navigation,
.content-article .comments-area {
  max-width: var(--article-measure);
  margin-left: 0;
  margin-right: 0;
}

.single-article .entry-title {
  max-width: 11.5em;
}

.page-article.single-article .entry-hero.no-thumbnail {
  grid-template-columns: minmax(0, var(--article-measure));
  width: min(var(--article-measure), 100%);
}

@media (max-width: 760px) {
  .content-article {
    width: min(var(--article-measure), calc(100% - 32px));
  }

  .single-article {
    display: block;
  }

  .single-article .entry-hero {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .single-article .entry-content,
  .single-article .entry-footer,
  .single-article .breadcrumbs,
  .content-article .post-navigation,
  .content-article .comments-area {
    max-width: var(--article-measure);
    margin-left: 0;
    margin-right: 0;
  }
}

/* Mobile header menu. */
.main-navigation {
  margin-left: auto;
}

.menu-toggle {
  display: none;
  margin-left: auto;
}

@media (max-width: 760px) {
  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 60px;
    position: relative;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
  }

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

  .menu-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }

  .menu-toggle-lines,
  .menu-toggle-lines::before,
  .menu-toggle-lines::after {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .menu-toggle-lines {
    position: relative;
  }

  .menu-toggle-lines::before,
  .menu-toggle-lines::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-toggle-lines::before {
    top: -6px;
  }

  .menu-toggle-lines::after {
    top: 6px;
  }

  .site-header.is-menu-open .menu-toggle-lines {
    transform: rotate(45deg);
  }

  .site-header.is-menu-open .menu-toggle-lines::before {
    transform: translateY(6px) rotate(90deg);
  }

  .site-header.is-menu-open .menu-toggle-lines::after {
    opacity: 0;
  }

  .main-navigation {
    width: 100%;
    display: none;
    margin-left: 0;
  }

  .site-header.is-menu-open .main-navigation {
    display: block;
  }

  .main-navigation ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--line);
  }

  .main-navigation a {
    padding: 11px 12px;
    font-size: 1rem;
  }
}

/* Collapsible article contents. */
.diamnato-toc {
  --diamnato-toc-max-height: 260px;
}

.diamnato-article-tools .diamnato-toc-header {
  margin: 0 0 8px;
}

.diamnato-article-tools .diamnato-toc-header h2 {
  margin: 0;
}

.diamnato-toc-toggle {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  margin: 8px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  opacity: 0.78;
}

.diamnato-toc-toggle:hover,
.diamnato-toc-toggle:focus-visible {
  color: var(--brand-dark);
  opacity: 1;
}

.diamnato-toc-toggle::before {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.diamnato-toc.is-expanded .diamnato-toc-toggle::before {
  transform: translateY(2px) rotate(225deg);
}

.diamnato-toc-list {
  max-height: var(--diamnato-toc-max-height);
  overflow: hidden;
  position: relative;
}

.diamnato-toc.is-expanded .diamnato-toc-list {
  max-height: none;
  overflow: visible;
}

.diamnato-toc.is-collapsed .diamnato-toc-list::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 68px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 72%, var(--surface));
}

@media (max-width: 760px) {
  .diamnato-toc {
    --diamnato-toc-max-height: 220px;
  }
}
