/*
 * The look every dl.min.io page shares, after www.min.io and docs.min.io:
 * Satoshi headings, Geist text, Roboto Mono code, MinIO red on the
 * docs.min.io gray scale, a navy header and footer, and a dark theme that
 * follows the system. Pages keep their own layout in their templates and
 * use the variables below; the older names (--bg-primary, --accent-red, ...)
 * are kept so every template reads the same palette.
 */

:root {
    color-scheme: light;

    --font-display: 'Satoshi', 'Geist', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --navy: #01091b;
    --navy-raised: #0b1428;
    --navy-border: #1f2a37;
    --red: #cf163d;
    --red-hover: #b91339;
    --red-text: #a01133;
    --red-tint: #fff1f2;

    --bg: #ffffff;
    --bg-muted: #f9fafb;
    --bg-subtle: #f3f4f6;
    --surface: #ffffff;
    --border: #e5e7eb;
    --border-strong: #d2d6db;
    --text: #111927;
    --text-2: #384250;
    --text-3: #6c737f;
    --link: var(--text);
    --link-underline: var(--red);
    --mark: #fde68a;
    --info: #2e90fa;
    --success: #17b26a;
    --warning: #f79009;
    --error: #f04438;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px #1018280f, 0 1px 3px #1018281a;
    --shadow-md: 0 2px 4px -2px #1018280f, 0 4px 8px -2px #1018281a;
    --shadow-lg: 0 4px 6px -2px #10182808, 0 12px 16px -4px #10182814;
    --container: 1280px;
    --header-height: 64px;

    /* Names the templates use. */
    --bg-primary: var(--bg);
    --bg-white: var(--surface);
    --bg-page: var(--bg-muted);
    --bg-secondary: var(--bg-muted);
    --bg-light: var(--bg-muted);
    --bg-tertiary: var(--bg-subtle);
    --bg-code: var(--bg-muted);
    --bg-dark: var(--navy);
    --bg-dark-secondary: var(--navy-raised);
    --border-color: var(--border);
    --border-light: var(--border-strong);
    --border-dark: var(--navy-border);
    --text-primary: var(--text);
    --text-secondary: var(--text-2);
    --text-muted: var(--text-3);
    --text-white: #ffffff;
    --text-white-muted: #d2d6db;
    --accent-red: var(--red);
    --accent-red-hover: var(--red-hover);
    --accent-blue: #1a4be1;
    --accent-green: #067647;
    --sev-critical: #b42318;
    --sev-high: #dc6803;
    --sev-medium: #b54708;
    --sev-low: #175cd3;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --red: #e04e6a;
        --red-hover: #ee8a9c;
        --red-text: #ee8a9c;
        --red-tint: #2a0f19;

        --bg: #01091b;
        --bg-muted: #0b1428;
        --bg-subtle: #111927;
        --surface: #0b1428;
        --border: #1f2a37;
        --border-strong: #384250;
        --text: #f3f4f6;
        --text-2: #d2d6db;
        --text-3: #9da4ae;
        --mark: #854d0e;

        --shadow-sm: 0 1px 2px #0000004d;
        --shadow-md: 0 4px 8px -2px #00000066;
        --shadow-lg: 0 12px 16px -4px #00000080;

        --navy-raised: #111927;
        --accent-blue: #76b4ff;
        --accent-green: #47cd89;
        --sev-critical: #f97066;
        --sev-high: #fdb022;
        --sev-medium: #fec84b;
        --sev-low: #84caff;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: var(--text);
}

code, kbd, pre, samp {
    font-family: var(--font-mono);
}

::selection {
    background: color-mix(in srgb, var(--red) 25%, transparent);
}

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

/* Header: navy, as on docs.min.io. */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    border-bottom: 1px solid var(--navy-border);
}

.site-header .header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: var(--header-height);
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    text-decoration: none;
}

.site-header .brand svg {
    height: 18px;
    width: auto;
    color: #cf163d;
}

.site-header .brand-divider {
    width: 1px;
    height: 22px;
    background: #384250;
}

.site-header .brand-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
    white-space: nowrap;
}

.site-header .site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin-left: auto;
}

