/* ============================================================
   Roch Dog Standards — standard.css
   Fonts: Varela Round (headings) / Lato (body) / Figtree (UI)
   Paragraph style: EBS-inspired — 18px, 1.75 line-height,
   text-wrap: pretty, generous measure, well-spaced sections
   ============================================================ */

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

/* ===== BASE ===== */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', 'Figtree', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Varela Round', sans-serif;
  color: #1a1a1a;
  margin: 0 0 0.5em 0;
  line-height: 1.3;
  text-wrap: balance;
}

a {
  color: #B8860B;
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: #9f810f;
  text-decoration: underline;
}

/* ===== NAVIGATION ===== */
.site-nav {
  background: #333;
  border-bottom: 1px solid #444;
  position: relative;
}

.site-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-nav__logo-img {
  height: 32px;
  width: auto;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-family: 'Figtree', 'Lato', sans-serif;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav__links a:hover {
  color: #B8860B;
  text-decoration: none;
}

.site-nav__links a.is-active {
  color: #fff;
}

.site-nav__links a.site-nav__external {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.15s;
}

.site-nav__links a.site-nav__external:hover {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.35);
  text-decoration: none;
}

/* Nav social icons */
.site-nav__socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav__social-link {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.site-nav__social-link:hover {
  opacity: 1;
}

.site-nav__social-link img {
  display: block;
  filter: brightness(0) invert(1);
}

/* Mobile nav toggle */
.site-nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ===== PAGE SHELL ===== */
.page-main {
  flex: 1;
}

/* ===== HERO BAND ===== */
.page-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 52px 24px 48px;
  color: #fff;
}

.page-hero__inner {
  max-width: 760px;
  margin: 0 auto;
}

.page-hero__kicker {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B8860B;
  margin-bottom: 12px;
}

.page-hero__title {
  font-family: 'Varela Round', sans-serif;
  font-size: 2rem;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 14px 0;
  text-wrap: balance;
}

.page-hero__subtitle {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin: 0;
  max-width: 580px;
}

/* ===== MACHINE-READABLE BLOCK ===== */
/* Stable IDs for LLM extraction — must stay at top of article */
.roch-machine-block {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-left: 3px solid #B8860B;
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin-bottom: 40px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #444;
}

.roch-machine-block__label {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B8860B;
  margin-bottom: 6px;
}

.roch-machine-block__text {
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  color: #1a1a1a;
  margin: 0;
  text-wrap: pretty;
}

/* ===== ARTICLE LAYOUT ===== */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

/* ===== ARTICLE TYPOGRAPHY — THE GOOD PARAGRAPHS ===== */
/* EBS-inspired: generous size, open line-height, text-wrap: pretty */

.article-body {
  font-family: 'Lato', sans-serif;
  font-size: 1.125rem;       /* 18px */
  line-height: 1.75;
  color: #333;
}

.article-body p {
  margin: 0 0 1.4em 0;
  text-wrap: pretty;         /* prevents orphaned single words */
}

.article-body p:last-child {
  margin-bottom: 0;
}

/* Section headings within articles */
.article-section {
  margin-top: 48px;
}

.article-section:first-child {
  margin-top: 0;
}

.article-section h2 {
  font-family: 'Varela Round', sans-serif;
  font-size: 1.25rem;
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e5e5;
  text-wrap: balance;
}

.article-section h3 {
  font-family: 'Varela Round', sans-serif;
  font-size: 1.0625rem;
  color: #1a1a1a;
  margin-bottom: 10px;
  text-wrap: balance;
}

/* ===== DEFINITION / REQUIREMENT BADGE ===== */
.doc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.doc-badge {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9f810f;
  background: rgba(184,134,11,0.08);
  padding: 4px 10px;
  border-radius: 4px;
}

.doc-id {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.75rem;
  color: #999;
}

/* ===== PAGE TITLE ===== */
.article-title {
  font-family: 'Varela Round', sans-serif;
  font-size: 2rem;
  line-height: 1.25;
  color: #1a1a1a;
  margin: 0 0 28px 0;
  text-wrap: balance;
}

/* ===== COMPLIANT / NOT COMPLIANT BLOCKS ===== */
.example-block {
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.6;
}

.example-block--compliant {
  background: #f0faf0;
  border-left: 3px solid #2d7a2d;
  color: #1a3d1a;
}

.example-block--noncompliant {
  background: #fff5f5;
  border-left: 3px solid #c0392b;
  color: #3d1a1a;
}

