/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

:root {
    --fuseki-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Use the same typography everywhere in the non-admin Django UI. */
html,
body,
body *,
button,
input,
select,
textarea {
    font-family: var(--fuseki-font-family) !important;
    font-variant: normal !important;
    font-variant-caps: normal !important;
    text-transform: none;
    letter-spacing: normal;
}

a.navbar-brand {
    white-space: nowrap;
    text-align: left;
    word-break: normal;
}

/* Provide sufficient contrast against white background */
a {
    color: #0366d6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.nav-link {
    border: 2px solid transparent;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background-color .15s, border-color .15s, opacity .15s;
}

.nav-link-active {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
}

.nav-link:not(.nav-link-active) {
    opacity: 0.9;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.16);
    opacity: 1 !important;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px; /* Vertically center the text there */
}

table td,
table th {
    padding: 4px;
    vertical-align: top;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

table th {
    border-bottom: 1px solid lightgrey;
}

table {
    border: 1px dashed lightgrey;
    width: 100%;
    table-layout: fixed;
}

.tag {
    display: inline-block;
}

.tag a {
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    padding: 1px 6px;
    display: inline-block;
    box-sizing: border-box;
    font-size: 0.85em;
    color: #555;
    line-height: 1.5;
    white-space: nowrap;
    text-decoration: none;
    background: #f5f5f5;
}

    .tag a:visited {
        color: #666;
    }
    .tag a:visited:hover {
        background-color: #e8e8e8;
        color: #333;
    }

    .tag a:hover {
        background-color: #e8f0fe;
        border-color: #9ab;
        color: #0366d6;
        text-decoration: none;
    }

body {
    margin: auto;
    width: 95%;
}

.container {
    margin-top: 15px;
    width: 100% !important;
    max-width: inherit !important;
}

.container.article{
    width:95% !important;
}
.container.tag{
    
}

/* Let top bars span the full viewport width. */
body > header,
body > nav.navbar {
    display: block;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

body > nav.navbar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

body > nav.navbar > .navbar-brand,
body > nav.navbar .nav-link {
    white-space: nowrap;
}

body > nav.navbar > .navbar-collapse {
    display: flex !important;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

body > nav.navbar .navbar-nav {
    flex-wrap: nowrap;
}

body > header > .container.article {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0;
    padding-left: 2.5%;
    padding-right: 2.5%;
}

div.navigation {
    font-size: 1.4em;
}

.highlight a {
    border: 1px dashed red !important;
}

.relatedarticle {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #e8e8e8;
}

.relatedarticle .articlelink {
    flex: 1 1 auto;
    min-width: 0;
}

.right {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-editor {
    width: 700px;
}

.taglist{
    margin-bottom:12px;
}

.title-editor {
    width: 700px;
    font-size: 3em;
}

blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: .25em solid #dfe2e5;
}

.nb {
    white-space: nowrap;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fuseki-font-family);
    font-weight: normal;
    color: #222;
    line-height: 1.1em;
    margin-bottom: 3px;
}
h1 {
    margin-bottom:8px !important;
}

.articleLinks {
    margin: auto;
    width: 99%;
}

.articleLinks .relatedarticle:last-child {
    border-bottom: none;
}

.realarticle{
    border:3px dashed red;
    padding:16px;
    margin:20px;
    box-sizing: border-box;
}

/* Article editor layout: side-by-side writing and preview panes. */
body.page-article-editor {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.page-article-editor .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
}

.page-article-editor .editor-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-article-editor .editor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-article-editor .title-input {
    flex: 1 1 420px;
    min-width: 240px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.6rem;
    line-height: 1.2;
    padding: 8px 10px;
}

.page-article-editor .editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-article-editor .editor-btn {
    border: 1px solid #bfc4ca;
    border-radius: 6px;
    background: #f7f8fa;
    color: #222;
    padding: 5px 10px;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.page-article-editor .editor-btn input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

.editor-modes {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.editor-mode {
    display: inline-block;
    border: 2px solid #aeb8c4;
    border-radius: 7px;
    padding: 5px 10px;
    background: #f3f6f9;
    color: #25384d;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
}

.editor-mode:hover {
    background: #e2eaf3;
    color: #17293d;
    text-decoration: none;
}

.editor-mode-active {
    border: 3px solid #173b66;
    background: #0d47a1;
    color: #fff;
}

.page-article-editor .slug-editor {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.page-article-editor .slug-input {
    min-width: 320px;
    max-width: 720px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 8px;
}

.page-article-editor .tag-editor {
    width: 100%;
    max-width: 900px;
}

.page-article-editor .editor-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    min-height: calc(100vh - 220px);
}

.page-article-editor .editor-panel {
    border: 1px solid #d5d8dd;
    border-radius: 6px;
    background: #fff;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.page-article-editor .rst-editor-textarea {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 220px);
    border: 0;
    padding: 12px;
    resize: vertical;
}

.page-article-editor .preview-content {
    height: 100%;
    min-height: calc(100vh - 220px);
    overflow: auto;
    padding: 14px;
}

.page-article-editor .editor-main.preview-collapsed {
    grid-template-columns: minmax(0, 1fr);
}

.page-article-editor .related-preview {
    border: 1px solid #d5d8dd;
    border-radius: 6px;
    background: #fff;
    padding: 10px 14px 14px;
    max-width: 900px;
}

.page-article-editor .related-preview-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.page-article-editor .related-preview-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.page-article-editor .related-preview-status {
    color: #999;
    font-size: 0.85em;
    flex: 1 1 auto;
}

.page-article-editor .related-preview .articleLinks {
    width: 100%;
}

.page-article-editor .related-score {
    flex-shrink: 0;
    width: 3em;
    color: #999;
    font-size: 0.8em;
    font-variant-numeric: tabular-nums;
}

.page-article-editor .editor-main.preview-collapsed .preview-panel {
    display: none;
}

.page-article-editor .spell-checker-sidebar {
    position: fixed;
    top: 60px;
    right: 0;
    width: min(420px, 92vw);
    height: calc(100vh - 60px);
    background: #fff;
    border-left: 1px solid #d5d8dd;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
    padding: 12px;
    overflow: auto;
    transform: translateX(105%);
    transition: transform 0.2s ease;
    z-index: 1100;
}

.page-article-editor .spell-checker-sidebar.active {
    transform: translateX(0);
}

.page-article-editor .spell-checker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-article-editor .syntax-help-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.page-article-editor .syntax-help-modal.active {
    display: flex;
}

.page-article-editor .syntax-help-dialog {
    width: min(900px, 94vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 10px;
    border: 1px solid #cfd6de;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.page-article-editor .syntax-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e1e5ea;
    padding: 10px 14px;
}

.page-article-editor .syntax-help-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.page-article-editor .syntax-help-close {
    border: 1px solid #c7cdd4;
    border-radius: 6px;
    background: #f7f9fb;
    font-size: 1.2rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.page-article-editor .syntax-help-body {
    padding: 12px 14px 14px;
}

.page-article-editor .syntax-help-body h4 {
    margin: 8px 0 6px;
    font-size: 1.02rem;
}

.page-article-editor .syntax-help-body pre {
    margin: 0 0 12px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d7dce2;
    background: #f8fafc;
    white-space: pre-wrap;
}

@media (max-width: 980px) {
    .page-article-editor .editor-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-article-editor .preview-panel {
        min-height: 320px;
    }
}

/* ===== Published static article pages =====
   Scoped to body.static-article so the Django editor UI is unaffected.
   Design: narrow reading column, one type scale, uniform vertical
   rhythm, three-color palette (text / accent / muted). */

body.static-article {
    width: 100%;
    margin: 0 0 60px;
    color: #111;
    line-height: 1.55;
}

/* Early-internet visited purple, sitewide on published pages. */
.static-article a:visited {
    color: #551a8b;
}

.static-article .container.article {
    width: 100% !important;
    max-width: 45em !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Masthead: small and quiet, thin rule below. */
.static-article header {
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 1.5em;
}

.static-article.homepage header {
    border-bottom: 0;
}

.static-article .site-masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.static-article h1.site-header {
    font-size: 1.3em;
    margin: 0;
    padding: 0.5em 0;
    line-height: 1.3;
}

/* Headings switch typeface (serif), not just size — matches the
   established fuseki.net look and separates them from body text.
   !important needed to beat the global font-family reset above. */
.static-article h1,
.static-article h2,
.static-article h3,
.static-article h4,
.static-article h5,
.static-article h6 {
    font-family: 'Vollkorn', Georgia, serif !important;
}

/* Type scale: sizes step down, weight stays normal, color stays #111. */
.static-article article h1 {
    font-size: 2.4em;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 0 0 4px;
}

.static-article h2 {
    font-size: 1.7em;
}

.static-article h3 {
    font-size: 1.45em;
}

.static-article h4,
.static-article h5,
.static-article h6 {
    font-size: 1.25em;
}

.static-article .article-content h2,
.static-article .article-content h3,
.static-article .article-content h4 {
    margin-top: 1.4em;
    margin-bottom: 0.5em;
    line-height: 1.25;
}

/* Uniform vertical rhythm for block elements. */
.static-article .article-content p,
.static-article .article-content ul,
.static-article .article-content ol,
.static-article .article-content blockquote,
.static-article .article-content pre,
.static-article .article-content table,
.static-article .article-content figure {
    margin-top: 0;
    margin-bottom: 1em;
}

/* Article images never overflow the reading column; tapping an
   image link opens the full-resolution overlay (js/image-viewer.js). */
.static-article .article-content img {
    max-width: 100%;
    height: auto;
}

.static-article .article-content a > img {
    cursor: zoom-in;
}

.image-viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.image-viewer-overlay img {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.youtube-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 0 1em;
    overflow: hidden;
    background: #111;
}

.youtube-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Muted metadata: published/updated dates under the title. */
.static-article .post-meta {
    color: #828282;
    font-size: 0.875em;
    margin: 0 0 1.8em;
}

/* Tag pills: borderless tinted chips. Blue tint = unvisited,
   purple tint = visited (chip follows its text color). */
.static-article .tag a {
    border: none;
    border-radius: 6px;
    margin: 2px;
    padding: 1px 7px;
    background: #eaf2fc;
    font-size: 1em;
    color: #0366d6;
}

.static-article .tag a:visited {
    color: #551a8b;
    background: #f3ecf9;
}

.static-article .tag a:hover {
    background-color: #d7e7fa;
    text-decoration: none;
}

.static-article .tag a:visited:hover {
    background-color: #e9ddf5;
}

/* Related list: stack title over tags so neither squeezes the other
   in the narrow column. */
.static-article .relatedarticle {
    display: block;
    padding: 9px 0;
}

.static-article .relatedarticle .articlelink {
    display: inline-block;
    font-size: 1.08em;
    font-weight: 500;
    margin-bottom: 4px;
}

.static-article .relatedarticle .right {
    float: none;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    font-size: 0.8em;
}

/* Shared tags sit left, non-shared push right; position is the only
   signifier. Pill chrome is identical for both groups (the override
   kills the global red-dashed .highlight border). */
.static-article .highlight a {
    border: none !important;
}

.static-article .relatedarticle .tag-spacer {
    flex: 1 1 12px;
}

/* ===== Comparison table (Piscataway / Kochi / Zhuzhou) ===== */

.comparison-table-wrap {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 100vh;
    padding: 0 1vw;
    box-sizing: border-box;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: none;
}

.comparison-table colgroup .ct-col-cat {
    width: 18%;
}

.comparison-table colgroup .ct-col-city {
    width: 27.33%;
}

.comparison-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1a1a2e;
    color: #e8e8e8;
    padding: 10px 12px;
    font-size: 1.05em;
    font-weight: 600;
    text-align: left;
    border-bottom: 3px solid #e94560;
    letter-spacing: 0.02em;
}

.comparison-table thead th.ct-corner {
    background: #1a1a2e;
}

.comparison-table td {
    padding: 8px 12px;
    vertical-align: top;
    border: 1px dashed #ccc;
    font-size: 0.95em;
    line-height: 1.45;
}

.comparison-table .ct-cat {
    font-weight: 600;
    color: #333;
    background: #f8f8fa;
    border-right: 2px dashed #bbb;
}

.comparison-table tr.ct-alt td {
    background: #f4f6f9;
}

.comparison-table tr.ct-alt .ct-cat {
    background: #eef0f4;
}

.comparison-table tr.ct-section td {
    background: #16213e;
    color: #fff;
    font-size: 1.15em;
    font-weight: 700;
    padding: 12px 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 3px solid #e94560;
    border-top: 2px solid #0f3460;
}

.comparison-table img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.ct-intro {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 1em;
}

.ct-outro {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin-top: 2em;
}

@media (max-width: 768px) {
    .comparison-table colgroup .ct-col-cat {
        width: 25%;
    }

    .comparison-table colgroup .ct-col-city {
        width: 25%;
    }

    .comparison-table td,
    .comparison-table thead th {
        padding: 6px 6px;
        font-size: 0.82em;
    }

    .comparison-table .ct-section td {
        font-size: 1em;
    }
}

.activity-page {
    max-width: 960px !important;
    margin: 3rem auto 0;
}

.activity-kicker {
    margin-bottom: 0.35rem;
    color: #59636e;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.activity-page > h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4rem);
    letter-spacing: -0.04em;
}

.activity-intro {
    max-width: 650px;
    margin: 1rem 0 2.5rem;
    color: #59636e;
    font-size: 1.12rem;
    line-height: 1.6;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
}

.activity-card,
.contribution-panel {
    min-height: 150px;
    padding: 1.25rem;
    border: 1px solid #d8dee4;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(31, 35, 40, 0.05);
}

.activity-card-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.activity-card h2,
.contribution-panel h2 {
    margin: 0;
    font-size: 1.3rem;
}

.activity-card p {
    color: #59636e;
    line-height: 1.5;
}

.activity-repository-link {
    flex: none;
    font-size: 0.82rem;
}

.activity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.activity-badges a {
    display: inline-flex;
    min-height: 20px;
}

.activity-badges img {
    display: block;
    max-width: 100%;
    height: 20px;
}

.contribution-panel {
    margin-bottom: 1rem;
    min-height: auto;
}

.contribution-chart-scroll {
    margin-top: 1.25rem;
}

.contribution-chart {
    display: block;
    width: 100%;
    height: auto;
}

.activity-note {
    margin-top: 2rem;
    color: #6e7781;
    font-size: 0.9rem;
}

.activity-footer {
    max-width: 960px !important;
    margin: 3em auto 0;
    padding-top: 2em;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}