/* ============================================================
   pivotalreadout.com stylesheet. Shared by every generated page.

   PART 1 is the CSS of the original hand-written index.html. Its rules are
   unchanged except that pixel sizes are written in rem, so the whole page
   can scale with the screen (see "Scaling" just below).
   PART 2 (at the end) is what the multi-page site added.
   ============================================================ */

/* ---------------- Scaling ----------------
   Every size in this file is in rem, so this one line sets the scale of the
   whole page: text, column width and spacing together.

     - up to about 1280px wide: 100%, the original design size
     - wider than that: grows steadily with the window
     - from about 2560px wide: stops at 175%

   To change it: the first value is the smallest scale, the last the largest,
   and the middle one sets how fast it grows in between. */
html {
  font-size: clamp(100%, 0.9375vw + 0.25rem, 175%);
}

/* ---------------- PART 1: original page CSS (sizes in rem) ---------------- */

:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #475569;
  --subtle: #e2e8f0;
  --maxw: 47.5rem;

  /* Focus ring (highly visible) */
  --focus: #1d4ed8;
  --focus-shadow: rgba(29, 78, 216, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.125rem;
  text-rendering: optimizeLegibility;
}

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: #ffffff;
  border: 1px solid var(--subtle);
  color: var(--fg);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 120ms ease-out;
  z-index: 9999;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 0.375rem var(--focus-shadow);
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.5rem;
}

header {
  margin-bottom: 0.5rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.25rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tagline {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.body {
  max-width: 68ch;
  margin-bottom: 2.25rem;
}

.section {
  border-top: 1px solid var(--subtle);
  padding-top: 1.5rem;
  margin-top: 1.75rem;
}

.section h2 {
  margin: 0 0 0.625rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.case {
  font-size: 1rem;
  max-width: 72ch;
}

.case h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.meta {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.meta li {
  margin: 0.125rem 0;
}

.label {
  display: inline-block;
  min-width: 6.75rem;
  color: var(--muted);
}

.pivotal-take {
  margin: 0 0 0.875rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--subtle);
  border-radius: 0.625rem;
  background: #f8fafc;
}

.pivotal-take strong {
  display: inline-block;
  margin-right: 0.375rem;
}

.case p {
  margin: 0 0 0.75rem;
}

.contact {
  border-top: 1px solid var(--subtle);
  padding-top: 1.25rem;
  font-size: 1rem;
  margin-top: 1.75rem;
}

/* Links: keep your minimalist look but improve affordance + keyboard focus */
a {
  color: var(--fg);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 3px;
}

/* Strong, consistent focus indicator for keyboard users */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 0.375rem var(--focus-shadow);
  border-radius: 0.5rem;
}

footer {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* If user increases text size, avoid layout breaking */
@media (max-width: 420px) {
  .label {
    min-width: 5.75rem;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .skip-link {
    transition: none !important;
  }
}

/* ---------------- PART 2: added for the generated site ---------------- */

/* Site name on inner pages (the home page keeps the large h1) */
.site-header {
  margin-bottom: 1.25rem;
}
.site-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-name a {
  text-decoration: none;
}
.site-name a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Way back to the home page */
.crumbs {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.crumbs a {
  color: var(--muted);
}

/* Page titles on inner pages */
.case h1.case-title,
h1.page-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.listing-note {
  margin: 0 0 0.75rem;
  max-width: 68ch;
  font-size: 1rem;
  color: var(--muted);
}

/* Lists of readouts (home page, practice area pages, topic pages) */
.listing {
  margin: 0 0 1.5rem;
}
.listing + .listing {
  padding-top: 1.5rem;
  border-top: 1px solid var(--subtle);
}
.listing .pivotal-take {
  margin-bottom: 0;
}
.listing-summary {
  margin: 0;
}
h1.page-title ~ .listing:first-of-type,
.listing-note + .listing {
  margin-top: 1.25rem;
}
.empty-note {
  font-size: 1rem;
  color: var(--muted);
}

/* Practice areas and topics under a readout */
.filed-under {
  margin: 1.25rem 0 0;
  padding-top: 0.875rem;
  border-top: 1px solid var(--subtle);
}

/* Contact block (these were inline styles on the original page) */
.section-title {
  margin: 0 0 0.625rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.disclaimer {
  max-width: 60ch;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Markdown extras inside a readout's text */
.case h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.125rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
}
.case ul:not(.meta),
.case ol {
  margin: 0 0 0.75rem;
  padding-left: 1.5em;
}
.case blockquote {
  margin: 0 0 0.75rem;
  padding-left: 0.875rem;
  border-left: 3px solid var(--subtle);
  color: var(--muted);
}
