/* ==========================================================================
   ThaiChoiceSouq flagship (/thaichoicesouq): the Souq vitrine.
   Grammar: gallery / catalog. Majlis night is the default ground; Desert day
   turns the limestone into the ground. ASCII only.
   Brief: scrollcraft/builds/thaichoicesouq/BRIEF.md
   ========================================================================== */

.tcs-souq {
    --tcs-hdr: 64px;
    --tcs-gutter: clamp(16px, 4vw, 48px);
    --tcs-max: 1320px;
    --tcs-radius: 14px;
    --tcs-radius-sm: 10px;
    --tcs-ease: var(--th-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
    --tcs-section: clamp(72px, 9vw, 136px);

    /* Majlis night */
    --tcs-ground: #0B1220;
    --tcs-ground-2: #0E1727;
    --tcs-ground-3: #131E31;
    --tcs-ink: #F5F0E6;
    --tcs-ink-2: #D2C9B9;
    --tcs-ink-3: #ADA594;
    --tcs-gold: #D8A64D;
    --tcs-gold-hi: #E8C27A;
    --tcs-gold-ink: #E2B867;
    --tcs-emerald: #0D6E5B;
    --tcs-emerald-ink: #4FC2A0;
    --tcs-line: rgba(245, 240, 230, 0.12);
    --tcs-line-2: rgba(216, 166, 77, 0.38);
    --tcs-sheet: #F5F0E6;
    --tcs-sheet-2: #ECE5D6;
    --tcs-sheet-ink: #0B1220;
    --tcs-sheet-ink-2: #4A4537;
    --tcs-sheet-line: rgba(11, 18, 32, 0.14);
    --tcs-sheet-gold: #85601E;
    --tcs-sheet-emerald: #0D6E5B;
    --tcs-shadow: 0 30px 48px -30px rgba(2, 5, 12, 0.85);
    --tcs-shadow-sm: 0 12px 24px -16px rgba(2, 5, 12, 0.8);
    --tcs-pattern: rgba(216, 166, 77, 0.09);

    --text-soft-dur: 200ms;
    --text-soft-blur: 2px;
    --text-soft-ease: ease-in-out;
    --text-soft-resize-dur: 240ms;
    --text-soft-resize-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --digit-dur: 500ms;
    --digit-distance: 8px;
    --digit-stagger: 70ms;
    --digit-blur: 2px;
    --digit-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --digit-dir-x: 0;
    --digit-dir-y: 1;

    background-color: var(--tcs-ground);
    color-scheme: dark;
    scroll-padding-top: calc(var(--tcs-hdr) + 12px);
}

/* Desert day: limestone becomes the ground, the ink turns to obsidian. */
.tcs-souq[data-theme="day"] {
    --tcs-ground: #F5F0E6;
    --tcs-ground-2: #EDE6D7;
    --tcs-ground-3: #E4DBC8;
    --tcs-ink: #0B1220;
    --tcs-ink-2: #39404D;
    --tcs-ink-3: #565C67;
    --tcs-gold-ink: #85601E;
    --tcs-emerald-ink: #0D6E5B;
    --tcs-line: rgba(11, 18, 32, 0.13);
    --tcs-line-2: rgba(133, 96, 30, 0.42);
    --tcs-sheet: #FFFDF9;
    --tcs-sheet-2: #F3EEE3;
    --tcs-shadow: 0 30px 48px -32px rgba(60, 44, 18, 0.45);
    --tcs-shadow-sm: 0 12px 24px -18px rgba(60, 44, 18, 0.5);
    --tcs-pattern: rgba(133, 96, 30, 0.1);
    color-scheme: light;
}

/* --------------------------------------------------------------------------
   Base and browser surfaces
   -------------------------------------------------------------------------- */
.tcs-souq *,
.tcs-souq *::before,
.tcs-souq *::after {
    box-sizing: border-box;
}

.tcs-souq body {
    margin: 0;
    background-color: var(--tcs-ground);
    color: var(--tcs-ink);
    font-family: "IBM Plex Sans", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    caret-color: var(--tcs-gold);
    accent-color: var(--tcs-gold);
    overflow-x: clip;
}

.tcs-souq ::selection {
    background-color: var(--tcs-gold);
    color: #0B1220;
}

.tcs-souq {
    scrollbar-color: var(--tcs-line-2) var(--tcs-ground);
}

.tcs-souq a {
    color: inherit;
    text-underline-offset: 0.22em;
    text-decoration-thickness: 1px;
}

.tcs-souq :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--tcs-gold-hi);
    outline-offset: 3px;
}

.tcs-souq img {
    max-width: 100%;
}

html.tcs-souq:lang(ar) body,
.tcs-souq [lang="ar"] {
    font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0;
}

html.tcs-souq:lang(th) body,
.tcs-souq [lang="th"] {
    font-family: "Sarabun", "IBM Plex Sans", "Leelawadee UI", sans-serif;
    letter-spacing: 0;
}

html.tcs-souq:lang(th) body {
    line-height: 1.7;
}

