/*
 * Australian Government Design System (GOLD) Inspired Styles
 * Adapted for GovSafeAI Toolkit documentation
 *
 * Based on GOLD Design System: https://gold.designsystemau.org/
 */

/* ============================================================================
   CSS Custom Properties - GOLD Color Palette
   ============================================================================ */

:root {
  /* Primary Colors - Australian Government Blue */
  --gold-primary: #313131;           /* Dark gray (primary text) */
  --gold-primary-dark: #1a1a1a;
  --gold-link: #00698f;              /* Action blue */
  --gold-link-hover: #004d6a;
  --gold-focus: #9263de;             /* Focus purple */

  /* Secondary Colors */
  --gold-secondary: #61777d;         /* Steel gray */
  --gold-muted: #6c757d;

  /* Accent Colors */
  --gold-success: #0b996c;           /* Success green */
  --gold-warning: #f57f17;           /* Warning orange */
  --gold-error: #d32f2f;             /* Error red */
  --gold-info: #00698f;              /* Info blue */

  /* Backgrounds */
  --gold-bg-primary: #ffffff;
  --gold-bg-secondary: #f5f5f5;
  --gold-bg-light: #ebebeb;
  --gold-bg-dark: #313131;

  /* Borders */
  --gold-border: #d3d3d3;
  --gold-border-dark: #6c757d;

  /* Government specific */
  --gold-govt-crest: #000000;
  --gold-govt-bar: #313131;
}

/* Dark mode overrides */
[data-md-color-scheme="slate"] {
  --gold-bg-primary: #1a1a1a;
  --gold-bg-secondary: #2d2d2d;
  --gold-bg-light: #383838;
  --gold-primary: #e0e0e0;
  --gold-border: #4a4a4a;
}

/* ============================================================================
   Typography - Public Sans (Australian Government standard)
   ============================================================================ */

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

body {
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gold-primary);
}

/* ============================================================================
   Header - Government style header bar
   ============================================================================ */

.md-header {
  background-color: var(--gold-bg-dark) !important;
  box-shadow: none;
  border-bottom: 4px solid var(--gold-link);
}

