/* ==========================================================================
   ThaiHao Cross-Platform Multi-PWA & Mainland China GFW-Safe Design Tokens
   Zero external CDN calls. Native Web / Android Material 3 / iOS Safe-Area.
   Wave 3: semantic surfaces, WCAG AA status pairs, motion scale and
   per-language type stacks. Keep this file pure ASCII (test_multi_pwa_and_gfw).
   ========================================================================== */

/* Sarabun (SIL Open Font License) ships inside this module: Thai and Latin
   glyphs load from the same origin as the page, so no CDN can block them
   and Thai text never drops to Tahoma or Leelawadee. Only 400 and 700 exist;
   500 renders from the 400 face and 600 from the 700 face. */
@font-face {
    font-family: "Sarabun";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/Sarabun-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Sarabun";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/Sarabun-Bold.ttf") format("truetype");
}

@font-face {
    font-family: "Sarabun";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/Sarabun-Italic.ttf") format("truetype");
}

@font-face {
    font-family: "Sarabun";
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/Sarabun-BoldItalic.ttf") format("truetype");
}

/* IBM Plex Sans (SIL Open Font License, see fonts/IBMPlex-OFL.txt) ships as
   one variable face per subset: weight 100-700 and width 75-100%, so a page
   can set a condensed terminal voice or a light display voice from the same
   file. unicode-range keeps each subset off the wire until a glyph needs it.
   IBM Plex Sans Arabic covers the Arabic script; IBM Plex Mono is for codes
   and figures only. */
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 100 700;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSans-Var-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: "IBM Plex Sans";
    font-style: normal;
    font-weight: 100 700;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSans-Var-LatinExt.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 100 700;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSans-Var-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: "IBM Plex Sans";
    font-style: italic;
    font-weight: 100 700;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSans-VarItalic-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: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSansArabic-Light.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSansArabic-Medium.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: "IBM Plex Sans Arabic";
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexMono-Regular.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: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("/thaihao_core_workspace/static/src/fonts/IBMPlexMono-Medium.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;
}

