:root {
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f9fafb;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --green: #059669;
    --coral: #f97316;
    --yellow: #eab308;
    --shadow: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, .08);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 150ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    color: var(--ink);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

input, textarea, select, button {
    font: inherit;
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--ink);
    background: var(--paper);
    outline: none;
    transition: border-color var(--transition);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--blue);
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

/* ===== Shared button styles (used by admin) ===== */

.primary-button, .ghost-button, .small-button, .danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition);
}

.primary-button {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 2px 8px rgba(59, 130, 246, .25);
}

.primary-button:hover {
    background: var(--blue-dark);
    box-shadow: 0 4px 12px rgba(59, 130, 246, .35);
    transform: translateY(-1px);
}

.ghost-button {
    color: var(--blue-dark);
    background: rgba(59, 130, 246, .08);
}

.ghost-button:hover {
    background: rgba(59, 130, 246, .14);
}

.small-button {
    min-height: 34px;
    color: var(--green);
    background: rgba(5, 150, 105, .08);
}

.small-button:hover {
    background: rgba(5, 150, 105, .14);
}

.danger-button {
    min-height: 34px;
    color: #dc2626;
    background: rgba(220, 38, 38, .08);
}

.danger-button:hover {
    background: rgba(220, 38, 38, .14);
}

/* ===== Shared base styles (used by admin) ===== */

.article-card, .admin-panel, .stats-grid article, .login-box, .setup-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.empty-state {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 80vh;
    padding: 20px;
    text-align: center;
}

.empty-state p {
    color: var(--muted);
}

.notice, .form-error {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    background: #fffbeb;
    color: #92400e;
    font-weight: 600;
    font-size: 14px;
}

.form-error {
    background: #fef2f2;
    color: #dc2626;
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 12px;
    color: var(--green);
    background: rgba(5, 150, 105, .08);
    font-size: 12px;
    font-weight: 700;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.admin-table th, .admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.admin-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

/* ===== Frontend Header ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 80px);
    height: 64px;
    background: rgba(255, 255, 255, .85);
    border-bottom: 1px solid rgba(226, 232, 240, .8);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
}

.brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.3px;
}

.brand:hover {
    color: var(--blue);
}

.site-header nav, .admin-sidebar nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-header nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.site-header nav a:hover {
    color: var(--ink);
    background: var(--soft);
}

/* ===== Hero Section ===== */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: center;
    min-height: 520px;
    padding: 80px clamp(20px, 5vw, 80px) 64px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(59, 130, 246, .06), transparent),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(5, 150, 105, .04), transparent),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    z-index: -1;
}

.hero-content {
    max-width: 640px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .06);
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
}

.hero-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(36px, 5.5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--ink);
}

.hero-tagline {
    margin: 0 0 36px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-card {
    position: relative;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-lg);
}

.hero-card-label {
    display: block;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.hero-card-number {
    display: block;
    margin-bottom: 8px;
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -.02em;
}

.hero-card-desc {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.hero-card::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 24px;
    right: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--green));
    border-radius: 0 0 4px 4px;
}

/* ===== Section Styles ===== */

.section-band {
    padding: 72px clamp(20px, 5vw, 80px);
}

.section-band-alt {
    background: var(--soft);
}

.section-header {
    margin-bottom: 40px;
}

.section-label {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.section-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.01em;
}

.section-desc {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 560px;
}

/* ===== Featured Articles Grid ===== */

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.article-card {
    padding: 28px;
    transition: all var(--transition);
    border-color: var(--line);
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, .2);
}

.article-card-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(5, 150, 105, .06);
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
}

.article-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--ink);
    transition: color var(--transition);
}

.article-card h3 a:hover {
    color: var(--blue);
}

.article-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Latest Articles List ===== */

.article-list {
    display: grid;
    gap: 0;
}

.article-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    transition: all var(--transition);
}

.article-list-item:last-child {
    border-bottom: 0;
}

.article-list-item:hover {
    background: rgba(59, 130, 246, .02);
}

.article-list-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--soft);
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.article-list-body {
    min-width: 0;
}

.article-list-title {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    transition: color var(--transition);
}

.article-list-item:hover .article-list-title {
    color: var(--blue);
}

