/* ============================================================
   the first pancake — theme styles
   Concept: cream paper + espresso ink for reading; the logo's
   TEAL pulled up as the signature accent; maple-amber for
   structure; brick-red as a rare pop. Honors the logo without
   a teal wash.
   ============================================================ */

:root {
  /* surfaces & ink (pancake browns) */
  --paper:        #FBF6EC;   /* cream reading surface   */
  --paper-sunk:   #F3EAD7;   /* code / card / quote bg  */
  --ink:          #241B14;   /* warm espresso near-black*/
  --ink-soft:     #5E5043;   /* muted meta / captions   */

  /* accents (sampled from the logo) */
  --teal:         #0E8C8C;   /* signature accent        */
  --teal-deep:    #0A6A6A;   /* link hover              */
  --maple:        #B26B2E;   /* structural warmth       */
  --brick:        #A6332A;   /* rare pop (the ring)     */

  /* lines */
  --rule:         #E7DCC6;
  --rule-strong:  #D8C7A6;

  --measure: 34rem;          /* ~660px reading column   */
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --serif:   "Newsreader", Georgia, "Times New Roman", serif;
  --mono:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 19px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.4rem;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-deep); }

/* ---------- site header (brand bar) ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; line-height: 1; }
.brand-mark {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  display: block;
  flex: none;
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand-name .one { color: var(--teal); }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1.4rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .01em;
}
.site-nav a { color: var(--ink-soft); }
.site-nav a:hover { color: var(--teal); }
.site-nav .nav-current a { color: var(--ink); }

/* ---------- homepage masthead ---------- */
.masthead { text-align: center; padding: 3.4rem 0 2.6rem; }
.masthead-logo {
  width: clamp(168px, 42vw, 232px);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(36,27,20,.12);
}
.masthead-tagline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 4.5vw, 2.1rem);
  letter-spacing: -.015em;
  margin: 1.5rem 0 .5rem;
  color: var(--ink);
}
.masthead-desc {
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 30rem;
  margin: 0 auto;
}
/* the origin story — how the name happened */
.masthead-origin { max-width: 31rem; margin: 1.3rem auto 0; }
.origin-quote {
  margin: 0; padding: 0; border: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.16rem;
  line-height: 1.5;
  color: #3a3027;
}
.origin-by {
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--maple);
  margin-top: .55rem;
}
.origin-reply {
  font-style: italic;
  font-size: 1.04rem;
  color: var(--ink-soft);
  margin: .85rem 0 0;
}
.masthead-rule {
  width: 60px; height: 3px; margin: 1.8rem auto 0;
  background: var(--maple); border: 0; border-radius: 2px;
}

/* ---------- main / footer ---------- */
.site-main { padding: 2.6rem 0 4rem; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.4rem 0 3rem;
  text-align: center;
}
.footer-brand {
  font-family: var(--display); font-weight: 800;
  font-size: 1rem; letter-spacing: -.01em;
  margin: 0 0 .25rem; color: var(--ink);
}
.footer-brand .one { color: var(--teal); }
.footer-note { margin: 0; color: var(--ink-soft); font-size: .85rem; }
.footer-credit { margin: .5rem 0 0; color: var(--ink-soft); font-size: .78rem; }
.footer-credit a { color: var(--maple); text-decoration: underline; text-underline-offset: 2px; }
.footer-credit a:hover { color: var(--teal); }

/* ---------- featured lead (homepage) ---------- */
.featured { margin: 0 0 2.6rem; }
.featured-link {
  display: block;
  position: relative;
  background: var(--paper-sunk);
  border: 1px solid var(--rule-strong);
  border-left: 5px solid var(--teal);
  border-radius: 14px;
  padding: 1.7rem 1.8rem 1.9rem;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.featured-link:hover {
  box-shadow: 0 10px 30px rgba(36,27,20,.13);
  transform: translateY(-2px);
  border-left-color: var(--maple);
}
.featured-eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--maple);
  margin-bottom: .7rem;
}
.featured-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 0 0 .65rem;
}
.featured-link:hover .featured-title { color: var(--teal-deep); }
.featured-meta {
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-soft);
  margin-bottom: .8rem;
}
.featured-excerpt {
  margin: 0 0 1rem;
  color: #3f352b;
  font-size: 1.1rem;
  line-height: 1.6;
}
.featured-cta {
  font-family: var(--display);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .01em;
  color: var(--teal);
}
.featured-link:hover .featured-cta { color: var(--teal-deep); }

