/* IvoryScroll — namespaced tokens */
:root{
  --is-primary: #FFFFF0; /* Ivory */
  --is-ink: #1c1a16;
  --is-muted-ink: #4d493f;
  --is-surface: #f7f6f0;
  --is-paper: #fbfaf4;
  --is-line: rgba(28,26,22,0.15);
  --is-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.05);
  --is-radius-sm: 10px;
  --is-radius-md: 16px;
  --is-radius-lg: 22px;
  --is-space-1: 10px;
  --is-space-2: 16px;
  --is-space-3: 24px;
  --is-space-4: 32px;
  --is-space-5: 48px;
  --is-maxw: 1080px;
}

html, body{
  margin:0; padding:0;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(255,255,255,0.6), transparent 70%),
    radial-gradient(900px 500px at 110% 10%, rgba(255,255,255,0.5), transparent 60%),
    linear-gradient(180deg, var(--is-paper), var(--is-surface));
  color: var(--is-ink);
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a{ color: #5a574d; text-decoration: none; border-bottom: 1px solid var(--is-line); }
a:hover{ color: #000; border-bottom-color: #000; }

header{
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.5));
  border-bottom: 1px solid var(--is-line);
}
.is-brand{
  display:flex; align-items:center; gap:12px; padding: var(--is-space-2) var(--is-space-3);
  max-width: var(--is-maxw); margin: 0 auto;
}
.is-brand img{ height:32px; width:auto; }
.is-brand-title{ font-weight:700; letter-spacing:0.3px; }

nav.is-nav{ max-width: var(--is-maxw); margin: 0 auto; display:flex; justify-content:center; gap: 8px; padding: 6px var(--is-space-3) var(--is-space-3); flex-wrap: wrap; }
.is-nav a{
  padding: 8px 12px; border-radius: 0; position: relative; font-weight: 600;
}
.is-nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px; background: var(--is-ink);
  transform: scaleX(0); transform-origin:left; transition: transform .2s ease;
}
.is-nav a:hover::after, .is-nav a[aria-current="page"]::after{ transform: scaleX(1); }
.is-container{ max-width: var(--is-maxw); margin: 0 auto; padding: var(--is-space-4) var(--is-space-3); }

main.is-layout{ display:grid; grid-template-columns: 1fr 300px; gap: var(--is-space-4); }
@media (max-width: 900px){
  main.is-layout{ grid-template-columns: 1fr; }
}

.is-paper{ background: var(--is-primary); border: 1px solid var(--is-line); border-radius: var(--is-radius-md); box-shadow: var(--is-shadow); }
.is-content{ padding: var(--is-space-4); }
.is-sidebar{ padding: var(--is-space-4); position: sticky; top: 86px; height: fit-content; }

.is-hero figure{ margin:0; }
.is-hero img{ width:100%; height:auto; max-height: 380px; object-fit: cover; border-radius: var(--is-radius-lg); border:1px solid var(--is-line); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.is-section{ padding: var(--is-space-4) 0; border-top: 1px solid var(--is-line); }
.is-section:first-of-type{ border-top:none; }
.is-section h2{ margin: 0 0 var(--is-space-2); }
.is-section h3{ margin: var(--is-space-3) 0 var(--is-space-1); }

footer{ border-top: 1px solid var(--is-line); margin-top: var(--is-space-5); }
footer .is-container{ display:flex; align-items:center; justify-content:space-between; gap: 12px; padding-top: var(--is-space-3); padding-bottom: var(--is-space-3);}
footer img{ height:24px; width:auto; }

/* Paragraph justification rule with high specificity */
article p,
section p,
main p,
p {
  text-align: justify !important;
  text-justify: inter-word !important;
  -webkit-hyphens: auto !important;
  -ms-hyphens: auto !important;
  hyphens: auto !important;
}

/* Back to Top button */
:root{
  --is--primary: #bfb7a6; /* style-system button vars */
  --is--paper: #121416;
  --is--ink: #f5f5f0;
}
.is--to-top{
  position: fixed;
  right: 18px; bottom: 18px;
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.25);
  background: var(--is--primary);
  color: #111;
  font: 600 18px/42px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 60;
}
.is--to-top:hover{ background: #fff; }
.is--to-top.is--show{ opacity: 1; transform: translateY(0); pointer-events: auto; }
@media (prefers-reduced-motion: reduce){ .is--to-top{ transition: none; } }

/* Utility */
.is-lede{ font-style: italic; color: var(--is-muted-ink); }
.is-toc{ list-style: none; padding:0; margin:0; }
.is-toc li{ padding: 6px 0; }

.is-footer-group {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  width: 100%;
  text-align: center;
}

/* --- Footer Alignment & Styling Fix (IvoryScroll / QuantumEdge adaptation) --- */
footer,
footer * {
  text-align: center !important;
}

/* Center everything in the footer */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--is-space-3);
  padding-bottom: var(--is-space-3);
}

/* --- Final Footer Refinement (IvoryScroll / QuantumEdge Harmonization) --- */

/* Override global justification */
footer,
footer * {
  text-align: center !important;
}

/* Footer layout: columnar balance */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--is-space-4);
  padding-bottom: var(--is-space-4);
  background: var(--is-paper);
  border-top: 1px solid var(--is-line);
  color: var(--is-muted-ink);
}

/* Metrolagu Network (IvoryScroll palette) */
.metrolagu-network {
  background: none;
  color: var(--is-ink);
  padding: var(--is-space-4) 0;
}

.network-container {
  max-width: var(--is-maxw);
  margin: 0 auto;
  padding: 0 var(--is-space-3);
}

.metrolagu-network h3 {
  font-size: 1.15em;
  margin-bottom: var(--is-space-1);
  color: #8C9C72; /* natural soft olive-green accent */
  font-weight: 600;
  text-align: center;
  text-shadow: 0 0 3px rgba(140,156,114,0.2);
}

.metrolagu-network p {
  color: var(--is-muted-ink);
  margin-bottom: 10px;
  line-height: 1.7;
  text-align: center;
}

/* Network links */
.network-links {
  text-align: center;
}

.network-links a {
  color: var(--is-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(28,26,22,0.15);
  transition: color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.network-links a:hover {
  color: #8C9C72;
  border-bottom-color: #8C9C72;
  opacity: 0.9;
}

/* Copyright pill refinement */
.site-footer .copyright,
footer .copyright {
  display: inline-block;
  margin: 18px auto 6px auto;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  color: var(--is-ink);
  background: rgba(255,255,240,0.8);
  padding: 8px 22px;
  border: 1.5px solid rgba(28,26,22,0.2);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

/* Hover tone: subtle parchment glow */
footer .copyright:hover {
  background: #fffdf4;
  color: #1c1a16;
  border-color: rgba(28,26,22,0.4);
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

/* Inherit tone for embedded link */
footer .copyright a {
  color: inherit !important;
  text-decoration: none !important;
  transition: opacity 0.3s ease;
}