:root {
    --o-thaihao-crimson: #AC0022;
    --o-thaihao-crimson-deep: #780000;
    --o-thaihao-gold: #C5A059;
    --o-thaihao-surface: #F7F8FA;
    --o-thaihao-card: #FFFFFF;
    --o-thaihao-ink: #15181D;
    --o-thaihao-muted: #525763;
    --o-thaihao-border: #E2E4EA;
    --o-thaihao-font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Sarabun", "Noto Sans Thai", "Sukhumvit Set", "Thonburi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --o-thaihao-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --o-thaihao-safe-top: env(safe-area-inset-top, 0px);
    --o-thaihao-safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Surfaces. Canvas sits under cards, sunken is for wells and table heads,
       brand and inverse are the only two dark surfaces. */
    --th-surface-canvas: #F4F5F8;
    --th-surface-card: #FFFFFF;
    --th-surface-sunken: #F0F1F5;
    --th-surface-brand: #780000;
    --th-surface-inverse: #15181D;
    --th-border-subtle: #E2E4EA;
    --th-border-strong: #C6CAD3;
    --th-border-input: #8E94A0;
    --th-on-brand: #FFFFFF;
    --th-on-brand-muted: #F2D3D9;

    /* Elevation. One per surface: cards carry a border, raised surfaces carry
       one of these and no border. */
    --th-e1: 0 1px 2px rgba(21, 24, 29, 0.08);
    --th-e2: 0 12px 28px -14px rgba(21, 24, 29, 0.34);
    --th-e3: 0 20px 44px -18px rgba(21, 24, 29, 0.5);

    /* Status pairs. Every fg on its bg is >= 4.5:1. */
    --th-ok-fg: #145A38;
    --th-ok-bg: #E7F5EE;
    --th-ok-bd: #9FD3B8;
    --th-warn-fg: #7A4F08;
    --th-warn-bg: #FDF3DF;
    --th-warn-bd: #EBC77E;
    --th-risk-fg: #8F001C;
    --th-risk-bg: #FCE8EC;
    --th-risk-bd: #F0A7B5;
    --th-gold-ink: #7A5B1E;
    --th-gold-bg: #F7EFDD;

    /* Radius */
    --th-r-sm: 8px;
    --th-r-md: 12px;
    --th-r-lg: 16px;
    --th-r-pill: 999px;

    /* Spacing, 4px base */
    --th-s1: 4px;
    --th-s2: 8px;
    --th-s3: 12px;
    --th-s4: 16px;
    --th-s5: 20px;
    --th-s6: 24px;
    --th-s8: 32px;

    /* Type. IBM Plex Sans is used where the device already has it; Sarabun
       (self-hosted above) covers Thai and Latin everywhere else. Nothing is
       fetched from a font CDN, so nothing can be blocked. */
    --th-font-sans: "IBM Plex Sans", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    --th-font-display: "IBM Plex Sans", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --th-font-latin: var(--th-font-sans);
    --th-font-th: "Sarabun", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Sukhumvit Set", "Thonburi", "Segoe UI", "Leelawadee UI", "Noto Sans Thai", "PingFang SC", "Microsoft YaHei", sans-serif;
    --th-font-zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --th-fs-xs: 12px;
    --th-fs-sm: 13px;
    --th-fs-md: 15px;
    --th-fs-lg: 17px;
    --th-fs-xl: 20px;
    --th-fs-2xl: 24px;
    --th-fs-hero: 32px;
    --th-lh-heading: 1.3;
    --th-lh-body: 1.55;
    --th-tracking-tight: -0.02em;

    /* Motion. Durations follow the transitions.dev scale and are picked by
       usage: micro = press, quick = color swaps and closes, fast = opens,
       tab and page changes, medium/slow = panel close/open. */
    --th-dur-micro: 80ms;
    --th-dur-quick: 150ms;
    --th-dur-fast: 250ms;
    --th-dur-medium: 350ms;
    --th-dur-slow: 400ms;
    --th-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --th-ease-in-out: ease-in-out;
    --th-ease-linear: linear;
    --th-distance-micro: 4px;
    --th-distance-base: 8px;
    --th-blur-small: 2px;
}

/* Per-language stacks. Thai stacks vowels and tone marks above and below the
   baseline, so it gets taller lines and no negative tracking. Elements that
   carry their own lang attribute (the Thai AI coach inside a Chinese page)
   switch stacks too. */
.o_thaihao_pwa_body:lang(th),
.o_thaihao_pwa_body [lang|="th"] {
    --o-thaihao-font-sans: var(--th-font-th);
    --th-tracking-tight: 0;
    --th-lh-heading: 1.45;
    --th-lh-body: 1.7;
}

.o_thaihao_pwa_body:lang(zh),
.o_thaihao_pwa_body [lang|="zh"] {
    --o-thaihao-font-sans: var(--th-font-zh);
    --th-tracking-tight: 0;
    --th-lh-heading: 1.4;
    --th-lh-body: 1.65;
}

.o_thaihao_pwa_body:lang(en),
.o_thaihao_pwa_body [lang|="en"] {
    --o-thaihao-font-sans: var(--th-font-latin);
}

.o_thaihao_pwa_body [lang] {
    font-family: var(--o-thaihao-font-sans);
}

.o_thaihao_pwa_body:lang(th) :is(h1, h2, h3, h4),
.o_thaihao_pwa_body [lang|="th"]:is(h1, h2, h3, h4) {
    letter-spacing: 0;
}

.o_thaihao_pwa_body {
    margin: 0;
    padding-bottom: calc(72px + var(--o-thaihao-safe-bottom));
    background-color: var(--th-surface-canvas);
    color: var(--o-thaihao-ink);
    caret-color: var(--o-thaihao-crimson);
    accent-color: var(--o-thaihao-crimson);
    font-family: var(--o-thaihao-font-sans);
    line-height: var(--th-lh-body);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.o_thaihao_pwa_body ::selection {
    background-color: var(--o-thaihao-crimson);
    color: #FFFFFF;
}

.o_thaihao_pwa_body ::placeholder {
    color: #6B7080;
    opacity: 1;
}

.o_thaihao_pwa_body :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--o-thaihao-crimson);
    outline-offset: 2px;
}