.article-list-summary {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-list-tag {
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(5, 150, 105, .06);
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== Book TOC Page ===== */

.book-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 64px 24px 80px;
}

.book-header {
    margin-bottom: 48px;
    text-align: center;
}

.book-header h1 {
    margin: 0 0 12px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.book-header p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 480px;
    margin-inline: auto;
}

.toc-list {
    display: grid;
    gap: 24px;
}

.toc-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.toc-section:hover {
    box-shadow: var(--shadow-lg);
}

.toc-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--soft);
}

.toc-section-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--blue);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

.toc-section-info {
    min-width: 0;
}

.toc-section-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.toc-section-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.toc-articles {
    padding: 8px 0;
}

.toc-article-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px 14px 84px;
    color: var(--ink);
    transition: all var(--transition);
    position: relative;
}

.toc-article-link::before {
    content: "";
    position: absolute;
    left: 60px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
    transform: translateY(-50%);
    transition: all var(--transition);
}

.toc-article-link:hover {
    background: rgba(59, 130, 246, .03);
}

.toc-article-link:hover::before {
    background: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.toc-article-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.toc-article-summary {
    color: var(--muted);
    font-size: 13px;
    max-width: 320px;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.toc-children {
    border-top: 1px solid var(--line);
    background: var(--soft);
}

.toc-child-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px 8px 60px;
}

.toc-child-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.toc-child-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.toc-child-articles {
    padding: 4px 0 8px;
}

.toc-child-articles .toc-article-link {
    padding-left: 96px;
}

.toc-child-articles .toc-article-link::before {
    left: 76px;
    width: 6px;
    height: 6px;
}

/* ===== Article Reading Page ===== */

.reader-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 760px);
    gap: 48px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.reader-sidebar {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 8px;
}

.reader-sidebar::-webkit-scrollbar {
    width: 4px;
}

.reader-sidebar::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 4px;
}

.reader-sidebar-title {
    display: block;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.reader-nav-section {
    margin-bottom: 20px;
}

.reader-nav-section-title {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.reader-nav-link {
    display: block;
    padding: 7px 12px;
    margin: 2px 0;
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
    transition: all var(--transition);
}

.reader-nav-link:hover {
    color: var(--ink);
    background: var(--soft);
}

.reader-nav-link.active {
    color: var(--blue);
    background: rgba(59, 130, 246, .06);
    font-weight: 600;
}

.reader-nav-subsection {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.reader-nav-subsection-title {
    display: block;
    margin-bottom: 6px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

/* ===== Article Content ===== */

.reader-article {
    min-width: 0;
}

.article-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
}

.article-breadcrumb a {
    color: var(--blue);
    font-weight: 500;
}

.article-breadcrumb a:hover {
    text-decoration: underline;
}

.article-breadcrumb-sep {
    color: var(--line);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.article-meta-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(5, 150, 105, .06);
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
}

.article-meta-views {
    color: var(--muted);
    font-size: 13px;
}

.article-title {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--ink);
}

.article-lead {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

/* ===== Markdown Content ===== */

.markdown-body {
    margin-top: 32px;
    color: #374151;
    font-size: 16px;
    line-height: 1.8;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
    color: var(--ink);
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: .6em;
}

.markdown-body h1 { font-size: 2em; }
.markdown-body h2 { font-size: 1.5em; }
.markdown-body h3 { font-size: 1.25em; }

.markdown-body h2 {
    padding-top: 1em;
    border-top: 1px solid var(--line);
}

.markdown-body h1[id],
.markdown-body h2[id],
.markdown-body h3[id],
.markdown-body h4[id],
.markdown-body h5[id],
.markdown-body h6[id] {
    scroll-margin-top: 88px;
}

.markdown-body p {
    margin: 1em 0;
}

.markdown-body :not(pre) > code {
    border-radius: 5px;
    padding: 2px 6px;
    background: rgba(59, 130, 246, .06);
    color: var(--blue-dark);
    font-size: .9em;
}

.markdown-body blockquote {
    margin: 1.5em 0;
    border-left: 3px solid var(--blue);
    padding: 12px 20px;
    background: rgba(59, 130, 246, .03);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #4b5563;
}

.markdown-body blockquote p {
    margin: .5em 0;
}

.markdown-body table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

.markdown-body th {
    background: var(--soft);
    color: var(--ink);
    font-weight: 700;
    font-size: 14px;
}

.markdown-body tr:nth-child(even) td {
    background: rgba(248, 250, 252, .5);
}

.markdown-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5em auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.markdown-body hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2.5em 0;
}

.markdown-body a {
    color: var(--blue);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(59, 130, 246, .3);
    transition: text-decoration-color var(--transition);
}

.markdown-body a:hover {
    text-decoration-color: var(--blue);
}

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

.markdown-body li {
    margin: .5em 0;
}

.markdown-body input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* ===== Code Blocks ===== */

.code-frame {
    overflow: hidden;
    margin: 1.5em 0;
    border-radius: var(--radius);
    background: #0f172a;
    border: 1px solid #1e293b;
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid #1e293b;
    background: #0c1322;
}

.code-language {
    color: #94a3b8;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.code-copy-button {
    position: relative;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition);
}

.code-copy-button:hover {
    background: rgba(255, 255, 255, .08);
}

.code-copy-button.copied {
    background: rgba(5, 150, 105, .3);
}

.code-copy-icon::before,
.code-copy-icon::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 14px;
    border: 1.5px solid #64748b;
    border-radius: 2px;
}

