@font-face {
    font-family: NotoDevanagari;
    src: url('fonts/NotoSansDevanagari-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: NotoDevanagari;
    src: url('fonts/NotoSansDevanagari-Bold.ttf') format('truetype');
    font-weight: 600 900;
    font-display: swap;
}
/* Simple encyclopedia interface. These rules refine the existing base styles. */
:root {
    --blue: #245d92;
    --ink: #202b38;
    --line: #dce1e6;
}

body {
    font-family: Inter,NotoDevanagari,"Nirmala UI","Mangal",Arial,sans-serif;
    font-size: 15px;
}

.site-header {
    height: 86px;
    padding: 12px 28px;
    gap: 20px;
}

.brand {
    min-width: 240px;
}

    .brand img {
        width: 100px;
        height: 100%;
    }

    .brand span {
        font-size: 23px;
    }

    .brand small {
        font-family: Arial,sans-serif;
        font-size: 9px;
        letter-spacing: .6px;
    }

.header-search {
    max-width: 530px;
}

.header-create {
    font-size: 13px;
    padding: 9px 14px;
}

.header-links {
    margin-left: 0;
    font-size: 12px;
}

.language-picker select {
    border: 1px solid var(--line);
    background: white;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--ink);
    min-width: 88px;
}

.app-frame {
    grid-template-columns: 188px minmax(0,1fr);
    max-width: 1550px;
}

.navigation {
    top: 86px;
    height: calc(100vh - 86px);
    padding: 26px 15px;
    background: white;
}

    .navigation a {
        font-size: 13px;
        padding: 10px;
    }

    .navigation hr {
        border: 0;
        border-top: 1px solid var(--line);
        margin: 18px 0;
    }

    .navigation .nav-create {
        background: #edf4fa;
        color: #245d92;
        font-weight: 600;
    }

.main-content {
    padding: 32px 42px;
}

h1 {
    font-family: NotoDevanagari,"Nirmala UI",Georgia,serif;
    font-size: 32px;
    letter-spacing: 0;
    line-height: 1.4;
}

h2 {
    font-family: NotoDevanagari,"Nirmala UI",Georgia,serif;
    font-size: 24px;
    line-height: 1.45;
}

.home-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border: 1px solid var(--line);
    padding: 25px 30px;
    background: #fafcfe;
    border-radius: 7px;
}

    .home-welcome h1 {
        margin: 0 0 10px;
        font-size: 30px;
    }

    .home-welcome p {
        margin: 0;
        color: var(--muted);
    }

.how-strip {
    display: flex;
    gap: 23px;
    align-items: center;
    flex-wrap: wrap;
    padding: 17px 0 21px;
    color: #637083;
    font-size: 12px;
    border-bottom: 1px solid var(--line);
}

    .how-strip a {
        margin-left: auto;
    }

.page-list {
    border-top: 1px solid var(--line);
}

.page-result {
    display: flex;
    gap: 22px;
    padding: 24px 4px;
    border-bottom: 1px solid var(--line);
}

.result-image {
    flex: 0 0 115px;
    width: 115px;
    height: 95px;
    background: #f3f6f8;
    border-radius: 4px;
    overflow: hidden;
}

    .result-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.page-result h2 {
    margin: 0 0 7px;
    font-size: 22px;
}

.page-result p {
    margin: 0 0 10px;
    max-width: 820px;
    line-height: 1.7;
    font-size: 14px;
    color: #46546a;
}

.result-meta {
    display: flex;
    gap: 18px;
    color: #7d8794;
    font-size: 11px;
}

.subject-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 25px;
    padding: 15px 0;
}

    .subject-links a {
        border-bottom: 1px solid #dce6ef;
        padding: 6px 0;
    }

.simple-search {
    display: flex;
    gap: 10px;
    max-width: 850px;
}

    .simple-search input[type=text] {
        flex: 1;
    }

.search-filters {
    margin: 15px 0 20px;
}

    .search-filters summary, .editor-extra summary {
        cursor: pointer;
        color: var(--blue);
        font-size: 14px;
    }

    .search-filters .form-grid {
        padding-top: 20px;
    }

.create-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    background: #f7fbf6;
    border: 1px solid #d2e2cc;
    padding: 20px;
    border-radius: 6px;
    margin: 24px 0;
}

.reading-page .app-frame {
    display: block;
    max-width: 1600px;
}

.reading-page .navigation {
    display: none;
}

.reading-page .main-content {
    padding: 35px 45px;
}

.article-layout {
    grid-template-columns: 165px minmax(0,1fr) 140px;
    gap: 40px;
}

.article-head {
    border: 0;
    margin-bottom: 15px;
}

    .article-head h1 {
        font-family: NotoDevanagari,"Nirmala UI",Georgia,serif;
        font-size: 36px;
        margin: 0;
        padding: 0 0 16px;
        border-bottom: 1px solid #adb5bf;
    }