.md-header__title {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ============================================================================
   Navigation - Clean, accessible navigation
   ============================================================================ */

.md-nav__title {
  font-weight: 600;
  color: var(--gold-primary);
}

.md-nav__link {
  color: var(--gold-primary);
}

.md-nav__link:hover {
  color: var(--gold-link);
}

.md-nav__link--active {
  color: var(--gold-link) !important;
  font-weight: 500;
}

/* Tab navigation */
.md-tabs {
  background-color: var(--gold-bg-dark);
  border-bottom: 1px solid var(--gold-border);
}

.md-tabs__link {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  color: #ffffff;
}

/* ============================================================================
   Content - Main content area styling
   ============================================================================ */

/* Wider content area for better use of horizontal space */
.md-content {
  max-width: 1200px;
}

/* On larger screens, allow even more width */
@media screen and (min-width: 76.25em) {
  .md-content {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* When sidebar is visible, use available space */
  .md-sidebar--primary ~ .md-content {
    max-width: none;
  }
}

.md-content__inner {
  padding-top: 1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Better content flow */
.md-typeset {
  line-height: 1.7;
}

/* Improve paragraph spacing */
.md-typeset p {
  margin-bottom: 1.25em;
}

/* Better list spacing */
.md-typeset ul,
.md-typeset ol {
  margin-bottom: 1.25em;
}

.md-typeset li {
  margin-bottom: 0.5em;
}

/* Headings */
.md-typeset h1 {
  font-weight: 700;
  color: var(--gold-primary);
  border-bottom: 2px solid var(--gold-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.md-typeset h2 {
  font-weight: 600;
  color: var(--gold-primary);
  margin-top: 2rem;
}

.md-typeset h3 {
  font-weight: 600;
  color: var(--gold-secondary);
}

/* Links */
.md-typeset a {
  color: var(--gold-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md-typeset a:hover {
  color: var(--gold-link-hover);
}

.md-typeset a:focus {
  outline: 3px solid var(--gold-focus);
  outline-offset: 2px;
}

/* ============================================================================
   Admonitions - GOLD-styled callout boxes
   ============================================================================ */

.md-typeset .admonition,
.md-typeset details {
  border: none;
  border-left: 4px solid;
  border-radius: 0;
  box-shadow: none;
  background: var(--gold-bg-secondary);
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-left-color: var(--gold-info);
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: var(--gold-success);
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left-color: var(--gold-warning);
}

.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left-color: var(--gold-error);
}

.md-typeset .admonition.info,
.md-typeset details.info {
  border-left-color: var(--gold-link);
}

/* ============================================================================
   Buttons - Government-style buttons
   ============================================================================ */

.md-typeset .md-button {
  background-color: var(--gold-link);
  border: 2px solid var(--gold-link);
  border-radius: 4px;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.md-typeset .md-button:hover {
  background-color: var(--gold-link-hover);
  border-color: var(--gold-link-hover);
}

.md-typeset .md-button:focus {
  outline: 3px solid var(--gold-focus);
  outline-offset: 2px;
}

.md-typeset .md-button--primary {
  background-color: var(--gold-link);
}

.md-typeset .md-button--secondary {
  background-color: transparent;
  color: var(--gold-link);
}

.md-typeset .md-button--secondary:hover {
  background-color: var(--gold-bg-light);
}

/* ============================================================================
   Tables - Clean, accessible tables with full width
   ============================================================================ */

.md-typeset table:not([class]) {
  width: 100%;
  border: 1px solid var(--gold-border);
  border-collapse: collapse;
  font-size: 0.9rem;
  display: table;
  table-layout: auto;
}

.md-typeset table:not([class]) th {
  background-color: var(--gold-bg-secondary);
  border-bottom: 2px solid var(--gold-border-dark);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.md-typeset table:not([class]) td {
  border-bottom: 1px solid var(--gold-border);
  padding: 0.75rem 1rem;
  vertical-align: top;
}

.md-typeset table:not([class]) tr:hover {
  background-color: var(--gold-bg-light);
}

/* Make tables responsive */
.md-typeset__scrollwrap {
  margin: 1em 0;
}

/* Ensure table wrapper takes full width */
.md-typeset__table {
  width: 100%;
  display: block;
}

/* Two-column tables: first column fixed, second column flexible */
.md-typeset table:not([class]) th:first-child,
.md-typeset table:not([class]) td:first-child {
  width: 30%;
  min-width: 150px;
}

/* For tables with more columns, distribute evenly */
.md-typeset table:not([class]) th:only-child,
.md-typeset table:not([class]) td:only-child {
  width: 100%;
}

/* ============================================================================
   Code Blocks
   ============================================================================ */

.md-typeset code {
  background-color: var(--gold-bg-light);
  border-radius: 3px;
  color: var(--gold-primary);
  font-size: 0.875em;
  padding: 0.2em 0.4em;
}

.md-typeset pre {
  border: 1px solid var(--gold-border);
  border-radius: 4px;
}

/* ============================================================================
   Search
   ============================================================================ */

.md-search__input {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   Footer
   ============================================================================ */

.md-footer {
  background-color: var(--gold-bg-dark);
}

.md-footer-meta {
  background-color: var(--gold-primary-dark);
}

/* ============================================================================
   Custom Components - Tool Cards
   ============================================================================ */

.tool-card {
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s ease;
}

.tool-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-card__title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tool-card__description {
  color: var(--gold-secondary);
  margin-bottom: 1rem;
}

/* ============================================================================
   Interactive Tool Links - Links to Streamlit app
   ============================================================================ */

.interactive-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold-link) 0%, var(--gold-link-hover) 100%);
  color: #ffffff !important;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  text-decoration: none !important;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.interactive-tool:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 105, 143, 0.3);
  color: #ffffff !important;
}

.interactive-tool::after {
  content: "→";
  margin-left: 0.25rem;
}

/* ============================================================================
   Pathway Cards - Scenario navigation
   ============================================================================ */

.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.pathway-card {
  background: var(--gold-bg-primary);
  border: 2px solid var(--gold-border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.pathway-card:hover {
  border-color: var(--gold-link);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pathway-card__icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.pathway-card__title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--gold-primary);
}

.pathway-card__description {
  color: var(--gold-secondary);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.pathway-card a {
  color: var(--gold-link);
  font-weight: 500;
  text-decoration: none;
}

.pathway-card a:hover {
  text-decoration: underline;
}

/* ============================================================================
   Horizontal Rule Styling
   ============================================================================ */

.md-typeset hr {
  border: none;
  border-top: 1px solid var(--gold-border);
  margin: 2rem 0;
}

/* ============================================================================
   Blockquote Styling
   ============================================================================ */

.md-typeset blockquote {
  border-left: 4px solid var(--gold-link);
  background: var(--gold-bg-secondary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gold-secondary);
}

.md-typeset blockquote p:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   Definition Lists
   ============================================================================ */

.md-typeset dl {
  margin-bottom: 1.5rem;
}

.md-typeset dt {
  font-weight: 600;
  color: var(--gold-primary);
  margin-top: 1rem;
}

.md-typeset dd {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gold-secondary);
}

/* ============================================================================
   Status Badges
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge--complete {
  background-color: var(--gold-success);
  color: #ffffff;
}

.badge--in-progress {
  background-color: var(--gold-warning);
  color: #ffffff;
}

.badge--required {
  background-color: var(--gold-error);
  color: #ffffff;
}

.badge--optional {
  background-color: var(--gold-secondary);
  color: #ffffff;
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer {
    display: none !important;
  }

  .md-content {
    max-width: 100%;
  }

  .md-typeset a {
    color: var(--gold-primary);
    text-decoration: none;
  }

  .md-typeset a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--gold-secondary);
  }
}

/* ============================================================================
   Accessibility - High contrast support
   ============================================================================ */

@media (prefers-contrast: high) {
  :root {
    --gold-link: #0056b3;
    --gold-border: #000000;
  }

  .md-typeset a {
    text-decoration-thickness: 2px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   Page Status Badges - Document status indicators
   ============================================================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-badge--ready {
  background-color: rgba(11, 153, 108, 0.15);
  color: var(--gold-success);
  border: 1px solid var(--gold-success);
}

.status-badge--draft {
  background-color: rgba(245, 127, 23, 0.15);
  color: var(--gold-warning);
  border: 1px solid var(--gold-warning);
}

.status-badge--updated {
  background-color: rgba(0, 105, 143, 0.15);
  color: var(--gold-info);
  border: 1px solid var(--gold-info);
}

/* ============================================================================
   Download Button - For downloadable templates
   ============================================================================ */

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--gold-link);
  color: white !important;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.1s ease;
  margin: 1rem 0;
}

.download-btn:hover {
  background: var(--gold-link-hover);
  transform: translateY(-1px);
  color: white !important;
}

.download-btn::before {
  content: "⬇";
  font-size: 1rem;
}

/* Dark mode */
[data-md-color-scheme="slate"] .download-btn {
  background: var(--gold-link);
}

[data-md-color-scheme="slate"] .download-btn:hover {
  background: #0088b3;
}

/* ============================================================================
   Related Content Cards - Cross-reference suggestions
   ============================================================================ */

.related-content {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gold-border);
}

.related-content__title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-secondary);
  margin-bottom: 1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.related-card {
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 1rem;
  text-decoration: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: block;
}

.related-card:hover {
  border-color: var(--gold-link);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-card__type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-link);
  margin-bottom: 0.25rem;
}

.related-card__title {
  font-weight: 600;
  color: var(--gold-primary);
  margin-bottom: 0.25rem;
}

.related-card__desc {
  font-size: 0.85rem;
  color: var(--gold-secondary);
  line-height: 1.4;
}

/* ============================================================================
   Progress Indicators - Phase tracking for playbooks
   ============================================================================ */

.phase-tracker {
  display: flex;
  gap: 0;
  margin: 2rem 0;
  overflow-x: auto;
}

.phase-step {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  text-align: center;
  position: relative;
}

.phase-step:first-child {
  border-radius: 6px 0 0 6px;
}

.phase-step:last-child {
  border-radius: 0 6px 6px 0;
}

.phase-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-secondary);
  font-size: 1.2rem;
  z-index: 1;
  background: var(--gold-bg-primary);
  padding: 0 0.25rem;
}

.phase-step--current {
  background: var(--gold-link);
  color: #ffffff;
  border-color: var(--gold-link);
}

.phase-step--complete {
  background: rgba(11, 153, 108, 0.1);
  border-color: var(--gold-success);
}

.phase-step__number {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.7;
}

.phase-step__name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============================================================================
   Abbreviation Tooltips - Enhanced styling
   ============================================================================ */

.md-typeset abbr {
  text-decoration: underline dotted var(--gold-link);
  text-underline-offset: 3px;
  cursor: help;
}

.md-typeset abbr:hover {
  text-decoration-style: solid;
}

/* ============================================================================
   Content Tabs - Enhanced styling
   ============================================================================ */

.md-typeset .tabbed-set {
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.md-typeset .tabbed-labels {
  background: var(--gold-bg-secondary);
  border-bottom: 1px solid var(--gold-border);
}

.md-typeset .tabbed-labels > label {
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.md-typeset .tabbed-labels > label:hover {
  color: var(--gold-link);
}

.md-typeset .tabbed-set > input:checked + label {
  color: var(--gold-link);
  border-bottom-color: var(--gold-link);
  background: var(--gold-bg-primary);
}

.md-typeset .tabbed-content {
  padding: 1.25rem;
}

/* ============================================================================
   Collapsible Details - Enhanced admonitions
   ============================================================================ */

.md-typeset details {
  margin: 1.25rem 0;
}

.md-typeset details > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 1rem;
}

.md-typeset details > summary::after {
  content: "▸";
  float: right;
  transition: transform 0.2s ease;
}

.md-typeset details[open] > summary::after {
  transform: rotate(90deg);
}

.md-typeset details > summary:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* ============================================================================
   Quick Reference Cards - Scannable summaries
   ============================================================================ */

.quick-ref {
  background: linear-gradient(135deg, var(--gold-bg-secondary) 0%, var(--gold-bg-light) 100%);
  border: 1px solid var(--gold-border);
  border-left: 4px solid var(--gold-link);
  border-radius: 0 6px 6px 0;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.quick-ref__title {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gold-link);
  margin-bottom: 0.75rem;
}

.quick-ref__list {
  margin: 0;
  padding-left: 1.25rem;
}

.quick-ref__list li {
  margin-bottom: 0.4rem;
}

/* ============================================================================
   Key Takeaway Boxes
   ============================================================================ */

.takeaway {
  background: rgba(0, 105, 143, 0.08);
  border: 1px solid var(--gold-link);
  border-radius: 6px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.takeaway::before {
  content: "💡";
  font-size: 1.5rem;
  flex-shrink: 0;
}

.takeaway__content {
  flex: 1;
}

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

/* ============================================================================
   Decision Points - Interactive decision trees
   ============================================================================ */

.decision-point {
  background: var(--gold-bg-secondary);
  border: 2px solid var(--gold-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.decision-point__question {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.decision-point__options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.decision-point__option {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--gold-link);
  border-radius: 6px;
  color: var(--gold-link);
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.decision-point__option:hover {
  background: var(--gold-link);
  color: #ffffff;
}

/* ============================================================================
   Checklist Progress - Visual completion tracking
   ============================================================================ */

.checklist-progress {
  background: var(--gold-bg-secondary);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.checklist-progress__bar {
  height: 8px;
  background: var(--gold-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.checklist-progress__fill {
  height: 100%;
  background: var(--gold-success);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.checklist-progress__text {
  font-size: 0.85rem;
  color: var(--gold-secondary);
  text-align: center;
}

/* Enhanced task list styling */
.md-typeset .task-list-item {
  list-style: none;
  margin-left: -1.25rem;
}

.md-typeset .task-list-item input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: var(--gold-success);
}

.md-typeset .task-list-item input[type="checkbox"]:checked + * {
  text-decoration: line-through;
  opacity: 0.7;
}

/* ============================================================================
   Keyboard Shortcuts Display
   ============================================================================ */

.md-typeset kbd {
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--gold-primary);
}

/* ============================================================================
   Warning Banners - Critical information
   ============================================================================ */

.warning-banner {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.1) 0%, rgba(211, 47, 47, 0.05) 100%);
  border: 1px solid var(--gold-error);
  border-left-width: 4px;
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.warning-banner::before {
  content: "⚠️";
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ============================================================================
   Time/Effort Indicators
   ============================================================================ */

.effort-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--gold-bg-secondary);
  border-radius: 2rem;
  font-size: 0.8rem;
  color: var(--gold-secondary);
}

.effort-indicator__dots {
  display: flex;
  gap: 0.2rem;
}

.effort-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-border);
}

.effort-indicator__dot--filled {
  background: var(--gold-link);
}

/* ============================================================================
   Streamlit Iframe Embeds - Interactive tool containers
   ============================================================================ */

.streamlit-embed {
  width: 100%;
  margin: 1.5rem 0;
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--gold-bg-secondary);
}

.streamlit-embed iframe {
  width: 100%;
  height: 800px;
  border: none;
  display: block;
}

.streamlit-embed--tall iframe {
  height: 1000px;
}

.streamlit-embed--short iframe {
  height: 600px;
}

/* Fallback link for when iframe doesn't load */
.streamlit-embed__fallback {
  padding: 1rem;
  text-align: center;
  background: var(--gold-bg-light);
  border-top: 1px solid var(--gold-border);
}

.streamlit-embed__fallback a {
  color: var(--gold-link);
  font-weight: 600;
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .streamlit-embed {
  border-color: var(--gold-border);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .streamlit-embed iframe {
    height: 600px;
  }

  .streamlit-embed--tall iframe {
    height: 800px;
  }
}

/* ============================================================================
   Input Fields - Styled placeholders for template forms
   ============================================================================ */

.input-field {
  background: var(--gold-bg-secondary);
  border: 1px dashed var(--gold-border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem 0;
  color: var(--gold-secondary);
  font-style: italic;
  font-size: 0.9rem;
  min-height: 2.5rem;
}

.input-field--multi {
  min-height: 5rem;
}

.input-field::before {
  content: "📝 ";
}

/* Dark mode */
[data-md-color-scheme="slate"] .input-field {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Input field within tables */
td .input-field,
th .input-field {
  margin: 0;
  padding: 0.5rem;
}

/* Compact variant for inline use */
.input-field--inline {
  display: inline-block;
  margin: 0 0.25rem;
  padding: 0.25rem 0.5rem;
  min-height: auto;
}

.input-field--inline::before {
  content: "";
}

/* ============================================================================
   Template Blocks - Copyable template sections
   ============================================================================ */

.template-block {
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  border-left: 4px solid var(--gold-link);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.template-block p:first-child {
  margin-top: 0;
}

.template-block p:last-child {
  margin-bottom: 0;
}

/* Dark mode */
[data-md-color-scheme="slate"] .template-block {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--gold-link);
}

/* ============================================================================
   Formula/Maxim Blocks - Highlighted short formulas or key phrases
   ============================================================================ */

.formula {
  background: linear-gradient(135deg, var(--gold-bg-secondary) 0%, rgba(191, 161, 74, 0.1) 100%);
  border: 1px solid var(--gold-accent);
  border-radius: 6px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-text);
}

/* Dark mode */
[data-md-color-scheme="slate"] .formula {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(191, 161, 74, 0.15) 100%);
}

/* ============================================================================
   Callout Quote - Emphasized quotes or maxims
   ============================================================================ */

.callout-quote {
  background: var(--gold-bg-secondary);
  border-left: 4px solid var(--gold-accent);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gold-secondary);
}

.callout-quote p {
  margin: 0;
}

/* Dark mode */
[data-md-color-scheme="slate"] .callout-quote {
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================================================
   Template Page Components
   ============================================================================ */

/* Export buttons container */
.export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  color: var(--gold-text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.15s ease;
  cursor: pointer;
}

.export-btn:hover {
  background: var(--gold-link);
  border-color: var(--gold-link);
  color: #ffffff !important;
}

.export-btn--primary {
  background: var(--gold-link);
  border-color: var(--gold-link);
  color: #ffffff;
}

.export-btn--primary:hover {
  background: var(--gold-link-hover);
  border-color: var(--gold-link-hover);
}

/* Copyable sections */
.copyable {
  position: relative;
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.copyable-content {
  overflow-x: auto;
}

.copy-section-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.copy-section-btn:hover {
  background: var(--gold-link);
  border-color: var(--gold-link);
  color: #ffffff;
}

.copy-section-btn.copied {
  background: var(--gold-success);
  border-color: var(--gold-success);
  color: #ffffff;
}

.copy-icon {
  font-size: 0.9em;
}

/* How-to steps */
.how-to-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.how-to-steps li {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: 1.5rem;
  border-left: 2px solid var(--gold-border);
  margin-left: 1rem;
}

.how-to-steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.how-to-steps li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: -1rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--gold-link);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.how-to-steps li strong {
  display: block;
  color: var(--gold-text);
  margin-bottom: 0.25rem;
}

/* Worked example callout */
.worked-example {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid #81c784;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.worked-example__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #2e7d32;
  font-size: 1.1rem;
}

.worked-example__header::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: #2e7d32;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.8rem;
}

[data-md-color-scheme="slate"] .worked-example {
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.15) 0%, rgba(46, 125, 50, 0.25) 100%);
  border-color: rgba(46, 125, 50, 0.5);
}

[data-md-color-scheme="slate"] .worked-example__header {
  color: #81c784;
}

/* Time estimate badge */
.time-estimate {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  background: var(--gold-bg-secondary);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--gold-secondary);
}

.time-estimate::before {
  content: "⏱";
}

/* Difficulty badge */
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.difficulty-badge--easy {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #81c784;
}

.difficulty-badge--medium {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffb74d;
}

.difficulty-badge--hard {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* Template metadata bar */
.template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: var(--gold-bg-secondary);
  border-radius: 6px;
  margin: 1rem 0;
}

/* Section anchor links */
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--gold-link);
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
  /* Hide navigation, search, and interactive elements */
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer,
  .md-search,
  .export-buttons,
  .copy-section-btn,
  .related-content,
  .download-btn,
  .status-badge {
    display: none !important;
  }

  /* Full width content */
  .md-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .md-main__inner {
    padding: 0 !important;
  }

  /* Ensure tables fit */
  table {
    font-size: 0.85rem;
    width: 100%;
  }

  /* Page breaks */
  h2 {
    page-break-before: auto;
    page-break-after: avoid;
  }

  h3, h4 {
    page-break-after: avoid;
  }

  table, .copyable, .worked-example {
    page-break-inside: avoid;
  }

  /* Print-friendly colors */
  .worked-example {
    background: #f5f5f5 !important;
    border: 2px solid #333 !important;
  }

  .pathway-card {
    border: 1px solid #333 !important;
    background: #fff !important;
  }

  /* Show URLs for links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
