:root {
    /* Color scheme based on your presentation styles */
    --bg-color: #232323;
    /* Simpler charcoal background */
    --text-color: #eaeaea;
    /* Light cream text */
    --accent-1: #c0d6df;
    /* Teal accent */
    --accent-2: #ec652b;
    /* Bright blue accent */
    --accent-3: #edac3c;
    /* Gold accent */
    --accent-4: #ba38f6;
    /* Red accent */
    --accent-5: #b92826;
    /* Orange accent */
    --accent-6: #1c8097;
    /* Purple accent */
    --accent-7: #f23d50;
    /* Apple Red accent */
    --code-bg: #2f2f2f;
    /* Dark code background */
    --sidebar-bg: #1c1c1c4d;
    /* Simple dark sidebar */
    --border-color: #96969633;
    /* Subtle borders */
    --footer-bg: #141414cc;
    /* Simple dark footer */
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: content-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "gimlet-text-narrow", serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0 auto;
    display: flex;
    flex: 1;
}

.content-wrapper {
    display: flex;
    flex: 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-family: "agency-fb", sans-serif;
    font-weight: 700;
    font-size: 2.3rem;
    margin-top: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h2 {
    font-family: "vinyl", sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 2rem;
    color: var(--accent-1);
    margin-top: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

h3 {
    font-family: "vinyl", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.55rem;
    margin-top: 1.5rem;
    color: #d9bce7;
}

h4 {
    font-family: "vista-sans", sans-serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--accent-3);
}

h5 {
    font-family: "vista-sans", sans-serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--accent-3);
}

p {
    font-family: "gimlet-text-narrow", serif;
    font-style: normal;
    font-weight: 400;
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

a {
    text-decoration: underline;
    transition: color 0.2s;
    color: var(--text-color);
}

a:hover {
    color: var(--accent-4);
    text-decoration: none;
}

ul,
ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: "vista-sans-narrow", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.25px;
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    border-left: 3px solid var(--accent-2);
    padding-left: 1rem;
    margin: 1.5rem 0 1.5rem 1rem;
    font-style: italic;
}

blockquote p {
    font-family: "vista-sans-narrow", sans-serif;
    letter-spacing: 0.05rem;
    font-style: italic;
    font-size: 1rem;
}

code {
    font-family: "JetBrains Mono", monospace;
    background-color: var(--code-bg);
    color: var(--accent-3);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    text-wrap: auto;
    letter-spacing: 0.05rem;
}

pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

pre code {
    padding: 0;
    background-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Table styles - Base */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-family: "vista-sans-narrow", sans-serif;
    table-layout: fixed;
}

th,
td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

th {
    background-color: rgba(28, 128, 151, 0.2);
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: rgba(28, 128, 151, 0.1);
}

/* Header */
.header {
    background-color: #0d1f2dcc;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1200px;
    margin: 0;
    padding: 0 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    font-family: "agency-fb", sans-serif;
    font-size: 2.5rem;
}

.brand a {
    font-weight: bold;
    text-decoration: none;
    color: #263f53;
}

.brand a:hover {
    color: #0aa0c9;
}

.main-nav {
    font-family: system-ui, sans-serif;
}

.main-nav ul {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0 0 0 1.5rem;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--accent-3);
}