.site-header .site-nav a {
    color: #d2d6db;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.site-header .site-nav a:hover,
.site-header .site-nav a[aria-current="page"] {
    color: #ffffff;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background: #cf163d;
    border-color: #cf163d;
    color: #ffffff;
}

.btn-primary:hover {
    background: #b91339;
    border-color: #b91339;
    color: #ffffff;
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--border-strong);
    background: var(--bg-subtle);
    color: var(--text);
}

/* Breadcrumbs and page titles. */

.page-head {
    padding: 40px 0 24px;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-3);
}

.page-title {
    margin: 4px 0 0;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

.page-lead {
    margin: 8px 0 0;
    max-width: 720px;
    color: var(--text-3);
    font-size: 16px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-3);
    overflow-wrap: anywhere;
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 6px;
    color: var(--border-strong);
}

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

.breadcrumbs a:hover {
    color: var(--red);
}

.breadcrumbs [aria-current="page"] {
    color: var(--text);
    font-weight: 500;
}

/* Links in prose: docs.min.io's red underline. */

.prose a {
    color: var(--link);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3.5px;
}

.prose a:hover {
    opacity: 0.8;
}

/* Footer: navy, as on www.min.io. */

main {
    flex: 1 0 auto;
    width: 100%;
}

.site-footer {
    margin-top: 80px;
    background: var(--navy);
    background-image: radial-gradient(circle farthest-corner at 50% 260%, #021337 20%, transparent 80%);
    color: #d2d6db;
    font-size: 13px;
}

.site-footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding-top: 32px;
    padding-bottom: 32px;
}

.site-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-footer .footer-brand svg {
    height: 14px;
    width: auto;
    color: #ffffff;
}

.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.site-footer a {
    color: #d2d6db;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: #ffffff;
}

/* Scrollbars. */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

@media (max-width: 900px) {
    .site-header .site-nav {
        gap: 1.25rem;
    }

    .site-header .site-nav .nav-secondary {
        display: none;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .site-header .header-content {
        gap: 1rem;
    }

    .site-header .brand-divider,
    .site-header .brand-name {
        display: none;
    }

    .site-header .site-nav {
        gap: 1rem;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .site-header .site-nav a {
        font-size: 14px;
    }

    .site-header .btn-primary {
        display: none;
    }

    .page-head {
        padding: 24px 0 16px;
    }

    .page-title {
        font-size: 24px;
    }
}

/*
 * Rendered Markdown (the file viewer and /releases), after docs.min.io:
 * cards for code blocks and tables, callouts for block quotes.
 */

.prose {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.prose > :first-child {
    margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    margin: 1.75em 0 0.6em;
    color: var(--text);
    line-height: 1.3;
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.prose h1 {
    font-size: 1.75em;
    font-weight: 500;
}

.prose h2 {
    font-size: 1.5em;
    font-weight: 600;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border);
}

.prose h3 {
    font-size: 1.25em;
    font-weight: 600;
}

.prose h4,
.prose h5,
.prose h6 {
    font-size: 1em;
    font-weight: 600;
}

.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose table,
.prose blockquote {
    margin: 0 0 1.1em;
}

.prose ul,
.prose ol {
    padding-left: 1.5em;
}

.prose li {
    margin: 0.3em 0;
}

.prose li::marker {
    color: var(--text-3);
}

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

.prose hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.prose img {
    max-width: 100%;
    border-radius: var(--radius);
}

.prose :not(pre) > code {
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--bg-muted);
    color: var(--text);
    font-size: 0.85em;
}

.prose pre {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.prose pre code,
.prose pre code.hljs {
    padding: 0;
    background: none;
    font-size: inherit;
}

.prose table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875em;
    line-height: 1.7;
}

.prose th,
.prose td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.prose th + th,
.prose td + td {
    border-left: 1px solid var(--border);
}

.prose tr:last-child td {
    border-bottom: 0;
}

.prose th {
    background: var(--bg-muted);
    color: var(--text);
    font-weight: 600;
}

.prose blockquote {
    position: relative;
    padding: 12px 16px 12px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text-2);
    font-size: 15px;
}

.prose blockquote::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 8px;
    width: 2px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--info) 50%, transparent);
}

.prose blockquote > :last-child {
    margin-bottom: 0;
}

.prose mark {
    background: var(--mark);
    color: inherit;
    border-radius: 2px;
}