.tcs-mono {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.tcs-num {
    unicode-bidi: isolate;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.tcs-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.tcs-souq .tcs-skip {
    position: absolute;
    inset-inline-start: 12px;
    top: -60px;
    z-index: 100;
    padding: 12px 16px;
    border-radius: var(--tcs-radius-sm);
    background-color: var(--tcs-gold);
    color: #0B1220;
    font-weight: 600;
    text-decoration: none;
    transition: top var(--th-dur-fast, 250ms) var(--tcs-ease);
}

.tcs-skip:focus {
    top: 12px;
}

.tcs-wrap {
    width: 100%;
    max-width: var(--tcs-max);
    margin-inline: auto;
    padding-inline: var(--tcs-gutter);
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
.tcs-h1 {
    max-width: 18ch;
    margin: 0;
    font-size: clamp(2.05rem, 1.05rem + 2.05vw, 2.95rem);
    font-weight: 300;
    font-stretch: 100%;
    line-height: 1.08;
    letter-spacing: -0.022em;
    text-wrap: balance;
}

.tcs-h2 {
    margin: 0;
    font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.6rem);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

html.tcs-souq:lang(ar) :is(.tcs-h1, .tcs-h2),
html.tcs-souq:lang(th) :is(.tcs-h1, .tcs-h2) {
    letter-spacing: 0;
    line-height: 1.3;
}

html.tcs-souq:lang(ar) .tcs-h1 {
    max-width: 20ch;
}

.tcs-sub {
    max-width: 58ch;
    margin: 16px 0 0;
    color: var(--tcs-ink-2);
    font-size: 1.0625rem;
    line-height: 1.6;
    text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   SIVIRAI command bar, worn in the Majlis palette
   -------------------------------------------------------------------------- */
.tcs-souq .sivilai-command-bar {
    background-color: #070C16;
    color: #E8E2D6;
    border-bottom-color: rgba(216, 166, 77, 0.22);
    font-size: 12px;
}

.tcs-souq .sivilai-command-bar .sivilai-brand-sub {
    font-size: 12px;
}

.tcs-souq .sivilai-command-bar .sivilai-pill-link,
.tcs-souq .sivilai-command-bar .sivilai-util-link {
    font-size: 12px;
}

.tcs-souq .sivilai-command-bar .sivilai-bar-inner {
    max-width: var(--tcs-max);
    padding-inline: var(--tcs-gutter);
}

/* --------------------------------------------------------------------------
   Header: index of the collection plus display tools
   -------------------------------------------------------------------------- */
.tcs-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--tcs-line);
    background-color: var(--tcs-ground);
}

.tcs-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: var(--tcs-max);
    min-height: var(--tcs-hdr);
    margin-inline: auto;
    padding-inline: var(--tcs-gutter);
}

.tcs-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    color: var(--tcs-ink);
    text-decoration: none;
}

.tcs-brand-mark {
    display: block;
    width: 36px;
    height: 36px;
    padding: 3px;
    border-radius: 9px;
    background-color: #F5F0E6;
}

.tcs-brand-text {
    display: grid;
    line-height: 1.2;
}

.tcs-brand-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.tcs-brand-domain {
    color: var(--tcs-ink-3);
    font-size: 12px;
    letter-spacing: 0.01em;
}

.tcs-index {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    gap: 4px;
}

.tcs-index a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--tcs-ink-2);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--th-dur-quick, 150ms) var(--tcs-ease), background-color var(--th-dur-quick, 150ms) var(--tcs-ease);
}

@media (hover: hover) and (pointer: fine) {
    .tcs-index a:hover {
        color: var(--tcs-ink);
        background-color: var(--tcs-line);
    }
}

.tcs-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.tcs-seg {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--tcs-line);
    border-radius: 999px;
}

.tcs-seg-btn {
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background-color: transparent;
    color: var(--tcs-ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--th-dur-quick, 150ms) var(--tcs-ease), background-color var(--th-dur-quick, 150ms) var(--tcs-ease);
}

.tcs-seg-btn[aria-pressed="true"] {
    background-color: var(--tcs-gold);
    color: #0B1220;
}

@media (hover: hover) and (pointer: fine) {
    .tcs-seg-btn:not([aria-pressed="true"]):hover {
        color: var(--tcs-ink);
        background-color: var(--tcs-line);
    }
}

.tcs-seg-btn:active {
    transform: translateY(1px);
}

.tcs-seg-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.tcs-seg-icon {
    min-width: 36px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.tcs-tools-toggle {
    display: none;
}

.tcs-header-cta {
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.tcs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--th-dur-quick, 150ms) var(--tcs-ease), color var(--th-dur-quick, 150ms) var(--tcs-ease), border-color var(--th-dur-quick, 150ms) var(--tcs-ease), transform var(--th-dur-micro, 80ms) var(--tcs-ease);
}

.tcs-btn:active {
    transform: translateY(1px);
}

.tcs-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

[dir="rtl"] .tcs-btn svg.tcs-flip {
    transform: scaleX(-1);
}

.tcs-souq .tcs-btn-primary {
    background-color: var(--tcs-gold);
    color: #0B1220;
}

@media (hover: hover) and (pointer: fine) {
    .tcs-souq .tcs-btn-primary:hover {
        background-color: var(--tcs-gold-hi);
    }

    .tcs-souq .tcs-btn-quiet:hover {
        border-color: var(--tcs-gold);
        color: var(--tcs-ink);
    }
}

.tcs-souq .tcs-btn-quiet {
    border-color: var(--tcs-line-2);
    background-color: transparent;
    color: var(--tcs-ink);
}

/* --------------------------------------------------------------------------
   Hero: object zero, the trade astrolabe in its vitrine
   -------------------------------------------------------------------------- */
.tcs-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: clamp(620px, calc(100svh - 140px), 860px);
    overflow: clip;
    background-color: var(--tcs-ground);
}

.tcs-wall {
    inset: 0;
    z-index: -3;
    color: var(--tcs-pattern);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
}

