Jump to content

MediaWiki:Common.css: Difference between revisions

From တႆးၽီးတီးယႃး
No edit summary
No edit summary
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:


/* ==========================================
/* Shan Font | Self-hosted webfont kit
  TAIPEDIA MEDIAWIKI — COMPLETE STYLESHEET
   Performance: woff2 only, long-term caching recommended. */
  Custom Shan Font + Digital Library
   ========================================== */


 
:root {
/* ==========================================
  --shan-font-family: "Shan", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  1. CUSTOM SHAN FONT
}
  ========================================== */
@font-face {
    font-family: "Shan";
    src: url("/fonts/Shan-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}


@font-face {
@font-face {
     font-family: 'TaipediaShan';
     font-family: "Shan";
     src: url('/resources/assets/fonts/Shan.ttf?v=4')
     src: url("/fonts/Shan-Bold.woff2") format("woff2");
        format('truetype');
     font-weight: 700;
    font-style: normal;
     font-weight: 400;
     font-display: swap;
     font-display: swap;
}
}


/* Optional utility class */
.font-shan {
  font-family: var(--shan-font-family);
}


/* ==========================================
  2. GLOBAL WEBSITE TYPOGRAPHY
  ========================================== */


html,
/* =====================================================
body,
  GLOBAL TAIPEDIA FONT — applies to all wiki pages
  Avoid forcing font on icon and code glyphs.
  ===================================================== */
html, body,
.mw-page-container,
.mw-body,
.mw-body,
.mw-body-content,
.mw-body-content,
.mw-parser-output,
.mw-parser-output,
.mw-page-container,
.mw-category,
.mw-page-title-main,
.mw-category-group,
.mw-first-heading,
.vector-header,
.vector-header,
.vector-column-start,
.vector-column-end,
.vector-page-toolbar,
.vector-menu,
.vector-menu,
.vector-menu-content,
.mw-portlet,
.vector-toc,
.mw-specialpage-summary,
.catlinks,
.mw-editform,
.mw-category,
.oo-ui-widget,
.mw-category-group,
input, button, select, textarea {
input,
     font-family: var(--shan-font-family) !important;
textarea,
button,
select {
     font-family: 'TaipediaShan',
                'Noto Sans Myanmar',
                sans-serif !important;
}
 
 
/* ==========================================
  3. ARTICLE CONTENT
  ========================================== */
 
.mw-parser-output {
    font-size: 17px;
    line-height: 1.9;
}
}


/* Make normal text inherit the site-wide font. */
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output h5,
.mw-parser-output h6,
.mw-parser-output p,
.mw-parser-output p,
.mw-parser-output li,
.mw-parser-output li,
Line 63: Line 62:
.mw-parser-output th,
.mw-parser-output th,
.mw-parser-output blockquote,
.mw-parser-output blockquote,
.mw-parser-output span {
.mw-parser-output .library-home,
     font-family: 'TaipediaShan',
.mw-parser-output .kh-home,
                'Noto Sans Myanmar',
.mw-parser-output .tai-home {
                sans-serif !important;
     font-family: var(--shan-font-family) !important;
}
}


.mw-parser-output h1,
/* Keep code and preformatted text in monospace. */
.mw-parser-output h2,
pre, code, kbd, samp,
.mw-parser-output h3,
.mw-parser-output pre,
.mw-parser-output h4,
.mw-parser-output code,
.mw-parser-output h5,
.mw-parser-output .mw-code {
.mw-parser-output h6 {
     font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important;
     font-family: 'TaipediaShan',
                'Noto Sans Myanmar',
                sans-serif !important;
 
    line-height: 1.7;
}
}


/* MAIN CONTAINER */


/* ==========================================
.mw-parser-output .library-home .kh-home {
  4. LIBRARY MAIN PAGE
    width: 100%;
  ========================================== */
 
.mw-parser-output .library-home {
     max-width: 1200px;
     max-width: 1200px;
    min-width: 0;
     margin: 0 auto;
     margin: 0 auto;
     font-family: 'TaipediaShan',
     box-sizing: border-box;
                'Noto Sans Myanmar',
                sans-serif !important;
}
}


.mw-parser-output .library-home * {
.mw-parser-output .kh-home *,
    font-family: 'TaipediaShan',
.mw-parser-output .kh-home *::before,
                'Noto Sans Myanmar',
.mw-parser-output .kh-home *::after {
                sans-serif !important;
    box-sizing: border-box;
}
}


/* ==========================================
/* ==========================================
   5. WELCOME HERO
   COMPACT HERO SECTION
   ========================================== */
   ========================================== */


.mw-parser-output .library-hero {
.mw-parser-output .library-home .kh-home .kh-hero {
    display: block;
 
    width: 100%;
    max-width: 100%;
 
     background: linear-gradient(
     background: linear-gradient(
         135deg,
         135deg,
         #142d4e 0%,
         #10233f 0%,
        #1e3a5f 50%,
         #2459a6 100%
         #2459a6 100%
     );
     ) !important;


     color: #ffffff;
     color: #ffffff;
     padding: 55px 30px;
 
     padding: 25px 20px !important;
    margin: 0 0 25px;
 
    border: 0;
    border-radius: 14px;
     text-align: center;
     text-align: center;
    border-radius: 18px;
    margin-bottom: 35px;
}
}


.mw-parser-output .library-hero h1 {
/* Hero inner container */
     color: #ffffff;
 
     border: none;
.mw-parser-output .kh-home .kh-hero-inner {
    font-size: 36px;
     width: 100%;
    font-weight: 400;
     max-width: 720px;
     margin: 0 0 15px;
     margin: 0 auto;
    line-height: 1.7;
}
}


.mw-parser-output .library-hero p {
/* Welcome text */
     color: #ffffff;
 
     font-size: 17px;
.mw-parser-output .kh-home .kh-eyebrow {
     line-height: 1.9;
     color: #67e8f9;
     margin: 0;
     font-size: 11px;
    letter-spacing: 1px;
     line-height: 1.5;
     margin-bottom: 8px;
}
}


/* Hero heading */


/* ==========================================
.mw-parser-output .kh-home .kh-hero h1 {
  6. LIBRARY SECTION HEADING
    color: #ffffff !important;
  ========================================== */
    font-size: clamp(25px, 4vw, 34px);
    line-height: 1.4;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    background: transparent;
}
 
/* Hero description */


.mw-parser-output .library-home > h2 {
.mw-parser-output .kh-home .kh-hero p {
    font-size: 26px;
     color: #e2e8f0;
    font-weight: 400;
     font-size: 14px;
     color: #183153;
    border-bottom: 2px solid #e2e8f0;
     padding-bottom: 12px;
    margin: 30px 0 25px;
     line-height: 1.7;
     line-height: 1.7;
    margin: 0 0 15px;
}
}


/* ==========================================
/* ==========================================
   7. RESPONSIVE CARD GRID
   HERO SEARCH BOX
   ========================================== */
   ========================================== */


.mw-parser-output .library-grid {
.mw-parser-output .kh-home .kh-search {
     display: grid !important;
     width: 100%;
    max-width: 470px;
    margin: 0 auto;
}


    grid-template-columns:
.mw-parser-output .kh-home .kh-search .mw-inputbox-form {
        repeat(3, minmax(0, 1fr));
     display: flex;
 
     flex-wrap: wrap;
     gap: 20px;
 
     margin: 25px 0 40px;
     align-items: stretch;
     align-items: stretch;
    justify-content: center;
    gap: 8px;
}
}


.mw-parser-output .kh-home .kh-search input[type="text"],
.mw-parser-output .kh-home .kh-search input[type="search"],
.mw-parser-output .kh-home .kh-search .mw-inputbox-input {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
    padding: 10px 14px;


/* ==========================================
    color: #1e293b;
  8. LIBRARY CARDS
    background: #ffffff;
  ========================================== */


.mw-parser-output .library-card {
     border: 1px solid #cbd5e1;
     display: flex;
     border-radius: 9px;
     flex-direction: column;


     background: #ffffff;
     font-size: 14px;
}


    border: 1px solid #dbe4ef;
.mw-parser-output .kh-home .kh-search input[type="submit"] {
     border-radius: 16px;
     padding: 10px 18px;


     padding: 24px;
     background: #2563eb;
     min-width: 0;
     color: #ffffff;


     box-sizing: border-box;
     border: none;
    border-radius: 9px;


     box-shadow:
     font-size: 14px;
        0 4px 15px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}


    transition:
.mw-parser-output .kh-home .kh-search input[type="submit"]:hover {
        transform 0.25s ease,
    background: #1d4ed8;
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}
}


.mw-parser-output .library-card:hover {
/* Hero links */
    transform: translateY(-5px);


     border-color: #2563eb;
.mw-parser-output .kh-home .kh-hero-links {
    margin-top: 12px;
     line-height: 1.7;
}


     box-shadow:
.mw-parser-output .kh-home .kh-hero-links a {
        0 12px 28px rgba(0, 0, 0, 0.12);
     color: #ffffff !important;
    text-decoration: none;
}
}


.mw-parser-output .kh-home .kh-hero-links a:hover {
    text-decoration: underline;
}


/* ==========================================
/* ==========================================
   9. CARD ICON
   CATEGORY SECTION
   ========================================== */
   ========================================== */


.mw-parser-output .library-icon {
.mw-parser-output .kh-home .kh-section {
     font-size: 38px;
     margin-top: 30px;
     line-height: 1.4;
}
     margin-bottom: 12px;
 
.mw-parser-output .kh-home .kh-section-head {
     display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
     margin-bottom: 16px;
}
}


.mw-parser-output .kh-home .kh-section-head h2 {
    color: #17263c;
    font-size: 23px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    border: none;
}


/* ==========================================
/* ==========================================
   10. LIBRARY CATEGORY NUMBER
   CATEGORY GRID
   ========================================== */
   ========================================== */


.mw-parser-output .library-number {
.mw-parser-output .kh-home .kh-grid {
     color: #2563eb;
     display: grid;
     font-size: 14px;
     grid-template-columns:
     font-weight: 400;
        repeat(4, minmax(0, 1fr));
     letter-spacing: 1px;
     gap: 16px;
     margin-bottom: 6px;
     align-items: stretch;
     margin-top: 18px;
}
}


.mw-parser-output .kh-home .kh-card {
    min-width: 0;
    padding: 20px;


/* ==========================================
    background: #ffffff;
  11. SHAN CARD TITLES
    color: #17263c;
  ========================================== */


.mw-parser-output .library-card h3 {
    border: 1px solid #e2e8f0;
     font-family: 'TaipediaShan',
     border-radius: 14px;
                'Noto Sans Myanmar',
                sans-serif !important;


     font-size: 21px;
     box-shadow: 0 3px 12px rgba(0,0,0,0.04);
    font-weight: 400;
    line-height: 1.8;


     color: #183153;
     transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


     margin: 8px 0 12px;
.mw-parser-output .kh-home .kh-card:hover {
    transform: translateY(-3px);
     box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}


.mw-parser-output .kh-home .kh-card h3 {
    font-size: 17px;
    line-height: 1.7;
    margin: 0 0 8px;
    padding: 0;
     border: none;
     border: none;
     padding: 0;
     overflow-wrap: anywhere;
}


     overflow-wrap: break-word;
.mw-parser-output .kh-home .kh-card h3 a {
     color: #17263c;
    text-decoration: none;
}
}


.mw-parser-output .kh-home .kh-card h3 a:hover {
    color: #2563eb;
}


/* ==========================================
.mw-parser-output .kh-home .kh-card p {
  12. CARD DESCRIPTIONS
     font-size: 13px;
  ========================================== */
     line-height: 1.7;
 
     min-height: 0;
.mw-parser-output .library-card p {
     margin: 0;
     font-family: 'TaipediaShan',
                'Noto Sans Myanmar',
                sans-serif !important;
 
     font-size: 15px;
     font-weight: 400;
     line-height: 1.9;
 
     color: #64748b;
     color: #64748b;
    margin: 0 0 20px;
    flex-grow: 1;
}
}


/* ==========================================
/* ==========================================
   13. CARD LINKS
   LATEST ARTICLES
   ========================================== */
   ========================================== */


.mw-parser-output .library-card a {
.mw-parser-output .kh-home .kh-latest {
     font-family: 'TaipediaShan',
     margin-top: 30px;
                'Noto Sans Myanmar',
}
                sans-serif !important;


     display: inline-block;
.mw-parser-output .kh-home .kh-article-list {
     width: 100%;
    max-width: 100%;


     font-size: 15px;
     padding: 20px;
     font-weight: 400;
     background: #ffffff;


     color: #2563eb;
     border: 1px solid #e2e8f0;
     text-decoration: none;
     border-radius: 14px;


     transition: color 0.2s ease;
     overflow-wrap: anywhere;
}
}


.mw-parser-output .library-card a:hover {
.mw-parser-output .kh-home .kh-article-list li {
     color: #1e40af;
    padding: 10px 3px;
     text-decoration: underline;
     line-height: 1.8;
     border-bottom: 1px solid #e2e8f0;
}
}


.mw-parser-output .kh-home .kh-article-list li:last-child {
    border-bottom: none;
}


/* ==========================================
/* ==========================================
   14. CATEGORY PAGES
   TABLET RESPONSIVE
   ========================================== */
   ========================================== */


.mw-category,
@media (max-width: 1000px) {
.mw-category-group,
.mw-category-generated,
.catlinks {
    font-family: 'TaipediaShan',
                'Noto Sans Myanmar',
                sans-serif !important;


     line-height: 1.9;
     .mw-parser-output .kh-home .kh-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}
}


.mw-category a,
/* ==========================================
.catlinks a {
  MOBILE RESPONSIVE
    font-family: inherit !important;
  ========================================== */
}


