/* tuetran.link: the stylesheet of the theme, built from the drawing `tuetranlink-web` (sheet 03).
   The numbers come from the drawing; the colours, face and heading sizes of Administration, Theme options come first (theme-options.css) as --tuetran-* variables and these rules read them. */

@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/be-vietnam-pro-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/be-vietnam-pro-400-vietnamese.woff2') format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/be-vietnam-pro-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/be-vietnam-pro-500-vietnamese.woff2') format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/be-vietnam-pro-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/be-vietnam-pro-600-vietnamese.woff2') format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 500;font-display:swap;src:url('../fonts/jetbrains-mono-400-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 500;font-display:swap;src:url('../fonts/jetbrains-mono-400-500-vietnamese.woff2') format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}

/* Colours of the light and the dark page (drawing sheet 03, TH.light and TH.dark). The mode lives in `data-theme` on the root element, which the
   floating-widget package writes; with no choice made the system setting decides. */
:root {
    --bg: #FFFFFF;
    --surf: #FFFFFF;
    --line: #ECEFF3;
    --line-2: #E7EAEF;
    --line-3: #DDE2E9;
    --ink: #172948;
    --ink-3: #3F4A5C;
    --ink-4: #4D586A;
    --mut: #657286;
    --rose: #BD496A;
    --on-pink: #172948;
    --navy: #172948;
    --hdr: rgba(255, 255, 255, 0.92);
    --pink: var(--tuetran-primary, #FB7B9B);
    --font-body: var(--site-font, 'Be Vietnam Pro'), system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --pad-x: 40px;
    --home-pad-y: 96px;
    --home-h1: var(--tuetran-h1-size, 38px);
    --home-h1-lh: 49.4px;
    --page-h1: 34px;
    --page-h1-lh: 44.2px;
    --page-h2: var(--tuetran-h2-size, 24px);
    --page-h2-lh: 31.2px;
    --big-num: 96px;
    --text-pad-top: 64px;
    --text-pad-bottom: 96px;
    --section-gap: 40px;
    --foot-pad-top: 32px;
    --foot-pad-bottom: 32px;
    --lang-fs: 11px;
    --lang-pad: 5px 11px;
}

:root[data-theme="dark"] {
    --bg: #0B1324;
    --surf: #14213B;
    --line: #1E2D4B;
    --line-2: #2B3F66;
    --line-3: #34497A;
    --ink: #EAF0FA;
    --ink-3: #BCC9DE;
    --ink-4: #A9B9D3;
    --mut: #9FB0CC;
    --rose: #E88CA6;
    --on-pink: #0B1324;
    --navy: #0F1C3A;
    --hdr: rgba(11, 19, 36, 0.9);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0B1324;
        --surf: #14213B;
        --line: #1E2D4B;
        --line-2: #2B3F66;
        --line-3: #34497A;
        --ink: #EAF0FA;
        --ink-3: #BCC9DE;
        --ink-4: #A9B9D3;
        --mut: #9FB0CC;
        --rose: #E88CA6;
        --on-pink: #0B1324;
        --navy: #0F1C3A;
        --hdr: rgba(11, 19, 36, 0.9);
    }
}

/* Tablet: 560 to 1099 */
@media (max-width: 1099px) {
    :root {
        --pad-x: 32px;
        --home-pad-y: 80px;
        --home-h1: 24px;
        --home-h1-lh: 31.2px;
        --page-h1: 24px;
        --page-h1-lh: 31.2px;
        --page-h2: 20px;
        --page-h2-lh: 26px;
        --text-pad-top: 48px;
        --text-pad-bottom: 80px;
        --section-gap: 32px;
        --foot-pad-top: 24px;
        --foot-pad-bottom: 88px;
        --lang-fs: 12px;
        --lang-pad: 8px 13px;
    }
}

