@import url("../api/stylesheet.css");

:root {
    --tutorial-accent: #2a6b9b;
    --tutorial-accent-soft: #eaf3fb;
    --tutorial-success: #2f7a48;
    --tutorial-success-soft: #eef8f1;
    --tutorial-warn: #9b641f;
    --tutorial-warn-soft: #fff7ec;
    --tutorial-danger: #9d3c3c;
    --tutorial-danger-soft: #fff1f1;
    --tutorial-border: #ccd8e3;
    --tutorial-surface: #ffffff;
    --tutorial-surface-soft: #f8fbfe;
    --tutorial-text-soft: #42576b;
    --tutorial-shadow: 0 10px 30px rgba(28, 54, 77, 0.06);
}

body {
    line-height: 1.65;
}

.docs-home,
.tutorial-doc {
    min-height: 100vh;
}

.docs-home-wrap,
.tutorial-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 42px;
}

.top-links .link-btn,
.top-links .link-btn:visited {
    appearance: none;
    border: 1px solid #c4d3e1;
    background: #ffffff;
    color: #1a5f91;
    border-radius: 6px;
    padding: 7px 12px;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.top-links .link-btn:hover {
    background: #f4f8fc;
    text-decoration: none;
}

.top-links .link-btn.theme-icon-btn,
.top-links .link-btn.theme-icon-btn:visited {
    width: 40px;
    min-width: 40px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-hero,
.tutorial-article {
    border: 1px solid var(--tutorial-border);
    border-radius: 10px;
    background: var(--tutorial-surface);
    box-shadow: var(--tutorial-shadow);
}

.home-hero {
    padding: 32px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #fafcff 0%, #edf5fb 100%);
}

.home-hero .member-path {
    margin-bottom: 10px;
    font-size: 42px;
}

.home-hero .lead,
.tutorial-hero .lead {
    max-width: 900px;
    font-size: 18px;
    color: var(--tutorial-text-soft);
}

.home-grid,
.summary-grid,
.two-col {
    display: grid;
    gap: 16px;
}

.home-grid,
.summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-card,
.home-card,
.tutorial-panel,
.callout,
.pager-card {
    border: 1px solid var(--tutorial-border);
    border-radius: 8px;
    background: var(--tutorial-surface-soft);
}

.summary-card,
.home-card,
.pager-card {
    padding: 16px 18px;
}

.summary-card h3,
.home-card h3,
.pager-card .pager-title {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.summary-card p,
.home-card p,
.pager-card p {
    margin: 0;
    color: var(--tutorial-text-soft);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tutorial-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.tutorial-sidebar {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tutorial-panel {
    overflow: hidden;
}

.tutorial-panel .nav-pane-header {
    margin: 0;
}

.tutorial-panel-body {
    padding: 14px;
}

.tutorial-nav-list,
.toc-list,
.guide-list {
    margin: 0;
    padding-left: 18px;
}

.tutorial-nav-list {
    list-style: none;
    padding-left: 0;
}

.tutorial-nav-list li + li {
    margin-top: 3px;
}

.tutorial-nav-list a {
    display: block;
    padding: 7px 9px;
    border-radius: 6px;
    color: #274861;
    text-decoration: none;
}

.tutorial-nav-list a:hover {
    background: #eef5fa;
}

.tutorial-nav-list a.current {
    background: var(--tutorial-accent-soft);
    color: #123e64;
    font-weight: 700;
}

.tutorial-nav-group + .tutorial-nav-group {
    margin-top: 16px;
}

.tutorial-nav-group-title {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #486179;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tutorial-main {
    min-width: 0;
}

.tutorial-article {
    padding: 26px 30px 30px;
}

.tutorial-hero {
    margin-bottom: 24px;
}

.tutorial-article h2 {
    margin-top: 32px;
}

.tutorial-article h2:first-of-type {
    margin-top: 0;
}

.tutorial-article h3 {
    margin: 18px 0 8px 0;
    font-size: 18px;
    color: #30495f;
}

.tutorial-article p {
    margin: 0 0 12px 0;
}

.guide-section + .guide-section {
    margin-top: 28px;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 18px;
    table-layout: fixed;
}

.guide-table th,
.guide-table td {
    border: 1px solid #d7e2eb;
    padding: 10px 12px;
    vertical-align: top;
}

.guide-table th {
    background: #eef4fa;
    color: #30495f;
    text-align: left;
    font-weight: 600;
}

.callout {
    padding: 14px 16px;
    margin: 16px 0;
    border-left: 4px solid var(--tutorial-accent);
    background: #f6fbff;
}

.callout-title {
    margin: 0 0 6px 0;
    font-weight: 700;
    color: #234c6c;
}

.callout.warn {
    border-left-color: var(--tutorial-warn);
    background: var(--tutorial-warn-soft);
}

.callout.warn .callout-title {
    color: #6d4614;
}

.callout.success {
    border-left-color: var(--tutorial-success);
    background: var(--tutorial-success-soft);
}

.callout.success .callout-title {
    color: #255b37;
}

.callout.danger {
    border-left-color: var(--tutorial-danger);
    background: var(--tutorial-danger-soft);
}

.callout.danger .callout-title {
    color: #6f2a2a;
}

.callout p:last-child,
.callout ul:last-child,
.callout ol:last-child {
    margin-bottom: 0;
}

.doc-checklist {
    margin: 0;
    padding-left: 18px;
}

.doc-checklist li + li {
    margin-top: 6px;
}

.doc-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.pager-card .small {
    display: block;
    margin-bottom: 8px;
}

.pager-card a {
    font-weight: 600;
}

.home-section {
    margin-top: 22px;
}

.home-section .h2,
.tutorial-article .h2 {
    display: block;
}

pre.code {
    margin: 14px 0 18px;
    line-height: 1.5;
    font-size: 13px;
}

pre.code code {
    font-family: Consolas, "Courier New", monospace;
}

code.inline-strong {
    font-weight: 700;
}

.tok-com,
.tok-cmt {
    color: #6b7f93;
    font-style: italic;
}

.docs-home .member-summary,
.tutorial-doc .member-summary {
    margin: 0;
}

body.theme-dark .home-hero,
body.theme-dark .tutorial-article {
    background: #121a23;
    border-color: #3a4a59;
    box-shadow: none;
}

body.theme-dark .home-hero {
    background: linear-gradient(135deg, #16212c 0%, #11202d 100%);
}

body.theme-dark .home-hero .lead,
body.theme-dark .tutorial-hero .lead,
body.theme-dark .summary-card p,
body.theme-dark .home-card p,
body.theme-dark .pager-card p,
body.theme-dark .tutorial-article p {
    color: #a7b8c9;
}

body.theme-dark .summary-card,
body.theme-dark .home-card,
body.theme-dark .tutorial-panel,
body.theme-dark .pager-card {
    background: #18222d;
    border-color: #3d4e5d;
}

body.theme-dark .tutorial-nav-group-title {
    color: #9fb0c2;
}

body.theme-dark .tutorial-nav-list a {
    color: #cfdeeb;
}

body.theme-dark .tutorial-nav-list a:hover {
    background: #233240;
}

body.theme-dark .tutorial-nav-list a.current {
    background: #23384b;
    color: #e8f1f8;
}

body.theme-dark .guide-table th,
body.theme-dark .guide-table td {
    border-color: #37495a;
}

body.theme-dark .guide-table th {
    background: #202d3a;
    color: #d4e0ec;
}

body.theme-dark .callout {
    background: #142330;
    border-color: #4e7698;
}

body.theme-dark .callout .callout-title {
    color: #afd4f4;
}

body.theme-dark .callout.warn {
    background: #2a2114;
    border-color: #b88433;
}

body.theme-dark .callout.warn .callout-title {
    color: #f0cb8e;
}

body.theme-dark .callout.success {
    background: #14261a;
    border-color: #4f9463;
}

body.theme-dark .callout.success .callout-title {
    color: #a6ddb4;
}

body.theme-dark .callout.danger {
    background: #2b1717;
    border-color: #b35d5d;
}

body.theme-dark .callout.danger .callout-title {
    color: #f0b1b1;
}

body.theme-dark .top-links .link-btn,
body.theme-dark .top-links .link-btn:visited {
    background: #121a23;
    color: #8ab9e8;
    border-color: #3a4654;
}

body.theme-dark .top-links .link-btn:hover {
    background: #1b2530;
}

body.theme-dark .tok-com,
body.theme-dark .tok-cmt {
    color: #7f97ac;
}

@media (max-width: 980px) {
    .tutorial-layout,
    .two-col {
        grid-template-columns: 1fr;
    }

    .tutorial-sidebar {
        position: static;
    }

    .doc-pager {
        grid-template-columns: 1fr;
    }

    .home-hero,
    .tutorial-article {
        padding: 22px 20px;
    }
}
