/* ============================================================
   Dash site theme — modelled on the Dash desktop appearance:
   deep navy backdrop, floating windows with titlebars and a
   menubar, palette-style quick navigation, teal highlights.
   ============================================================ */

:root {
    --backdrop:       #191948;
    --backdrop-grid:  rgba(120, 140, 255, 0.06);
    --titlebar:       #3a3a58;
    --titlebar-text:  #f2f2ff;
    --window-bg:      #2b2b4a;
    --window-edge:    #4a4a6e;
    --panel-bg:       #232340;
    --text:           #e6e6fa;
    --accent:         #00d0c0;
    --accent-dim:     #0a8f86;
    --link:           #2196F3;
    --link-hover:     #00E4FF;
    --magenta:        #f700ff;
    --amber:          #FFBB00;
}

body {
    background-color: var(--backdrop);
    background-image:
        linear-gradient(var(--backdrop-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--backdrop-grid) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text);
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* ---------- top taskbar (like the Dash tab strip) ---------- */

#taskbar {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    background: #10102e;
    border-bottom: 1px solid #000;
    padding: 6px 10px 0 10px;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 2000;
}

#taskbar img {
    height: 18px;
    width: 18px;
    margin: 0 6px 4px 0;
    align-self: center;
}

#taskbar .tab {
    display: inline-block;
    background: #1e1e3e;
    color: #8a8ab0;
    text-decoration: none;
    padding: 5px 18px 4px 18px;
    border: 1px solid #34345c;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
}

#taskbar .tab.active {
    background: var(--window-bg);
    color: #ffffff;
    border-color: var(--window-edge);
}

#taskbar a.tab:hover {
    color: #ffffff;
    background: #28284e;
}

#taskbar a.tab.active:hover {
    background: var(--window-bg);
}

/* ---------- floating "palette" navigation ---------- */

#navPalette {
    position: fixed;
    top: 42px;
    left: 10px;
    width: 150px;
    background: var(--window-bg);
    border: 1px solid var(--window-edge);
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.55);
    z-index: 1000;
    overflow: hidden;
}

#navPalette .titlebar {
    font-size: 12px;
    padding: 4px 8px;
}

#navPalette .palette-body {
    padding: 6px;
}

#navPalette h4 {
    margin: 4px 4px 6px 4px;
    font-size: 11px;
    letter-spacing: 1px;
    color: #8a8ab0;
    text-transform: uppercase;
}

#navPalette a {
    display: block;
    color: var(--text);
    background: #20203c;
    border: 1px solid #3c3c60;
    border-radius: 4px;
    padding: 5px 8px;
    margin: 4px 0;
    font-size: 13px;
    text-decoration: none;
}

#navPalette a:hover {
    border-color: var(--accent);
    color: #ffffff;
}

#navPalette a.active {
    border-color: var(--accent);
    background: #1f3f44;
    color: var(--accent);
}

#navPalette hr {
    border: none;
    border-top: 1px solid #3c3c60;
    margin: 6px 0;
}

#navPalette h5 {
    margin: 6px 4px 2px 4px;
    font-size: 11px;
    color: var(--accent-dim);
}

/* ---------- window chrome ---------- */

.titlebar {
    display: flex;
    align-items: center;
    background: var(--titlebar);
    color: var(--titlebar-text);
    padding: 6px 10px;
    border-bottom: 1px solid #14142a;
    user-select: none;
}

.titlebar .win-btns {
    display: flex;
    gap: 6px;
}

.titlebar .win-btns span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 3px;
    background: #55557a;
    color: #10102e;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
}

.titlebar .win-btns span.close {
    background: #e05555;
}

.titlebar .win-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    margin-right: 50px; /* balances the window buttons on the left */
}

/* ---------- main document window ---------- */

#container {
    width: 960px;
    margin: 30px auto;
    background: var(--window-bg);
    border: 1px solid var(--window-edge);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.7);
}

#windowbody {
    padding: 20px 24px;
    background: var(--window-bg);
}