/* Sidebar */
.sidebar {
    width: 280px;
    padding: 1rem;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    height: 100%;
    overflow-y: auto;
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sidebar h3 {
    color: #1c8097;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.sidebar ul {
    list-style-type: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
}

.sidebar a {
    display: block;
    padding: 0.25rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar a:hover {
    color: var(--accent-3);
}

.sidebar a.active {
    color: var(--accent-3);
}

/* Main content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: calc(100% - 280px);
}

.main-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: "vista-sans-narrow", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-family: system-ui, sans-serif;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs-item {
    display: inline-block;
}

.breadcrumbs-item:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: var(--accent-1);
}

.breadcrumbs a {
    color: var(--accent-1);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-4);
    text-decoration: underline;
}

.breadcrumbs-current {
    color: var(--accent-3);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    padding: 2rem 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

.footer p {
    font-size: 0.8rem;
    font-family: system-ui, sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-section {
    margin-bottom: 1.5rem;
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    color: var(--accent-3);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--accent-3);
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    color: var(--accent-1);
}

/* Pixel art header for sections */
.pixel-header {
    height: 8px;
    width: 100%;
    margin-bottom: 1.5rem;
    background-image: linear-gradient(to right,
            var(--accent-3) 0%,
            var(--accent-4) 25%,
            var(--accent-2) 50%,
            var(--accent-5) 75%,
            var(--accent-1) 100%);
    position: relative;
}

.pixel-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><rect width="1" height="1" fill="rgba(255,255,255,0.3)" /><rect width="1" height="1" x="2" y="2" fill="rgba(255,255,255,0.3)" /></svg>');
    background-size: 4px 4px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Rouge Syntax Highlighting - GitHub Dark Theme */
.highlight .c {
    color: #8b949e;
    font-style: italic;
}

/* Comment */
.highlight .err {
    color: #f85149;
}

/* Error */
.highlight .k {
    color: #ff7b72;
}

/* Keyword */
.highlight .o {
    color: #ff7b72;
}

/* Operator */
.highlight .cm {
    color: #8b949e;
    font-style: italic;
}

/* Comment.Multiline */
.highlight .cp {
    color: #8b949e;
    font-weight: bold;
}

/* Comment.Preproc */
.highlight .c1 {
    color: #8b949e;
    font-style: italic;
}

/* Comment.Single */
.highlight .cs {
    color: #8b949e;
    font-style: italic;
}

/* Comment.Special */
.highlight .gd {
    color: #ffa198;
    background-color: #490202;
}

/* Generic.Deleted */
.highlight .ge {
    font-style: italic;
}

/* Generic.Emph */
.highlight .gr {
    color: #f85149;
}

/* Generic.Error */
.highlight .gh {
    color: #79c0ff;
    font-weight: bold;
}

/* Generic.Heading */
.highlight .gi {
    color: #56d364;
    background-color: #0f5323;
}

/* Generic.Inserted */
.highlight .go {
    color: #8b949e;
}

/* Generic.Output */
.highlight .gp {
    color: #8b949e;
}

/* Generic.Prompt */
.highlight .gs {
    font-weight: bold;
}

/* Generic.Strong */
.highlight .gu {
    color: #79c0ff;
}

/* Generic.Subheading */
.highlight .gt {
    color: #f85149;
}

/* Generic.Traceback */
.highlight .kc {
    color: #ff7b72;
}

/* Keyword.Constant */
.highlight .kd {
    color: #ff7b72;
}

/* Keyword.Declaration */
.highlight .kn {
    color: #ff7b72;
}

/* Keyword.Namespace */
.highlight .kp {
    color: #ff7b72;
}

/* Keyword.Pseudo */
.highlight .kr {
    color: #ff7b72;
}

/* Keyword.Reserved */
.highlight .kt {
    color: #ff7b72;
}

/* Keyword.Type */
.highlight .m {
    color: #d2a8ff;
}

/* Literal.Number */
.highlight .s {
    color: #a5d6ff;
}

/* Literal.String */
.highlight .na {
    color: #79c0ff;
}

/* Name.Attribute */
.highlight .nb {
    color: #c9d1d9;
}

/* Name.Builtin */
.highlight .nc {
    color: #f0883e;
    font-weight: bold;
}

/* Name.Class */
.highlight .no {
    color: #79c0ff;
}

/* Name.Constant */
.highlight .nd {
    color: #d2a8ff;
}

/* Name.Decorator */
.highlight .ni {
    color: #ffa657;
}

/* Name.Entity */
.highlight .ne {
    color: #f0883e;
    font-weight: bold;
}

/* Name.Exception */
.highlight .nf {
    color: #d2a8ff;
    font-weight: bold;
}

/* Name.Function */
.highlight .nl {
    color: #79c0ff;
}

/* Name.Label */
.highlight .nn {
    color: #ff7b72;
}

/* Name.Namespace */
.highlight .nt {
    color: #7ee787;
}

/* Name.Tag */
.highlight .nv {
    color: #79c0ff;
}

/* Name.Variable */
.highlight .ow {
    color: #ff7b72;
}

/* Operator.Word */
.highlight .w {
    color: #6e7681;
}

/* Text.Whitespace */
.highlight .mb {
    color: #d2a8ff;
}

/* Literal.Number.Bin */
.highlight .mf {
    color: #d2a8ff;
}

/* Literal.Number.Float */
.highlight .mh {
    color: #d2a8ff;
}

/* Literal.Number.Hex */
.highlight .mi {
    color: #d2a8ff;
}

/* Literal.Number.Integer */
.highlight .mo {
    color: #d2a8ff;
}

/* Literal.Number.Oct */
.highlight .sa {
    color: #a5d6ff;
}

/* Literal.String.Affix */
.highlight .sb {
    color: #a5d6ff;
}

/* Literal.String.Backtick */
.highlight .sc {
    color: #a5d6ff;
}

/* Literal.String.Char */
.highlight .dl {
    color: #a5d6ff;
}

/* Literal.String.Delimiter */
.highlight .sd {
    color: #a5d6ff;
}

/* Literal.String.Doc */
.highlight .s2 {
    color: #a5d6ff;
}

/* Literal.String.Double */
.highlight .se {
    color: #a5d6ff;
}

/* Literal.String.Escape */
.highlight .sh {
    color: #a5d6ff;
}

/* Literal.String.Heredoc */
.highlight .si {
    color: #a5d6ff;
}

/* Literal.String.Interpol */
.highlight .sx {
    color: #a5d6ff;
}

/* Literal.String.Other */
.highlight .sr {
    color: #a5d6ff;
}

/* Literal.String.Regex */
.highlight .s1 {
    color: #a5d6ff;
}

/* Literal.String.Single */
.highlight .ss {
    color: #a5d6ff;
}

/* Literal.String.Symbol */
.highlight .bp {
    color: #c9d1d9;
}

/* Name.Builtin.Pseudo */
.highlight .fm {
    color: #d2a8ff;
    font-weight: bold;
}

/* Name.Function.Magic */
.highlight .vc {
    color: #79c0ff;
}

/* Name.Variable.Class */
.highlight .vg {
    color: #79c0ff;
}

/* Name.Variable.Global */
.highlight .vi {
    color: #79c0ff;
}

/* Name.Variable.Instance */
.highlight .vm {
    color: #79c0ff;
}

/* Name.Variable.Magic */
.highlight .il {
    color: #d2a8ff;
}

/* Literal.Number.Integer.Long */

/* Highlighter container styles */
.highlighter-rouge {
    margin-bottom: 16px;
}

.highlight {
    background-color: var(--code-bg);
    border-radius: 6px;
}

.highlight pre {
    margin-bottom: 0;
    overflow-x: auto;
}

/* JSON and Python specific styling */
.language-json .highlight .p {
    color: #c9d1d9;
}

/* punctuation */
.language-json .highlight .s {
    color: #a5d6ff;
}

/* strings/keys */
.language-json .highlight .s2 {
    color: #a5d6ff;
}

/* double quoted strings */
.language-json .highlight .mi {
    color: #d2a8ff;
}

/* integer */
.language-json .highlight .kc {
    color: #79c0ff;
}

/* true/false/null */

.language-python .highlight .p {
    color: #c9d1d9;
}

/* punctuation */
.language-python .highlight .s {
    color: #a5d6ff;
}

/* strings */
.language-python .highlight .s2 {
    color: #a5d6ff;
}

/* double quoted strings */
.language-python .highlight .mi {
    color: #d2a8ff;
}

/* integer */
.language-python .highlight .kc {
    color: #ff7b72;
}

/* True/False/None */
.language-python .highlight .k {
    color: #ff7b72;
}

/* keywords */
.language-python .highlight .kn {
    color: #ff7b72;
}

/* import keywords */
.language-python .highlight .o {
    color: #c9d1d9;
}

/* operators */
.language-python .highlight .nb {
    color: #79c0ff;
}

/* builtins */

/* Responsive */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 85%;
        max-width: 320px;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        overflow-y: auto;
        background-color: var(--bg-color);
        z-index: 100;
        transition: all 0.3s ease-in-out;
        padding: 20px 25px 80px 25px;
        border-right: 1px solid var(--border-color);
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        max-width: 100%;
        padding: 1.5rem 1.2rem;
        margin-top: 0;
    }

    .header {
        padding: 0.75rem 0;
    }

    .brand {
        font-size: 1.8rem;
        margin-left: 60px;
        padding-left: 5px;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        margin-top: 1rem;
        width: 100%;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li {
        margin: 0.5rem 0;
    }

    .sidebar-inner {
        padding-top: 50px;
    }

    .sidebar-section {
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(150, 150, 150, 0.1);
        padding-bottom: 15px;
    }

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

    .sidebar h3 {
        font-size: 1.2rem;
        margin-top: 20px;
        margin-bottom: 12px;
        color: var(--accent-3);
    }

    .sidebar ul {
        margin-left: 0;
        padding-left: 10px;
    }

    .sidebar li {
        margin-bottom: 8px;
    }

    .sidebar a {
        padding: 6px 0;
        font-size: 0.95rem;
        display: block;
        transition: all 0.2s ease;
    }

    .sidebar a:hover {
        padding-left: 5px;
        color: var(--accent-3);
    }

    .hamburger-menu {
        display: flex;
    }

    /* Typography adjustments for mobile */
    h1 {
        font-size: 1.8rem;
        margin-top: 10px;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    /* Better spacing around content */
    p,
    ul,
    ol {
        margin-bottom: 1rem;
    }

    blockquote {
        margin: 1.2rem 0 1.2rem 0.5rem;
    }
}

@media (max-width: 768px) {
    p {
        font-size: 0.9rem;
        line-height: 1.8;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1rem;
    }

    h5 {
        font-size: 1rem;
    }

    code {
        font-size: 0.85rem;
        word-break: break-word;
    }

    .sidebar a {
        padding: 0;
    }

    .sidebar h3 {
        font-size: 1rem;
    }

    .sidebar ul {
        font-size: 0.7rem;
    }

    .research-container,
    .header-container,
    .footer-container,
    .container {
        padding: 0 1rem;
    }

    .footer-section {
        flex: 0 0 100%;
    }

    pre {
        max-width: 100%;
        overflow-x: auto;
        font-size: 0.85rem;
        padding: 0.8rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .pixel-header {
        height: 6px;
        margin-bottom: 1rem;
    }

    /* Responsive tables that can scroll horizontally */
    .table-container {
        width: 100%;
        overflow-x: auto;
        margin-bottom: 1.5rem;
    }

    /* Make tables more readable on mobile */
    table {
        table-layout: auto;
    }

    th,
    td {
        padding: 0.6rem;
        font-size: 0.95rem;
        min-width: 120px;
        /* Prevent columns from becoming too narrow */
    }

    /* First column (usually labels) should be wider */
    table tr th:first-child,
    table tr td:first-child {
        min-width: 100px;
        max-width: 25%;
        font-weight: 600;
    }

    /* Middle columns can be narrower */
    table tr th:not(:first-child):not(:last-child),
    table tr td:not(:first-child):not(:last-child) {
        min-width: 80px;
        max-width: 20%;
    }

    /* Make example/code columns wider to accommodate content */
    table tr th:last-child,
    table tr td:last-child {
        min-width: 180px;
        max-width: 55%;
    }

    /* Fix for code blocks in tables */
    td code {
        white-space: normal;
        word-break: break-word;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1.2rem 1rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    /* Already set for dark mode - no changes needed */
}

/* Hamburger menu button for mobile */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 101;
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-6);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-menu:hover {
    background-color: var(--accent-3);
    transform: scale(1.05);
}

.hamburger-menu.active {
    background-color: var(--accent-2);
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    width: 22px;
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    width: 22px;
}

/* Overlay when sidebar is active on mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

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

/* Sidebar inner container for better positioning */
.sidebar-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Scrollbar styling for the sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-6);
    border-radius: 5px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-3);
}