.code-copy-icon::before {
    top: 8px;
    left: 8px;
    opacity: .5;
}

.code-copy-icon::after {
    top: 6px;
    left: 11px;
    background: #0f172a;
}

.code-copy-button.copied .code-copy-icon::before {
    left: 9px;
    top: 14px;
    width: 8px;
    height: 4px;
    border-width: 0 0 2px 2px;
    border-radius: 0;
    transform: rotate(-45deg);
    opacity: 1;
    border-color: #34d399;
}

.code-copy-button.copied .code-copy-icon::after {
    content: none;
}

.markdown-body pre {
    overflow: auto;
    margin: 0;
    padding: 20px;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.7;
    tab-size: 4;
    font-size: 14px;
}

.markdown-body pre code {
    display: block;
    min-width: max-content;
    background: transparent;
    color: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: inherit;
    white-space: pre;
}

/* highlight.js integration */
.markdown-body pre code.hljs {
    padding: 0;
    background: transparent;
    overflow: visible;
}

.markdown-body .code-frame pre {
    background: #0f172a;
}

/* Syntax highlighting is handled by highlight.js (highlight-github-dark.min.css) */

/* ===== Footer ===== */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(20px, 5vw, 80px);
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.site-footer a {
    color: var(--muted);
    transition: color var(--transition);
}

.site-footer a:hover {
    color: var(--ink);
}

/* ===== Frontend Responsive ===== */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 56px clamp(20px, 5vw, 80px) 48px;
    }

    .hero-card {
        max-width: 400px;
    }

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

    .reader-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px 24px 64px;
    }

    .reader-sidebar {
        position: static;
        max-height: none;
        padding-right: 0;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 56px;
        padding: 0 16px;
    }

    .brand {
        font-size: 16px;
    }

    .site-header nav a {
        padding: 6px 10px;
        font-size: 13px;
    }

    .hero {
        padding: 40px 20px 36px;
        gap: 32px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-tagline {
        font-size: 16px;
    }

    .section-band {
        padding: 48px 20px;
    }

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

    .article-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .article-list-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .article-list-index {
        display: none;
    }

    .article-list-tag {
        display: none;
    }

    .book-layout {
        padding: 40px 16px 64px;
    }

    .book-header h1 {
        font-size: 28px;
    }

    .toc-section-header {
        padding: 16px;
    }

    .toc-article-link {
        padding-left: 16px;
        padding-right: 16px;
    }

    .toc-article-link::before {
        display: none;
    }

    .toc-article-summary {
        display: none;
    }

    .toc-child-header {
        padding-left: 32px;
    }

    .toc-child-articles .toc-article-link {
        padding-left: 32px;
    }

    .article-title {
        font-size: 26px;
    }

    .article-lead {
        font-size: 15px;
    }

    .markdown-body {
        font-size: 15px;
    }

    .site-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .primary-button,
    .hero-actions .ghost-button {
        width: 100%;
    }

    .hero-card {
        padding: 24px;
    }

    .hero-card-number {
        font-size: 36px;
    }

    .article-card {
        padding: 20px;
    }
}

