Jump to content

MediaWiki:Common.css: Difference between revisions

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


/* =========================================
/* Shan Font | Self-hosted webfont kit
  TAIPEDIA HOMEPAGE FIXES
   Performance: woff2 only, long-term caching recommended. */
  Font configuration is unchanged
   ========================================= */


/* Main homepage container */
: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;
}


.mw-parser-output .kh-home {
/* 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%;
     width: 100%;
     max-width: 1200px;
     max-width: 1200px;
    min-width: 0;
     margin: 0 auto;
     margin: 0 auto;
     box-sizing: border-box;
     box-sizing: border-box;
Line 20: Line 92:
}
}


/* =========================================
/* ==========================================
   1. COMPACT HERO
   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;


.mw-parser-output .kh-home .kh-hero {
     border: 0;
     padding: 30px 20px;
     border-radius: 14px;
     margin-bottom: 0;
     text-align: center;
     border-radius: 16px;
}
}


.mw-parser-output .kh-hero-inner {
/* Hero inner container */
 
.mw-parser-output .kh-home .kh-hero-inner {
     width: 100%;
     width: 100%;
     max-width: 720px;
     max-width: 720px;
Line 36: Line 127:
}
}


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


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


.mw-parser-output .kh-home .kh-hero p {
.mw-parser-output .kh-home .kh-hero p {
     color: #cbd5e1;
     color: #e2e8f0;
     font-size: 14px;
     font-size: 14px;
     line-height: 1.7;
     line-height: 1.7;
Line 58: Line 158:
}
}


/* Hero navigation */
/* ==========================================
 
   HERO SEARCH BOX
.mw-parser-output .kh-hero-links {
   ========================================== */
    margin-top: 12px;
    line-height: 1.8;
}
 
.mw-parser-output .kh-hero-links a {
    color: #ffffff;
    text-decoration: none;
}
 
.mw-parser-output .kh-hero-links a:hover {
    text-decoration: underline;
}
 
/* =========================================
   2. SEARCH INPUT FIX
   ========================================= */


.mw-parser-output .kh-search {
.mw-parser-output .kh-home .kh-search {
     width: 100%;
     width: 100%;
     max-width: 470px;
     max-width: 470px;
Line 84: Line 168:
}
}


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


.mw-parser-output .kh-search input[type="text"],
.mw-parser-output .kh-home .kh-search input[type="text"],
.mw-parser-output .kh-search input[type="search"],
.mw-parser-output .kh-home .kh-search input[type="search"],
.mw-parser-output .kh-search .mw-inputbox-input {
.mw-parser-output .kh-home .kh-search .mw-inputbox-input {
     flex: 1 1 220px;
     flex: 1 1 220px;
     min-width: 0;
     min-width: 0;
     max-width: 100%;
     max-width: 100%;
     padding: 10px 14px;
     padding: 10px 14px;
    color: #1e293b;
     background: #ffffff;
     background: #ffffff;
    color: #1e293b;
 
     border: 1px solid #cbd5e1;
     border: 1px solid #cbd5e1;
     border-radius: 9px;
     border-radius: 9px;
     font-size: 14px;
     font-size: 14px;
}
}


.mw-parser-output .kh-search input[type="submit"] {
.mw-parser-output .kh-home .kh-search input[type="submit"] {
     padding: 10px 18px;
     padding: 10px 18px;
     background: #2563eb;
     background: #2563eb;
     color: #ffffff;
     color: #ffffff;
     border: 0;
 
     border: none;
     border-radius: 9px;
     border-radius: 9px;
    font-size: 14px;
     cursor: pointer;
     cursor: pointer;
    font-size: 14px;
}
}


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


/* =========================================
/* Hero links */
   3. SECTION SPACING
 
   ========================================= */
.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 {
.mw-parser-output .kh-home .kh-section {
Line 128: Line 235:
}
}


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


.mw-parser-output .kh-section-head h2 {
.mw-parser-output .kh-home .kh-section-head h2 {
     color: #17263c;
     color: #17263c;
     font-size: 23px;
     font-size: 23px;
Line 143: Line 250:
     margin: 0;
     margin: 0;
     padding: 0;
     padding: 0;
     border: 0;
     border: none;
}
 
.mw-parser-output .kh-section-head p {
    margin: 0;
}
 
.mw-parser-output .kh-section-head a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}
 
.mw-parser-output .kh-section-head a:hover {
    text-decoration: underline;
}
}