.article-tabs {
    border-bottom: 1px solid var(--line);
    gap: 24px;
    margin: 8px 0 0;
    font-size: 13px;
}

    .article-tabs a {
        padding: 7px 0 10px;
    }

.article-language {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
}

.encyclopedia-credit {
    margin: 0 0 23px;
    color: #6c7887;
    font-size: 11px;
}

.article-body {
    font-family: NotoDevanagari,"Nirmala UI","Mangal",Georgia,serif;
    font-size: 17px;
    line-height: 1.95;
}

    .article-body h2 {
        font-size: 26px;
        margin-top: 27px;
        border-bottom: 1px solid #bfc7d0;
    }

    .article-body h3 {
        font-family: NotoDevanagari,"Nirmala UI",Georgia,serif;
    }

    .article-body .article-lead {
        font-weight: 400;
    }

    .article-body table {
        width: 100%;
        border-collapse: collapse;
        margin: 18px 0;
        font: 14px/1.7 Inter,NotoDevanagari,"Nirmala UI",Arial,sans-serif;
    }

        .article-body table th, .article-body table td {
            padding: 10px 12px;
            border: 1px solid #cbd2da;
        }

        .article-body table th {
            background: #edf2f6;
        }

    .article-body figure {
        margin: 25px 0;
    }

        .article-body figure img {
            max-width: 100%;
            max-height: 550px;
            height: auto;
        }

    .article-body figcaption {
        font-size: 11px;
        color: var(--muted);
    }

.section-edit {
    font: 11px Inter,NotoDevanagari,"Nirmala UI",Arial,sans-serif;
    margin-left: 15px;
    white-space: nowrap;
    font-weight: 400;
}

.infobox {
    width: 290px;
    border-radius: 0;
    background: #f8f9fa;
    padding: 13px;
    margin-left: 25px;
    font-family: Inter,NotoDevanagari,"Nirmala UI",Arial,sans-serif;
    border: 1px solid #a8b0bb;
}

    .infobox h2 {
        background: #e7eef5;
        margin: 0 0 12px;
        border: 0;
        padding: 8px;
        font-size: 20px;
    }

    .infobox .facts {
        font-size: 12px;
    }

.toc {
    top: 116px;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 20px;
}

    .toc strong, .appearance strong {
        display: block;
        border-bottom: 1px solid var(--line);
        padding: 0 0 12px;
        margin-bottom: 10px;
    }

    .toc a {
        font-size: 12px;
        color: var(--blue);
    }

.appearance {
    position: sticky;
    top: 116px;
    align-self: start;
    font-size: 12px;
}

    .appearance label {
        display: block;
        margin: 20px 0 10px;
        color: var(--muted);
    }

    .appearance button {
        display: block;
        background: none;
        border: 0;
        padding: 7px 0;
        color: var(--blue);
    }

    .appearance hr {
        border: 0;
        border-top: 1px solid var(--line);
    }

.page-dates {
    margin: 35px 0 0;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px 18px;
    font-size: 12px;
}

    .page-dates dt {
        color: var(--muted);
    }

    .page-dates dd {
        margin: 0;
    }

.large-reading .article-body {
    font-size: 20px;
}

.dark-reading {
    background: #151a22;
    color: #dce2eb;
    --ink: #dce2eb;
    --muted: #aab5c6;
    --line: #414957;
    --blue: #8dbbff;
}

    .dark-reading .site-header, .dark-reading .main-content, .dark-reading .article-tools {
        background: #151a22;
    }

    .dark-reading .infobox, .dark-reading table th {
        background: #232c38;
        color: #e2e7ed;
    }

        .dark-reading .infobox h2 {
            background: #303e50;
        }

    .dark-reading .article-body {
        color: #dce2eb;
    }

    .dark-reading a {
        color: #8dbbff;
    }

    .dark-reading input, .dark-reading select {
        color: #202b38;
    }

.editor-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
}

    .editor-heading h1 {
        margin: 0 0 8px;
    }

    .editor-heading p {
        color: var(--muted);
        font-size: 13px;
    }

.writing-steps {
    display: flex;
    margin: 0 0 25px;
    border-bottom: 1px solid var(--line);
    position: relative;
    scroll-margin-top: 100px;
}

    .writing-steps button {
        background: transparent;
        color: var(--muted);
        border: 0;
        border-bottom: 3px solid transparent;
        padding: 13px 20px;
        font-size: 14px;
        flex: 1;
    }

        .writing-steps button.selected {
            color: #245d92;
            background: #f2f7fb;
            border-bottom-color: #245d92;
            font-weight: 650;
        }

.writing-step[hidden] {
    display: none !important;
}

.writing-step.panel {
    border: 1px solid var(--line);
    box-shadow: none;
    border-radius: 6px;
    padding: 28px;
}