[dir="rtl"] .tcs-wall {
    -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 42%, #000 100%);
    mask-image: linear-gradient(270deg, transparent 0%, #000 42%, #000 100%);
}

.tcs-wall svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tcs-stage {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.tcs-stage canvas[data-sc-canvas3d] {
    --c3d-primary: #D8A64D;
    --c3d-highlight: #F2D592;
    --c3d-accent: #4FC2A0;
    --c3d-ink: #F5F0E6;
    --c3d-muted: #66738B;
    --c3d-stars: 1;
    --c3d-ox: 0.71;
    --c3d-oy: 0.45;
    --c3d-zoom: 0.235;
    --c3d-font: 500 12px "IBM Plex Mono", ui-monospace, monospace;
}

[dir="rtl"] .tcs-stage canvas[data-sc-canvas3d] {
    --c3d-ox: 0.29;
}

.tcs-souq[data-theme="day"] .tcs-stage canvas[data-sc-canvas3d] {
    --c3d-primary: #8F6418;
    --c3d-highlight: #A87720;
    --c3d-accent: #0D6E5B;
    --c3d-ink: #0B1220;
    --c3d-muted: #9C9380;
    --c3d-stars: 0;
}

/* The vitrine: four brass corner brackets on the nearest plane. */
.tcs-vitrine-frame {
    top: clamp(28px, 5vh, 56px);
    bottom: clamp(150px, 20vh, 190px);
    inset-inline-start: 50%;
    inset-inline-end: clamp(20px, 4vw, 64px);
    z-index: -1;
}

.tcs-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: var(--tcs-line-2);
    border-style: solid;
    border-width: 0;
}

.tcs-corner-ts {
    top: 0;
    inset-inline-start: 0;
    border-top-width: 1px;
    border-inline-start-width: 1px;
}

.tcs-corner-te {
    top: 0;
    inset-inline-end: 0;
    border-top-width: 1px;
    border-inline-end-width: 1px;
}

.tcs-corner-bs {
    bottom: 0;
    inset-inline-start: 0;
    border-bottom-width: 1px;
    border-inline-start-width: 1px;
}

.tcs-corner-be {
    bottom: 0;
    inset-inline-end: 0;
    border-bottom-width: 1px;
    border-inline-end-width: 1px;
}

.tcs-hero-copy {
    align-self: center;
    width: 100%;
    max-width: var(--tcs-max);
    margin-inline: auto;
    padding: clamp(40px, 7vh, 88px) var(--tcs-gutter) clamp(32px, 5vh, 56px);
}

.tcs-hero-copy > * {
    max-width: 640px;
}

.tcs-logo-plate {
    display: inline-block;
    margin: 0 0 28px;
    padding: 10px 16px;
    border-radius: var(--tcs-radius-sm);
    background-color: #F5F0E6;
    box-shadow: var(--tcs-shadow-sm);
}

.tcs-souq[data-theme="day"] .tcs-logo-plate {
    box-shadow: none;
    border: 1px solid var(--tcs-line);
}

.tcs-logo-plate img {
    display: block;
    width: auto;
    height: clamp(52px, 6vw, 72px);
}

.tcs-lead {
    max-width: 40ch;
    margin: 20px 0 0;
    color: var(--tcs-ink-2);
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    line-height: 1.6;
    text-wrap: pretty;
}

.tcs-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* Live board: the six capitals across the foot of the hero. */
.tcs-board {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--tcs-max);
    margin-inline: auto;
    padding: 0 var(--tcs-gutter) clamp(20px, 3vh, 32px);
}

.tcs-board-title {
    margin: 0 0 10px;
    text-wrap: balance;
    color: var(--tcs-ink-2);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.tcs-board-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--tcs-line);
    border-radius: var(--tcs-radius);
    background-color: var(--tcs-line);
    list-style: none;
}

.tcs-board-cell {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 2px 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    background-color: var(--tcs-ground);
    color: var(--tcs-ink);
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: background-color var(--th-dur-quick, 150ms) var(--tcs-ease);
}

.tcs-board-cell[aria-pressed="true"] {
    background-color: var(--tcs-ground-3);
}

@media (hover: hover) and (pointer: fine) {
    .tcs-board-cell:hover {
        background-color: var(--tcs-ground-2);
    }
}

.tcs-board-code {
    grid-row: span 2;
    color: var(--tcs-gold-ink);
    font-size: 15px;
    font-weight: 500;
}

.tcs-board-city {
    overflow: hidden;
    color: var(--tcs-ink-2);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tcs-board-time {
    font-size: 18px;
    font-weight: 400;
}

.tcs-board-km {
    grid-column: 1 / -1;
    color: var(--tcs-ink-3);
    font-size: 12px;
}

.tcs-board-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    margin: 12px 0 0;
    color: var(--tcs-ink-3);
    font-size: 13px;
}

.tcs-board-facts div {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
}

.tcs-board-facts dt {
    color: var(--tcs-ink-2);
}

.tcs-board-facts dd {
    margin: 0;
}

/* Pointer lamp: the shared spotlight, in Oud gold. */
@media (hover: hover) and (pointer: fine) {
    html.sc-ready.tcs-souq [data-sc-spotlight] {
        background-image: radial-gradient(440px circle at calc(var(--sc-mx, 0.5) * 100%) calc(var(--sc-my, 0.5) * 100%), rgba(216, 166, 77, calc(0.1 * var(--sc-lit, 0))), transparent 72%);
    }
}

/* --------------------------------------------------------------------------
   The collection: a walk past six vitrines
   -------------------------------------------------------------------------- */
.tcs-collection {
    position: relative;
    padding-top: var(--tcs-section);
    background-color: var(--tcs-ground-2);
}

.tcs-collection-head {
    margin-bottom: clamp(20px, 3vh, 32px);
}

.tcs-walk {
    position: relative;
}

.tcs-collection-pin {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2.4vh, 28px);
    padding-bottom: var(--tcs-section);
    overflow: clip;
}

.tcs-objindex {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tcs-objindex-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--tcs-line);
    border-radius: 999px;
    background-color: transparent;
    color: var(--tcs-ink-2);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    cursor: pointer;
    transition: color var(--th-dur-quick, 150ms) var(--tcs-ease), border-color var(--th-dur-quick, 150ms) var(--tcs-ease), background-color var(--th-dur-quick, 150ms) var(--tcs-ease);
}

.tcs-objindex-btn[aria-current="true"] {
    border-color: var(--tcs-gold);
    color: var(--tcs-ink);
}

@media (hover: hover) and (pointer: fine) {
    .tcs-objindex-btn:hover {
        border-color: var(--tcs-line-2);
        color: var(--tcs-ink);
    }
}

.tcs-track-wrap {
    position: relative;
    width: 100%;
}

.tcs-track {
    display: flex;
    gap: clamp(28px, 4vw, 64px);
    margin: 0;
    padding: 12px var(--tcs-gutter) 24px;
    list-style: none;
}

.tcs-object {
    --near: 1;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 22px;
    width: clamp(260px, 26vw, 360px);
}

.tcs-object:nth-child(even) {
    padding-top: clamp(16px, 4vh, 44px);
}

.tcs-vitrine {
    position: relative;
    margin: 0;
    padding: 18px 18px 0;
    border-radius: var(--tcs-radius);
    transform: scale(calc(0.955 + 0.045 * var(--near)));
    transform-origin: 50% 100%;
}

