/*
 * Public documentation site (php artisan docs:build). Self-contained: no build
 * step, no third-party requests. Colours follow the portal's design tokens.
 */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('fonts/sora-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('fonts/sora-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
    color-scheme: light;
    --canvas: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #f7f8fb;
    --border: #e3e6ef;
    --border-strong: #d5d9e4;
    --text: #141a2e;
    --text-2: #2e3650;
    --muted: #5b6478;
    --faint: #8a92a6;
    --accent: #5b4bea;
    --accent-strong: #3f2fc4;
    --accent-soft: #eeebff;
    --code-bg: #eef0f5;
    --pre-bg: #0b0f1a;
    --pre-text: #e6eaf2;
    --note-bg: #f3f1ff;
    --note-border: #d9d3ff;
    --tip-bg: #ecfdf3;
    --tip-border: #a6e9c3;
    --tip-text: #116b3c;
    --warn-bg: #fff7e8;
    --warn-border: #f5cf86;
    --warn-text: #8a4b00;
    --danger-bg: #fff1f1;
    --danger-border: #f5b4b4;
    --danger-text: #a3201f;
    --shadow: 0 1px 2px rgb(20 26 46 / 0.06), 0 8px 24px rgb(20 26 46 / 0.06);

    --font-sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Sora', 'Manrope', ui-sans-serif, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --topbar: 60px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        color-scheme: dark;
        --canvas: #0b0f1a;
        --surface: #121829;
        --surface-2: #0f1424;
        --border: #1e2740;
        --border-strong: #2a3452;
        --text: #e6eaf2;
        --text-2: #c5cce0;
        --muted: #8b95ad;
        --faint: #6b7591;
        --accent: #8f82ff;
        --accent-strong: #a99bff;
        --accent-soft: #1d1b3d;
        --code-bg: #182036;
        --pre-bg: #070a12;
        --pre-text: #e6eaf2;
        --note-bg: #1a1838;
        --note-border: #3a3478;
    --tip-bg: #0f2a1d;
    --tip-border: #1f5b3a;
    --tip-text: #7fe0a8;
    --warn-bg: #2b200c;
    --warn-border: #6b4c12;
    --warn-text: #f5c56b;
    --danger-bg: #2d1313;
    --danger-border: #6e2626;
    --danger-text: #ff9b9b;
        --tip-bg: #0f2a1d;
        --tip-border: #1f5b3a;
        --tip-text: #7fe0a8;
        --warn-bg: #2b200c;
        --warn-border: #6b4c12;
        --warn-text: #f5c56b;
        --danger-bg: #2d1313;
        --danger-border: #6e2626;
        --danger-text: #ff9b9b;
        --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
    }
}

