Jump to content

MediaWiki:Common.css: Difference between revisions

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


/* ==========================================
/* Shan Font | Self-hosted webfont kit
   TAIPEDIA DIGITAL LIBRARY
   Performance: woff2 only, long-term caching recommended. */
  Complete Custom CSS
  ========================================== */


 
: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("/fonts/Shan.ttf?v=13")
     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. ARTICLE / POST FONT
  ========================================== */


.mw-parser-output {
/* =====================================================
    font-family: "TaipediaShan",
  GLOBAL TAIPEDIA FONT — applies to all wiki pages
                "Noto Sans Myanmar",
  Avoid forcing font on icon and code glyphs.
                sans-serif !important;
  ===================================================== */
     font-size: 17px;
html, body,
    line-height: 1.9;
.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;
}
}


/* Article headings */
/* Make normal text inherit the site-wide font. */
.mw-parser-output h1,
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h2,
Line 38: Line 56:
.mw-parser-output h4,
.mw-parser-output h4,
.mw-parser-output h5,
.mw-parser-output h5,
.mw-parser-output h6 {
.mw-parser-output h6,
    font-family: "TaipediaShan",
                "Noto Sans Myanmar",
                sans-serif !important;
    line-height: 1.7;
}
 
/* Article paragraphs, lists and tables */
.mw-parser-output p,
.mw-parser-output p,
.mw-parser-output li,
.mw-parser-output li,
.mw-parser-output td,
.mw-parser-output td,
.mw-parser-output th,
.mw-parser-output th,
.mw-parser-output blockquote {
.mw-parser-output blockquote,
    font-family: "TaipediaShan",
.mw-parser-output .library-home,
                "Noto Sans Myanmar",
.mw-parser-output .kh-home,
                sans-serif !important;
.mw-parser-output .tai-home {
     line-height: 1.9;
     font-family: var(--shan-font-family) !important;
}
}


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


/* MAIN CONTAINER */


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


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


/* ==========================================
/* ==========================================
   4. LIBRARY HERO BANNER
   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;
 
    font-size: 36px;
.mw-parser-output .kh-home .kh-hero-inner {
    font-weight: 400;
     width: 100%;
     line-height: 1.7;
     max-width: 720px;
    border: none;
     margin: 0 auto;
    padding: 0;
     margin: 0 0 15px;
}
}


.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 {
  5. 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;
     line-height: 1.7;
     line-height: 1.7;
    color: #183153;
     margin: 0 0 15px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
     margin: 30px 0 25px;
}
}


/* ==========================================
/* ==========================================
   6. LIBRARY GRID
   HERO SEARCH BOX
   ========================================== */
   ========================================== */


.mw-parser-output .library-grid {
.mw-parser-output .kh-home .kh-search {
     display: grid !important;
     width: 100%;
     grid-template-columns:
     max-width: 470px;
        repeat(3, minmax(0, 1fr));
    margin: 0 auto;
     gap: 20px;
}
 
.mw-parser-output .kh-home .kh-search .mw-inputbox-form {
    display: flex;
     flex-wrap: wrap;
     align-items: stretch;
     align-items: stretch;
     margin: 25px 0 40px;
     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;
  7. LIBRARY CARDS
  ========================================== */
 
.mw-parser-output .library-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
     padding: 24px;
    box-sizing: border-box;


    color: #1e293b;
     background: #ffffff;
     background: #ffffff;
    color: #183153;
    border: 1px solid #dbe4ef;
    border-radius: 16px;


     box-shadow:
     border: 1px solid #cbd5e1;
        0 4px 15px rgba(0, 0, 0, 0.06);
    border-radius: 9px;


     transition:
     font-size: 14px;
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}
}