.tcs-plate {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--tcs-line-2);
    border-radius: 8px;
    background-color: #0B1220;
    box-shadow: var(--tcs-shadow);
    transition: box-shadow var(--th-dur-fast, 250ms) var(--tcs-ease);
}

.tcs-plate img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

.tcs-plinth {
    display: block;
    height: 12px;
    margin: 0 -6px;
    border-radius: 0 0 6px 6px;
    background-color: var(--tcs-ground-3);
    box-shadow: 0 14px 22px -16px rgba(2, 5, 12, 0.9);
}

.tcs-souq[data-theme="day"] .tcs-plinth {
    box-shadow: 0 14px 22px -18px rgba(60, 44, 18, 0.5);
}

.tcs-label {
    padding-top: 14px;
    border-top: 1px solid var(--tcs-line-2);
}

.tcs-label-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.tcs-label-th {
    margin: 4px 0 0;
    color: var(--tcs-ink-2);
    font-size: 15px;
    line-height: 1.5;
}

.tcs-facts {
    display: grid;
    gap: 6px;
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.45;
}

.tcs-facts div {
    display: grid;
    grid-template-columns: 7.5em minmax(0, 1fr);
    gap: 12px;
}

html.tcs-souq:lang(ar) .tcs-facts div {
    grid-template-columns: 6.5em minmax(0, 1fr);
}

.tcs-facts dt {
    color: var(--tcs-ink-3);
}

.tcs-facts dd {
    margin: 0;
    color: var(--tcs-ink-2);
    text-wrap: pretty;
}

.tcs-facts .tcs-price-row {
    align-items: baseline;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--tcs-line);
}

.tcs-price {
    color: var(--tcs-ink);
    font-size: 1.1875rem;
    font-weight: 500;
}

/* Rail mode: phones, short screens and reduced motion. */
.tcs-walk.is-rail .tcs-track {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--tcs-gutter);
    scrollbar-width: thin;
}

.tcs-walk.is-rail .tcs-object {
    scroll-snap-align: start;
}

.tcs-walk.is-rail .tcs-track::after {
    content: "";
    flex: 0 0 1px;
}

/* Pan mode: the room holds while the vitrines pass. Height and the pan
   distance in px are written by tcs_souq.js from the real track width. */
@media (min-width: 900px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
    html.sc-ready .tcs-walk.is-pan .tcs-collection-pin {
        position: sticky;
        top: var(--tcs-hdr);
        height: calc(100svh - var(--tcs-hdr));
        justify-content: center;
        padding-block: clamp(16px, 3vh, 32px);
    }

    html.sc-ready .tcs-walk.is-pan .tcs-track {
        width: max-content;
        will-change: transform;
    }

    html.sc-ready .tcs-walk.is-pan .tcs-object {
        width: clamp(250px, min(23vw, 37vh), 350px);
    }

    html.sc-ready .tcs-walk.is-pan + * {
        margin-top: 0;
    }
}

/* --------------------------------------------------------------------------
   The consignment corridor (engine scrubber, Majlis skin)
   -------------------------------------------------------------------------- */
.tcs-corridor-section {
    padding-block: var(--tcs-section);
    background-color: var(--tcs-ground);
}

.tcs-corridor-section .o_thaihao_sc_corridor {
    --sc-corridor-accent: var(--tcs-emerald-ink);
    margin-top: clamp(28px, 4vw, 48px);
    padding: clamp(20px, 3vw, 36px);
    border: 1px solid var(--tcs-line);
    border-radius: var(--tcs-radius);
    background-color: var(--tcs-ground-2);
    color: var(--tcs-ink);
}

.tcs-corridor-section .o_thaihao_sc_corridor_head {
    margin-bottom: 24px;
}

.tcs-corridor-section .o_thaihao_sc_corridor_sub {
    margin: 0;
    color: var(--tcs-ink-2);
    font-size: 15px;
}

.tcs-corridor-section .o_thaihao_sc_corridor_ends {
    color: var(--tcs-gold-ink);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
}

.tcs-corridor-section .o_thaihao_sc_corridor_track {
    background-color: var(--tcs-line);
}

.tcs-corridor-section .o_thaihao_sc_corridor_fill {
    background-image: none;
    background-color: var(--tcs-gold);
}

.tcs-corridor-section .o_thaihao_sc_corridor_node {
    color: var(--tcs-ink-3);
    font-size: 14px;
}

.tcs-corridor-section .o_thaihao_sc_corridor_node.is-sc-stage-active {
    color: var(--tcs-ink);
}

.tcs-corridor-section .o_thaihao_sc_corridor_dot {
    border-color: var(--tcs-line-2);
    background-color: var(--tcs-ground-2);
}

.tcs-corridor-section .o_thaihao_sc_corridor_node.is-sc-stage-done .o_thaihao_sc_corridor_dot {
    border-color: var(--tcs-gold);
    background-color: var(--tcs-gold);
}

.tcs-corridor-section .o_thaihao_sc_corridor_node.is-sc-stage-active .o_thaihao_sc_corridor_dot {
    border-color: var(--tcs-gold);
    box-shadow: 0 0 0 5px rgba(216, 166, 77, 0.16);
}

.tcs-corridor-section .o_thaihao_sc_corridor_where {
    color: var(--tcs-ink-3);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.tcs-corridor-section .o_thaihao_sc_corridor_readout_line {
    text-wrap: pretty;
}

.tcs-corridor-section .o_thaihao_sc_corridor_readout {
    min-height: 92px;
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: var(--tcs-radius-sm);
    background-color: var(--tcs-sheet);
    color: var(--tcs-sheet-ink-2);
    font-size: 15px;
}

.tcs-corridor-section .o_thaihao_sc_corridor_readout_step {
    color: var(--tcs-sheet-ink);
}

[dir="rtl"] .tcs-corridor-section .o_thaihao_sc_corridor_fill {
    margin-inline-start: auto;
}

/* --------------------------------------------------------------------------
   The allocation and settlement desk (the peak)
   -------------------------------------------------------------------------- */
.tcs-desk {
    --post: 1;
    position: relative;
    background-color: var(--tcs-ground-2);
}

.tcs-desk-pin {
    padding-block: var(--tcs-section);
}

.tcs-desk-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
    gap: clamp(28px, 4vw, 64px);
}