@media (max-width: 600px) {


/* ==========================================
    .mw-parser-output .library-home .kh-home .kh-hero {
  15. NAVIGATION AND MENU
        padding: 20px 15px !important;
  ========================================== */
        border-radius: 12px;
    }


.vector-menu a,
    .mw-parser-output .kh-home .kh-hero h1 {
.vector-header a,
        font-size: 25px;
.vector-toc a,
    }
.mw-page-container a,
.vector-page-toolbar a {
    font-family: 'TaipediaShan',
                'Noto Sans Myanmar',
                sans-serif !important;
}


    .mw-parser-output .kh-home .kh-hero p {
        font-size: 13px;
        margin-bottom: 12px;
    }


/* ==========================================
    .mw-parser-output .kh-home .kh-grid {
  16. TABLET RESPONSIVE
        grid-template-columns: 1fr;
  ========================================== */
        gap: 12px;
    }


@media (max-width: 900px) {
    .mw-parser-output .kh-home .kh-card {
        padding: 17px;
    }


     .mw-parser-output .library-grid {
     .mw-parser-output .kh-home .kh-section {
         grid-template-columns:
         margin-top: 24px;
            repeat(2, minmax(0, 1fr));
        gap: 16px;
     }
     }


     .mw-parser-output .library-card {
     .mw-parser-output .kh-home .kh-search .mw-inputbox-form {
         padding: 20px;
         flex-direction: column;
     }
     }


     .mw-parser-output .library-hero {
     .mw-parser-output .kh-home .kh-search input[type="text"],
         padding: 40px 20px;
    .mw-parser-output .kh-home .kh-search input[type="search"],
    .mw-parser-output .kh-home .kh-search .mw-inputbox-input,
    .mw-parser-output .kh-home .kh-search input[type="submit"] {
         width: 100%;
        flex: 0 1 auto;
     }
     }


     .mw-parser-output .library-hero h1 {
     .mw-parser-output .kh-home .kh-article-list {
         font-size: 30px;
         padding: 15px;
     }
     }
}
}