/* Crimson on the brand bar is invisible; the ring turns white there. */
.o_thaihao_pwa_topbar :focus-visible {
    outline-color: #FFFFFF;
}

/* Prevent iOS Safari auto-zoom trap on form focus */
.o_thaihao_pwa_body input,
.o_thaihao_pwa_body select,
.o_thaihao_pwa_body textarea {
    font-size: 16px !important;
}

.o_thaihao_pwa_topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--th-s3);
    padding: calc(12px + var(--o-thaihao-safe-top)) 20px 12px;
    background-color: var(--th-surface-brand);
    color: var(--th-on-brand);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    view-transition-name: th-topbar;
}

/* The bar lifts off the page only once content scrolls under it. */
@supports (animation-timeline: scroll()) {
    .o_thaihao_pwa_topbar {
        animation: th-topbar-lift linear both;
        animation-timeline: scroll(root block);
        animation-range: 0 64px;
    }
}

@keyframes th-topbar-lift {
    to {
        box-shadow: 0 10px 24px -14px rgba(21, 24, 29, 0.7);
    }
}

.o_thaihao_pwa_partner_badge {
    margin-left: 8px;
    color: var(--th-on-brand-muted);
}

.o_thaihao_pwa_container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 16px;
    view-transition-name: th-main;
}

.o_thaihao_pwa_card {
    padding: var(--th-s5);
    margin-bottom: var(--th-s4);
    border: 1px solid var(--th-border-subtle);
    border-radius: var(--th-r-lg);
    background-color: var(--th-surface-card);
}

.o_thaihao_pwa_heading {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: var(--th-lh-heading);
    letter-spacing: var(--th-tracking-tight);
    text-wrap: balance;
}

.o_thaihao_pwa_card p {
    max-width: 68ch;
    margin: 0;
    line-height: var(--th-lh-body);
    color: var(--o-thaihao-muted);
}

.o_thaihao_pwa_bottom_nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    min-height: 56px;
    padding: 0 4px var(--o-thaihao-safe-bottom);
    border-top: 1px solid var(--th-border-subtle);
    background-color: var(--th-surface-card);
    view-transition-name: th-nav;
}

.o_thaihao_pwa_tab {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 6px 4px;
    color: var(--o-thaihao-muted);
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    transition: color var(--th-dur-quick) var(--th-ease-out),
                background-color var(--th-dur-quick) var(--th-ease-out);
}

@media (hover: hover) {
    .o_thaihao_pwa_tab:not(.o_thaihao_pwa_tab_active):hover {
        color: var(--o-thaihao-ink);
    }
}

.o_thaihao_pwa_tab:active {
    background-color: var(--th-surface-sunken);
}

.o_thaihao_pwa_tab_active {
    color: var(--o-thaihao-crimson);
}

/* Active tab gets a shape, not just a color (WCAG 1.4.1). */
.o_thaihao_pwa_tab_active::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background-color: currentColor;
    transform: translateX(-50%);
    content: "";
}

@media (min-width: 1024px) {
    .o_thaihao_pwa_body {
        padding-bottom: 24px;
    }

    .o_thaihao_pwa_bottom_nav {
        position: static;
        justify-content: flex-start;
        gap: var(--th-s2);
        min-height: 52px;
        padding: 0 20px;
        border-top: 0;
        border-bottom: 1px solid var(--th-border-subtle);
    }

    .o_thaihao_pwa_tab {
        flex: 0 0 auto;
        flex-direction: row;
        gap: var(--th-s2);
        padding: 6px 14px;
        font-size: 13px;
    }

    .o_thaihao_pwa_tab_active::before {
        top: auto;
        bottom: 0;
        width: calc(100% - 20px);
        border-radius: 3px 3px 0 0;
    }
}