.mw-parser-output .library-card:hover {
.mw-parser-output .kh-home .kh-search input[type="submit"] {
     transform: translateY(-5px);
    padding: 10px 18px;
     border-color: #2563eb;
 
     box-shadow:
    background: #2563eb;
        0 12px 28px rgba(0, 0, 0, 0.12);
    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 */
  8. CARD ICON AND NUMBER
  ========================================== */


.mw-parser-output .library-icon {
.mw-parser-output .kh-home .kh-hero-links {
     font-size: 38px;
     margin-top: 12px;
     line-height: 1.4;
     line-height: 1.7;
    margin-bottom: 12px;
}
}


.mw-parser-output .library-number {
.mw-parser-output .kh-home .kh-hero-links a {
     color: #2563eb;
     color: #ffffff !important;
    font-size: 14px;
     text-decoration: none;
    font-weight: 400;
    letter-spacing: 1px;
     margin-bottom: 6px;
}
}


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


/* ==========================================
/* ==========================================
   9. LIBRARY CARD TITLE
   CATEGORY SECTION
   ========================================== */
   ========================================== */


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


     font-size: 21px;
.mw-parser-output .kh-home .kh-section-head {
     font-weight: 400;
     display: flex;
     line-height: 1.8;
    flex-wrap: wrap;
     color: #183153;
     justify-content: space-between;
     align-items: center;
    gap: 10px;
     margin-bottom: 16px;
}


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


/* ==========================================
/* ==========================================
   10. LIBRARY CARD DESCRIPTION
   CATEGORY GRID
   ========================================== */
   ========================================== */


.mw-parser-output .library-card p {
.mw-parser-output .kh-home .kh-grid {
     font-size: 15px;
     display: grid;
     font-weight: 400;
     grid-template-columns:
     line-height: 1.9;
        repeat(4, minmax(0, 1fr));
     color: #64748b;
     gap: 16px;
     margin: 0 0 20px;
     align-items: stretch;
    flex-grow: 1;
     margin-top: 18px;
}
}


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


/* ==========================================
     background: #ffffff;
  11. LIBRARY CARD LINKS
     color: #17263c;
  ========================================== */
 
.mw-parser-output .library-card a {
     display: inline-block;
     color: #2563eb;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
}


.mw-parser-output .library-card a:hover {
     border: 1px solid #e2e8f0;
     color: #1e40af;
     border-radius: 14px;
     text-decoration: underline;
}


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


/* ==========================================
     transition:
  12. CATEGORY PAGE CONTENT
        transform 0.2s ease,
  ========================================== */
        box-shadow 0.2s ease;
 
.mw-category,
.mw-category-group,
.mw-category-generated,
.mw-category a,
.mw-category-group a {
     font-family: "TaipediaShan",
                "Noto Sans Myanmar",
                sans-serif !important;
    line-height: 1.9;
}
}


 
.mw-parser-output .kh-home .kh-card:hover {
/* ==========================================
     transform: translateY(-3px);
  13. CREATE ARTICLE FORM
     box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  ========================================== */
 
.taipedia-create-box {
     margin: 30px 0;
    padding: 35px 24px;
    text-align: center;
     background: #f0f6ff;
    border: 1px solid #dbeafe;
    border-radius: 18px;
}
}


.taipedia-create-box h2 {
.mw-parser-output .kh-home .kh-card h3 {
     color: #173a70;
     font-size: 17px;
     font-size: 25px;
     line-height: 1.7;
     font-weight: 400;
    margin: 0 0 8px;
     padding: 0;
     border: none;
     border: none;
     margin: 0 0 12px;
     overflow-wrap: anywhere;
}
}


.taipedia-create-box p {
.mw-parser-output .kh-home .kh-card h3 a {
     color: #64748b;
     color: #17263c;
     line-height: 1.8;
     text-decoration: none;
}
}


.taipedia-create-box input[type="text"] {
.mw-parser-output .kh-home .kh-card h3 a:hover {
    padding: 12px;
     color: #2563eb;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    max-width: 100%;
     box-sizing: border-box;
}
}


.taipedia-create-box input[type="submit"],
.mw-parser-output .kh-home .kh-card p {
.taipedia-create-box button {
     font-size: 13px;
     background: #2459a6;
     line-height: 1.7;
     color: #ffffff;
     min-height: 0;
     border: none;
     margin: 0;
    padding: 12px 22px;
     color: #64748b;
    border-radius: 8px;
     cursor: pointer;
     font-weight: 600;
}
}


.taipedia-create-box input[type="submit"]:hover,
/* ==========================================
.taipedia-create-box button:hover {
  LATEST ARTICLES
     background: #173a70;
  ========================================== */
 
.mw-parser-output .kh-home .kh-latest {
     margin-top: 30px;
}
}