/* =========================================
/* ==========================================
   4. CATEGORY GRID
   CATEGORY GRID
   ========================================= */
   ========================================== */


.mw-parser-output .kh-grid {
.mw-parser-output .kh-home .kh-grid {
     display: grid;
     display: grid;
     grid-template-columns:
     grid-template-columns:
Line 170: Line 263:
     gap: 16px;
     gap: 16px;
     align-items: stretch;
     align-items: stretch;
     margin: 18px 0;
     margin-top: 18px;
}
}


.mw-parser-output .kh-card {
.mw-parser-output .kh-home .kh-card {
     min-width: 0;
     min-width: 0;
     padding: 20px;
     padding: 20px;
     background: #ffffff;
     background: #ffffff;
     color: #17263c;
     color: #17263c;
     border: 1px solid #e2e8f0;
     border: 1px solid #e2e8f0;
     border-radius: 14px;
     border-radius: 14px;
     box-shadow: 0 3px 12px rgba(0,0,0,0.04);
     box-shadow: 0 3px 12px rgba(0,0,0,0.04);
     transition:
     transition:
         transform 0.2s ease,
         transform 0.2s ease,
         box-shadow 0.2s ease,
         box-shadow 0.2s ease;
        border-color 0.2s ease;
}
}


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


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


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


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


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


/* =========================================
/* ==========================================
   5. LATEST FIVE ARTICLES
   LATEST ARTICLES
   ========================================= */
   ========================================== */


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


.mw-parser-output .kh-latest .kh-article-list {
.mw-parser-output .kh-home .kh-article-list {
    width: 100%;
    max-width: 100%;
 
    padding: 20px;
     background: #ffffff;
     background: #ffffff;
     border: 1px solid #e2e8f0;
     border: 1px solid #e2e8f0;
     border-radius: 14px;
     border-radius: 14px;
    padding: 20px;
 
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
     overflow-wrap: anywhere;
     overflow-wrap: anywhere;
}
}


.mw-parser-output .kh-latest .kh-article-list ul {
.mw-parser-output .kh-home .kh-article-list li {
     padding-left: 22px;
     padding: 10px 3px;
     margin: 0;
     line-height: 1.8;
}
 
.mw-parser-output .kh-latest .kh-article-list li {
    padding: 11px 3px;
     border-bottom: 1px solid #e2e8f0;
     border-bottom: 1px solid #e2e8f0;
    line-height: 1.8;
}
}


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


.mw-parser-output .kh-latest .kh-article-list a {
/* ==========================================
    color: #2563eb;
   TABLET RESPONSIVE
    text-decoration: none;
   ========================================== */
}
 
.mw-parser-output .kh-latest .kh-article-list a:hover {
    text-decoration: underline;
}
 
/* =========================================
  6. ALL CATEGORIES FOOTER
  ========================================= */
 
.mw-parser-output .kh-category-footer {
    padding: 28px 20px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    text-align: center;
}
 
.mw-parser-output .kh-category-footer h2 {
    color: #17263c;
    font-size: 23px;
    margin: 0 0 10px;
}
 
.mw-parser-output .kh-category-footer p {
    color: #475569;
    margin: 0;
}
 
.mw-parser-output .kh-footer-actions {
    margin-top: 18px;
}
 
/* =========================================
   7. TABLET
   ========================================= */


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


     .mw-parser-output .kh-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: 14px;
         gap: 14px;
    }
    .mw-parser-output .kh-home .kh-hero {
        padding: 28px 18px;
     }
     }
}
}


/* =========================================
/* ==========================================
   8. MOBILE
   MOBILE RESPONSIVE
   ========================================= */
   ========================================== */


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


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


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


     .mw-parser-output .kh-card {
     .mw-parser-output .kh-home .kh-card {
         padding: 17px;
         padding: 17px;
        border-radius: 12px;
    }
    .mw-parser-output .kh-section-head h2 {
        font-size: 21px;
     }
     }


Line 342: Line 391:
     }
     }


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


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


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


/* =========================================
/* ==========================================
   9. ACCESSIBILITY
   ACCESSIBILITY
   ========================================= */
   ========================================== */


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


@media (prefers-reduced-motion: reduce) {
@media (prefers-reduced-motion: reduce) {
     .mw-parser-output .kh-card {
 
     .mw-parser-output .kh-home .kh-card {
         transition: none;
         transition: none;
     }
     }


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


/* END TAIPEDIA HOMEPAGE FIXES */
 
/* ==========================================
  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;
    }
}