/* ==========================================
/* ==========================================
   17. MOBILE RESPONSIVE
   ACCESSIBILITY
   ========================================== */
   ========================================== */


@media (max-width: 600px) {
.mw-parser-output .kh-home a:focus-visible,
.mw-parser-output .kh-home input:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}
 
@media (prefers-reduced-motion: reduce) {


     .mw-parser-output .library-grid {
     .mw-parser-output .kh-home .kh-card {
         grid-template-columns: 1fr;
         transition: none;
        gap: 15px;
     }
     }


     .mw-parser-output .library-card {
     .mw-parser-output .kh-home .kh-card:hover {
         padding: 20px;
         transform: none;
        border-radius: 14px;
     }
     }
}
/* ==========================================
  TAIPEDIA — ARTICLE PARAGRAPH ALIGNMENT
  Works with MediaWiki VisualEditor
  Does NOT change Shan fonts
  Does NOT affect homepage layout
  ========================================== */
/* Justify normal article paragraphs */
.mw-parser-output > p,
.mw-parser-output > section > p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.9;
}
/* Keep homepage paragraphs unchanged */
.mw-parser-output .library-home p,
.mw-parser-output .kh-home p,
.mw-parser-output .tai-home p {
    text-align: inherit;
}
/* Center manually marked paragraphs */
.mw-parser-output .text-center {
    text-align: center !important;
}
.biography-infobox {
  float: right;
  clear: right;
  width: 290px;
  max-width: 100%;
  margin: 0 0 1rem 1.2rem;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  background: #f8f9fa;
  font-size: 90%;
  line-height: 1.5;
}
.biography-infobox th,
.biography-infobox td {
  padding: 7px 10px;
  border: 1px solid #a2a9b1;
  vertical-align: top;
}
.biography-infobox th {
  text-align: left;
  font-weight: 600;
}
.biography-infobox .biography-title {
  text-align: center;
  background: #eaecf0;
  font-size: 115%;
}
.biography-infobox .biography-photo {
  text-align: center;
  background: #fff;
}


    .mw-parser-output .library-card h3 {
.biography-photo img {
        font-size: 19px;
  max-width: 100%;
     }
  height: auto;
}
 
