/*
 * Minimal site-specific styles that supplement your main style.css.
 * These cover layout and structural elements specific to the Hugo site.
 * Keep this file thin - all visual styling should come from style.css.
 */

/* Layout */
.container {
  width: min(1320px, calc(100vw - 3rem));
  margin: 0 auto;
  padding: 1rem 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border, #2e3140);
  padding: 0.75rem 1.5rem;
}
.header-inner {
  width: min(1320px, calc(100vw - 3rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text, #e6e8f0);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 1.25rem;
}
.nav-link {
  color: var(--text-dim, #8b8fa3);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent, #6c7bff);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text, #e6e8f0);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}
.hero h1 {
  font-size: 2rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}
.hero p {
  color: var(--text-dim, #8b8fa3);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 2rem 0;
}
.section > h1,
.section > h2 {
  text-align: center;
}
.section > p {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

/* Cards */
.card {
  background: var(--bg-card, #1a1d28);
  border: 1px solid var(--border, #2e3140);
  border-radius: var(--radius, 6px);
  overflow: hidden;
}
.card.post-card,
.card.resource-card,
.card.tool-card {
  overflow: visible;
}
.card-body {
  padding: 1.25rem;
}
.card-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim, #8b8fa3);
}

/* Tags & badges */
.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--bg-input, #262936);
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--text-dim, #8b8fa3);
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--accent, #6c7bff);
  color: #fff;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--accent, #6c7bff);
  color: #fff;
  border: none;
  border-radius: var(--radius, 6px);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover {
  background: var(--accent-hover, #8590ff);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border, #2e3140);
  color: var(--text, #e6e8f0);
}
.btn-outline:hover {
  border-color: var(--accent, #6c7bff);
  color: var(--accent, #6c7bff);
}
.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}

/* Tool card highlight */
.tool-card--highlight {
  border-color: var(--accent, #6c7bff);
  background:
    radial-gradient(1200px 340px at 20% -10%, rgba(108, 123, 255, 0.18), transparent 45%),
    var(--bg-card, #1a1d28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}
.tool-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent, #6c7bff);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius, 6px) 0 var(--radius, 6px) 0;
}
.tool-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
.tool-highlights {
  margin: 0.75rem 0 1rem;
  padding-left: 1.1rem;
}
.tool-highlights li {
  margin: 0.3rem 0;
  color: var(--text-dim, #8b8fa3);
}

.resource-downloads {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border, #2e3140);
  border-radius: var(--radius, 6px);
  background: var(--bg-card, #16181f);
}
.resource-downloads h2 {
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
}
.resource-downloads-note {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 52rem;
}
.download-list {
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
}
.download-list li {
  margin: 0.45rem 0;
}

/* Excel toolkit resource: section template download buttons (HTML in Markdown) */
.post-content .excel-template-download-wrap {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.post-content .excel-template-download-wrap .text-dim {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 0.92em;
  line-height: 1.45;
}

/* Post content (blog, resources, and other pages using .post / .post-content) */
.post-header {
  margin-bottom: 1.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border, #2e3140);
}
.post-header--with-inline-logo .post-header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  min-width: 0;
}
.post-header--with-inline-logo .post-header-title-row h1 {
  flex: 1 1 0;
  margin-bottom: 0;
  min-width: 0;
}
.post-header-inline-logo {
  flex-shrink: 0;
  display: block;
  margin: 0;
  min-width: 0;
  object-fit: contain;
  object-position: center right;
}
.post-header-inline-logo--blog {
  width: 90px;
  height: 90px;
  max-width: 90px;
  max-height: 90px;
}
.post-header-inline-logo--resource {
  width: auto;
  height: auto;
  max-height: 48px;
  max-width: min(252px, 42vw);
}
.post-header-inline-logo--tools {
  width: auto;
  height: auto;
  max-height: 96px;
  max-width: min(504px, 42vw);
  margin-top: -0.35rem;
  margin-right: -0.35rem;
  object-position: top right;
}
.post-header h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}
.post {
  max-width: 980px;
  margin: 0 auto;
}
/* Resource / generic single: title outside .post-header */
.post > h1:first-child {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #2e3140);
}
/* Prose: fixed px — no vw, so width never rescales body copy (editor panels, DevTools, etc.) */
.post-content {
  line-height: 1.82;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.post-content p,
.post-content li {
  font-size: inherit;
}
.post-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
.post-content a:hover {
  text-decoration-thickness: 2px;
}
.post-content > p {
  margin: 0 0 1.15em;
}
.post-content > p:last-child {
  margin-bottom: 0;
}
.post-content h2 {
  margin-top: 2.35rem;
  margin-bottom: 0.5rem;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
}
.post-content h3 {
  margin-top: 1.65rem;
  margin-bottom: 0.4rem;
  font-size: 20px;
  font-weight: 600;
}
.post-content hr {
  border: none;
  height: 1px;
  margin: 2.5rem 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border, #2e3140) 12%,
    var(--border, #2e3140) 88%,
    transparent
  );
}
.post-content pre {
  background: var(--bg-input, #262936);
  padding: 1rem 1.1rem;
  border-radius: var(--radius, 6px);
  overflow-x: auto;
  font-size: 0.88em;
  line-height: 1.55;
  border: 1px solid var(--border, #2e3140);
}
.post-content code {
  font-family: var(--font-mono, monospace);
  font-size: 0.88em;
}
.post-content blockquote {
  border-left: 4px solid var(--accent, #6c7bff);
  margin: 1.35rem 0;
  padding: 1rem 1.1rem 1rem 1.25rem;
  background: color-mix(in srgb, var(--accent, #6c7bff) 7%, var(--bg-card, #1a1d28));
  border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0;
  color: var(--text, #e6e8f0);
  font-size: 1.05em;
  line-height: 1.68;
}
.post-content blockquote p {
  margin: 0 0 0.65em;
}
.post-content blockquote p:last-child {
  margin-bottom: 0;
}
.post-content ul,
.post-content ol {
  margin: 0.85em 0 1.15em;
  padding-left: 1.35rem;
}
.post-content li {
  margin: 0.35em 0;
}
.post-content strong {
  color: var(--text, #e6e8f0);
  font-weight: 600;
}

/* Diagrams and figures: stay within prose width on all viewports */
.post-content img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 1.35rem auto;
  border-radius: var(--radius, 6px);
  border: 1px solid var(--border, #2e3140);
  box-sizing: border-box;
}
.post-content figure {
  margin: 1.5rem 0;
  max-width: 100%;
}
.post-content figure img {
  margin: 0 auto;
}
.post-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.9em;
  line-height: 1.5;
  color: var(--text-dim, #8b8fa3);
  text-align: center;
}

/* Markdown tables (Goldmark): explicit borders and spacing — global resets often strip table defaults */
.post-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.35rem 0;
  font-size: 0.9em;
  line-height: 1.45;
  border: 1px solid var(--border, #2e3140);
  border-radius: var(--radius, 6px);
  overflow: hidden;
  background: var(--bg-card, #1a1d28);
}
.post-content thead th {
  text-align: left;
  font-weight: 600;
  color: var(--text, #e6e8f0);
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border, #2e3140);
  background: color-mix(in srgb, var(--bg-input, #262936) 85%, var(--bg-card, #1a1d28));
}
.post-content tbody td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border, #2e3140);
  vertical-align: top;
  color: var(--text, #e6e8f0);
  word-break: break-word;
}
.post-content tbody tr:last-child td {
  border-bottom: none;
}
.post-content tbody tr:hover td {
  background: color-mix(in srgb, var(--accent, #6c7bff) 5%, transparent);
}

/* Excel toolkit resource: HTML summary tables and display formulas */
.post-content .math-display {
  margin: 1.15rem 0;
  padding: 0.75rem 1rem;
  font-size: 0.95em;
  line-height: 1.55;
  background: color-mix(in srgb, var(--bg-input, #262936) 70%, var(--bg-card, #1a1d28));
  border: 1px solid var(--border, #2e3140);
  border-radius: var(--radius, 6px);
  overflow-x: auto;
}
.post-content .table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
  -webkit-overflow-scrolling: touch;
}
.post-content table.excel-resource-table {
  min-width: 36rem;
}
.post-content table.excel-resource-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--text, #e6e8f0);
}
.post-content figure.excel-resource-figure {
  margin: 1.25rem 0;
}
.post-content figure.excel-resource-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.post-content figure.excel-resource-figure figcaption {
  margin-top: 0.55rem;
  font-weight: 600;
  color: var(--text, #e6e8f0);
}

@media (max-width: 520px) {
  .post-content table {
    font-size: 0.82em;
  }
  .post-content thead th,
  .post-content tbody td {
    padding: 0.45rem 0.55rem;
  }
  .post-header--with-inline-logo .post-header-title-row {
    flex-direction: column;
    align-items: stretch;
  }
  .post-header-inline-logo--blog {
    align-self: flex-end;
  }
  .post-header-inline-logo--resource {
    align-self: flex-end;
    max-height: 42px;
    max-width: min(222px, 78vw);
  }
  .post-header-inline-logo--tools {
    align-self: flex-end;
    max-height: 84px;
    max-width: min(444px, 78vw);
    margin-top: -0.25rem;
    margin-right: -0.25rem;
    object-position: top right;
  }
  .post-header h1,
  .post > h1:first-child {
    font-size: 26px;
  }
  .post-content {
    font-size: 17px;
  }
  .post-content h2 {
    font-size: 22px;
  }
  .post-content h3 {
    font-size: 18px;
  }
}

/* Blog index cards: slightly larger excerpt text */
.post-card .card-body p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim, #8b8fa3);
}
.post-card .card-body h3 {
  font-size: 17px;
  margin: 0.35rem 0 0.5rem;
}

/* Listing cards: logos (bare img — no box; min-width:0 avoids flex intrinsic blowout) */
.card-head-logo-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.35rem;
  min-width: 0;
}
.card-head-logo-row-main {
  flex: 1 1 0;
  min-width: 0;
}
.card-head-logo-row-main .card-meta {
  margin-bottom: 0.35rem;
}
.card-head-logo-row-main h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}
.card-head-logo {
  flex-shrink: 0;
  display: block;
  margin: 0;
  min-width: 0;
  object-fit: contain;
  object-position: center right;
}
.card-head-logo--blog {
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
}
.card-head-logo--resource {
  width: auto;
  height: auto;
  max-height: 36px;
  max-width: min(144px, 34%);
}
.card-head-logo--tools {
  width: auto;
  height: auto;
  max-height: 72px;
  max-width: min(288px, 34%);
  margin-left: auto;
  margin-top: -0.5rem;
  margin-right: -0.75rem;
  object-position: top right;
  align-self: flex-start;
}

@media (max-width: 520px) {
  .card-head-logo-row {
    flex-wrap: wrap;
  }
  .card-head-logo--blog {
    align-self: flex-end;
  }
  .card-head-logo--resource {
    align-self: flex-end;
    max-height: 33px;
    max-width: min(132px, 40%);
  }
  .card-head-logo--tools {
    align-self: flex-start;
    margin-top: -0.35rem;
    margin-right: -0.55rem;
    max-height: 66px;
    max-width: min(264px, 40%);
  }
}

.post-tags {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #2e3140);
}

/* Embedded WASM tool */
.wasm-app-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 1rem 0 0.65rem;
}
.wasm-app-toolbar-link {
  font-size: 0.85rem;
  color: var(--text-dim, #8b8fa3);
  text-decoration: none;
}
.wasm-app-toolbar-link:hover {
  color: var(--accent, #6c7bff);
  text-decoration: underline;
}

/* CTA blocks */
.cta-block {
  background: var(--bg-card, #1a1d28);
  border: 1px solid var(--border, #2e3140);
  border-radius: var(--radius, 6px);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}
/* Kit (ConvertKit) newsletter embed — footer CTA */
.newsletter-kit-embed {
  margin: 1.25rem auto 0;
  max-width: 640px;
  text-align: left;
}
.newsletter-kit-embed .formkit-form {
  margin: 0 auto;
  max-width: 100%;
}
.newsletter-kit-embed .formkit-form [data-style="clean"] {
  width: 100%;
}
.newsletter-kit-embed .formkit-alert {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius, 6px);
  border: 1px solid var(--border, #2e3140);
  font-size: 0.9rem;
  text-align: center;
}
.newsletter-kit-embed .formkit-alert:empty {
  display: none;
}
.newsletter-kit-embed .formkit-alert-success {
  background: color-mix(in srgb, #10bf7a 12%, transparent);
  border-color: color-mix(in srgb, #10bf7a 45%, var(--border, #2e3140));
  color: var(--text, #e6e8f0);
}
.newsletter-kit-embed .formkit-alert-error:not(:empty) {
  background: color-mix(in srgb, #f2643b 12%, transparent);
  border-color: color-mix(in srgb, #f2643b 45%, var(--border, #2e3140));
  color: var(--text, #e6e8f0);
}
.newsletter-kit-embed .formkit-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  margin: 0;
}
.newsletter-kit-embed .formkit-field {
  flex: 1 1 200px;
  margin: 0;
  min-width: 0;
}
.newsletter-kit-embed .formkit-input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  line-height: 1.35;
  border-radius: var(--radius, 6px);
  border: 1px solid var(--border, #2e3140);
  background: var(--bg-input, #262936);
  color: var(--text, #e6e8f0);
  transition: border-color 0.2s ease;
}
.newsletter-kit-embed .formkit-input:focus {
  outline: none;
  border-color: var(--accent, #6c7bff);
}
.newsletter-kit-embed .formkit-input::placeholder {
  color: var(--text-dim, #8b8fa3);
}
.newsletter-kit-embed .formkit-submit {
  flex: 0 1 auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius, 6px);
  background: var(--accent, #6c7bff);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  min-height: 2.75rem;
  min-width: 8rem;
  overflow: hidden;
  transition: filter 0.15s ease;
}
.newsletter-kit-embed .formkit-submit:hover,
.newsletter-kit-embed .formkit-submit:focus {
  filter: brightness(1.08);
  outline: none;
}
.newsletter-kit-embed .formkit-submit > span:last-child {
  display: block;
  padding: 0.65rem 1.25rem;
  transition: opacity 0.25s ease;
}
.newsletter-kit-embed .formkit-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: absolute;
  inset: 0;
  margin: auto;
  height: 0;
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.newsletter-kit-embed .formkit-spinner > div {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.35;
  animation: newsletter-kit-bounce 1.2s ease-in-out infinite both;
}
.newsletter-kit-embed .formkit-spinner > div:nth-child(2) {
  animation-delay: 0.15s;
}
.newsletter-kit-embed .formkit-spinner > div:nth-child(3) {
  animation-delay: 0.3s;
}
.newsletter-kit-embed .formkit-submit[data-active] .formkit-spinner {
  opacity: 1;
  height: 100%;
  width: 100%;
}
.newsletter-kit-embed .formkit-submit[data-active] > span:last-child {
  opacity: 0;
}
.newsletter-kit-embed .formkit-powered-by-convertkit-container {
  margin: 0.65rem 0 0;
  display: flex;
  justify-content: center;
}
.newsletter-kit-embed .formkit-powered-by-convertkit {
  font-size: 0.72rem;
  color: var(--text-dim, #8b8fa3);
  text-decoration: none;
  text-indent: 0;
  white-space: normal;
  width: auto;
  height: auto;
  background: none;
  opacity: 0.85;
}
.newsletter-kit-embed .formkit-powered-by-convertkit:hover {
  color: var(--accent, #6c7bff);
  text-decoration: underline;
  opacity: 1;
}

@keyframes newsletter-kit-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.55);
    opacity: 0.35;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Contact form */
.contact-form {
  max-width: 500px;
}
.contact-form label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-dim, #8b8fa3);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input, #262936);
  border: 1px solid var(--border, #2e3140);
  border-radius: var(--radius, 6px);
  color: var(--text, #e6e8f0);
  font-size: 0.9rem;
}
.contact-form button {
  margin-top: 1rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border, #2e3140);
  margin-top: 2rem;
  padding: 2rem 1.5rem 1rem;
}
.footer-inner {
  width: min(1320px, calc(100vw - 3rem));
  margin: 0 auto;
}
.footer-about {
  margin-bottom: 1rem;
}
.footer-about p {
  color: var(--text-dim, #8b8fa3);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-nav a {
  font-size: 0.85rem;
}
.footer-social {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}
.footer-social a {
  font-size: 0.85rem;
}
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim, #8b8fa3);
  margin-top: 1rem;
}

/* Affiliate box */
.affiliate-box {
  border-left: 3px solid var(--accent, #6c7bff);
  margin: 2rem 0;
}

/* Ad placeholder */
.ad-placeholder {
  margin: 1.5rem 0;
}

/* WASM container */
.wasm-app-container {
  margin: 2rem 0;
}
.tool-page > h1,
.tool-page .post-header h1 {
  margin-bottom: 0.35rem;
}
.tool-page .post-content > h2 {
  margin-top: 2.3rem;
  font-size: 1.45rem;
}
.tool-page .post-content > h2:first-of-type {
  margin-top: 1.7rem;
}
.se-hero {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--accent, #6c7bff) 32%, var(--border, #2e3140));
  border-radius: calc(var(--radius, 6px) + 4px);
  padding: 1.35rem 1.25rem;
  margin-bottom: 1.1rem;
  background:
    linear-gradient(120deg, rgba(108, 123, 255, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(108, 123, 255, 0.08), transparent 46%),
    var(--bg-card, #1a1d28);
}
.se-kicker {
  margin: 0 0 0.35rem;
  color: color-mix(in srgb, var(--accent, #6c7bff) 76%, #ffffff 24%);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.se-hero h2 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.7rem;
  line-height: 1.25;
}
.se-hero p {
  margin: 0;
}
.se-hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.95rem;
}
.se-signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.7rem 0 1.3rem;
}
.se-signal-strip span {
  position: relative;
  display: block;
  padding: 0.55rem 0.75rem 0.55rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--accent, #6c7bff) 35%, var(--border, #2e3140));
  border-radius: var(--radius, 6px);
  background: color-mix(in srgb, var(--bg-card, #1a1d28) 82%, var(--accent, #6c7bff));
  font-size: 0.82rem;
  color: var(--text-dim, #8b8fa3);
}
.se-signal-strip span::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--accent, #6c7bff);
  box-shadow: 0 0 0 3px rgba(108, 123, 255, 0.15);
}
.se-sequence {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 1rem 0 0.7rem;
  padding-top: 2.2rem;
}
.se-sequence::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 1.08rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(108, 123, 255, 0.25), rgba(108, 123, 255, 0.95), rgba(108, 123, 255, 0.25));
}
.se-seq-item {
  position: relative;
  padding-top: 1.65rem;
}
.se-seq-item::before {
  content: counter(se-step);
  counter-increment: se-step;
  position: absolute;
  top: -0.95rem;
  left: 0;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent, #6c7bff) 58%, var(--border, #2e3140));
  background: radial-gradient(circle at 30% 30%, rgba(108, 123, 255, 0.28), rgba(8, 12, 24, 0.98));
  color: var(--accent, #6c7bff);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 2.05rem;
  text-align: center;
  box-shadow: 0 0 0 4px rgba(108, 123, 255, 0.07);
}
.se-seq-item h3 {
  margin: 0 0 0.42rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.se-seq-item p {
  margin: 0;
  color: var(--text-dim, #8b8fa3);
}
.se-sequence {
  counter-reset: se-step;
}
.se-heading-icon {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  display: inline-flex;
  color: var(--accent, #6c7bff);
}
.se-heading-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.se-mode-lanes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.95rem;
}
.se-mode-lanes::before {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: -0.45rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #6c7bff), transparent);
}
.se-mode-lane {
  border: 1px solid var(--border, #2e3140);
  border-top: 2px solid color-mix(in srgb, var(--accent, #6c7bff) 62%, var(--border, #2e3140));
  border-radius: calc(var(--radius, 6px) + 2px);
  padding: 0.95rem;
  background: linear-gradient(180deg, rgba(108, 123, 255, 0.08), transparent 60%);
}
.se-mode-lane h3 {
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.se-mode-lane p {
  margin: 0;
  color: var(--text-dim, #8b8fa3);
}
.se-signal-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.95rem;
}
.se-signal-matrix > div {
  border-left: 2px solid var(--accent, #6c7bff);
  padding: 0.2rem 0 0.2rem 0.75rem;
}
.se-signal-matrix h3 {
  margin: 0 0 0.45rem;
}
.se-signal-matrix ul {
  margin: 0;
  padding-left: 1rem;
}
.se-signal-matrix li {
  margin: 0.28rem 0;
  color: var(--text-dim, #8b8fa3);
}
.se-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.9rem;
}
.se-split > div {
  border: 1px solid var(--border, #2e3140);
  border-radius: calc(var(--radius, 6px) + 2px);
  padding: 0.95rem;
  background: var(--bg-card, #1a1d28);
}
.se-split h3 {
  margin: 0 0 0.45rem;
}
.se-split ul {
  margin: 0;
  padding-left: 1rem;
}
.se-split li {
  margin: 0.3rem 0;
  color: var(--text-dim, #8b8fa3);
}
.se-privacy,
.se-callout {
  border: 1px solid var(--border, #2e3140);
  border-radius: calc(var(--radius, 6px) + 2px);
  padding: 1rem 1.05rem;
  margin-top: 0.8rem;
  background: linear-gradient(180deg, rgba(108, 123, 255, 0.08), transparent 55%);
}
.se-callout {
  border-color: color-mix(in srgb, var(--accent, #6c7bff) 40%, var(--border, #2e3140));
}

.tool-page .se-page-end-cta {
  text-align: left;
  margin-top: 2rem;
}

/* Semantic Explorer instruction walkthrough (shortcode: se-instructions) */
.tool-page .se-instructions {
  margin-top: 0.75rem;
}
.tool-page .se-instructions img {
  display: block;
  box-sizing: border-box;
  width: auto;
  max-width: min(768px, 100%);
  height: auto;
  margin: 1rem auto 1.5rem;
  border-radius: var(--radius, 6px);
  border: 1px solid var(--border, #2e3140);
}

/* Text utility */
.text-dim {
  color: var(--text-dim, #8b8fa3);
}

/* Related posts */
.related-posts {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #2e3140);
}

/* Tag list (taxonomy page) */
.tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 3.5rem;
    right: 1rem;
    background: var(--bg-card, #1a1d28);
    border: 1px solid var(--border, #2e3140);
    border-radius: var(--radius, 6px);
    padding: 0.75rem 1rem;
    z-index: 100;
  }
  .site-nav.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .se-hero h2 {
    font-size: 1.3rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .se-signal-strip,
  .se-sequence,
  .se-mode-lanes,
  .se-signal-matrix,
  .se-split {
    grid-template-columns: 1fr;
  }
  .se-sequence::before {
    left: 8%;
    right: 8%;
  }
  .se-seq-item::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .newsletter-kit-embed .formkit-fields {
    flex-direction: column;
  }
  .newsletter-kit-embed .formkit-submit {
    width: 100%;
    min-width: 0;
  }
}