/* ===== Admin Styles (do not modify below) ===== */

.setup-page, .admin-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fbff, #f3f8f3 58%, #fffaf2);
}

.setup-shell {
    display: grid;
    grid-template-columns: minmax(260px, .5fr) minmax(320px, 1fr);
    gap: 32px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 20px;
}

.setup-intro h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.08;
}

.setup-intro p {
    color: var(--muted);
    line-height: 1.7;
}

.setup-form {
    display: grid;
    gap: 22px;
    padding: 26px;
}

.form-section {
    display: grid;
    gap: 16px;
}

.form-section h2 {
    margin: 0;
    font-size: 20px;
}

.two-cols {
    grid-template-columns: 1fr 1fr;
}

.two-cols > div {
    display: grid;
    gap: 16px;
}

.admin-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--soft);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    background: #ffffff;
    border-right: 1px solid var(--line);
}

.admin-sidebar .brand {
    display: block;
    margin-bottom: 30px;
}

.admin-sidebar nav {
    flex-direction: column;
}

.admin-sidebar nav a {
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--muted);
    font-weight: 720;
}

.admin-sidebar nav a.active, .admin-sidebar nav a:hover {
    color: var(--blue-dark);
    background: #edf4ff;
}

.admin-main {
    min-width: 0;
    padding: 34px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stats-grid article {
    padding: 20px;
}

.stats-grid span {
    color: var(--muted);
    font-weight: 700;
}

.stats-grid strong {
    display: block;
    margin-top: 10px;
    font-size: 38px;
}

.admin-panel {
    padding: 22px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-heading h2, .admin-panel h2 {
    margin: 0 0 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-align: left;
    text-transform: uppercase;
}

.admin-table th, .admin-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.admin-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--green);
    background: #e8f7f3;
    font-size: 12px;
    font-weight: 800;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.notice, .form-error {
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff8e1;
    color: #7a5200;
    font-weight: 700;
}

.form-error {
    background: #fff0ed;
    color: #b42318;
}

.editor-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
}

.editor-main, .editor-side, .settings-form, .form-grid, .ai-panel form {
    display: grid;
    gap: 16px;
}

.editor-main, .editor-side {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.content-editor {
    min-height: 520px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.65;
}

.checkbox-line {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
}

.checkbox-line input {
    width: auto;
}

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

.form-grid h2, .form-grid .wide {
    grid-column: 1 / -1;
}

.ai-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.ai-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
}

.ai-chat-panel, .ai-tools-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.ai-chat-panel {
    display: grid;
    grid-template-rows: minmax(420px, 1fr) auto;
    min-height: 680px;
}

.ai-stream {
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: auto;
    padding: 20px;
}

.ai-bubble {
    max-width: 86%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px 14px;
    background: #fbfcfe;
}

.ai-bubble strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

.ai-bubble p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.65;
}

.ai-bubble.user {
    justify-self: end;
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}

.ai-bubble.tool, .ai-bubble.think {
    max-width: 100%;
    background: #f8fbff;
    border-color: #dbe7ff;
}

.ai-bubble.system {
    max-width: 100%;
    color: var(--green);
    background: #eefaf7;
}

.ai-bubble.error {
    max-width: 100%;
    color: #b42318;
    background: #fff0ed;
}

.ai-chat-form {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 16px;
}

.ai-tools-panel {
    align-self: start;
    padding: 20px;
}

.ai-tools-panel h2 {
    margin: 0 0 12px;
}

.ai-tools-panel ul {
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}

.ai-tools-panel p {
    color: var(--muted);
    line-height: 1.7;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.node-admin-list {
    display: grid;
    gap: 12px;
}

.node-admin-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfe;
}

.node-admin-item p {
    margin: 6px 0;
    color: var(--muted);
}

.node-admin-item small {
    color: var(--green);
    font-weight: 750;
}

.node-admin-children {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    padding-left: 24px;
}

.node-admin-item.child {
    background: #fff;
}

.ai-note {
    border-left: 4px solid var(--green);
    padding-left: 18px;
}

.ai-note p {
    color: var(--muted);
    line-height: 1.7;
}