/* Small mobile screens */
@media (max-width: 576px) {
    .hamburger-menu {
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
    }

    .brand {
        font-size: 1.5rem !important;
        margin-left: 55px !important;
    }
}

/* Mobile styles for hamburger menu */
@media (max-width: 992px) {
    .hamburger-menu {
        display: flex;
    }
}

/* Helper class to prevent body scroll when sidebar is open */
.no-scroll {
    overflow: hidden !important;
}

/* Extra small screens */
@media (max-width: 480px) {
    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.5rem;
    }

    /* Even more compact tables for tiny screens */
    table tr th:first-child,
    table tr td:first-child {
        min-width: 80px;
        max-width: 30%;
    }

    table tr th:not(:first-child):not(:last-child),
    table tr td:not(:first-child):not(:last-child) {
        min-width: 60px;
    }

    table tr th:last-child,
    table tr td:last-child {
        min-width: 140px;
        max-width: 50%;
    }
}

/* Code blocks in table cells */
td code {
    white-space: normal;
    word-break: break-word;
    font-size: 0.85rem;
    padding: 0.15rem 0.3rem;
    background-color: rgba(47, 47, 47, 0.7);
}

/* Make code in tables more readable */
table code {
    display: inline-block;
    margin: 2px 0;
}

/* Better tables for mobile with code content */
@media (max-width: 768px) {

    /* Use flexbox for better handling of table with code */
    table.has-code-cells {
        display: flex;
        flex-direction: column;
    }

    table.has-code-cells thead,
    table.has-code-cells tbody {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    table.has-code-cells tr {
        display: flex;
        flex-wrap: wrap;
    }

    table.has-code-cells th,
    table.has-code-cells td {
        flex: 1 1 auto;
        min-width: 120px;
    }

    /* First column */
    table.has-code-cells th:first-child,
    table.has-code-cells td:first-child {
        flex: 0 0 30%;
    }

    /* Last column with code */
    table.has-code-cells th:last-child,
    table.has-code-cells td:last-child {
        flex: 0 0 60%;
    }
}

/* Voice modulation tables specific styling */
table.voice-modulation-table,
table.voice-notation-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

/* Better spacing for voice modulation tables */
@media (max-width: 768px) {

    /* Allow table scrolling but with nice structure */
    .table-container {
        -webkit-overflow-scrolling: touch;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    table.voice-notation-table,
    table.voice-modulation-table {
        width: max-content;
        min-width: 100%;
    }

    /* Optimize spacing */
    table.voice-notation-table td,
    table.voice-modulation-table td {
        padding: 8px 12px;
    }

    /* Different width strategies */
    table.voice-notation-table td:first-child {
        width: 100px;
        min-width: 80px;
        white-space: nowrap;
    }

    table.voice-notation-table td:nth-child(2):not(:last-child) {
        width: 150px;
        min-width: 150px;
    }

    table.voice-notation-table td:last-child {
        min-width: 200px;
    }

    /* Special styling for code blocks */
    table.voice-notation-table code,
    table.voice-modulation-table code {
        display: inline-block;
        margin: 2px 0;
        font-size: 0.85rem;
        white-space: normal !important;
        word-break: break-word;
    }

    /* Better visual hierarchy */
    table.voice-notation-table th,
    table.voice-modulation-table th {
        text-align: center;
        font-weight: 600;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 2;
        background-color: rgba(28, 128, 151, 0.3);
    }

    /* Ensure first column is always visible */
    table.voice-notation-table td:first-child,
    table.voice-modulation-table td:first-child {
        position: sticky;
        left: 0;
        background-color: var(--bg-color);
        z-index: 1;
    }
}