.tcs-desk-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.tcs-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.tcs-fieldset legend {
    margin-bottom: 8px;
    padding: 0;
    color: var(--tcs-ink-2);
    font-size: 14px;
    font-weight: 500;
}

.tcs-opts {
    display: grid;
    gap: 6px;
}

.tcs-opts-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tcs-opts-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tcs-opt {
    position: relative;
    display: grid;
    align-content: start;
    gap: 2px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--tcs-line);
    border-radius: var(--tcs-radius-sm);
    cursor: pointer;
    transition: border-color var(--th-dur-quick, 150ms) var(--tcs-ease), background-color var(--th-dur-quick, 150ms) var(--tcs-ease);
}

.tcs-opt input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.tcs-opt-main {
    color: var(--tcs-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.tcs-opt-sub {
    color: var(--tcs-ink-3);
    font-size: 12px;
    line-height: 1.35;
}

.tcs-opt:has(input:checked) {
    border-color: var(--tcs-gold);
    background-color: var(--tcs-ground-3);
}

.tcs-opt:has(input:focus-visible) {
    outline: 2px solid var(--tcs-gold-hi);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .tcs-opt:hover {
        border-color: var(--tcs-line-2);
    }
}

.tcs-opts-4 .tcs-opt {
    place-items: center;
    min-height: 40px;
    padding: 8px 6px;
    text-align: center;
}

.tcs-desk-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tcs-container {
    margin: 22px 0 0;
}

.tcs-container-svg {
    display: block;
    width: 100%;
    max-width: 460px;
    height: auto;
    color: var(--tcs-gold);
}

.tcs-container-svg .tcs-box {
    fill: none;
    stroke: var(--tcs-line-2);
    stroke-width: 1.5;
}

.tcs-container-svg .tcs-rib {
    stroke: var(--tcs-line);
    stroke-width: 1;
}

.tcs-container-svg .tcs-casting {
    fill: var(--tcs-line-2);
}

.tcs-container-svg .tcs-door {
    fill: none;
    stroke: var(--tcs-line-2);
    stroke-width: 1;
}

.tcs-container-svg .tcs-ground-line {
    stroke: var(--tcs-line);
    stroke-width: 1;
}

.tcs-carton {
    opacity: 0;
    stroke: rgba(232, 194, 122, 0.55);
    stroke-width: 0.8;
    transform: translateY(-6px);
    transform-box: fill-box;
    transition: opacity var(--th-dur-fast, 250ms) var(--tcs-ease), transform var(--th-dur-fast, 250ms) var(--tcs-ease);
    transition-delay: calc(min(var(--k, 0), 48) * 6ms);
}

.tcs-carton.is-on {
    opacity: 1;
    transform: none;
}

.tcs-container figcaption {
    margin-top: 10px;
    color: var(--tcs-ink-2);
    font-size: 14px;
}

.tcs-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.tcs-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--tcs-ink-2);
}

.tcs-swatch {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(232, 194, 122, 0.6);
    border-radius: 3px;
}