.login-box {
    display: grid;
    gap: 18px;
    width: min(420px, calc(100% - 32px));
    margin: 10vh auto;
    padding: 28px;
}

.login-box h1 {
    margin: 0;
}

.login-box form {
    display: grid;
    gap: 16px;
}

.empty-state {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 80vh;
    padding: 20px;
    text-align: center;
}

.empty-state p {
    color: var(--muted);
}

@media (max-width: 900px) {
    .setup-shell, .editor-form, .ai-panel, .ai-workbench {
        grid-template-columns: 1fr;
    }

    .stats-grid, .form-grid, .two-cols {
        grid-template-columns: 1fr;
    }

    .admin-body {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-main {
        padding: 22px;
    }
}

@media (max-width: 640px) {
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

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

/* Admin console */
.admin-console {
    grid-template-columns: 276px minmax(0, 1fr);
    background:
            linear-gradient(180deg, #f7f9fc 0, #eef3f8 100%);
}

.admin-console .admin-sidebar {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 24px;
    padding: 22px 18px;
    background: #ffffff;
    box-shadow: 8px 0 28px rgba(29, 36, 51, .04);
}

.admin-brand-block {
    display: grid;
    gap: 6px;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fbff, #f0faf8);
}

.admin-brand-block .brand {
    margin: 0;
    color: var(--blue-dark);
    font-size: 20px;
}

.admin-brand-block span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar .admin-nav {
    gap: 6px;
}

.admin-sidebar .admin-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    border-radius: 8px;
    padding: 0 12px;
    color: #465568;
    font-weight: 780;
}

.admin-sidebar .admin-nav a.active,
.admin-sidebar .admin-nav a:hover {
    color: var(--blue-dark);
    background: #edf4ff;
}

.admin-sidebar .admin-nav a.active::before {
    content: "";
    position: absolute;
    left: -18px;
    width: 4px;
    height: 24px;
    border-radius: 0 4px 4px 0;
    background: var(--blue);
}

.nav-icon {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 1px solid #d9e4f2;
    border-radius: 8px;
    background: #fff;
}

.admin-nav a.active .nav-icon {
    border-color: #bad0ff;
    background: #dfeaff;
}

.nav-dashboard::before,
.nav-tree::before,
.nav-article::before,
.nav-ai::before,
.nav-setting::before,
.nav-dashboard::after,
.nav-tree::after,
.nav-article::after,
.nav-ai::after,
.nav-setting::after {
    content: "";
    position: absolute;
    border-radius: 3px;
    background: currentColor;
    opacity: .78;
}

.nav-dashboard::before {
    top: 7px;
    left: 7px;
    width: 5px;
    height: 5px;
    box-shadow: 9px 0 0 currentColor, 0 9px 0 currentColor, 9px 9px 0 currentColor;
}

.nav-tree::before {
    top: 7px;
    left: 12px;
    width: 4px;
    height: 15px;
}

.nav-tree::after {
    top: 9px;
    left: 8px;
    width: 12px;
    height: 2px;
    box-shadow: 0 6px 0 currentColor;
}

.nav-article::before {
    top: 7px;
    left: 8px;
    width: 12px;
    height: 2px;
    box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.nav-ai::before {
    top: 8px;
    left: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid currentColor;
}

.nav-ai::after {
    top: 12px;
    left: 12px;
    width: 4px;
    height: 4px;
}

.nav-setting::before {
    top: 7px;
    left: 7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid currentColor;
}

.nav-setting::after {
    top: 12px;
    left: 12px;
    width: 4px;
    height: 4px;
}

.admin-sidebar-footer {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.admin-sidebar-footer a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.admin-sidebar-footer a:hover {
    color: var(--blue);
}

.admin-console .admin-main {
    padding: 30px clamp(22px, 3vw, 42px) 42px;
}

.admin-hero-bar {
    align-items: flex-end;
    border: 1px solid #e2eaf4;
    border-radius: 8px;
    padding: 22px;
    background:
            linear-gradient(135deg, rgba(37, 99, 235, .1), transparent 42%),
            linear-gradient(0deg, rgba(15, 118, 110, .08), transparent 48%),
            #ffffff;
    box-shadow: 0 16px 34px rgba(29, 36, 51, .06);
}

.admin-subtitle {
    margin: 8px 0 0;
    max-width: 620px;
    color: var(--muted);
    line-height: 1.65;
}

.admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2eaf4;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(29, 36, 51, .05);
}

.metric-card::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 16px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    opacity: .18;
}

.metric-blue::after { background: var(--blue); }
.metric-green::after { background: var(--green); }
.metric-amber::after { background: var(--yellow); }
.metric-slate::after { background: #64748b; }

.metric-card span {
    color: #5b6b7f;
    font-size: 13px;
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin: 12px 0 8px;
    font-size: 34px;
    line-height: 1;
}

.metric-card small {
    color: var(--muted);
    line-height: 1.5;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
}

.admin-panel {
    border-color: #e2eaf4;
    box-shadow: 0 14px 32px rgba(29, 36, 51, .055);
}

.admin-panel-large {
    min-width: 0;
}

.panel-heading {
    gap: 14px;
    margin-bottom: 16px;
}

.panel-heading.compact {
    margin-bottom: 12px;
}

.panel-heading h2,
.admin-panel h2,
.inspector-section h2 {
    margin: 0;
    font-size: 19px;
}

.panel-heading a {
    color: var(--blue);
    font-weight: 800;
}

.admin-table-shell {
    overflow-x: auto;
}

.admin-table {
    min-width: 720px;
}

.admin-table th {
    border-bottom: 1px solid #e2eaf4;
    color: #66758a;
    letter-spacing: 0;
}

.admin-table td {
    color: #344054;
}

.admin-table tbody tr:hover td {
    background: #f8fbff;
}

.table-title {
    display: inline-block;
    color: var(--ink);
    font-weight: 850;
}

.table-title:hover {
    color: var(--blue);
}

.table-muted {
    color: #465568;
    font-weight: 720;
}

.status.published {
    color: var(--green);
    background: #e8f7f3;
}

.status.draft {
    color: #9a5b00;
    background: #fff4d6;
}

.admin-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.search-field,
.compact-select {
    font-size: 13px;
}

.search-field span,
.compact-select span {
    color: #66758a;
    font-size: 12px;
    text-transform: uppercase;
}

.quick-panel {
    align-self: start;
}

.quick-action-list,
.tool-card-list {
    display: grid;
    gap: 10px;
}

.quick-action-list a,
.tool-card-list article,
.ai-route-card {
    display: grid;
    gap: 6px;
    border: 1px solid #e2eaf4;
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfe;
}

.quick-action-list a:hover {
    border-color: #bad0ff;
    background: #f6f9ff;
}

.quick-action-list strong,
.tool-card-list strong,
.ai-route-card strong {
    color: var(--ink);
}

.quick-action-list span,
.tool-card-list span,
.ai-route-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.admin-empty-inline {
    border: 1px dashed #cbd7e7;
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    background: #fbfcfe;
    text-align: center;
}

.book-tree-admin {
    gap: 14px;
}

.book-tree-admin .node-admin-item {
    border-color: #e2eaf4;
    background: #fff;
}

.node-admin-main {
    display: flex;
    gap: 14px;
    min-width: 0;
}

.tree-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--blue-dark);
    background: #edf4ff;
    font-weight: 900;
}

.child-index {
    color: var(--green);
    background: #e9f7f4;
    font-size: 13px;
}

.node-article-strip {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 58px;
}

.node-article-strip a {
    border: 1px solid #dbe7ff;
    border-radius: 8px;
    padding: 7px 10px;
    color: var(--blue-dark);
    background: #f8fbff;
    font-size: 13px;
    font-weight: 750;
}

.editor-shell {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) 340px;
}