/* ---------- post grid (homepage) ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.3rem 1.4rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.post-card:hover {
  box-shadow: 0 8px 22px rgba(36,27,20,.10);
  transform: translateY(-2px);
  border-color: var(--rule-strong);
}
.post-card-meta {
  font-family: var(--display);
  font-weight: 600;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--maple);
  margin-bottom: .5rem;
}
.post-card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.24rem;
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.post-card-title a { color: var(--ink); }
.post-card:hover .post-card-title a { color: var(--teal); }
.post-card-excerpt {
  margin: 0;
  color: #4a4036;
  font-size: .95rem;
  line-height: 1.55;
}

/* ---------- post list (tag / author archives) ---------- */
.post-list { padding-top: .5rem; }
.post-list-item {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
.post-list-item:first-child { border-top: 0; padding-top: .5rem; }
.post-list-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.post-list-title a { color: var(--ink); }
.post-list-title a:hover { color: var(--teal); }
.post-list-meta {
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--maple);
  margin-bottom: .55rem;
}
.post-list-excerpt { margin: 0; color: #3f352b; font-size: 1.02rem; }

.pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; margin-top: 1rem;
  font-family: var(--display); font-weight: 600; font-size: .85rem;
}

/* ---------- post / page ---------- */
.post { padding-top: .5rem; }
.post-header { margin-bottom: 2rem; }
.post-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 .9rem;
}
.post-meta {
  font-family: var(--display);
  font-weight: 600;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--maple);
}
.post-meta a { color: var(--maple); text-decoration: underline; text-underline-offset: 2px; }

.post-feature-image { margin: 1.8rem 0 0; }
.post-feature-image img { width: 100%; height: auto; border-radius: 10px; display: block; }
.post-feature-image figcaption { text-align: center; color: var(--ink-soft); font-size: .85rem; margin-top: .5rem; }

/* ---------- the point (top-of-article callout) ---------- */
.post-content .article-point {
  position: relative;
  background: var(--paper-sunk);
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  margin: 0 0 2.4rem;
}
.post-content .article-point .ap-label {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--maple);
  margin-bottom: .45rem;
}
.post-content .article-point .ap-text {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.5;
  color: #2c241c;
}
/* keep the lead-paragraph treatment from doubling up under a point */
.post-content .article-point + p { font-size: 1.06rem; line-height: 1.72; color: var(--ink); }

/* ---------- admonition callouts (note / tip / warning) ---------- */
.post-content .callout {
  background: var(--paper-sunk);
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--cl-accent, var(--teal));
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.6rem;
}
.post-content .callout-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--cl-accent, var(--teal));
  margin: 0 0 .5rem;
}
.post-content .callout-title::before {
  content: var(--cl-icon, "\25C9");   /* ◉ */
  margin-right: .45rem;
}
.post-content .callout-body > :last-child { margin-bottom: 0; }
.post-content .callout-body p { font-size: 1.0rem; line-height: 1.6; margin-bottom: .7rem; }
.post-content .callout-note    { --cl-accent: var(--teal-deep); --cl-icon: "\25C9"; }  /* ◉ */
.post-content .callout-tip     { --cl-accent: var(--maple);     --cl-icon: "\25B8"; }  /* ▸ */
.post-content .callout-warning { --cl-accent: var(--brick);     --cl-icon: "\25B2"; }  /* ▲ */