@media (max-width: 600px) {
  .biography-infobox {
    float: none;
    width: 100%;
     margin: 1rem 0;
  }
}


    .mw-parser-output .library-card p {
        font-size: 14px;
    }


    .mw-parser-output .library-hero {
        padding: 35px 18px;
        border-radius: 14px;
    }


    .mw-parser-output .library-hero h1 {
/* END TAIPEDIA HOMEPAGE LAYOUT FIX */
        font-size: 26px;
    }


    .mw-parser-output .library-hero p {
        font-size: 15px;
    }


    .mw-parser-output .library-home > h2 {
/* ==============================================
        font-size: 22px;
  TAIPEDIA CATEGORY GRID — VECTOR SIDEBAR FIX
     }
  Uses available content width, not screen width.
  Keep this block at the END of Common.css.
  ============================================== */
.mw-parser-output .library-home,
.mw-parser-output .library-home .kh-home,
.mw-parser-output .kh-home .kh-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
     box-sizing: border-box;
}


    .mw-parser-output {
.mw-parser-output .kh-home .kh-grid {
        font-size: 16px;
    display: grid;
        line-height: 1.85;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
     }
    gap: 16px;
    width: 100%;
    max-width: 100%;
     min-width: 0;
}
}


.mw-parser-output .kh-home .kh-grid > .kh-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}


