/*
Theme Name: Yolkmeet Editorial
Theme URI: https://www.yolkmeet.com/
Author: YOLKMEET
Description: Restrained editorial theme for operator-tech field guides, automation playbooks, workflow comparisons, and AdSense-safe reading layouts.
Version: 0.1.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.3
Text Domain: yolkmeet-editorial
*/

:root {
  --ink: #1D1B18;
  --ink-soft: #514D47;
  --paper: #F8F5EF;
  --paper-raised: #FFFDF8;
  --line: #D9D0C1;
  --accent: #0E6F68;
  --accent-strong: #0A4E49;
  --signal: #B84A2B;
  --note: #E6D8A8;
  --code-bg: #20211F;
  --code-fg: #F4EFE5;
  --page-width: 1180px;
  --content-width: var(--page-width);
  --article-width: 720px;
  --wide-width: 1040px;
  --rail-width: 280px;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 18px;
  --text-lg: 22px;
  --text-xl: 30px;
  --text-2xl: 42px;
  --text-3xl: 56px;
  --radius: 6px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 48px;
  --gap-xl: 64px;
  --shadow-line: 0 1px 0 var(--line);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  letter-spacing: 0;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.68;
}

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

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--ink-soft);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--gap-md);
  align-items: end;
  padding: 22px 0 14px;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  text-decoration: none;
}

.site-brand__name {
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.95;
  letter-spacing: 0;
}

.site-brand__deck,
.site-nav,
.topic-strip,
.post-meta,
.eyebrow,
.footer-grid,
.button,
.taxonomy-list,
.topic-link {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-brand__deck {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
  font-size: 14px;
  line-height: 1.35;
}

.site-nav a,
.topic-strip a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.topic-strip a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 0 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap-lg);
  padding: 36px 0 var(--gap-xl);
}

.home-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap-md);
  align-items: start;
}

.home-layout > div {
  grid-column: span 8;
}

.home-layout > .rail {
  grid-column: span 4;
}

.home-brief,
.lead-story {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.home-brief {
  margin-bottom: 24px;
}

.representative-guides,
.editorial-standards {
  margin: 22px 0 24px;
}

.representative-guides h2,
.editorial-standards h2 {
  font-size: 28px;
}

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

.topic-discovery {
  margin: 22px 0 24px;
  padding: 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topic-discovery h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.topic-link {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topic-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.topic-link span {
  font-weight: 700;
}

.topic-link small {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.editorial-standards {
  padding: 18px;
  background: color-mix(in srgb, var(--note) 28%, var(--paper-raised));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.editorial-standards ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.latest-story {
  margin-top: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--signal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.55em;
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(32px, 7vw, 56px);
}

h2 {
  font-size: clamp(24px, 4vw, 34px);
}

h3 {
  font-size: 24px;
}

p {
  margin: 0 0 1.1em;
}

.dek {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1.45;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

.breadcrumb a {
  color: var(--accent-strong);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.post-list {
  display: grid;
  gap: var(--gap-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.story-card h2,
.story-card h3 {
  margin: 0;
}

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

.story-card a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.story-card p {
  color: var(--ink-soft);
  font-size: 16px;
}

.rail {
  display: grid;
  gap: var(--gap-sm);
}

.rail-panel,
.callout,
.author-box,
.source-note,
.update-log,
.related-posts {
  padding: 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rail-panel h2,
.rail-panel h3 {
  font-size: 22px;
}

.taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.taxonomy-list a {
  display: inline-flex;
  padding: 5px 8px;
  color: var(--accent-strong);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--article-width)) var(--rail-width);
  gap: 40px;
  align-items: start;
  justify-content: center;
}

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

.article-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.quick-answer {
  margin: 24px 0;
  padding: 18px 18px 18px 20px;
  background: var(--paper-raised);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.quick-answer strong {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.toc {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.toc h2 {
  margin-bottom: 10px;
  font-size: 20px;
}

.toc ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.article-content {
  max-width: var(--article-width);
  overflow-wrap: anywhere;
}

.article-content > * {
  max-width: var(--article-width);
}

.article-content .alignwide,
.comparison-table,
.wide-block {
  width: min(var(--wide-width), 100%);
  max-width: var(--wide-width);
}

.article-content table,
.comparison-table table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.table-wrap,
.article-content .wp-block-table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: var(--note);
  color: var(--ink);
}

tr:nth-child(even) td {
  background: var(--paper-raised);
}

pre,
code {
  font-family: "IBM Plex Mono", SFMono-Regular, Consolas, monospace;
}

pre {
  max-width: 100%;
  margin: 24px 0;
  padding: 16px;
  overflow-x: auto;
  color: var(--code-fg);
  background: var(--code-bg);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

code {
  padding: 0.08em 0.25em;
  background: color-mix(in srgb, var(--note) 55%, transparent);
  border-radius: 4px;
}

pre code {
  padding: 0;
  background: transparent;
}

.code-copy {
  margin: -16px 0 8px auto;
  color: var(--code-fg);
  background: transparent;
  border-color: color-mix(in srgb, var(--code-fg) 35%, transparent);
}

.article-rail {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.article-rail h2,
.article-rail h3 {
  font-size: 20px;
}

.citation-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 20px;
  overflow-wrap: anywhere;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.source-note__empty {
  color: var(--ink-soft);
  font-size: 15px;
}

.faq-block {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq-block h2 {
  margin-bottom: 4px;
}

.faq-block details {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.faq-block summary {
  cursor: pointer;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
}

.faq-block p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

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

.search-form input[type="search"] {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.button,
.search-form input[type="submit"],
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--paper-raised);
  background: var(--accent-strong);
  border: 1px solid var(--accent-strong);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

.footer-grid a {
  color: var(--ink);
}

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

@media (max-width: 1040px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-rail {
    position: static;
  }
}

@media (max-width: 900px) {
  html {
    font-size: 17px;
  }

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

  .home-layout > div,
  .home-layout > .rail {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .site-shell {
    width: min(100% - 24px, var(--content-width));
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .page-grid {
    padding-top: 24px;
  }

  .dek {
    font-size: 19px;
  }

  .post-list--compact,
  .topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-card,
  .rail-panel,
  .callout,
  .author-box,
  .source-note,
  .faq-block,
  .update-log,
  .related-posts,
  .editorial-standards {
    padding: 14px;
  }

  .article-content table,
  .comparison-table table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .article-content th,
  .article-content td,
  .comparison-table th,
  .comparison-table td {
    min-width: 140px;
  }

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