@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --teal: #006B7D;
  --teal-dark: #1A2B3C;
  --teal-light: #E6F4F7;
  --coral: #FF6B5A;
  --cream: #FBF8F3;
  --text-dark: #2C2C2C;
  --text-mid: #555555;
  --white: #ffffff;
  --border: #D8EEF2;
  --warning-bg: #FFF3F0;
  --warning-border: #FF6B5A;
  --info-bg: #E6F4F7;
  --info-border: #006B7D;
  --success-bg: #F0FAF0;
  --success-border: #2E7D32;
  --sidebar-width: 280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dark);
  background: var(--cream);
  font-size: 15px;
  line-height: 1.7;
}

/* ── HEADER ── */
.site-header {
  background: var(--teal);
  color: white;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.header-logo img {
  height: 36px;
  filter: brightness(0) invert(1);
}

.header-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: white;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 11px;
  opacity: 0.75;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.3);
  margin: 0 8px;
}

.header-badge {
  background: var(--coral);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── LAYOUT ── */
.layout {
  display: flex;
  padding-top: 64px;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 90;
  transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section {
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child { border-bottom: none; }

.sidebar-heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal);
  padding: 0 20px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  text-decoration: none;
  color: var(--text-mid);
  font-size: 13.5px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  line-height: 1.3;
}

.sidebar-link:hover {
  background: var(--teal-light);
  color: var(--teal);
  border-left-color: var(--teal);
}

.sidebar-link.active {
  background: var(--teal-light);
  color: var(--teal);
  border-left-color: var(--teal);
  font-weight: 600;
}

.sidebar-link .icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* ── MAIN CONTENT ── */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  max-width: 100%;
}

.content-page {
  display: none;
  padding: 48px 56px;
  max-width: 860px;
  animation: fadeIn 0.2s ease;
}

.content-page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HERO ── */
.page-hero {
  background: linear-gradient(135deg, var(--teal) 0%, #3A8FBF 100%);
  color: white;
  padding: 36px 40px;
  border-radius: 12px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 60px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.page-hero-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 8px;
}

.page-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 15px;
  opacity: 0.88;
  max-width: 560px;
  line-height: 1.6;
  color: white;
}

/* ── SECTION HEADINGS ── */
.section-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.section-title:first-of-type { margin-top: 0; }

h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--teal);
  margin: 24px 0 10px;
}

p { margin-bottom: 14px; color: var(--text-mid); }

strong { color: var(--text-dark); font-weight: 600; }

/* ── CALLOUT BOXES ── */
.callout {
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.callout-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-body { flex: 1; }

.callout-title {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.callout p { margin-bottom: 6px; font-size: 14px; }
.callout p:last-child { margin-bottom: 0; }

.callout.warning {
  background: var(--warning-bg);
  border-left: 4px solid var(--coral);
}
.callout.warning .callout-title { color: #c0392b; }

.callout.info {
  background: var(--info-bg);
  border-left: 4px solid var(--teal);
}
.callout.info .callout-title { color: var(--teal); }

.callout.success {
  background: var(--success-bg);
  border-left: 4px solid var(--success-border);
}
.callout.success .callout-title { color: #2E7D32; }

/* ── CHECKLISTS ── */
.checklist {
  list-style: none;
  margin: 12px 0 20px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  color: var(--text-mid);
  font-size: 14.5px;
  line-height: 1.5;
}

.checklist li::before {
  content: '☐';
  color: var(--teal);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.checklist li.indent {
  padding-left: 28px;
}

.checklist li.indent::before {
  content: '○';
  font-size: 13px;
  color: var(--text-mid);
}

/* ── STEPS ── */
.steps { margin: 16px 0 24px; }

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.step-number {
  width: 30px;
  height: 30px;
  background: var(--teal);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content { flex: 1; }
.step-content strong { display: block; margin-bottom: 4px; color: var(--text-dark); }
.step-content p { margin-bottom: 0; font-size: 14px; }

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 16px rgba(0,107,125,0.1); }

.card-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

.card h4 {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 6px;
}

.card p { font-size: 13px; margin-bottom: 0; }

/* ── TABLE ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.data-table th {
  background: var(--teal);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: #FAFCFD; }

.tick { color: #2E7D32; font-weight: 700; }
.cross { color: #c0392b; font-weight: 700; }

/* ── BADGE / PILL ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-teal { background: var(--teal-light); color: var(--teal); }
.badge-coral { background: #FFF0EE; color: #c0392b; }
.badge-green { background: #F0FAF0; color: #2E7D32; }

/* ── FIELD EXAMPLES ── */
.field-example {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 16px 0;
}

.field-example h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.field-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  align-items: flex-start;
  font-size: 14px;
}

.field-label {
  font-weight: 600;
  color: var(--text-dark);
  min-width: 160px;
  flex-shrink: 0;
}

.field-value { color: var(--text-mid); }

/* ── CONTACT CARD ── */
.contact-card {
  background: linear-gradient(135deg, var(--teal) 0%, #3A8FBF 100%);
  color: white;
  border-radius: 12px;
  padding: 28px 32px;
  margin: 24px 0;
}

.contact-card h3 {
  color: white;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  margin-bottom: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 15px;
}

.contact-item a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
}

.contact-item a:hover { opacity: 1; text-decoration: underline; }

.contact-label {
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* ── TOC OVERVIEW ── */
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.toc-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
}

.toc-item:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 12px rgba(0,107,125,0.12);
  transform: translateY(-1px);
}

.toc-item-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.toc-item-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.toc-item-text span {
  font-size: 12px;
  color: var(--text-mid);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--teal-dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 20px;
  font-size: 12px;
  margin-left: var(--sidebar-width);
}

.site-footer a { color: rgba(255,255,255,0.8); }

/* ── PRINT / PAGE BREAK ── */
hr.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main { margin-left: 0; }
  .site-footer { margin-left: 0; }

  .content-page {
    padding: 28px 24px;
  }

  .hamburger {
    display: flex;
  }

  .page-hero h1 { font-size: 24px; }

  .cards-grid { grid-template-columns: 1fr; }
  .toc-grid { grid-template-columns: 1fr; }

  .field-row { flex-direction: column; gap: 4px; }
  .field-label { min-width: auto; }
}

/* ── OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 80;
}

.sidebar-overlay.active { display: block; }