/* Cross-document view transitions: tab changes are full page loads, so the
   topbar and nav are pinned by name and only the content changes. Browsers
   without support load the page normally. */
@view-transition {
    navigation: auto;
}

::view-transition-group(th-main) {
    animation-duration: var(--th-dur-fast);
    animation-timing-function: var(--th-ease-out);
}

::view-transition-old(th-main) {
    animation: th-vt-out var(--th-dur-quick) var(--th-ease-out) both;
}

::view-transition-new(th-main) {
    animation: th-vt-in var(--th-dur-fast) var(--th-ease-out) both;
}

@keyframes th-vt-out {
    to {
        opacity: 0;
    }
}

@keyframes th-vt-in {
    from {
        opacity: 0;
        transform: translateY(var(--th-distance-base));
        filter: blur(var(--th-blur-small));
    }
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --th-dur-micro: 0ms;
        --th-dur-quick: 0ms;
        --th-dur-fast: 0ms;
        --th-dur-medium: 0ms;
        --th-dur-slow: 0ms;
    }

    .o_thaihao_pwa_tab {
        transition: none;
    }

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

/* Authored 24x24 stroke-width=1.75 GFW-safe inline SVG mask-image icons */
.ti {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    line-height: 1;
}

.ti::before {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
    background-color: currentColor;
    -webkit-mask: var(--ti-svg) no-repeat center / contain;
    mask: var(--ti-svg) no-repeat center / contain;
    content: "";
}

.ti-bowl-chopsticks {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11h16a1 1 0 0 1 1 1v.5c0 3.5-2.5 6.5-6 7.5v1H9v-1c-3.5-1-6-4-6-7.5V12a1 1 0 0 1 1-1z'/%3E%3Cpath d='M6 4l12 2'/%3E%3Cpath d='M6 7.5l12-.5'/%3E%3C/svg%3E");
}

.ti-broadcast {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.364 19.364a9 9 0 1 0-12.728 0'/%3E%3Cpath d='M15.536 16.536a5 5 0 1 0-7.072 0'/%3E%3Ccircle cx='12' cy='13' r='1'/%3E%3Cpath d='M12 14v7'/%3E%3C/svg%3E");
}

.ti-building-Handshake,
.ti-building-handshake {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 11l4-4 4 4'/%3E%3Cpath d='M3 13l4-4 5 5 5-5 4 4'/%3E%3Cpath d='M7 17l3 3 7-7'/%3E%3C/svg%3E");
}

.ti-building-warehouse {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21V8l9-4 9 4v13'/%3E%3Cpath d='M13 13h4v8H7v-6h6'/%3E%3Cpath d='M13 21v-9a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v3'/%3E%3C/svg%3E");
}

.ti-chart-line {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19h16'/%3E%3Cpath d='M4 15l4-6 4 2 5-5 3 3'/%3E%3C/svg%3E");
}

.ti-device-mobile {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='3' width='12' height='18' rx='2'/%3E%3Cpath d='M11 4h2'/%3E%3Cpath d='M12 17v.01'/%3E%3C/svg%3E");
}

.ti-filter-off {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4h12v2.172a2 2 0 0 1-.586 1.414L15.5 11.5M14 14v5l-4 2v-8.5L5.52 7.572A2 2 0 0 1 5 6.227V5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}

.ti-history {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v4l2 2'/%3E%3Cpath d='M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5'/%3E%3C/svg%3E");
}

.ti-lock-check {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.5 21H7a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v.5'/%3E%3Ccircle cx='12' cy='16' r='1'/%3E%3Cpath d='M8 11V7a4 4 0 1 1 8 0v4'/%3E%3Cpath d='M15 19l2 2 4-4'/%3E%3C/svg%3E");
}

.ti-moon {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3h.393a7.5 7.5 0 0 0 7.92 12.446A9 9 0 1 1 12 2.992z'/%3E%3C/svg%3E");
}