/* ---------- long-form content ---------- */
.post-content { font-size: 1.06rem; }
.post-content > p:first-of-type { font-size: 1.18rem; line-height: 1.6; color: #15110d; }

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content figure,
.post-content pre { margin: 0 0 1.35rem; }

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--display);
  letter-spacing: -.015em;
  line-height: 1.18;
  color: var(--ink);
}
.post-content h2 {
  font-weight: 700;
  font-size: 1.6rem;
  margin: 2.6rem 0 .9rem;
  padding-top: .3rem;
}
/* maple section tick before each h2 */
.post-content h2::before {
  content: "";
  display: block;
  width: 34px; height: 3px;
  background: var(--maple);
  border-radius: 2px;
  margin-bottom: .85rem;
}
.post-content h3 { font-weight: 700; font-size: 1.25rem; margin: 2rem 0 .6rem; }
.post-content h4 { font-weight: 600; font-size: 1.05rem; margin: 1.6rem 0 .5rem; color: var(--ink-soft); }

.post-content a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
  text-decoration-color: rgba(14,140,140,.4);
}
.post-content a:hover { color: var(--teal-deep); text-decoration-color: currentColor; }

.post-content strong { font-weight: 600; color: #15110d; }
.post-content em { font-style: italic; }

.post-content ul, .post-content ol { padding-left: 1.4rem; }
.post-content li { margin: .35rem 0; padding-left: .25rem; }
.post-content ul li::marker { color: var(--maple); }
.post-content ol li::marker { color: var(--maple); font-family: var(--display); font-weight: 700; }

.post-content table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 1.35rem;
  font-size: .92rem;
  line-height: 1.52;
}
.post-content th,
.post-content td {
  vertical-align: top;
  text-align: left;
  padding: .72rem .82rem;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.post-content th {
  font-family: var(--display);
  font-weight: 700;
  font-size: .84rem;
  line-height: 1.35;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
}
.post-content td {
  border-bottom: 1px solid var(--rule);
}
.post-content tr:last-child td {
  border-bottom: 0;
}
.post-content th:first-child,
.post-content td:first-child {
  width: 36%;
}
.post-content th:nth-child(2),
.post-content td:nth-child(2) {
  width: 28%;
}
.post-content th:nth-child(3),
.post-content td:nth-child(3) {
  width: 36%;
}

.post-content blockquote {
  border-left: 3px solid var(--teal);
  padding: .2rem 0 .2rem 1.3rem;
  margin-left: 0;
  font-style: italic;
  font-size: 1.15rem;
  color: #2c241c;
}
.post-content blockquote p:last-child { margin-bottom: 0; }

/* horizontal rule → centered syrup-drip motif */
.post-content hr {
  border: 0;
  text-align: center;
  margin: 2.6rem 0;
}
.post-content hr::after {
  content: "· · ·";
  color: var(--maple);
  letter-spacing: .4em;
  font-size: 1.1rem;
}

.post-content code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: .08em .4em;
}
.post-content pre {
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.55;
  background: #2A211A;
  color: #F3EAD7;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
}
.post-content pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }

.post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.post-content figcaption { text-align: center; color: var(--ink-soft); font-size: .85rem; margin-top: .5rem; }

/* tags footer */
.post-tags {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.post-tag {
  font-family: var(--display); font-weight: 600;
  font-size: .76rem;
  color: var(--ink-soft);
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .2rem .7rem;
}
.post-tag:hover { color: var(--teal); border-color: var(--teal); }

/* ---------- small screens ---------- */
@media (max-width: 680px) {
  .post-grid { grid-template-columns: 1fr; gap: 1.1rem; }
}

@media (max-width: 540px) {
  html { font-size: 18px; }
  .site-nav ul { gap: 1rem; }
  .post-list-title { font-size: 1.4rem; }
  .featured-link { padding: 1.4rem 1.4rem 1.5rem; }
  .post-content table {
    font-size: .84rem;
    line-height: 1.45;
  }
  .post-content th,
  .post-content td {
    padding: .58rem .56rem;
  }
}

/* ============================================================
   Ghost card width utilities (required by GScan)
   .kg-width-wide  — break out of the reading column slightly
   .kg-width-full  — full viewport bleed
   ============================================================ */
.kg-width-wide {
  width: 85vw;
  max-width: 1200px;
  margin-left: calc(50% - 42.5vw);
  margin-right: calc(50% - 42.5vw);
}

.kg-width-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Ensure images inside these containers scale correctly */
.kg-width-wide img,
.kg-width-full img {
  width: 100%;
  height: auto;
  display: block;
}