.example-block__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.example-block--compliant .example-block__label { color: #2d7a2d; }
.example-block--noncompliant .example-block__label { color: #c0392b; }

/* ===== RELATED LINKS ===== */
.related-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #e5e5e5;
}

.related-section h2 {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 14px;
  border: none;
  padding: 0;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-links li a {
  display: inline-block;
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.875rem;
  color: #B8860B;
  background: rgba(184,134,11,0.07);
  padding: 5px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.related-links li a:hover {
  background: rgba(184,134,11,0.15);
  color: #9f810f;
  text-decoration: none;
}

/* ===== VERSION LINE ===== */
.version-line {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.8125rem;
  color: #999;
}

.version-line__publisher {
  font-weight: 600;
  color: #666;
}

.version-line a {
  color: #999;
  text-decoration: underline;
}

.version-line a:hover {
  color: #B8860B;
}

/* ===== INDEX PAGES ===== */
.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.index-item {
  background: #fff;
  padding: 20px 22px;
  display: block;
  text-decoration: none;
  transition: background 0.15s;
  border-bottom: 1px solid #e5e5e5;
  border-right: 1px solid #e5e5e5;
}

.index-item:last-child {
  border-bottom: none;
}

.index-item:nth-child(even) {
  border-right: none;
}

.index-item:last-child:nth-child(odd) {
  border-right: none;
  grid-column: 1 / -1;
}

.index-item:hover {
  background: #fffdf5;
  text-decoration: none;
}

.index-item__number {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B8860B;
  margin-bottom: 4px;
}

.index-item__term {
  font-family: 'Varela Round', sans-serif;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.index-item__short {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #666;
  text-wrap: pretty;
}

/* A-Z letter heading for definitions index */
.az-group {
  margin-top: 36px;
}

.az-group:first-child {
  margin-top: 0;
}

.az-letter {
  font-family: 'Varela Round', sans-serif;
  font-size: 1.375rem;
  color: #B8860B;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0e8d0;
}

/* ===== LANDING PAGE ===== */
.landing-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.landing-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 28px 24px;
  display: block;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.landing-card:hover {
  border-color: #B8860B;
  box-shadow: 0 2px 12px rgba(184,134,11,0.1);
  text-decoration: none;
}

.landing-card__count {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B8860B;
  margin-bottom: 8px;
}

.landing-card__title {
  font-family: 'Varela Round', sans-serif;
  font-size: 1.125rem;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.landing-card__desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #666;
  text-wrap: pretty;
}

/* ===== CRITERIA PAGE — REQUIREMENT BLOCK ===== */
.requirement-block {
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 22px 26px;
  margin-bottom: 40px;
}

.requirement-block__label {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B8860B;
  margin-bottom: 8px;
}

.requirement-block__text {
  font-family: 'Lato', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #fff;
  margin: 0;
  text-wrap: pretty;
}

/* ===== ASSESSED-VIA CHIP ===== */
.assessed-via {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.8125rem;
  color: #666;
  background: #f5f5f5;
  padding: 5px 12px;
  border-radius: 4px;
  margin-top: 16px;
}

.assessed-via__label {
  font-weight: 600;
  color: #999;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.8125rem;
  color: #999;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #B8860B;
  text-decoration: none;
}

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

.breadcrumb__sep {
  color: #ccc;
}

/* ===== ROCH INTERPRETATION (empty state) ===== */
.interpretation-empty {
  font-size: 0.875rem;
  color: #bbb;
  font-style: italic;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #333;
  margin-top: auto;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 40px 40px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.site-footer__logo {
  flex-shrink: 0;
}

.site-footer__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.site-footer__cols {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  flex: 1;
}

.site-footer__col {
  min-width: 120px;
}

.site-footer__col-heading {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  display: block;
  margin-bottom: 14px;
}

.site-footer__col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col-links a {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer__col-links a:hover {
  color: #fff;
  text-decoration: none;
}

.site-footer__socials {
  display: flex;
  gap: 12px;
  align-items: center;
}

.site-footer__socials a {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.site-footer__socials a:hover {
  opacity: 1;
}

.site-footer__socials img {
  display: block;
  filter: brightness(0) invert(1);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.site-footer__bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer__copy {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

.site-footer__bottom-links {
  display: flex;
  gap: 20px;
}

.site-footer__bottom-links a {
  font-family: 'Figtree', 'Lato', sans-serif;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer__bottom-links a:hover {
  color: rgba(255,255,255,0.8);
}

/* ===== INLINE TERM LINKS (auto-linked) ===== */
a.term-link {
  color: #9f810f;
  text-decoration: underline;
  text-decoration-color: rgba(159,129,15,0.35);
  text-underline-offset: 2px;
}

a.term-link:hover {
  color: #B8860B;
  text-decoration-color: #B8860B;
}

/* ===== UTILITY ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .landing-sections {
    grid-template-columns: 1fr;
  }

  .index-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-footer__inner {
    flex-direction: column;
    gap: 32px;
    padding: 40px 24px 32px;
  }

  .site-footer__cols {
    gap: 28px;
  }

  .site-footer__bottom-inner {
    padding: 16px 24px;
  }
}

@media (max-width: 640px) {
  .site-nav__links {
    display: none;
  }

  .site-nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #333;
    padding: 16px 24px 20px;
    z-index: 100;
    border-bottom: 1px solid #444;
    gap: 12px;
  }

  .site-nav__mobile-toggle {
    display: block;
  }

  .article-wrap {
    padding: 36px 20px 60px;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .page-hero {
    padding: 36px 20px 32px;
  }

  .page-hero__title {
    font-size: 1.5rem;
  }

  .article-body {
    font-size: 1.0625rem;
  }

  .version-line {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 1.375rem;
  }
}