.ti-package-export {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21l-8-4.5v-9L12 3l8 4.5V12'/%3E%3Cpath d='M12 12l8-4.5'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M12 12L4 7.5'/%3E%3Cpath d='M15 18h7'/%3E%3Cpath d='M19 15l3 3-3 3'/%3E%3C/svg%3E");
}

.ti-player-play {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4v16l13-8z'/%3E%3C/svg%3E");
}

.ti-send {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14L21 3'/%3E%3Cpath d='M21 3l-6.5 18a.55.55 0 0 1-1 0L10 14l-7-3.5a.55.55 0 0 1 0-1L21 3'/%3E%3C/svg%3E");
}

.ti-shield-check {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.46 20.846a12 12 0 0 1-7.96-14.846A12 12 0 0 0 12 3a12 12 0 0 0 8.5 3 12 12 0 0 1-8.5 15c-.18 0-.36-.05-.54-.154z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.ti-shield-lock {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a12 12 0 0 0 8.5 3A12 12 0 0 1 12 21 12 12 0 0 1 3.5 6 12 12 0 0 0 12 3'/%3E%3Ccircle cx='12' cy='11' r='1'/%3E%3Cpath d='M12 12v2.5'/%3E%3C/svg%3E");
}

.ti-shopping-bag {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.331 8h11.339a2 2 0 0 1 1.977 2.304l-1.255 8.152A3 3 0 0 1 15.426 21H8.574a3 3 0 0 1-2.965-2.544l-1.255-8.152A2 2 0 0 1 6.331 8z'/%3E%3Cpath d='M9 11V6a3 3 0 0 1 6 0v5'/%3E%3C/svg%3E");
}

.ti-sparkles {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 18a2 2 0 0 1 2 2 2 2 0 0 1 2-2 2 2 0 0 1-2-2 2 2 0 0 1-2 2zm0-12a2 2 0 0 1 2 2 2 2 0 0 1 2-2 2 2 0 0 1-2-2 2 2 0 0 1-2 2zM9 18a6 6 0 0 1 6-6 6 6 0 0 1-6-6 6 6 0 0 1-6 6 6 6 0 0 1 6 6z'/%3E%3C/svg%3E");
}

.ti-sun {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M3 12h1m8-9v1m8 8h1m-9 8v1M5.6 5.6l.7.7m12.1-.7l-.7.7m0 11.4l.7.7m-12.1-.7l-.7.7'/%3E%3C/svg%3E");
}

.ti-tag {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='7.5' r='1'/%3E%3Cpath d='M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592-5.592a2.41 2.41 0 0 0 0-3.408l-7.71-7.71A2 2 0 0 0 11.172 3H6a3 3 0 0 0-3 3z'/%3E%3C/svg%3E");
}

.ti-truck-delivery {
    --ti-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3Cpath d='M5 17H3v-4M2 5h11v12m-4 0h6m4 0h2v-6h-8m0-5h5l3 5M3 9h4'/%3E%3C/svg%3E");
}

/* ==========================================================================
   ScrollCraft devices (static/src/js/thaihao_scrollcraft.js)
   Start states only apply once the engine has run (html.sc-ready), so no
   content depends on JavaScript to be visible. Pointer devices are gated to
   (hover: hover) and (pointer: fine); motion stops under reduced motion.
   ========================================================================== */
:root {
    --sc-ease-out: var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
    --sc-in-distance: 14px;
    --sc-in-duration: 620ms;
}

[data-sc-act],
[data-sc-cue] {
    --sc-p: 0;
}

[data-sc-act="pin"] {
    position: relative;
}

[data-sc-act="pin"] > [data-sc-pin] {
    position: sticky;
    top: var(--sc-pin-top, 0px);
}

[data-sc-act="pan"] [data-sc-pan-track] {
    transform: translate3d(calc(var(--sc-p) * var(--sc-pan-distance, -40%)), 0, 0);
}

[data-sc-act="flow"] [data-sc-flow-item] {
    opacity: calc(0.35 + var(--sc-p) * 0.65);
}

html.sc-ready [data-sc-reveal="up"] {
    clip-path: inset(calc((1 - var(--sc-rp, 1)) * 100%) 0 0 0);
}

html.sc-ready [data-sc-reveal="left"] {
    clip-path: inset(0 calc((1 - var(--sc-rp, 1)) * 100%) 0 0);
}

html.sc-ready [data-sc-reveal="right"] {
    clip-path: inset(0 0 0 calc((1 - var(--sc-rp, 1)) * 100%));
}

html.sc-ready [data-sc-reveal="iris"] {
    clip-path: circle(calc(var(--sc-rp, 1) * 75%) at 50% 50%);
}

/* Entry: a 14px rise and fade, once. [data-sc-stagger] containers trigger
   their children in sequence; the container itself does not move. */
html.sc-ready [data-sc-in]:not([data-sc-stagger]):not(.is-sc-in),
html.sc-ready [data-sc-stagger]:not(.is-sc-in) > * {
    opacity: 0;
    translate: 0 var(--sc-in-distance);
}

html.sc-ready [data-sc-in]:not([data-sc-stagger]).is-sc-in:not(.is-sc-entered),
html.sc-ready [data-sc-stagger].is-sc-in:not(.is-sc-entered) > * {
    transition: opacity var(--sc-in-duration) var(--sc-ease-out),
                translate var(--sc-in-duration) var(--sc-ease-out);
    transition-delay: min(calc(var(--sc-i, 0) * var(--sc-stagger, 0ms)), 320ms);
}

[data-sc-parallax] {
    will-change: transform;
}

html.sc-ready [data-sc-tilt].is-sc-tilting {
    will-change: transform;
}

html.sc-ready [data-sc-magnet] {
    -webkit-tap-highlight-color: transparent;
}

/* Spotlight paints on the element's own background layer, under its content.
   The engine eases --sc-lit between 0 and 1 and tracks --sc-mx / --sc-my. */
@media (hover: hover) and (pointer: fine) {
    html.sc-ready [data-sc-spotlight] {
        background-image: radial-gradient(460px circle at calc(var(--sc-mx, 0.5) * 100%) calc(var(--sc-my, 0.5) * 100%), rgba(247, 127, 0, calc(0.13 * var(--sc-lit, 0))), rgba(120, 0, 0, calc(0.05 * var(--sc-lit, 0))) 48%, transparent 75%);
    }
}

/* Dimensional planes. Decorative only: aria-hidden in markup, no pointer. */
.o_thaihao_sc_hero_stage {
    position: relative;
    isolation: isolate;
}

.o_thaihao_sc_plane {
    position: absolute;
    pointer-events: none;
}

/* Back plane: meridian grid of the trade map with a warm gold and crimson glow. */
.o_thaihao_sc_plane_back {
    inset: -28px -20px;
    z-index: -1;
    border-radius: 28px;
    background-image:
        radial-gradient(55% 65% at 80% 18%, rgba(197, 160, 89, 0.2), transparent 70%),
        radial-gradient(45% 55% at 10% 88%, rgba(172, 0, 34, 0.1), transparent 72%),
        repeating-linear-gradient(90deg, rgba(120, 0, 0, 0.055) 0 1px, transparent 1px 72px),
        repeating-linear-gradient(0deg, rgba(120, 0, 0, 0.04) 0 1px, transparent 1px 72px);
    -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 35%, transparent 100%);
}

