/* ===========================================================
   astrologyprompt.com site-v4 — Deep Ochre & Parchment
   ===========================================================
   Per Daniel's Stitch design brief 2026-05-04:
   - Utilitarian + warm + professional
   - Inspired by high-end print manuals
   - Strict square corners (0px border-radius)
   - 1px solid borders, no shadows
   - IBM Plex Serif headings + IBM Plex Sans body + JetBrains Mono code
   =========================================================== */

/* ---- Color tokens ------------------------------------------------------- */
:root {
  --ochre:        #B45309;  /* primary accent — links, inline code, active nav, CTAs */
  --ochre-hover:  #92400E;  /* darker for hover */
  --paper:        #FFFFFF;  /* main reading column */
  --parchment:    #FAF9F6;  /* sidebar, code blocks, secondary panels */
  --ink:          #111827;  /* body + headings */
  --muted:        #6B7280;  /* timestamps, inactive nav, secondary metadata */
  --rule:         #E5E7EB;  /* 1px border separator */
}

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

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

body {
  margin: 0;
  background: var(--parchment);   /* shows through the gap above the shell */
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--ochre); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ochre-hover); text-decoration: none; }

/* ---- Typography --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.25;
}
h1 { font-size: 2.25rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.625rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.25rem;  margin: 1.75rem 0 0.5rem; }
h4 { font-size: 1rem;     margin: 1.5rem 0 0.5rem; }

p { margin: 0 0 1rem; }
strong { font-weight: 600; }
em { font-style: italic; }

ul, ol { margin: 1rem 0 1rem 1.5rem; padding: 0; }
li { margin-bottom: 0.4rem; }
ul ul, ol ol { margin-top: 0.4rem; margin-bottom: 0; }

/* ---- Code: inline + blocks --------------------------------------------- */
:not(pre) > code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, monospace;
  font-size: 0.9em;
  color: var(--ochre);
  background: var(--parchment);
  border: 1px solid var(--rule);
  padding: 0.05em 0.4em;
}

pre {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--parchment);
  border: 1px solid var(--rule);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}
pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ---- Skip-to-content (a11y) -------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ochre);
  color: white;
  padding: 8px 12px;
  z-index: 1100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---- Top NAVBAR (deep ochre bg, white anchors) ------------------------- */
.site-navbar {
  background: var(--ochre);
}
.site-navbar .navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-navbar .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--paper);
  text-decoration: none;
}
.site-navbar .brand:hover { color: var(--paper); text-decoration: none; opacity: 0.85; }
.site-navbar nav.primary {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 500;
  font-size: 14px;
}
.site-navbar nav.primary a {
  color: var(--paper);
  text-decoration: none;
}
.site-navbar nav.primary a:hover {
  color: var(--paper);
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---- Page shell: 280px sidebar + content column ------------------------ */
.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  max-width: 1280px;
  margin: 14px auto 0;            /* parchment gap visible between navbar and shell */
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
}

/* ---- Sidebar ----------------------------------------------------------- */
.sidebar {
  background: var(--parchment);
  padding: 2rem 1.5rem 3rem;
}

/* Author's Choice card — top of sidebar
   ----------------------------------------------------------------------
   Departure from v4's strict 0px-radius / no-shadow rule for this single
   component, per Daniel's reference. Treatment: rounded card + soft shadow
   + light-ochre top color bar + circular photo overlapping the bar.
   ---------------------------------------------------------------------- */
.sidebar .author-choice-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.06), 0 8px 16px rgba(17, 24, 39, 0.05);
  padding: 0 1.1rem 1.5rem;
  margin-bottom: 1.75rem;
  text-align: center;
  overflow: hidden;
}
/* Light-ochre top color bar */
.sidebar .author-choice-card::before {
  content: "";
  display: block;
  height: 90px;
  margin: 0 -1.1rem 0;
  background: #F5E6D3;        /* light tint of Deep Ochre */
}
/* Photo absolutely positioned so it overlaps the color bar */
.sidebar .author-choice-card .author-photo {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;          /* circular, overrides v4's strict 0px-radius for this component */
  background: var(--paper);
  object-fit: cover;
  border: 4px solid var(--paper);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
  z-index: 1;
}
.sidebar .author-choice-card .choice-caption {
  font-family: "IBM Plex Sans", sans-serif;
  font-style: normal;
  font-size: 14px;
  color: var(--muted);
  margin: 50px 0 1rem;          /* clears the lower half of the absolutely-positioned photo */
  letter-spacing: 0.005em;
}
/* Ad visual is now an <img> — keep rounded corners + shadow */
.sidebar .author-choice-card img.ad-visual {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
}
.sidebar .author-choice-card .recommendation {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 1rem;
}
.sidebar .author-choice-card .recommendation strong { color: var(--ink); font-weight: 600; }
.sidebar .author-choice-card .download-link {
  display: inline-block;
  font-family: "IBM Plex Sans", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--paper);
  background: var(--ochre);
  border: 1px solid var(--ochre);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sidebar .author-choice-card .download-link:hover {
  color: var(--paper);
  background: var(--ochre-hover);
  border-color: var(--ochre-hover);
  text-decoration: none;
}