:root[data-theme='dark'] {
    color-scheme: dark;
    --canvas: #0b0f1a;
    --surface: #121829;
    --surface-2: #0f1424;
    --border: #1e2740;
    --border-strong: #2a3452;
    --text: #e6eaf2;
    --text-2: #c5cce0;
    --muted: #8b95ad;
    --faint: #6b7591;
    --accent: #8f82ff;
    --accent-strong: #a99bff;
    --accent-soft: #1d1b3d;
    --code-bg: #182036;
    --pre-bg: #070a12;
    --pre-text: #e6eaf2;
    --note-bg: #1a1838;
    --note-border: #3a3478;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text); font-family: var(--font-sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--surface); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 60; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: var(--topbar); padding: 0 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #7c6cff, #4a7bf7); }
.brand-mark svg { width: 17px; height: 17px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand-tag { font-size: 12px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--border-strong); padding-left: 10px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.icon-button svg { width: 20px; height: 20px; }
.menu-button { display: none; }
.icon-moon { display: none; }
:root[data-theme='dark'] .icon-sun { display: none; }
:root[data-theme='dark'] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .icon-sun { display: none; }
    :root:not([data-theme='light']) .icon-moon { display: block; }
}

/* Search */
.search { position: relative; margin-left: auto; width: min(360px, 100%); }
.search input { width: 100%; height: 38px; padding: 0 36px 0 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-results { position: absolute; top: calc(100% + 8px); right: 0; width: min(520px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-results a[aria-selected='true'], .search-results a:hover { background: var(--accent-soft); }
.search-results .result-section { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.search-results .result-title { display: block; font-weight: 600; }
.search-results .result-snippet { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 2px; }
.search-results mark { background: none; color: var(--accent-strong); font-weight: 700; }
.search-results .empty { padding: 14px 12px; color: var(--muted); font-size: 14px; margin: 0; }

/* Layout */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr) 220px; max-width: 1360px; margin: 0 auto; }
.sidebar { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 24px 16px 48px; border-right: 1px solid var(--border); }
.sidebar ul, .toc ul { list-style: none; margin: 0 0 20px; padding: 0; }
.sidebar a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--text-2); font-size: 14px; line-height: 1.45; text-decoration: none; }
.sidebar a:hover { background: var(--surface-2); color: var(--text); }
.sidebar a[aria-current='page'] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav-section { margin: 0 0 6px; }
.nav-section-title { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 7px; font-size: 14px; font-weight: 650; color: var(--text); cursor: pointer; list-style: none; }
.nav-section-title::-webkit-details-marker { display: none; }
.nav-section-title::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); transition: transform 0.15s; }
.nav-section[open] > .nav-section-title::after { transform: rotate(45deg); }
.nav-section-title:hover { background: var(--surface-2); }
.nav-section > ul { margin-bottom: 12px; }
.nav-section ul { padding-left: 6px; }
.nav-group { margin: 10px 0 4px; padding: 0 10px 0 16px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.nav-heading { margin: 0 0 6px; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
.scrim { display: none; }

.content { min-width: 0; padding: 40px 48px 80px; max-width: 840px; }
.content-wide { max-width: none; grid-column: 2 / 4; }
.toc { position: sticky; top: var(--topbar); align-self: start; padding: 40px 16px 24px 0; max-height: calc(100vh - var(--topbar)); overflow-y: auto; }
.toc a { display: block; padding: 4px 10px; border-left: 2px solid var(--border); color: var(--muted); font-size: 13px; line-height: 1.45; text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc a.active { border-left-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }

/* Page header */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.page-header { margin: 0 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.page-header h1 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
.lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.updated { margin: 32px 0 0; font-size: 13px; color: var(--faint); }

/* Callouts: a quote starting with **Note:**, **Tip:**, **Important:** or **Warning:** */
.prose .callout { margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--note-border); border-left-width: 4px; border-radius: 8px; background: var(--note-bg); }
.prose .callout p { margin: 0 0 8px; }
.prose .callout p:last-child { margin-bottom: 0; }
.prose .callout-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-strong); }
.prose .callout-tip { background: var(--tip-bg); border-color: var(--tip-border); }
.prose .callout-tip .callout-title { color: var(--tip-text); }
.prose .callout-important { background: var(--warn-bg); border-color: var(--warn-border); }
.prose .callout-important .callout-title { color: var(--warn-text); }
.prose .callout-warning { background: var(--danger-bg); border-color: var(--danger-border); }
.prose .callout-warning .callout-title { color: var(--danger-text); }

/* Related pages */
.related { margin-top: 48px; }
.related h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.related-link { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-decoration: none; }
.related-link:hover { border-color: var(--accent); }
.related-title { display: block; font-weight: 650; color: var(--text); }
.related-summary { display: -webkit-box; margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Article */
.prose { color: var(--text-2); overflow-wrap: break-word; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-display); color: var(--text); letter-spacing: -0.015em; line-height: 1.3; }
.prose h1 { margin: 0 0 20px; font-size: clamp(28px, 4vw, 36px); font-weight: 600; }
.prose h2 { margin: 44px 0 12px; padding-top: 8px; font-size: 22px; font-weight: 600; }
.prose h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; }
.prose .anchor { margin-left: 8px; color: var(--faint); text-decoration: none; opacity: 0; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose p, .prose ul, .prose ol, .prose table, .prose pre, .prose blockquote { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin: 4px 0 0; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: var(--code-bg); color: var(--text); padding: 2px 6px; border-radius: 5px; }
.prose pre { position: relative; overflow-x: auto; background: var(--pre-bg); color: var(--pre-text); padding: 16px 18px; border-radius: 10px; border: 1px solid var(--border); font-size: 13.5px; line-height: 1.65; }
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.prose .copy { position: absolute; top: 8px; right: 8px; border: 1px solid rgb(255 255 255 / 0.15); background: rgb(255 255 255 / 0.06); color: #c5cce0; border-radius: 6px; font: 600 12px var(--font-sans); padding: 4px 9px; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.prose pre:hover .copy, .prose .copy:focus { opacity: 1; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.prose th { text-align: left; font-weight: 650; color: var(--text); border-bottom: 1px solid var(--border-strong); padding: 8px 16px 8px 0; }
.prose td { border-bottom: 1px solid var(--border); padding: 8px 16px 8px 0; vertical-align: top; }
.prose blockquote { border-left: 3px solid var(--note-border); background: var(--note-bg); padding: 10px 16px; border-radius: 0 8px 8px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pager-link { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; }
.pager-link span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.pager-link:hover { border-color: var(--accent); }
.pager-next { grid-column: 2; text-align: right; }

/* Home */
.hero { padding: 24px 0 36px; max-width: 720px; }
.hero h1 { margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(30px, 5vw, 44px); font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; }
.hero p { margin: 0 0 24px; font-size: 18px; color: var(--muted); }
.hero-search { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; box-shadow: var(--shadow); }
.hero-search:hover { border-color: var(--accent); color: var(--text); }
.hero-search svg { width: 18px; height: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 20px 12px; }
.home-section { margin: 0 0 44px; }
.home-section > h2 { margin: 0 0 16px; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.task { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.task:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.task-title { display: block; margin-bottom: 4px; font-weight: 700; color: var(--text); }
.task-title span { color: var(--accent); }
.task-summary { display: block; font-size: 14px; line-height: 1.55; color: var(--muted); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); flex-shrink: 0; }
.card-icon svg { width: 19px; height: 19px; }
.card h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.card-count { margin-left: 4px; font-size: 12px; font-weight: 650; color: var(--faint); }
.card-blurb { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.card .card-more { display: inline-block; margin: 4px 0 8px; font-size: 13.5px; font-weight: 650; color: var(--accent); }
.card ul { list-style: none; margin: 0; padding: 0; }
.card li { margin: 0 0 8px; }
.card a { color: var(--text-2); font-size: 14.5px; text-decoration: none; }
.card a:hover { color: var(--accent); }

@media (max-width: 1180px) {
    .shell { grid-template-columns: 248px minmax(0, 1fr); }
    .toc { display: none; }
    .content-wide { grid-column: 2; }
}

@media (max-width: 860px) {
    .shell { display: block; }
    .menu-button { display: grid; }
    .brand-tag { display: none; }
    .sidebar { position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; height: auto; width: min(300px, 85vw); background: var(--surface); transform: translateX(-100%); transition: transform 0.2s ease; }
    .nav-open .sidebar { transform: none; }
    .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgb(0 0 0 / 0.45); }
    .content { padding: 28px 16px 64px; }
    .topbar { gap: 8px; }
    .search { width: auto; flex: 1; }
    .search kbd { display: none; }
    .pager { grid-template-columns: 1fr; }
    .pager-next { grid-column: 1; }
}

@media (max-width: 420px) {
    .brand-name { display: none; }
}

@media print {
    .topbar, .sidebar, .toc, .pager, .prose .copy, .prose .anchor { display: none; }
    .shell { display: block; }
    .content { padding: 0; }
}