/* Brand plane: the same grid in light lines, for the crimson wallet surface. */
.o_thaihao_sc_plane_brand {
    inset: -40px;
    z-index: -1;
    background-image:
        radial-gradient(50% 70% at 88% 12%, rgba(197, 160, 89, 0.28), transparent 70%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 56px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 56px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
    mask-image: linear-gradient(90deg, transparent, #000 45%);
}

/* Front plane: one floating telemetry badge. */
.o_thaihao_sc_plane_front {
    left: 0;
    bottom: -22px;
    z-index: 2;
}

.o_thaihao_sc_badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: var(--surface-container-lowest, var(--th-surface-card, #FFFFFF));
    color: var(--on-surface, var(--o-thaihao-ink));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 12px 26px -14px rgba(21, 24, 29, 0.45);
    font-variant-numeric: tabular-nums;
}

.o_thaihao_sc_badge_dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #1F7A4C;
    box-shadow: 0 0 0 4px rgba(31, 122, 76, 0.18);
}

@media (max-width: 767px) {
    [data-sc-parallax] {
        will-change: auto;
    }

    .o_thaihao_sc_plane_front {
        display: none;
    }

    .o_thaihao_sc_plane_back {
        inset: -12px -8px;
        opacity: 0.7;
        transform: none !important;
    }
}

/* --------------------------------------------------------------------------
   TH -> CN corridor live scrubber. Reads the landing page variables first and
   falls back to ThaiHao tokens, so one component serves every surface.
   -------------------------------------------------------------------------- */
.o_thaihao_sc_corridor {
    --sc-corridor-accent: var(--thaihao-primary, var(--o-thaihao-crimson));
    padding: 24px;
    border: 1px solid var(--outline-variant, var(--th-border-subtle, #E2E4EA));
    border-radius: var(--radius-lg, var(--th-r-lg, 16px));
    background-color: var(--surface-container-lowest, var(--th-surface-card, #FFFFFF));
    color: var(--on-surface, var(--o-thaihao-ink));
}

.o_thaihao_sc_corridor_head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 28px;
}

.o_thaihao_sc_corridor_title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: var(--th-lh-heading, 1.3);
    text-wrap: balance;
}

.o_thaihao_sc_corridor_sub {
    max-width: 60ch;
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--on-surface-variant, var(--o-thaihao-muted));
}

.o_thaihao_sc_corridor_ends {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--o-thaihao-font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--on-surface-variant, var(--o-thaihao-muted));
}

.o_thaihao_sc_corridor_rail {
    position: relative;
}

.o_thaihao_sc_corridor_track {
    position: absolute;
    top: 11px;
    left: 10%;
    right: 10%;
    height: 2px;
    border-radius: 2px;
    background-color: var(--outline-variant, var(--th-border-subtle, #E2E4EA));
}

.o_thaihao_sc_corridor_fill {
    display: block;
    width: calc(var(--sc-corridor-p, 0.6) * 100%);
    height: 100%;
    border-radius: inherit;
    background-image: linear-gradient(90deg, var(--o-thaihao-gold), var(--sc-corridor-accent));
    transition: width 180ms var(--sc-ease-out);
}

.o_thaihao_sc_corridor_nodes {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.o_thaihao_sc_corridor_node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    padding: 0 4px 6px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--on-surface-variant, var(--o-thaihao-muted));
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    transition: color 150ms var(--sc-ease-out);
}

.o_thaihao_sc_corridor_node:focus-visible {
    outline: 2px solid var(--sc-corridor-accent);
    outline-offset: 2px;
}

.o_thaihao_sc_corridor_dot {
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    border: 2px solid var(--outline-variant, var(--th-border-strong, #C6CAD3));
    border-radius: 50%;
    background-color: var(--surface-container-lowest, var(--th-surface-card, #FFFFFF));
    transition: border-color 150ms var(--sc-ease-out), background-color 150ms var(--sc-ease-out), transform 250ms var(--sc-ease-out);
}

.o_thaihao_sc_corridor_label_alt,
.o_thaihao_sc_corridor_where {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.o_thaihao_sc_corridor_where {
    font-family: var(--o-thaihao-font-mono);
    letter-spacing: 0.04em;
}

.o_thaihao_sc_corridor_count {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--on-surface, var(--o-thaihao-ink));
    font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
    .o_thaihao_sc_corridor_node:hover .o_thaihao_sc_corridor_dot {
        border-color: var(--sc-corridor-accent);
    }
}

.o_thaihao_sc_corridor_node.is-sc-stage-done .o_thaihao_sc_corridor_dot {
    border-color: var(--sc-corridor-accent);
    background-color: var(--sc-corridor-accent);
}

.o_thaihao_sc_corridor_node.is-sc-stage-active {
    color: var(--on-surface, var(--o-thaihao-ink));
}

.o_thaihao_sc_corridor_node.is-sc-stage-active .o_thaihao_sc_corridor_dot {
    border-color: var(--sc-corridor-accent);
    box-shadow: 0 0 0 5px rgba(172, 0, 34, 0.14);
    transform: scale(1.12);
}

.o_thaihao_sc_corridor_readout {
    display: grid;
    gap: 6px;
    min-height: 76px;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background-color: var(--surface-container-low, var(--th-surface-sunken, #F0F1F5));
    font-size: 14px;
    line-height: 1.55;
    color: var(--on-surface-variant, var(--o-thaihao-muted));
}

.o_thaihao_sc_corridor_readout_line {
    max-width: 72ch;
    margin: 0;
}

.o_thaihao_sc_corridor_readout_alt {
    font-size: 13px;
}

.o_thaihao_sc_corridor_readout_step {
    font-weight: 700;
    color: var(--on-surface, var(--o-thaihao-ink));
}

@media (max-width: 767px) {
    .o_thaihao_sc_corridor {
        padding: 18px 14px;
    }

    .o_thaihao_sc_corridor_node {
        padding: 0 2px 6px;
        font-size: 12px;
    }

    .o_thaihao_sc_corridor_count {
        font-size: 17px;
    }
}

@media print {
    html.sc-ready [data-sc-in],
    html.sc-ready [data-sc-stagger] > * {
        opacity: 1 !important;
        translate: none !important;
    }

    .o_thaihao_sc_plane {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.sc-ready [data-sc-in],
    html.sc-ready [data-sc-stagger] > * {
        opacity: 1;
        translate: none;
        transition: none;
    }

    html.sc-ready [data-sc-reveal] {
        clip-path: none;
    }

    /* Tilt, magnet and spotlight are already switched off in the engine. */
    [data-sc-parallax] {
        transform: none !important;
        will-change: auto;
    }

    .o_thaihao_sc_corridor_fill,
    .o_thaihao_sc_corridor_node,
    .o_thaihao_sc_corridor_dot {
        transition: none;
    }

    .o_thaihao_sc_corridor_node.is-sc-stage-active .o_thaihao_sc_corridor_dot {
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   3D canvas stages ([data-sc-canvas3d] in thaihao_scrollcraft.js). The canvas
   is decoration: aria-hidden in markup, never the only carrier of meaning.
   It fades in once the engine has drawn its first frame; before that, and
   without JavaScript, the stage shows its own poster or plain ground.
   Scenes read their palette and framing from these properties, so a page
   recolours or reframes a scene from CSS (media queries included).
   -------------------------------------------------------------------------- */
canvas[data-sc-canvas3d] {
    --c3d-primary: #D8A64D;
    --c3d-highlight: #F5D78E;
    --c3d-accent: #2BB58F;
    --c3d-accent-2: #C93B3B;
    --c3d-ink: #F5F0E6;
    --c3d-muted: #8C96AA;
    --c3d-ox: 0.5;
    --c3d-oy: 0.5;
    --c3d-zoom: 0.24;
    --c3d-stars: 1;
    --c3d-density: 1;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

html.sc-ready canvas[data-sc-canvas3d] {
    opacity: 0;
    transition: opacity 700ms var(--sc-ease-out);
}

html.sc-ready canvas[data-sc-canvas3d][data-c3d-state="ready"] {
    opacity: 1;
}

.o_thaihao_c3d_stage {
    position: relative;
    overflow: hidden;
    contain: layout paint;
}

.o_thaihao_c3d_stage > canvas[data-sc-canvas3d] {
    position: absolute;
    inset: 0;
}

@media print {
    canvas[data-sc-canvas3d] {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.sc-ready canvas[data-sc-canvas3d] {
        transition: none;
    }
}
