
/* Accountability Register AU — v2 stylesheet */
:root {
  --primary: #0F1B3D;
  --primary-rgb: 15, 27, 61;
  --secondary: #07102A;
  --accent: #14B8A6;
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --border: #D6DDE9;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --font-serif: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--secondary); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.22; margin: 1.4em 0 0.5em; color: var(--secondary); }
h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 2vw + 0.6rem, 2.15rem); margin-top: 2.2em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-fluid { max-width: 1400px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  padding: 12px 0;
  gap: 16px;
  position: relative;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}
.brand-logo { height: 48px; width: auto; display: block; max-width: 100%; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: .92rem;
  padding: 8px 10px;
  border-radius: var(--radius);
  border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s, background .18s;
  white-space: nowrap;
  display: inline-block;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--primary);
  border-color: var(--accent);
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  border-radius: var(--radius);
  transition: background .18s;
}
.nav-toggle-label:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.nav-toggle-label span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--secondary);
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .2s ease;
  border-radius: 2px;
  transform-origin: center;
}

/* Tablet/mobile: switch to hamburger */
@media (max-width: 991px) {
  .nav-toggle-label { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 6px 12px rgba(0,0,0,.05);
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 20px;
    align-items: stretch;
  }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav li:last-child { border-bottom: none; }
  .main-nav a {
    display: block;
    padding: 14px 0;
    border: none;
    font-size: 1rem;
  }
  .nav-toggle-checkbox:checked ~ .main-nav { max-height: 620px; }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* Extra narrow breakpoint for very small phones */
@media (max-width: 400px) {
  .brand-logo { height: 38px; }
  .header-inner { min-height: 60px; }
}

/* Breadcrumb */
.breadcrumb { font-size: .88rem; color: var(--muted); padding: 20px 0 4px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span[aria-current] { color: var(--text); }

/* Article */
.article-hero { margin: 24px 0 28px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.article-hero img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.article-lede { font-size: 1.14rem; color: var(--muted); font-family: var(--font-serif); font-style: italic; margin: 8px 0 24px; padding-left: 16px; border-left: 3px solid var(--accent); }
.byline { display: flex; align-items: center; gap: 12px; margin: 18px 0 28px; font-size: .92rem; color: var(--muted); }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.byline strong { color: var(--text); }

/* Callout */
.callout { padding: 18px 22px; margin: 24px 0; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); border-radius: var(--radius); }
.callout.warning { border-color: #b45309; background: rgba(180, 83, 9, .06); }

/* Table of Contents */
.toc { margin: 32px 0 40px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.toc-heading { font-size: 1rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-family: var(--font-sans); }
.toc-list { list-style: none; padding: 0; margin: 0; counter-reset: toc-counter; column-count: 2; column-gap: 32px; column-rule: 1px solid var(--border); }
.toc-list li { counter-increment: toc-counter; break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; padding: 8px 0 8px 40px; position: relative; }
.toc-list li::before { content: counter(toc-counter, decimal-leading-zero); position: absolute; left: 0; top: 8px; color: var(--accent); font-family: ui-monospace, "SF Mono", monospace; font-size: .82rem; letter-spacing: -.02em; }
.toc-list a { color: var(--text); text-decoration: none; font-size: .95rem; }
.toc-list a:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 700px) { .toc-list { column-count: 1; column-rule: none; } }

/* Steps — zigzag timeline */
.steps { list-style: none; padding: 0; margin: 48px 0 52px; position: relative; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 50%; top: 50%; bottom: -46px; width: 2px; transform: translateX(-50%); background: repeating-linear-gradient(to bottom, var(--border) 0 5px, transparent 5px 10px); z-index: 0; }
.steps li { position: relative; margin: 0 0 32px; min-height: 76px; display: flex; align-items: center; }
.step-num { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; border: 4px solid var(--bg); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.05rem; box-shadow: 0 6px 16px rgba(var(--primary-rgb), .32); z-index: 2; }
.step-body { padding: 18px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); position: relative; z-index: 1; text-align: left; }
@media (min-width: 992px) {
  .steps li { padding: 0 46px; }
  .steps li:nth-child(odd) .step-body { width: calc(50% - 46px); margin-right: auto; }
  .steps li:nth-child(odd) .step-body::after { content: ""; position: absolute; right: -8px; top: 50%; width: 14px; height: 14px; background: var(--surface); border-right: 1px solid var(--border); border-top: 1px solid var(--border); transform: translateY(-50%) rotate(45deg); }
  .steps li:nth-child(even) .step-body { width: calc(50% - 46px); margin-left: auto; }
  .steps li:nth-child(even) .step-body::after { content: ""; position: absolute; left: -8px; top: 50%; width: 14px; height: 14px; background: var(--surface); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: translateY(-50%) rotate(45deg); }
}
@media (max-width: 991px) {
  .steps li:not(:last-child)::before { left: 24px; }
  .steps li { padding-left: 60px; }
  .step-num { left: 24px; }
  .step-body { width: 100%; }
}

/* FAQ */
.faq-section { margin: 40px 0; }
.faq-section h2 { margin-bottom: 20px; }
.faq-section details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 10px 0; transition: box-shadow .2s, border-color .2s; }
.faq-section details[open] { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.faq-section summary { padding: 18px 56px 18px 22px; font-weight: 600; color: var(--secondary); position: relative; list-style: none; cursor: pointer; user-select: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::before, .faq-section summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 14px; height: 2px; background: var(--primary); transition: transform .35s cubic-bezier(.4,0,.2,1); }
.faq-section summary::before { transform: translateY(-50%) rotate(0deg); }
.faq-section summary::after { transform: translateY(-50%) rotate(90deg); }
.faq-section details[open] summary::after { transform: translateY(-50%) rotate(0deg); }
.faq-section details > *:not(summary) { padding: 0 22px 20px; animation: faqSlideDown .32s cubic-bezier(.4,0,.2,1); }
@keyframes faqSlideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* Content image */
.content-image { margin: 32px 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.content-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.content-image figcaption { padding: 10px 4px 0; font-size: .88rem; color: var(--muted); font-style: italic; }

/* Author box */
.author-box { margin: 48px 0 16px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; grid-template-columns: 88px 1fr; gap: 20px; align-items: start; }
.author-box img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.author-box h3 { margin: 0 0 4px; font-size: 1.1rem; color: var(--secondary); }
.author-box p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer { background: var(--secondary); color: rgba(255,255,255,.82); padding: 56px 0 24px; margin-top: 64px; }
.site-footer a { color: rgba(255,255,255,.9); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 42px; }
.footer-brand img { height: 48px; width: auto; max-width: 100%; margin-bottom: 14px; display: block; }
.footer-brand p { font-size: .93rem; line-height: 1.6; margin: 8px 0; }
.footer-col h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin: 0 0 14px; font-family: var(--font-sans); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 8px 0; font-size: .93rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: .84rem; color: rgba(255,255,255,.68); flex-wrap: wrap; gap: 12px; }
.footer-age { display: flex; align-items: center; gap: 12px; }
.age-badge { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #fff; color: var(--secondary); font-weight: 800; font-size: .95rem; border-radius: 50%; letter-spacing: -.02em; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Utility */
.text-muted { color: var(--muted); }
.section-intro { font-size: 1.08rem; margin-bottom: 22px; }
figure { margin: 0; }
.updated-date { font-size: .85rem; color: var(--muted); margin-top: 8px; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .toc { padding: 16px 18px; }
  .container, .container-fluid { padding: 0 16px; }
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: absolute; left: 10px; top: 10px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--radius); z-index: 100; }