.taipedia-create-note {
.mw-parser-output .kh-home .kh-article-list {
     font-size: 13px;
     width: 100%;
     margin-top: 18px;
     max-width: 100%;
}


    padding: 20px;
    background: #ffffff;


/* ==========================================
    border: 1px solid #e2e8f0;
  14. HIDE CREATE FORM BY DEFAULT
    border-radius: 14px;
  ========================================== */


/* Logged-in visibility rule is explained below */
    overflow-wrap: anywhere;
}


.taipedia-create-box {
.mw-parser-output .kh-home .kh-article-list li {
     display: none;
     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;
}


/* ==========================================
/* ==========================================
   15. TABLET RESPONSIVE
   TABLET RESPONSIVE
   ========================================== */
   ========================================== */


@media (max-width: 900px) {
@media (max-width: 1000px) {


     .mw-parser-output .library-grid {
     .mw-parser-output .kh-home .kh-grid {
         grid-template-columns:
         grid-template-columns:
             repeat(2, minmax(0, 1fr));
             repeat(2, minmax(0, 1fr));
         gap: 16px;
         gap: 14px;
    }
 
    .mw-parser-output .library-card {
        padding: 20px;
    }
 
    .mw-parser-output .library-hero {
        padding: 40px 20px;
    }
 
    .mw-parser-output .library-hero h1 {
        font-size: 30px;
     }
     }
}
}


/* ==========================================
/* ==========================================
   16. MOBILE RESPONSIVE
   MOBILE RESPONSIVE
   ========================================== */
   ========================================== */


@media (max-width: 600px) {
@media (max-width: 600px) {


     .mw-parser-output {
     .mw-parser-output .library-home .kh-home .kh-hero {
         font-size: 16px;
         padding: 20px 15px !important;
         line-height: 1.85;
         border-radius: 12px;
     }
     }


     .mw-parser-output .library-grid {
     .mw-parser-output .kh-home .kh-hero h1 {
         grid-template-columns: 1fr;
         font-size: 25px;
        gap: 15px;
     }
     }


     .mw-parser-output .library-card {
     .mw-parser-output .kh-home .kh-hero p {
         padding: 20px;
         font-size: 13px;
         border-radius: 14px;
         margin-bottom: 12px;
     }
     }


     .mw-parser-output .library-card h3 {
     .mw-parser-output .kh-home .kh-grid {
         font-size: 19px;
         grid-template-columns: 1fr;
        gap: 12px;
     }
     }


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


     .mw-parser-output .library-hero {
     .mw-parser-output .kh-home .kh-section {
         padding: 35px 18px;
         margin-top: 24px;
        border-radius: 14px;
     }
     }


     .mw-parser-output .library-hero h1 {
     .mw-parser-output .kh-home .kh-search .mw-inputbox-form {
         font-size: 26px;
         flex-direction: column;
     }
     }


     .mw-parser-output .library-hero p {
     .mw-parser-output .kh-home .kh-search input[type="text"],
         font-size: 15px;
    .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-home > h2 {
     .mw-parser-output .kh-home .kh-article-list {
         font-size: 22px;
         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) {


     .taipedia-create-box {
     .mw-parser-output .kh-home .kh-card {
         padding: 25px 15px;
         transition: none;
     }
     }


     .taipedia-create-box h2 {
     .mw-parser-output .kh-home .kh-card:hover {
         font-size: 22px;
         transform: none;
     }
     }
}
}
Line 421: Line 431:


/* ==========================================
/* ==========================================
   END OF TAIPEDIA CSS
   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;
    }
}

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;
    }
}