img.float-left {
    float: left;
    margin: 0 20px 10px 0;
    width: 110px;
    border-radius: 18px;
}

p {
    line-height: 1.6;
    font-size: 1.05em;
}

hr {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    border: none;
    border-top: 3px solid var(--accent-dim);
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

h1 {
    font-size: 60px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: lighter;
    margin: 10px 0;
    background: linear-gradient(to bottom, #0a2472, #42a5f5, #0a1030);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter:
        drop-shadow(0 -3px 2px rgba(80, 160, 255, 0.35))
        drop-shadow(0 4px 2px rgba(0, 0, 0, 1));
}

h2 {
    color: var(--accent);
    clear: both;
}

h3 {
    font-size: 1.17em;
    color: #2196F3;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
}

a:visited {
    color: var(--link);
}

/* ---------- code / result blocks ---------- */

.code {
    color: #59ff00;
    background: #1a1a30;
    font-family: Menlo, Consolas, Monaco, "Courier New", monospace;
    font-size: 1em;
    line-height: 2;
    text-align: left;
    white-space: pre;
    tab-size: 4;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #33335c;
}

/* ---------- two-column block ---------- */

.twocol {
    display: flex;
    gap: 20px;
}

.twocol .column {
    flex: 1;
    padding: 12px;
    background: var(--panel-bg);
    border: 1px solid #33335c;
    border-radius: 6px;
    vertical-align: top;
}

.twocol img {
    max-width: 100%;
}

/* ---------- screenshots ---------- */

.shot {
    max-width: 100%;
    border: 1px solid var(--window-edge);
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    display: block;
    margin: 10px 0;
}

/* ---------- download button ---------- */

.blueDownload {
    display: inline-block;
    padding: 5px 14px;
    background: linear-gradient(to bottom, #1e88e5 0%, #1565c0 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    border: 2px solid #0d47a1;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 0 #0d47a1, 0 6px 10px rgba(0,0,0,0.25);
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.blueDownload:hover {
    background: linear-gradient(to bottom, #42a5f5 0%, #1e88e5 100%);
    color: #ffffff;
    box-shadow: 0 2px 0 #0d47a1, 0 4px 8px rgba(0,0,0,0.22);
    transform: translateY(2px);
}

.blueDownload:visited {
    color: #ffffff;
}

.blueDownload:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #0d47a1, 0 2px 4px rgba(0,0,0,0.2);
}

/* ---------- .stack download links ----------
   Every link whose href ends in ".stack" is a file download.
   (Also enforced by js/download-stack-links.js, the download
   attribute on each anchor, and stacks/.htaccess) */

a[href$=".stack"] {
    position: relative;
    padding-left: 24px;
    text-decoration: none;
    color: var(--link);
}

a[href$=".stack"]::before {
    content: "📄";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

a[href$=".stack"]:hover {
    color: var(--link-hover);
}

/* ---------- demo stacks grid ---------- */

.three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 14px;
    background: var(--panel-bg);
    border: 1px solid var(--accent-dim);
    border-radius: 8px;
}

.three-columns > * {
    padding: 8px;
}

.ccomment {
    color: var(--magenta);
    display: block;
    font-style: italic;
    font-size: 0.9em;
}

/* ---------- footer ---------- */

.compatfooter {
    margin: 24px;
    padding: 18px 20px;
    background: #10102e;
    border: 1px solid var(--amber);
    border-radius: 12px;
    color: var(--text);
}

.compatfooter a {
    color: var(--amber);
}

.laimage {
    float: left;
    margin: 4px 14px 14px 0;
    width: 36px;
}

/* ---------- small screens ---------- */

@media (max-width: 1100px) {
    #navPalette {
        position: static;
        width: auto;
        margin: 10px;
    }
    #container {
        width: auto;
        margin: 10px;
    }
    .three-columns {
        grid-template-columns: 1fr;
    }
    .twocol {
        flex-direction: column;
    }
}