.tcs-sku-min { --sku: #3A2F5C; }
.tcs-sku-ubn { --sku: #6B2430; }
.tcs-sku-fem { --sku: #23406B; }
.tcs-sku-mos { --sku: #1F5A44; }
.tcs-sku-tea { --sku: #6B4A2E; }
.tcs-sku-cof { --sku: #4A3226; }

.tcs-swatch,
.tcs-carton {
    fill: var(--sku, #3A2F5C);
    background-color: var(--sku, #3A2F5C);
}

/* The statement sheet: heavy limestone stock. */
.tcs-sheet {
    position: relative;
    padding: clamp(22px, 3vw, 36px);
    border-radius: var(--tcs-radius);
    background-color: var(--tcs-sheet);
    color: var(--tcs-sheet-ink);
    box-shadow: var(--tcs-shadow);
}

.tcs-sheet-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tcs-sheet-line);
}

.tcs-sheet-head img {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
}

.tcs-sheet-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
}

.tcs-sheet-kind {
    margin: 2px 0 0;
    color: var(--tcs-sheet-gold);
    font-size: 13px;
    font-weight: 500;
}

.tcs-sheet-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin: 16px 0 6px;
    font-size: 13px;
    line-height: 1.45;
}

.tcs-sheet-meta dt {
    color: var(--tcs-sheet-ink-2);
}

.tcs-sheet-meta dd {
    margin: 2px 0 0;
    color: var(--tcs-sheet-ink);
    font-weight: 500;
}

.tcs-ledger {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 15px;
}

.tcs-ledger th,
.tcs-ledger td {
    padding: 9px 0;
    border-bottom: 1px solid var(--tcs-sheet-line);
    vertical-align: baseline;
}

.tcs-ledger th {
    padding-inline-end: 16px;
    color: var(--tcs-sheet-ink);
    font-weight: 400;
    text-align: start;
}

.tcs-ledger td {
    text-align: end;
    white-space: nowrap;
}

.tcs-line-note th,
.tcs-line-note td {
    color: var(--tcs-sheet-ink-2);
    font-size: 14px;
}

.tcs-line-total th,
.tcs-line-total td {
    padding-top: 16px;
    border-bottom: 0;
    font-size: 17px;
    font-weight: 600;
}

.tcs-line-total td {
    color: var(--tcs-sheet-emerald);
    font-size: 1.5rem;
    font-weight: 500;
}

.tcs-vat-note {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    background-color: var(--tcs-sheet-2);
    color: var(--tcs-sheet-ink-2);
    font-size: 14px;
    line-height: 1.5;
}

.tcs-sheet-foot {
    max-width: 62ch;
    margin: 14px 0 0;
    color: var(--tcs-sheet-ink-2);
    font-size: 13px;
    line-height: 1.5;
}

.tcs-seal {
    position: absolute;
    top: clamp(18px, 2.4vw, 30px);
    inset-inline-end: clamp(18px, 2.4vw, 30px);
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border: 1.5px solid var(--tcs-sheet-emerald);
    border-radius: 50%;
    color: var(--tcs-sheet-emerald);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(-12deg);
}

.tcs-seal::before {
    position: absolute;
    inset: 5px;
    border: 1px dashed rgba(13, 110, 91, 0.55);
    border-radius: 50%;
    content: "";
}

html.tcs-souq:lang(ar) .tcs-seal,
html.tcs-souq:lang(th) .tcs-seal {
    letter-spacing: 0;
    text-transform: none;
}

/* Posting: on a wide, tall screen the desk holds and the statement posts
   one line per step of scroll; the seal lands when the last line does. */
@media (min-width: 1000px) and (min-height: 820px) and (prefers-reduced-motion: no-preference) {
    html.sc-ready .tcs-desk {
        --post: clamp(0, calc(var(--sc-p, 0) / 0.6), 1);
        height: 250vh;
    }

    html.sc-ready .tcs-desk-pin {
        position: sticky;
        top: var(--tcs-hdr);
        min-height: calc(100svh - var(--tcs-hdr));
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-block: clamp(20px, 3vh, 40px);
    }

    html.sc-ready .tcs-desk .tcs-line {
        --k: clamp(0, calc(var(--post) * 8.6 - var(--i, 0)), 1);
        opacity: var(--k);
        transform: translateY(calc((1 - var(--k)) * 8px));
    }

    html.sc-ready .tcs-desk .tcs-seal {
        opacity: clamp(0, calc((var(--post) - 0.96) * 25), 1);
        transform: rotate(-12deg) scale(calc(1.15 - 0.15 * clamp(0, calc((var(--post) - 0.96) * 25), 1)));
    }
}

/* Elsewhere the sheet posts once, in sequence, when it comes into view. */
@media not all and (min-width: 1000px) and (min-height: 820px) {
    html.sc-ready .tcs-desk .tcs-line {
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 420ms var(--tcs-ease), transform 420ms var(--tcs-ease);
        transition-delay: calc(var(--i, 0) * 90ms);
    }

    html.sc-ready .tcs-desk.is-posted .tcs-line {
        opacity: 1;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Request plate: the ask, typeset as a collection label
   -------------------------------------------------------------------------- */
.tcs-request {
    padding-block: var(--tcs-section);
    background-color: var(--tcs-ground);
}

.tcs-plate-card {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(28px, 4vw, 64px);
    padding: clamp(24px, 4vw, 56px);
    border-radius: var(--tcs-radius);
    background-color: var(--tcs-sheet);
    color: var(--tcs-sheet-ink);
    box-shadow: var(--tcs-shadow);
}

.tcs-plate-card .tcs-h2 {
    color: var(--tcs-sheet-ink);
}

.tcs-plate-card .tcs-sub {
    color: var(--tcs-sheet-ink-2);
}

.tcs-entity {
    display: grid;
    gap: 10px;
    margin: 28px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--tcs-sheet-line);
    font-size: 14px;
    line-height: 1.5;
}

.tcs-entity div {
    display: grid;
    grid-template-columns: 9.5em minmax(0, 1fr);
    gap: 12px;
}

.tcs-entity dt {
    color: var(--tcs-sheet-ink-2);
}

.tcs-entity dd {
    margin: 0;
    color: var(--tcs-sheet-ink);
}

.tcs-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.tcs-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tcs-field-full {
    grid-column: 1 / -1;
}

.tcs-field label {
    color: var(--tcs-sheet-ink);
    font-size: 14px;
    font-weight: 500;
}

.tcs-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(11, 18, 32, 0.28);
    border-radius: var(--tcs-radius-sm);
    background-color: #FFFFFF;
    color: var(--tcs-sheet-ink);
    font: inherit;
    font-size: 16px;
    transition: border-color var(--th-dur-quick, 150ms) var(--tcs-ease), box-shadow var(--th-dur-quick, 150ms) var(--tcs-ease);
}

.tcs-input::placeholder {
    color: #6A6558;
    opacity: 1;
}

.tcs-input:focus {
    border-color: var(--tcs-sheet-emerald);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 91, 0.22);
}

textarea.tcs-input {
    min-height: 112px;
    resize: vertical;
    line-height: 1.5;
}

.tcs-form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.tcs-form-note {
    max-width: 44ch;
    margin: 0;
    color: var(--tcs-sheet-ink-2);
    font-size: 13px;
    line-height: 1.5;
}

.tcs-souq .tcs-plate-card .tcs-btn-primary {
    background-color: var(--tcs-sheet-ink);
    color: var(--tcs-sheet);
}

@media (hover: hover) and (pointer: fine) {
    .tcs-plate-card .tcs-btn-primary:hover {
        background-color: #1A2438;
    }
}

.tcs-alert {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: var(--tcs-radius-sm);
    font-size: 15px;
    line-height: 1.5;
}

.tcs-alert-ok {
    border-color: rgba(13, 110, 91, 0.45);
    background-color: #E2F1EA;
    color: #0A4A3D;
}

.tcs-alert-err {
    border-color: rgba(143, 0, 28, 0.35);
    background-color: #FBE9EC;
    color: #7A0E22;
}

/* --------------------------------------------------------------------------
   Executive footer: GCC and SIVIRAI Worldwide statutory close
   -------------------------------------------------------------------------- */
.tcs-footer {
    padding-block: clamp(56px, 7vw, 96px) 32px;
    border-top: 1px solid rgba(216, 166, 77, 0.22);
    background-color: #070C16;
    color: #D2C9B9;
}

.tcs-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
    gap: 40px 32px;
}

.tcs-footer-brand {
    display: grid;
    align-content: start;
    gap: 14px;
}

.tcs-footer-bu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #F5F0E6;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.tcs-footer-bu img {
    width: 40px;
    height: 40px;
    padding: 3px;
    border-radius: 9px;
    background-color: #F5F0E6;
}

.tcs-footer-scope {
    margin: 0;
    color: #ADA594;
    font-size: 14px;
}

.tcs-footer-parent {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.tcs-footer-parent span {
    color: #ADA594;
    font-size: 13px;
}

.tcs-footer-parent img {
    display: block;
    width: min(240px, 100%);
    height: auto;
}

.tcs-footer-h {
    margin: 0 0 14px;
    color: #F5F0E6;
    font-size: 15px;
    font-weight: 500;
}

.tcs-footer-links,
.tcs-footer-facts {
    text-wrap: pretty;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
}

.tcs-footer a {
    color: #D2C9B9;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .tcs-footer a:hover {
        color: #E8C27A;
        text-decoration: underline;
    }
}

.tcs-footer-facts .tcs-mono {
    color: #F5F0E6;
}

.tcs-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid rgba(245, 240, 230, 0.1);
    color: #ADA594;
    font-size: 13px;
}