/* Phone: under 560 */
@media (max-width: 559px) {
    :root {
        --pad-x: 20px;
        --home-pad-y: 56px;
        --home-h1: 22px;
        --home-h1-lh: 28.6px;
        --page-h1: 22px;
        --page-h1-lh: 28.6px;
        --page-h2: 18px;
        --page-h2-lh: 23.4px;
        --big-num: 72px;
        --text-pad-top: 36px;
        --text-pad-bottom: 64px;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: var(--tuetran-body-size, 16px);
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    color: var(--ink);
}

a { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

.page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.page > main { flex: 1; }

/* Header: 75 high plus the rule under it = 76 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--hdr);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 var(--pad-x);
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.site-logo { display: flex; align-items: center; height: 34px; text-decoration: none; color: var(--ink); }
.site-logo img { display: block; flex: none; }
.site-logo__name { font-weight: 600; }

.lang-switch { display: flex; align-items: center; border: 1px solid var(--line-3); border-radius: 999px; padding: 3px; }
.lang-switch__item {
    font-family: var(--font-mono);
    font-size: var(--lang-fs);
    line-height: 1.5;
    letter-spacing: 0.08em;
    padding: var(--lang-pad);
    border-radius: 999px;
    text-decoration: none;
    background: transparent;
    color: var(--mut);
}
.lang-switch__item:hover { color: var(--ink); }
.lang-switch__item.is-active { background: var(--ink); color: var(--bg); }

/* Home */
.page > .home { display: flex; align-items: center; }
.home-hero {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: var(--home-pad-y) var(--pad-x);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.home-kicker { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5; letter-spacing: 0.2em; color: var(--mut); }
.home-title { margin: 16px 0 0; font-size: var(--home-h1); line-height: var(--home-h1-lh); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.home-lead { margin: 14px 0 0; font-size: 16px; line-height: 26.4px; font-weight: 400; color: var(--ink-3); }

.home-illustration { margin-top: 48px; width: 600px; max-width: 100%; aspect-ratio: 600 / 132; }
.home-illustration svg { display: block; }
.home-illustration--tall { display: none; margin-top: 40px; width: 100%; max-width: 340px; aspect-ratio: 300 / 228; }
@media (max-width: 559px) {
    .home-illustration--wide { display: none; }
    .home-illustration--tall { display: block; }
}
.illo-card { fill: var(--surf); stroke: var(--line-3); }
.illo-dot--pink { fill: #FB7B9B; }
.illo-dot--grey { fill: var(--ink-3); }
.illo-label { font-family: 'JetBrains Mono', monospace; fill: var(--mut); }
.illo-mono { font-family: 'JetBrains Mono', monospace; fill: var(--ink); }
.illo-name { font-family: 'Be Vietnam Pro', sans-serif; fill: var(--ink); }
.illo-dash { stroke: var(--line-3); }
.illo-arrow { stroke: var(--ink-3); }

/* Long text */
.text-page__grid {
    max-width: 1220px;
    margin: 0 auto;
    padding: var(--text-pad-top) var(--pad-x) var(--text-pad-bottom);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1100px) {
    .text-page__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 4fr) minmax(0, 1fr); }
    .text-page__article { grid-column: 2; }
}
.text-page__article { min-width: 0; display: flex; flex-direction: column; }
.text-title { margin: 0; font-size: var(--page-h1); line-height: var(--page-h1-lh); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.text-updated { margin-top: 12px; font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; color: var(--mut); }
.text-page__article > p { margin: 0; font-size: 16px; line-height: 26.4px; color: var(--ink-3); }
.text-page__article > [data-k="text-intro"] { margin-top: 24px; }
.doc-section { margin-top: var(--section-gap); display: flex; flex-direction: column; gap: 14px; }
.doc-section h2 { margin: 0; font-size: var(--page-h2); line-height: var(--page-h2-lh); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.doc-section p { margin: 0; font-size: 16px; line-height: 26.4px; color: var(--ink-3); }
.doc-section ul, .doc-section ol { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 26.4px; color: var(--ink-3); }
.doc-section li { padding-left: 2px; }

/* Notice (the page of a link that no longer works, and the server error) */
.page > main:has(.notice) { display: flex; align-items: center; }
.notice {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: var(--home-pad-y) var(--pad-x);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.notice-code { font-family: var(--font-mono); font-size: var(--big-num); line-height: 1; font-weight: 500; letter-spacing: -0.04em; color: var(--ink); }
.notice-title { margin: 24px 0 0; font-size: var(--page-h1); line-height: var(--page-h1-lh); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.notice-text { margin: 12px 0 0; font-size: 16px; line-height: 26.4px; color: var(--ink-3); }
.notice-button {
    margin-top: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    background: var(--pink);
    color: var(--on-pink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}
.notice-button:hover { background: var(--rose); color: var(--bg); }
@media (max-width: 559px) {
    .notice-button { width: 100%; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surf); }
.site-footer__inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: var(--foot-pad-top) var(--pad-x) var(--foot-pad-bottom);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.footer-menu { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 24px; }
.footer-menu__item { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; line-height: 1.5; color: var(--ink-4); text-decoration: none; }
.footer-menu__item:hover { color: var(--ink); }
.footer-copyright { font-size: 14px; line-height: 21px; color: var(--mut); }

/* Floating buttons of the shared floating-widget package (drawing sheet 03): the light and dark switch, Zalo and the call button.
   The package prints its own corner with inline numbers, so these rules stand above it. Desktop: stacked, 56 wide buttons 12 apart, 26 from the edge.
   Tablet and phone: in a row, 48 wide buttons 10 apart, 16 from the edge. */
[class*="group-bottom-"] { bottom: 26px !important; right: 26px !important; gap: 12px !important; z-index: 41 !important; }
[class*="group-bottom-"] .floating-widget-btn { width: 56px; height: 56px; border-radius: 999px; }
[class*="group-bottom-"] .floating-widget-theme {
    background-color: var(--surf) !important;
    border: 1px solid var(--line-3);
    color: var(--ink-3);
    box-shadow: 0 14px 30px -14px rgba(23, 41, 72, 0.4);
}
[class*="group-bottom-"] .floating-widget-theme:hover { border-color: #FB7B9B; color: var(--rose); }
[class*="group-bottom-"] a[href^="https://zalo.me"] { box-shadow: 0 14px 30px -12px rgba(0, 104, 255, 0.55); }
[class*="group-bottom-"] a[href^="https://zalo.me"]:hover { background-color: #0055D4 !important; }
[class*="group-bottom-"] a[href^="tel:"] { color: var(--on-pink); box-shadow: 0 14px 30px -12px rgba(251, 123, 155, 0.6); }
[class*="group-bottom-"] a[href^="tel:"]:hover { background-color: var(--navy) !important; color: #FFFFFF; }
@media (max-width: 1099px) {
    [class*="group-bottom-"] {
        flex-direction: row !important;
        align-items: flex-end !important;
        gap: 10px !important;
        right: 16px !important;
        bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }
    [class*="group-bottom-"] .floating-widget-btn { width: 48px; height: 48px; }
}

/* The switch of the design shows the mode it goes TO (the moon on a light page, the sun on a dark one); the package shows the mode in use. */
[class*="group-bottom-"] .floating-widget-theme .floating-widget-theme-sun { display: none !important; }
[class*="group-bottom-"] .floating-widget-theme .floating-widget-theme-moon { display: block !important; }
html[data-theme="dark"] [class*="group-bottom-"] .floating-widget-theme .floating-widget-theme-sun { display: block !important; }
html[data-theme="dark"] [class*="group-bottom-"] .floating-widget-theme .floating-widget-theme-moon { display: none !important; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) [class*="group-bottom-"] .floating-widget-theme .floating-widget-theme-sun { display: block !important; }
    html:not([data-theme="light"]) [class*="group-bottom-"] .floating-widget-theme .floating-widget-theme-moon { display: none !important; }
}