.writing-step h2 {
    margin: 0 0 22px;
}

.writing-step .section-title {
    margin: 0 0 15px;
}

    .writing-step .section-title h2 {
        margin: 0;
    }

.writing-step .actions {
    margin-top: 25px;
}

.field label {
    font-size: 14px;
}

.field input, .field textarea, .field select {
    font-family: Inter,NotoDevanagari,"Nirmala UI",Arial,sans-serif;
}

.editor-storage {
    display: none !important;
}

.visual-toolbar {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    border: 1px solid #c4cdd8;
    padding: 8px;
    background: #f6f8fa;
    border-bottom: 0;
}

    .visual-toolbar button {
        border: 1px solid transparent;
        background: transparent;
        padding: 6px 10px;
        color: #33475d;
        border-radius: 4px;
        font-size: 12px;
    }

        .visual-toolbar button:hover {
            background: white;
            border-color: #c4cdd8;
        }

.rich-editor {
    border: 1px solid #c4cdd8;
    min-height: 390px;
    padding: 28px;
    font: 17px/1.9 NotoDevanagari,"Nirmala UI",Georgia,serif;
    background: white;
    overflow: auto;
    outline-offset: 2px;
}

    .rich-editor:empty:before {
        content: attr(data-placeholder);
        color: #8c97a5;
        pointer-events: none;
    }

    .rich-editor h2 {
        margin: 25px 0 10px;
        border-bottom: 1px solid var(--line);
        padding-bottom: 5px;
    }

    .rich-editor p {
        margin: 0 0 15px;
    }

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

    .rich-editor th, .rich-editor td {
        border: 1px solid #bfcad5;
        padding: 10px;
    }

    .rich-editor img {
        max-width: 100%;
        max-height: 450px;
    }

    .rich-editor[contenteditable=false] {
        background: #f5f7f9;
    }

.builder-row {
    display: grid;
    grid-template-columns: 1fr 1.7fr 35px;
    gap: 10px;
    margin-bottom: 10px;
}

    .builder-row input {
        width: 100%;
        border: 1px solid #cbd4df;
        padding: 10px;
        border-radius: 5px;
        min-width: 0;
    }

    .builder-row button {
        background: #f5f7f9;
        border: 1px solid var(--line);
        color: #8c3f3f;
        border-radius: 5px;
        font-size: 20px;
    }

.source-builder {
    margin: 25px 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
}

.editor-extra {
    border-top: 1px solid var(--line);
    padding: 17px 0;
}

    .editor-extra[open] summary {
        margin-bottom: 20px;
    }

.editor-save-bar {
    position: sticky;
    bottom: 0;
    padding: 15px 20px;
    background: #fffffffa;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9;
    font-size: 12px;
}