/* Sidebar nav */
.sidebar .nav-heading {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.sidebar nav.topics ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar nav.topics li { margin: 0; }
.sidebar nav.topics a {
  display: block;
  padding: 0.4rem 0.75rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  border-left: 2px solid transparent;
}
.sidebar nav.topics a:hover {
  background: var(--paper);
  color: var(--ochre);
}
.sidebar nav.topics a.current {
  color: var(--ochre);
  background: var(--paper);
  border-left-color: var(--ochre);
  font-weight: 600;
}

/* ---- Content column ---------------------------------------------------- */
.content-area {
  background: var(--paper);
  padding: 3rem 2rem 4rem;
  border-radius: 14px;
}
.content {
  max-width: 800px;
  margin: 0 auto;
}
.content > .subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  font-style: italic;             /* styleguide: intro paragraph set in italics */
  margin: 0.25rem 0 2rem;
  line-height: 1.5;
}

/* ---- Out-dented numbered steps (signature element) -------------------- */
ol.steps {
  list-style: none;
  counter-reset: step;
  margin: 1.5rem 0;
  padding: 0;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
  min-height: 2rem;
}
ol.steps > li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ochre);
  line-height: 1.45;
}
ol.steps ol, ol.steps ul { margin-top: 0.5rem; }
ol.steps pre { margin: 0.75rem 0; }

/* ---- Inline "Author's Note" boxes ------------------------------------- */
.author-note {
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ochre);
  padding: 1rem 1.25rem 1.1rem;
  margin: 1.75rem 0;
}
.author-note::before {
  content: "Author's Note";
  display: block;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 0.5rem;
}
.author-note p:last-child { margin-bottom: 0; }
.author-note em { font-style: italic; }

/* ---- Tables ------------------------------------------------------------ */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 14px;
}
.content th, .content td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.85rem;
  text-align: left;
  vertical-align: top;
}
.content th {
  background: var(--parchment);
  font-weight: 600;
  font-family: "IBM Plex Sans", sans-serif;
}

/* ---- Pull quote (used sparingly, italic, ochre rule) ------------------ */
.content blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--ochre);
  font-family: "IBM Plex Serif", serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
}
.content blockquote p { margin: 0; }

/* ---- Related-pages grid (used on Home, available on articles) -------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.guide-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.guide-card:hover {
  border-color: var(--ochre);
  background: var(--parchment);
  color: var(--ink);
  text-decoration: none;
}
.guide-card .guide-title {
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.guide-card:hover .guide-title { color: var(--ochre); }
.guide-card .guide-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- About the author band (also serves as page footer) --------------- */
.about-author {
  background: var(--parchment);
  padding: 2.5rem 1.5rem 2.75rem;
}
.about-author .inner {
  max-width: 1000px;
  margin: 0 auto;
}
.about-author h2 {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1.5rem;
}
.about-author .row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}
@media (min-width: 640px) {
  .about-author .row {
    flex-direction: row;
    gap: 1.75rem;
    align-items: flex-start;
  }
}
.about-author .photo-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.about-author img.portrait {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--paper);
  object-fit: cover;
  border: 1px solid var(--rule);
  display: block;
}
.about-author .socials {
  display: flex;
  gap: 0.5rem;
}
.about-author .socials a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--muted);
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease;
}
.about-author .socials a:hover {
  color: var(--ochre);
  border-color: var(--ochre);
}
.about-author .socials svg { width: 14px; height: 14px; }
.about-author .bio {
  font-family: "IBM Plex Serif", serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  flex-grow: 1;
}
.about-author .bio em { font-style: italic; }
.about-author .bio a { color: var(--ochre); }

/* Colophon row inside the about-author footer (copyright + nav) */
.about-author .colophon {
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .about-author .colophon {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.about-author .colophon a { color: var(--ochre); text-decoration: none; }
.about-author .colophon a:hover { text-decoration: underline; }
.about-author .colophon nav { display: flex; gap: 1.25rem; }

/* ---- Print -------------------------------------------------------------- */
@media print {
  .site-navbar, .sidebar, .about-author { display: none; }
  .shell { display: block; }
  .content-area { padding: 0; }
  body { font-size: 11pt; color: black; background: white; }
}