.tcs-footer-legal p {
    margin: 0;
}

.tcs-footer-legal img {
    width: 28px;
    height: 28px;
}

.tcs-footer :focus-visible {
    outline-color: #E8C27A;
}

/* --------------------------------------------------------------------------
   Phone dock: the page index as a bottom bar under 761px, the same pattern
   as the ThaiHao workspace dock. It wears the active theme (Majlis night or
   Desert day) through the theme tokens and follows dir="rtl" for Arabic.
   tcs_souq.js marks the room under the reading line with aria-current.
   Icons are authored 24px masks in the shared .ti format.
   -------------------------------------------------------------------------- */
.tcs-dock {
    display: none;
}

.ti-tcs-astrolabe {
    --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='14' r='7'/%3E%3Ccircle cx='12' cy='4.75' r='1.75'/%3E%3Cpath d='M12 6.5V7'/%3E%3Cpath d='M5 14h14'/%3E%3Cpath d='M8.5 14a3.5 3.5 0 0 1 7 0'/%3E%3C/svg%3E");
}

.ti-tcs-vitrine {
    --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='M5.5 21v-9.5C5.5 8 8.5 5.5 12 3c3.5 2.5 6.5 5 6.5 8.5V21'/%3E%3Cpath d='M3.5 21h17'/%3E%3Cpath d='M10 21v-3.5a2 2 0 0 1 4 0V21'/%3E%3C/svg%3E");
}

.ti-tcs-corridor {
    --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='5' cy='18' r='2'/%3E%3Cpath d='M7 18h3a4 4 0 0 0 4-4v-4a4 4 0 0 1 4-4h2.5'/%3E%3Cpath d='M18.5 3.5L21 6l-2.5 2.5'/%3E%3C/svg%3E");
}

.ti-tcs-scale {
    --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 20h10'/%3E%3Cpath d='M6 6l6-1 6 1'/%3E%3Cpath d='M12 3v17'/%3E%3Cpath d='M9 12L6 6l-3 6a3 3 0 0 0 6 0'/%3E%3Cpath d='M21 12l-3-6-3 6a3 3 0 0 0 6 0'/%3E%3C/svg%3E");
}