.notice.compact {
    font-size: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.account-menu {
    position: relative;
}

    .account-menu summary {
        cursor: pointer;
        max-width: 120px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }

    .account-menu[open] {
        background: #fff;
        border: 1px solid var(--line);
        padding: 12px;
        border-radius: 7px;
        position: absolute;
        right: 16px;
        top: 26px;
        min-width: 160px;
        box-shadow: 0 12px 30px #17324d15;
    }

    .account-menu a {
        display: block;
        padding: 7px 0;
    }

.suggest-result {
    display: flex !important;
    gap: 12px;
}

    .suggest-result img {
        width: 48px;
        height: 45px;
        object-fit: contain;
        background: #f3f6f8;
        flex-shrink: 0;
    }

    .suggest-result strong {
        display: block;
        font-size: 13px;
    }

    .suggest-result small {
        display: block;
        font-size: 11px;
        color: var(--muted);
        max-height: 34px;
        overflow: hidden;
    }

.suggest-create {
    background: #f3f8fc;
    font-weight: 600;
}

.review-card {
    padding: 22px;
    border: 1px solid var(--line);
    margin-bottom: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

    .review-card h3 {
        font-size: 19px;
        margin: 0 0 8px;
    }

    .review-card p {
        color: var(--muted);
        font-size: 12px;
        margin: 0;
    }

.admin-steps {
    font-size: 14px;
    background: #f5f8fb;
    border: 1px solid var(--line);
    padding: 18px;
    margin: 20px 0;
}

.review-decision {
    position: sticky;
    bottom: 0;
    z-index: 9;
    background: #fff;
    box-shadow: 0 -6px 30px #17324d0a;
}

.diff-grid .panel {
    padding: 20px;
    overflow: auto;
}

.diff-block {
    font-family: Inter,NotoDevanagari,"Nirmala UI",Arial,sans-serif;
}

.selected-record {
    border-left: 4px solid #245d92;
    background: #f4f8fb;
    padding: 17px 20px;
    margin-bottom: 22px;
}

@media(max-width:1250px) {
    .site-header {
        gap: 12px;
        padding: 12px 18px;
    }

    .brand {
        min-width: 220px;
    }

    .header-create {
        font-size: 12px;
        padding: 8px;
    }

    .article-layout {
        grid-template-columns: 145px minmax(0,1fr);
        gap: 28px;
    }

    .appearance {
        display: none;
    }
}

@media(max-width:1000px) {
    .brand {
        min-width: 195px;
    }

        .brand span {
            font-size: 20px;
        }

        .brand small {
            font-size: 8px;
        }

    .site-header {
        flex-wrap: wrap;
        height: auto;
    }

    .header-search {
        order: 5;
        flex-basis: 100%;
        max-width: none;
    }

    .app-frame {
        grid-template-columns: 165px minmax(0,1fr);
    }

    .navigation {
        top: 135px;
        height: calc(100vh - 135px);
    }

    .main-content {
        padding: 28px;
    }

    .home-welcome {
        align-items: start;
        flex-direction: column;
    }
}

@media(max-width:850px) {
    .app-frame {
        display: block;
    }

    .navigation {
        display: none;
        position: fixed;
        width: 245px;
        z-index: 19;
    }

        .navigation.open {
            display: block;
        }

    .reading-page .navigation.open {
        display: block;
    }

    .main-content, .reading-page .main-content {
        padding: 24px 18px;
    }

    .article-layout {
        display: block;
    }

    .toc {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 25px;
        position: static;
    }

        .toc strong {
            border: 0;
            padding: 0;
            margin: 0;
        }

        .toc a {
            padding: 0;
        }

    .site-header .brand {
        flex: 1;
    }

    .header-links {
        font-size: 12px;
    }

    .home-welcome h1 {
        font-size: 27px;
    }

    .editor-heading {
        display: block;
    }

    .writing-steps button {
        padding: 12px 8px;
        font-size: 12px;
    }

    .writing-step.panel {
        padding: 20px;
    }
}

@media(max-width:560px) {
    .site-header {
        padding: 10px 12px;
        gap: 10px;
    }

        .site-header .brand {
            min-width: 170px;
        }

    .brand img {
        width: 42px;
        height: 42px;
    }

    .brand span {
        font-size: 17px;
    }

    .brand small {
        font-size: 6px;
    }

    .header-create {
        order: 3;
        margin-left: 37px;
    }

    .header-links {
        order: 4;
        margin-left: auto;
    }

    .language-picker select {
        min-width: 78px;
        font-size: 11px;
        padding: 6px;
    }

    .home-welcome {
        padding: 20px;
    }

        .home-welcome h1 {
            font-size: 25px;
        }

    .how-strip {
        gap: 9px 17px;
        font-size: 11px;
    }

    .page-result {
        gap: 15px;
    }

    .result-image {
        width: 80px;
        height: 80px;
        flex-basis: 80px;
    }

    .page-result h2 {
        font-size: 20px;
    }

    .page-result p {
        font-size: 13px;
    }

    .create-callout {
        display: block;
    }

        .create-callout .button {
            margin-top: 15px;
        }

    .infobox {
        width: 100%;
        margin: 0 0 25px;
    }

    .article-head h1 {
        font-size: 30px;
    }

    .article-tabs {
        gap: 15px;
        font-size: 12px;
    }

    .article-language {
        width: 100%;
        margin: 0 0 10px;
    }

    .page-dates {
        grid-template-columns: 110px 1fr;
        font-size: 11px;
    }

    .writing-steps button span {
        display: block;
    }

    .rich-editor {
        min-height: 330px;
        padding: 17px;
        font-size: 16px;
    }

    .builder-row {
        grid-template-columns: minmax(0,1fr) 32px;
    }

        .builder-row input:first-child {
            grid-column: 1;
        }

        .builder-row input:nth-child(2) {
            grid-column: 1;
        }

        .builder-row button {
            grid-column: 2;
            grid-row: 1/3;
        }

    .section-title {
        flex-wrap: wrap;
    }

    .review-card {
        display: block;
    }

        .review-card .button {
            margin-top: 15px;
        }

    .editor-save-bar {
        flex-wrap: wrap;
    }
}

.infobox figcaption {
    overflow-wrap: anywhere;
}

.home-explainer {
    margin-top: 40px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    max-width: 950px;
}

    .home-explainer h2 {
        font-size: 25px;
    }

    .home-explainer p {
        color: #56667a;
        line-height: 1.85;
    }

    .home-explainer details {
        border-bottom: 1px solid var(--line);
        padding: 17px 0;
    }

    .home-explainer summary {
        cursor: pointer;
        color: var(--ink);
        font-weight: 600;
    }

.brand small {
    font-family: Inter,NotoDevanagari,"Nirmala UI",Arial,sans-serif;
}

.editor-save-bar {
    position: static;
}