.editor-section,
.inspector-section {
    display: grid;
    gap: 16px;
}

.editor-main,
.editor-side {
    border-color: #e2eaf4;
}

.editor-section-heading,
.form-card-heading {
    display: flex;
    grid-column: 1 / -1;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.editor-section-heading h2,
.form-card-heading h2 {
    margin: 0;
}

.form-card-heading {
    display: grid;
    justify-content: stretch;
}

.form-card-heading span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.editor-stats {
    border: 1px solid #dbe7ff;
    border-radius: 8px;
    padding: 7px 10px;
    color: var(--blue-dark);
    background: #f8fbff;
    font-size: 12px;
    font-weight: 820;
    white-space: nowrap;
}

.content-editor {
    min-height: 620px;
    border-color: #d6e0ec;
    background: #fbfdff;
}

.admin-inspector {
    position: sticky;
    top: 22px;
    align-self: start;
}

.inspector-section {
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.inspector-section:last-of-type {
    border-bottom: 0;
}

.full-button {
    width: 100%;
}

.switch-line {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch-line input {
    width: 0;
    height: 0;
    opacity: 0;
}

.switch-line span {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
}

.switch-line span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(29, 36, 51, .18);
    transition: transform .16s ease;
}

.switch-line input:checked + span {
    background: var(--green);
}

.switch-line input:checked + span::after {
    transform: translateX(18px);
}

.form-card {
    padding: 24px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.settings-stack {
    gap: 18px;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    border: 1px solid #e2eaf4;
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(12px);
}

.ai-workbench-pro {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.ai-chat-panel {
    overflow: hidden;
}

.ai-stream-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 16px 18px;
    background: #fbfcfe;
}

.ai-stream-header div {
    display: grid;
    gap: 3px;
}

.ai-stream-header span {
    color: var(--muted);
    font-size: 13px;
}

.live-pill {
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--green) !important;
    background: #e8f7f3;
    font-weight: 820;
    white-space: nowrap;
}

.ai-bubble.assistant {
    border-color: #dbe7ff;
    background: #f8fbff;
}

.ai-bubble.assistant.streaming {
    box-shadow: inset 3px 0 0 var(--blue);
}

.prompt-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 12px 16px 0;
}

.prompt-suggestions button {
    border: 1px solid #dbe7ff;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--blue-dark);
    background: #f8fbff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 760;
}

.prompt-suggestions button:hover {
    background: #edf4ff;
}

.ai-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-form-actions span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.ai-capability-panel {
    display: grid;
    gap: 18px;
}

.ai-route-card span {
    border-radius: 7px;
    padding: 7px 8px;
    color: #465568;
    background: #f4f7fb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-login-pro {
    display: grid;
    place-items: center;
    padding: 28px;
    background:
            linear-gradient(135deg, rgba(37, 99, 235, .1), transparent 40%),
            linear-gradient(315deg, rgba(15, 118, 110, .12), transparent 44%),
            #f7f9fc;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(340px, 420px);
    gap: 22px;
    width: min(980px, 100%);
}

.login-intro,
.admin-login-pro .login-box {
    border: 1px solid #e2eaf4;
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 40px rgba(29, 36, 51, .08);
}

.login-intro {
    display: grid;
    align-content: end;
    gap: 14px;
    min-height: 480px;
    padding: 30px;
}

.login-intro h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1;
}