/* ==========================================
@media (max-width: 600px) {
  END — TAIPEDIA STYLESHEET
    .mw-parser-output .kh-home .kh-grid {
  ========================================== */
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

Latest revision as of 14:04, 24 October 2026


/* Shan Font | Self-hosted webfont kit
   Performance: woff2 only, long-term caching recommended. */

:root {
  --shan-font-family: "Shan", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}
@font-face {
    font-family: "Shan";
    src: url("/fonts/Shan-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Shan";
    src: url("/fonts/Shan-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* Optional utility class */
.font-shan {
  font-family: var(--shan-font-family);
}


/* =====================================================
   GLOBAL TAIPEDIA FONT — applies to all wiki pages
   Avoid forcing font on icon and code glyphs.
   ===================================================== */
html, body,
.mw-page-container,
.mw-body,
.mw-body-content,
.mw-parser-output,
.mw-category,
.mw-category-group,
.vector-header,
.vector-column-start,
.vector-column-end,
.vector-page-toolbar,
.vector-menu,
.mw-portlet,
.mw-specialpage-summary,
.mw-editform,
.oo-ui-widget,
input, button, select, textarea {
    font-family: var(--shan-font-family) !important;
}

/* Make normal text inherit the site-wide font. */
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output h5,
.mw-parser-output h6,
.mw-parser-output p,
.mw-parser-output li,
.mw-parser-output td,
.mw-parser-output th,
.mw-parser-output blockquote,
.mw-parser-output .library-home,
.mw-parser-output .kh-home,
.mw-parser-output .tai-home {
    font-family: var(--shan-font-family) !important;
}

/* Keep code and preformatted text in monospace. */
pre, code, kbd, samp,
.mw-parser-output pre,
.mw-parser-output code,
.mw-parser-output .mw-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important;
}

/* MAIN CONTAINER */

.mw-parser-output .library-home .kh-home {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
}

.mw-parser-output .kh-home *,
.mw-parser-output .kh-home *::before,
.mw-parser-output .kh-home *::after {
    box-sizing: border-box;
}

/* ==========================================
   COMPACT HERO SECTION
   ========================================== */

.mw-parser-output .library-home .kh-home .kh-hero {
    display: block;

    width: 100%;
    max-width: 100%;

    background: linear-gradient(
        135deg,
        #10233f 0%,
        #1e3a5f 50%,
        #2459a6 100%
    ) !important;

    color: #ffffff;

    padding: 25px 20px !important;
    margin: 0 0 25px;

    border: 0;
    border-radius: 14px;
    text-align: center;
}

/* Hero inner container */

.mw-parser-output .kh-home .kh-hero-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

/* Welcome text */

.mw-parser-output .kh-home .kh-eyebrow {
    color: #67e8f9;
    font-size: 11px;
    letter-spacing: 1px;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Hero heading */

.mw-parser-output .kh-home .kh-hero h1 {
    color: #ffffff !important;
    font-size: clamp(25px, 4vw, 34px);
    line-height: 1.4;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    background: transparent;
}

/* Hero description */

.mw-parser-output .kh-home .kh-hero p {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 15px;
}

/* ==========================================
   HERO SEARCH BOX
   ========================================== */

.mw-parser-output .kh-home .kh-search {
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
}

.mw-parser-output .kh-home .kh-search .mw-inputbox-form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
}

.mw-parser-output .kh-home .kh-search input[type="text"],
.mw-parser-output .kh-home .kh-search input[type="search"],
.mw-parser-output .kh-home .kh-search .mw-inputbox-input {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;

    padding: 10px 14px;

    color: #1e293b;
    background: #ffffff;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    font-size: 14px;
}

.mw-parser-output .kh-home .kh-search input[type="submit"] {
    padding: 10px 18px;

    background: #2563eb;
    color: #ffffff;

    border: none;
    border-radius: 9px;

    font-size: 14px;
    cursor: pointer;
}

.mw-parser-output .kh-home .kh-search input[type="submit"]:hover {
    background: #1d4ed8;
}

/* Hero links */

.mw-parser-output .kh-home .kh-hero-links {
    margin-top: 12px;
    line-height: 1.7;
}

.mw-parser-output .kh-home .kh-hero-links a {
    color: #ffffff !important;
    text-decoration: none;
}

.mw-parser-output .kh-home .kh-hero-links a:hover {
    text-decoration: underline;
}

/* ==========================================
   CATEGORY SECTION
   ========================================== */

.mw-parser-output .kh-home .kh-section {
    margin-top: 30px;
}

.mw-parser-output .kh-home .kh-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.mw-parser-output .kh-home .kh-section-head h2 {
    color: #17263c;
    font-size: 23px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    border: none;
}

/* ==========================================
   CATEGORY GRID
   ========================================== */

.mw-parser-output .kh-home .kh-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    margin-top: 18px;
}

.mw-parser-output .kh-home .kh-card {
    min-width: 0;
    padding: 20px;

    background: #ffffff;
    color: #17263c;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    box-shadow: 0 3px 12px rgba(0,0,0,0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.mw-parser-output .kh-home .kh-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.mw-parser-output .kh-home .kh-card h3 {
    font-size: 17px;
    line-height: 1.7;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    overflow-wrap: anywhere;
}

.mw-parser-output .kh-home .kh-card h3 a {
    color: #17263c;
    text-decoration: none;
}

.mw-parser-output .kh-home .kh-card h3 a:hover {
    color: #2563eb;
}

.mw-parser-output .kh-home .kh-card p {
    font-size: 13px;
    line-height: 1.7;
    min-height: 0;
    margin: 0;
    color: #64748b;
}

/* ==========================================
   LATEST ARTICLES
   ========================================== */

.mw-parser-output .kh-home .kh-latest {
    margin-top: 30px;
}

.mw-parser-output .kh-home .kh-article-list {
    width: 100%;
    max-width: 100%;

    padding: 20px;
    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    overflow-wrap: anywhere;
}

.mw-parser-output .kh-home .kh-article-list li {
    padding: 10px 3px;
    line-height: 1.8;
    border-bottom: 1px solid #e2e8f0;
}

.mw-parser-output .kh-home .kh-article-list li:last-child {
    border-bottom: none;
}

/* ==========================================
   TABLET RESPONSIVE
   ========================================== */

@media (max-width: 1000px) {

    .mw-parser-output .kh-home .kh-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 600px) {

    .mw-parser-output .library-home .kh-home .kh-hero {
        padding: 20px 15px !important;
        border-radius: 12px;
    }

    .mw-parser-output .kh-home .kh-hero h1 {
        font-size: 25px;
    }

    .mw-parser-output .kh-home .kh-hero p {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .mw-parser-output .kh-home .kh-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mw-parser-output .kh-home .kh-card {
        padding: 17px;
    }

    .mw-parser-output .kh-home .kh-section {
        margin-top: 24px;
    }

    .mw-parser-output .kh-home .kh-search .mw-inputbox-form {
        flex-direction: column;
    }

    .mw-parser-output .kh-home .kh-search input[type="text"],
    .mw-parser-output .kh-home .kh-search input[type="search"],
    .mw-parser-output .kh-home .kh-search .mw-inputbox-input,
    .mw-parser-output .kh-home .kh-search input[type="submit"] {
        width: 100%;
        flex: 0 1 auto;
    }

    .mw-parser-output .kh-home .kh-article-list {
        padding: 15px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.mw-parser-output .kh-home a:focus-visible,
.mw-parser-output .kh-home input:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .mw-parser-output .kh-home .kh-card {
        transition: none;
    }

    .mw-parser-output .kh-home .kh-card:hover {
        transform: none;
    }
}


/* ==========================================
   TAIPEDIA — ARTICLE PARAGRAPH ALIGNMENT
   Works with MediaWiki VisualEditor
   Does NOT change Shan fonts
   Does NOT affect homepage layout
   ========================================== */

/* Justify normal article paragraphs */
.mw-parser-output > p,
.mw-parser-output > section > p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.9;
}

/* Keep homepage paragraphs unchanged */
.mw-parser-output .library-home p,
.mw-parser-output .kh-home p,
.mw-parser-output .tai-home p {
    text-align: inherit;
}

/* Center manually marked paragraphs */
.mw-parser-output .text-center {
    text-align: center !important;
}


.biography-infobox {
  float: right;
  clear: right;
  width: 290px;
  max-width: 100%;
  margin: 0 0 1rem 1.2rem;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  background: #f8f9fa;
  font-size: 90%;
  line-height: 1.5;
}

.biography-infobox th,
.biography-infobox td {
  padding: 7px 10px;
  border: 1px solid #a2a9b1;
  vertical-align: top;
}

.biography-infobox th {
  text-align: left;
  font-weight: 600;
}

.biography-infobox .biography-title {
  text-align: center;
  background: #eaecf0;
  font-size: 115%;
}

.biography-infobox .biography-photo {
  text-align: center;
  background: #fff;
}

.biography-photo img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .biography-infobox {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }
}



/* END TAIPEDIA HOMEPAGE LAYOUT FIX */


/* ==============================================
   TAIPEDIA CATEGORY GRID — VECTOR SIDEBAR FIX
   Uses available content width, not screen width.
   Keep this block at the END of Common.css.
   ============================================== */
.mw-parser-output .library-home,
.mw-parser-output .library-home .kh-home,
.mw-parser-output .kh-home .kh-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.mw-parser-output .kh-home .kh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.mw-parser-output .kh-home .kh-grid > .kh-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .mw-parser-output .kh-home .kh-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}