:root {
    /* Light mode - Corporate Professional */
    --bg-primary: #fafbfc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-accent: #f0f4f8;
    --text-primary: #1a202c;
    --text-secondary: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
    --accent: #2c5282;
    --accent-hover: #2a4a7a;
    --accent-light: #bee3f8;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.12);
    --success: #22543d;
    --warning: #c05621;
    --danger: #c53030;
  }
  
  [data-theme="dark"] {
    /* Dark mode - Corporate Professional */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-accent: #21262d;
    --text-primary: #c9d1d9;
    --text-secondary: #b1bac4;
    --text-muted: #8b949e;
    --border: #30363d;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --accent-light: #1f6feb;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.6);
    --success: #3fb950;
    --warning: #d29922;
    --danger: #f85149;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.75;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
    padding-bottom: 4rem;
    font-size: 16px;
  }
  
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
  }
  
  /* HEADER */
  
  header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.75rem;   /* tighter header box */
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px var(--shadow);
  }
  
  .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
  
    /* keeps title + actions on one row on wide screens */
    flex-wrap: nowrap;
  }
  
  .header-actions {
    display: flex;
    flex-direction: row;   /* force horizontal alignment */
    align-items: center;
    gap: 0.75rem;          /* space between buttons */
    flex-wrap: nowrap;     /* prevent wrapping on wide screens */
  }
  
  h1 {
    font-size: 1.85rem;    /* reduced */
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
  }
  
  .theme-toggle {
    background: var(--bg-accent);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
  }
  
  .theme-toggle:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
  }
  
  .meta {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    padding-top: 0.5rem;        /* tighter meta line */
    border-top: 1px solid var(--border);
  }
  
  /* SECTION CARDS */
  
  .section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1.25rem;          /* was 2rem */
    overflow: hidden;
    box-shadow: 0 2px 6px var(--shadow);
    transition: box-shadow 0.3s, border-color 0.3s;
  }
  
  .section:hover {
    box-shadow: 0 4px 12px var(--shadow-lg);
    border-color: var(--accent-light);
  }
  
  /* Collapsed header row (section titles) */
  .section summary {
    padding: 0.9rem 1.25rem;         /* was 1.5rem 2rem */
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.2s;
    background: var(--bg-accent);
    border-bottom: 2px solid var(--border);
  }
  
  .section summary::-webkit-details-marker {
    display: none;
  }
  
  .section summary::after {
    content: '▼';
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.3s;
    margin-left: 1.5rem;
    font-weight: 400;
  }
  
  .section[open] summary::after {
    transform: rotate(180deg);
  }
  
  .section summary:hover {
    background: var(--accent-light);
    color: var(--accent);
  }
  
  /* Open section content */
  
  .section-content {
    padding: 1.25rem 1.25rem 1.5rem;  /* tighter than original 2rem */
    border-top: 1px solid var(--border);
  }
  
  h2 {
    font-size: 1.35rem;      /* reduced */
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.3;
  }
  
  /* Subsection headings inside sections */
  h3 {
    font-size: 1.15rem;      /* reduced */
    font-weight: 600;
    margin: 1.25rem 0 0.75rem 0;
    color: var(--text-primary);
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border);
  }
  
  h4 {
    font-size: 0.95rem;      /* reduced */
    font-weight: 600;
    margin: 1.25rem 0 0.5rem 0;
    color: var(--text-secondary);
  }
  
  .tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0.75rem 0 1.25rem 0;
    padding: 0.6rem 0.9rem;
    background: var(--bg-accent);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
  }
  
  /* General text + list spacing inside sections */
  
  p {
    margin: 0.9rem 0;                /* was 1.25rem 0 */
    color: var(--text-secondary);
    line-height: 1.8;
  }
  
  ul,
  ol {
    margin: 0.9rem 0;                /* was 1.25rem 0 */
    padding-left: 1.5rem;            /* was 2rem */
  }
  
  li {
    margin: 0.5rem 0;                /* was 0.875rem 0 */
    line-height: 1.9;
    color: var(--text-secondary);
  }
  
  strong {
    color: var(--text-primary);
    font-weight: 700;
  }
  
  em {
    color: var(--text-muted);
    font-style: italic;
  }
  
  a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
    font-weight: 500;
  }
  
  a:hover {
    border-bottom-color: var(--accent);
    color: var(--accent-hover);
  }
  
  /* Takeaway callout box */
  .takeaway {
    background: var(--bg-accent);
    border-left: 5px solid var(--accent);
    margin: 1.25rem 0;               /* was 2rem 0 */
    padding: 1.1rem 1.25rem;         /* was 1.5rem 1.75rem */
    border-radius: 6px;
    font-style: italic;
    color: var(--text-secondary);
    box-shadow: 0 2px 4px var(--shadow);
  }
  
  .takeaway strong {
    color: var(--accent);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
  }
  
  /* TABLES */
  
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow);
  }
  
  th,
  td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
  
  th {
    background: var(--bg-accent);
    font-weight: 700;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
  }
  
  tr:hover {
    background: var(--bg-accent);
  }
  
  tr:last-child td {
    border-bottom: none;
  }
  
  blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-accent);
    border-radius: 4px;
    color: var(--text-secondary);
    font-style: italic;
  }
  
  .table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid var(--border);
  }
  
  .table-wrapper::-webkit-scrollbar {
    height: 8px;
  }
  
  .table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-accent);
  }
  
  .table-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
  }
  
  .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
  }
  
  .scroll-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
    display: none;
  }
  
  /* FOOTER */
  
  footer {
    margin-top: 5rem;
    padding-top: 2.5rem;
    border-top: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.8;
  }
  
  footer p {
    margin: 0.5rem 0;
  }
  
  /* MOBILE */
  
  @media (max-width: 768px) {
    .container {
      padding: 1.5rem 1rem;
    }
  
    header {
      padding: 1.1rem 1.25rem;
    }
  
    /* stack title on first row, actions below */
    .header-top {
      flex-direction: column;
      align-items: flex-start; /* use center if you want everything centered */
      gap: 0.75rem;
    }
  
    .header-actions {
      width: 100%;
      flex-wrap: wrap;          /* allow buttons to wrap if needed */
      justify-content: flex-start;
    }
  
    h1 {
      font-size: 1.35rem;        /* reduced from 1.5rem */
    }
  
    .section summary {
      padding: 0.8rem 1rem;          /* keep compact on mobile too */
      font-size: 1.05rem;
    }
  
    .section-content {
      padding: 1.1rem 1.1rem 1.25rem;
    }
  
    h2 {
      font-size: 1.15rem;        /* reduced from 1.3rem */
    }
  
    h3 {
      font-size: 1.05rem;        /* reduced from 1.15rem */
    }
  
    .table-wrapper {
      margin: 1.5rem -1.5rem;
      padding: 0 1.5rem;
    }
  
    table {
      font-size: 0.85rem;
    }
  
    th,
    td {
      padding: 0.75rem;
    }
  
    .scroll-hint {
      display: block;
    }
  }
  