/* ===========================================================
   Reading the Water : internexio.com
   Distinct from kpt-theme: navy field, green accent, editorial
   =========================================================== */

:root {
  --navy:        #0d1b3e;
  --navy-soft:   #16264f;
  --green:       #69BE27;
  --green-dark:  #58a41f;
  --ink:         #10151f;
  --muted:       #5d6980;
  --rule:        #e4e8ef;
  --paper:       #ffffff;
  --paper-warm:  #f7f8fa;

  --measure:  1100px;
  --narrow:   700px;
  --radius:   10px;

  --sans:    "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: var(--narrow); }
a { color: inherit; text-decoration: none; }

/* --- nav --------------------------------------------------- */
.site-nav { background: var(--navy); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.nav-brand { color: #fff; font-weight: 700; font-size: .98rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.nav-brand-mark { width: 9px; height: 9px; background: var(--green); border-radius: 2px; transform: rotate(45deg); }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-link { color: rgba(255,255,255,.72); font-size: .88rem; transition: color .15s; }
.nav-link:hover { color: #fff; }

/* --- hero: compact navy band, left aligned ----------------- */
.hero { background: var(--navy); color: #fff; padding: 56px 0 64px; border-bottom: 3px solid var(--green); }
.hero-kicker { display: inline-block; color: var(--green); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.hero-title { font-family: var(--display); color: #fff; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 14px; }
.hero-sub { color: rgba(255,255,255,.76); font-size: 1.06rem; max-width: 46ch; margin: 0; }

/* --- shared bits ------------------------------------------- */
.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.meta-dot { opacity: .5; }
.chip { display: inline-block; background: rgba(105,190,39,.14); color: var(--green-dark); font-size: .69rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 4px; }
.chip-link:hover { background: rgba(105,190,39,.26); }
.more { color: var(--green-dark); font-weight: 600; font-size: .9rem; }

/* --- feed -------------------------------------------------- */
.feed { padding: 56px 24px 72px; }

.lead { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--rule); }
.lead-img { border-radius: var(--radius); overflow: hidden; background: var(--paper-warm); aspect-ratio: 16/10; }
.lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.lead:hover .lead-img img { transform: scale(1.03); }
.lead-title { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 0 0 12px; }
.lead-excerpt { color: var(--muted); margin: 0 0 16px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-img { border-radius: var(--radius); overflow: hidden; background: var(--paper-warm); aspect-ratio: 16/10; margin-bottom: 14px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-title { font-family: var(--display); font-size: 1.07rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; margin: 0 0 8px; }
.card:hover .card-title { color: var(--green-dark); }
.card-excerpt { color: var(--muted); font-size: .9rem; margin: 0; }
.card-flat { border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; transition: border-color .2s; }
.card-flat:hover { border-color: var(--green); }

/* --- post -------------------------------------------------- */
.post-head { padding: 52px 0 28px; }
.post-title { font-family: var(--display); font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 16px; }
.post-standfirst { font-size: 1.16rem; color: var(--muted); margin: 0; }
.post-hero { margin-bottom: 40px; }
.post-hero img { width: 100%; border-radius: var(--radius); display: block; }
.post-hero figcaption { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 10px; }

.post-body { font-size: 1.09rem; line-height: 1.75; }
.post-body h2 { font-family: var(--display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 44px 0 14px; }
.post-body h3 { font-family: var(--display); font-size: 1.22rem; font-weight: 700; margin: 32px 0 10px; }
.post-body p { margin: 0 0 20px; }
.post-body a { color: var(--green-dark); border-bottom: 1px solid rgba(105,190,39,.4); }
.post-body a:hover { border-bottom-color: var(--green); }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.post-body blockquote { border-left: 3px solid var(--green); padding-left: 20px; margin: 28px 0; color: var(--muted); font-size: 1.1rem; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body code { background: var(--paper-warm); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.post-body pre { background: var(--navy); color: #e8edf5; padding: 18px; border-radius: var(--radius); overflow-x: auto; margin: 0 0 20px; }
.post-body pre code { background: none; padding: 0; }

.post-foot { padding: 36px 24px 8px; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.byline { border-top: 1px solid var(--rule); padding-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.byline-name { font-weight: 700; }
.byline-sub { color: var(--muted); font-size: .9rem; }

.more-reading { padding: 48px 24px 64px; }
.more-reading-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }

/* --- bridge CTA -------------------------------------------- */
.bridge { background: var(--paper-warm); border-top: 1px solid var(--rule); }
.bridge-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 32px 24px; flex-wrap: wrap; }
.bridge-title { font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
.bridge-sub { color: var(--muted); font-size: .9rem; margin: 0; max-width: 60ch; }
.bridge-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 10px 22px; border-radius: 8px; font-weight: 600; font-size: .9rem; transition: all .18s; }
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--green-dark); }
.btn-ghost { border: 2px solid var(--navy); color: var(--navy); padding: 8px 20px; }
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* --- footer ------------------------------------------------ */
.site-footer { background: var(--navy); color: rgba(255,255,255,.62); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 26px 24px; gap: 16px; flex-wrap: wrap; font-size: .86rem; }
.footer-brand { color: #fff; font-weight: 700; }

/* --- pagination -------------------------------------------- */
.pagination { display: flex; justify-content: center; gap: 16px; align-items: center; padding: 48px 0 0; font-size: .9rem; color: var(--muted); }
.pagination a { color: var(--green-dark); font-weight: 600; }

/* --- responsive -------------------------------------------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .lead { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 600px) {
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 44px; }
  .bridge-inner { flex-direction: column; align-items: flex-start; }
}

/* --- Koenig editor image widths (required by gscan) ------- */
.post-body :where(.kg-width-wide) {
  width: min(96vw, 1000px);
  margin-inline: calc(50% - min(48vw, 500px));
  max-width: none;
}
.post-body :where(.kg-width-full) {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  max-width: none;
  border-radius: 0;
}
.post-body :where(.kg-image-card, .kg-card) { margin: 28px 0; }
.post-body :where(.kg-image-card figcaption, .kg-card figcaption) {
  text-align: center; color: var(--muted); font-size: .84rem; margin-top: 10px;
}

/* --- mobile nav: stack brand, scroll links, never wrap ----- */
@media (max-width: 760px) {
  .nav-inner {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-block: 14px;
  }
  .nav-links {
    width: 100%;
    gap: 18px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; padding-block: 6px; }
  .nav-brand { white-space: nowrap; }
}