.login-intro p {
    max-width: 520px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.login-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-feature-list span {
    border: 1px solid #dbe7ff;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--blue-dark);
    background: #f8fbff;
    font-size: 13px;
    font-weight: 760;
}

.admin-login-pro .login-box {
    align-self: center;
    width: auto;
    margin: 0;
    padding: 28px;
}

.admin-login-pro .login-box h2 {
    margin: 0;
    font-size: 28px;
}

@media (max-width: 1180px) {
    .admin-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-dashboard-grid,
    .ai-workbench-pro {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .admin-console {
        grid-template-columns: 1fr;
    }

    .admin-console .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-sidebar .admin-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-sidebar-footer {
        grid-template-columns: repeat(2, max-content);
    }

    .editor-shell {
        grid-template-columns: 1fr;
    }

    .admin-inspector {
        position: static;
    }

    .admin-toolbar {
        grid-template-columns: 1fr;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-intro {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .admin-console .admin-main {
        padding: 18px;
    }

    .admin-metric-grid,
    .admin-sidebar .admin-nav {
        grid-template-columns: 1fr;
    }

    .admin-hero-bar,
    .editor-section-heading,
    .ai-form-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-actions,
    .form-actions {
        width: 100%;
    }

    .topbar-actions > *,
    .form-actions > * {
        width: 100%;
    }

    .node-admin-item {
        grid-template-columns: 1fr;
    }

    .node-article-strip {
        margin-left: 0;
    }
}