.ti-tcs-allocation {
    --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 11h16v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M4 11l2-4h12l2 4'/%3E%3Cpath d='M9.5 15.5l2 2 3.5-3.5'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   transitions.dev: text swap soft (34) and number pop-in (02)
   -------------------------------------------------------------------------- */
.t-text-soft {
    display: inline-grid;
    justify-items: var(--text-soft-align, start);
    transition: width var(--text-soft-resize-dur) var(--text-soft-resize-ease);
}

.t-text-soft > span {
    grid-area: 1 / 1;
    white-space: pre;
    transition:
        filter var(--text-soft-dur) var(--text-soft-ease),
        opacity var(--text-soft-dur) var(--text-soft-ease);
}

.t-text-soft-new {
    opacity: 0;
    filter: blur(var(--text-soft-blur));
}

.t-text-soft.is-swapping .t-text-soft-old {
    opacity: 0;
    filter: blur(var(--text-soft-blur));
}

.t-text-soft.is-swapping .t-text-soft-new {
    opacity: 1;
    filter: blur(0);
}

.tcs-ledger .t-text-soft {
    --text-soft-align: end;
}

@keyframes t-digit-pop-in {
    0% {
        transform: translate(calc(var(--digit-distance) * var(--digit-dir-x)), calc(var(--digit-distance) * var(--digit-dir-y)));
        opacity: 0;
        filter: blur(var(--digit-blur));
    }
    100% {
        transform: translate(0, 0);
        opacity: 1;
        filter: blur(0);
    }
}

.t-digit-group {
    display: inline-flex;
    align-items: baseline;
}

.t-digit {
    display: inline-block;
    white-space: pre;
}

.t-digit-group.is-animating .t-digit {
    animation: t-digit-pop-in var(--digit-dur) var(--digit-ease) both;
}

.t-digit-group.is-animating .t-digit[data-stagger="1"] {
    animation-delay: var(--digit-stagger);
}

.t-digit-group.is-animating .t-digit[data-stagger="2"] {
    animation-delay: calc(var(--digit-stagger) * 2);
}

.t-digit-group.is-animating .t-digit[data-same] {
    animation: none;
}

/* --------------------------------------------------------------------------
   Responsive composition
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
    .tcs-index {
        display: none;
    }

    .tcs-tools {
        margin-inline-start: auto;
    }
}

@media (max-width: 1100px) {
    .tcs-board-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tcs-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 999px) {
    .tcs-desk-grid,
    .tcs-plate-card {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 899px) {
    .tcs-header-inner {
        gap: 10px;
    }

    .tcs-tools-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
        margin-inline-start: auto;
        padding: 0 14px;
        border: 1px solid var(--tcs-line);
        border-radius: 999px;
        background-color: transparent;
        color: var(--tcs-ink);
        font: inherit;
        font-size: 14px;
        cursor: pointer;
    }

    .tcs-tools-toggle svg {
        width: 16px;
        height: 16px;
    }

    .tcs-tools {
        position: absolute;
        top: 100%;
        inset-inline: 0;
        display: none;
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px var(--tcs-gutter) 18px;
        border-bottom: 1px solid var(--tcs-line);
        background-color: var(--tcs-ground);
        box-shadow: var(--tcs-shadow-sm);
    }

    .tcs-header.is-open .tcs-tools {
        display: flex;
    }

    .tcs-seg-btn {
        min-width: 48px;
        height: 40px;
        font-size: 14px;
    }

    .tcs-header-cta {
        min-height: 44px;
        padding: 0 16px;
        font-size: 14px;
    }

    .tcs-hero {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .tcs-hero-copy {
        order: 1;
    }

    .tcs-stage {
        position: relative;
        inset: auto;
        z-index: 0;
        order: 2;
        height: clamp(300px, 88vw, 440px);
    }

    .tcs-board {
        order: 3;
    }

    .tcs-logo-plate {
        margin-bottom: 22px;
        padding: 8px 12px;
    }

    .tcs-logo-plate img {
        height: 48px;
    }

    .tcs-stage canvas[data-sc-canvas3d],
    [dir="rtl"] .tcs-stage canvas[data-sc-canvas3d] {
        --c3d-ox: 0.5;
        --c3d-oy: 0.5;
        --c3d-zoom: 0.27;
    }

    .tcs-vitrine-frame {
        display: none;
    }

    .tcs-hero-copy {
        padding-top: 36px;
        padding-bottom: 8px;
    }

    .tcs-board {
        padding-top: 4px;
    }

    .tcs-object {
        width: min(78vw, 340px);
    }

    .tcs-object:nth-child(even) {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .tcs-brand-domain {
        display: none;
    }

    .tcs-header-cta {
        display: none;
    }

    .tcs-board-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tcs-board-facts {
        display: grid;
        gap: 8px;
    }

    .tcs-opts-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .tcs-desk-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .tcs-sheet-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .tcs-ledger {
        font-size: 14px;
    }

    .tcs-ledger td {
        white-space: normal;
    }

    .tcs-line-total td {
        font-size: 1.25rem;
    }

    .tcs-seal {
        position: static;
        margin: 18px 0 0 auto;
        width: 72px;
        height: 72px;
        font-size: 11px;
    }

    [dir="rtl"] .tcs-seal {
        margin: 18px auto 0 0;
    }

    .tcs-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .tcs-entity div {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .tcs-footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The phone dock. The footer pads by the dock height and anchored jumps
   stop above it; while a form field has focus (the on-screen keyboard is
   up) the dock steps out of the way. */
@media (max-width: 760px) {
    .tcs-souq {
        --tcs-dock-h: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .tcs-souq:has(.tcs-dock) {
        scroll-padding-bottom: calc(var(--tcs-dock-h) + 12px);
    }

    .tcs-dock {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 45;
        display: grid;
        grid-auto-columns: minmax(0, 1fr);
        grid-auto-flow: column;
        height: var(--tcs-dock-h);
        padding: 0 2px env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--tcs-line-2);
        background-color: var(--tcs-ground);
        transition: transform 250ms var(--tcs-ease), visibility 0s linear 0s;
    }

    .tcs-body:has(:is(input, select, textarea):focus) .tcs-dock {
        visibility: hidden;
        transform: translateY(100%);
        transition: transform 250ms var(--tcs-ease), visibility 0s linear 250ms;
    }

    .tcs-dock a {
        position: relative;
        display: grid;
        align-content: center;
        justify-items: center;
        gap: 4px;
        min-width: 0;
        min-height: 48px;
        padding: 0;
        color: var(--tcs-ink-3);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.25;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: color 150ms var(--tcs-ease);
    }

    /* The current room: gold ink and a small khatam diamond set on the top
       rule, the star-point of the souq pattern. */
    .tcs-dock a::before {
        position: absolute;
        top: -4px;
        left: 50%;
        width: 7px;
        height: 7px;
        margin-left: -3.5px;
        border-radius: 1px;
        background-color: currentColor;
        transform: rotate(45deg) scale(0);
        transition: transform 250ms var(--tcs-ease);
        content: "";
    }

    .tcs-dock a[aria-current="true"] {
        color: var(--tcs-gold-ink);
    }

    .tcs-dock a[aria-current="true"]::before {
        transform: rotate(45deg) scale(1);
    }

    .tcs-souq .tcs-dock a:focus-visible {
        outline-offset: -4px;
        border-radius: 10px;
    }

    .tcs-dock .ti::before {
        width: 22px;
        height: 22px;
        vertical-align: 0;
    }

    /* Directional glyphs turn with the reading direction. */
    [dir="rtl"] .tcs-dock .ti-tcs-corridor::before {
        transform: scaleX(-1);
    }

    .tcs-dock span {
        max-width: 100%;
        overflow: hidden;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html.tcs-souq:lang(ar) .tcs-dock span {
        font-size: 12.5px;
        line-height: 1.35;
    }

    html.tcs-souq:lang(th) .tcs-dock span {
        font-size: 12.5px;
        line-height: 1.3;
    }

    .tcs-body:has(.tcs-dock) .tcs-footer {
        padding-bottom: calc(32px + var(--tcs-dock-h));
    }
}

@media (max-width: 380px) {
    .tcs-brand-name {
        font-size: 14px;
        letter-spacing: 0.06em;
    }

    .tcs-dock a {
        font-size: 11px;
    }

    .tcs-board-cell {
        padding: 10px 12px;
    }
}

@media (max-width: 340px) {
    .tcs-dock a {
        font-size: 10.5px;
    }

    html.tcs-souq:lang(th) .tcs-dock span,
    html.tcs-souq:lang(ar) .tcs-dock span {
        font-size: 11px;
    }
}

/* --------------------------------------------------------------------------
   Reduced motion: complete and still
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .tcs-vitrine {
        transform: none;
    }

    .tcs-carton,
    .tcs-skip,
    .tcs-btn,
    .tcs-seg-btn,
    .tcs-dock,
    .tcs-dock a,
    .tcs-dock a::before,
    .t-text-soft,
    .t-text-soft > span {
        transition: none !important;
    }

    .t-digit-group .t-digit {
        animation: none !important;
    }

    html.sc-ready .tcs-desk .tcs-line {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html.sc-ready .tcs-desk .tcs-seal {
        opacity: 1;
    }
}

@media print {
    .tcs-header,
    .tcs-stage,
    .tcs-wall,
    .tcs-vitrine-frame,
    .sivilai-command-bar,
    .tcs-dock {
        display: none;
    }
}
