/* Direction A: Open House, turned up.
   Standalone override: load after every stylesheet. Never load both directions.
   Root tokens cover the kit, its meaning/home helpers, and inherited legacy aliases. */
:root {
  --tt-ground: #F4F6F9;
  --tt-card: #FFFFFF;
  --tt-sunk: #E9EEF2;
  --tt-line: #DBE2E7;
  --tt-line-2: #C1CAD1;
  --tt-ink: #16212F;
  --tt-ink-2: #374755;
  --tt-mute: #53636E;
  --tt-faint: #62727D;
  --tt-control-edge: #87949D;
  --tt-control-strong: #6F7E89;
  --tt-primary: #03709E;
  --tt-primary-hover: #025D87;
  --tt-primary-press: #024E75;
  --tt-primary-fg: #FFFFFF;
  --tt-primary-icon: #FFFFFF;
  --tt-cyan-deep: #006B91;
  --tt-cyan-tint: #D1EFFB;
  --tt-art-sun: #FFE7A0;
  --tt-navy: #16212F;
  --tt-navy-hover: #1D2A3C;
  --tt-navy-press: #0D1520;
  --tt-cyan: #8FDCEB;
  --tt-navy-950: #0D1520;
  --tt-navy-900: #16212F;
  --tt-navy-850: #1D2A3C;
  --tt-navy-800: #273548;
  --tt-navy-700: #2D3D51;
  --tt-route-bright: #5FCDE2;
  --tt-ai: var(--tt-cyan-deep);
  --tt-arrive: #377EE3;
  --tt-arrive-deep: #1B4D95;
  --tt-arrive-tint: #DAE8FE;
  --tt-leave: #E26320;
  --tt-leave-deep: #8F3804;
  --tt-leave-tint: #FFE2D5;
  --tt-money: #7A40BA;
  --tt-money-deep: #562688;
  --tt-money-tint: #EBE0FE;
  --tt-stay: #128D42;
  --tt-stay-deep: #10602D;
  --tt-stay-tint: #D0F2D6;
  --tt-chat: #C1488A;
  --tt-chat-deep: #7E2B58;
  --tt-chat-tint: #FEDCEB;
  --tt-clean: #0A8C89;
  --tt-clean-deep: #045957;
  --tt-clean-tint: #C3F2EF;
  --tt-fix: #B58900;
  --tt-fix-deep: #715503;
  --tt-fix-tint: #FFE9BA;
  --tt-late: #CC1C3A;
  --tt-late-deep: #940A25;
  --tt-late-tint: #FEDEDD;
  --tt-home-1: #DECCFC;
  --tt-home-1-deep: #593C7E;
  --tt-home-2: #B3DBFE;
  --tt-home-2-deep: #035181;
  --tt-home-3: #FDC9B1;
  --tt-home-3-deep: #7C350E;
  --tt-home-4: #F0D295;
  --tt-home-4-deep: #624800;
  --tt-home-5: #C3E1B4;
  --tt-home-5-deep: #305A12;
  --tt-home-6: #A3E5DC;
  --tt-home-6-deep: #005A52;
  --tt-home-7: #FBC4D8;
  --tt-home-7-deep: #792F50;
  --tt-home-8: #A4E1F6;
  --tt-home-8-deep: #05566B;
  --tt-chart-1: #2A78D6;
  --tt-chart-2: #EB6834;
  --tt-chart-3: #1BAF7A;
  --tt-chart-4: #EDA100;
  --tt-chart-5: #E87BA4;
  --tt-chart-6: #008300;
  --tt-chart-7: #6250D6;
  --tt-chart-8: #E34948;
  --tt-area-today-fill: #F3C44E;
  --tt-area-today-fg: #16212F;
  --tt-area-today-ink: #805B00;
  --tt-area-today-tint: #FFF0BC;
  --tt-area-inbox-fill: #315BCC;
  --tt-area-inbox-fg: #FFFFFF;
  --tt-area-inbox-ink: #2348A8;
  --tt-area-inbox-tint: #DEE6FF;
  --tt-area-calendar-fill: #087C83;
  --tt-area-calendar-fg: #FFFFFF;
  --tt-area-calendar-ink: #005B63;
  --tt-area-calendar-tint: #CEEEEC;
  --tt-area-reservations-fill: #B74E27;
  --tt-area-reservations-fg: #FFFFFF;
  --tt-area-reservations-ink: #873712;
  --tt-area-reservations-tint: #FFE1CE;
  --tt-area-portfolio-fill: #547824;
  --tt-area-portfolio-fg: #FFFFFF;
  --tt-area-portfolio-ink: #3E5918;
  --tt-area-portfolio-tint: #E0ECC5;
  --tt-area-operations-fill: #7953B5;
  --tt-area-operations-fg: #FFFFFF;
  --tt-area-operations-ink: #58358C;
  --tt-area-operations-tint: #EADDF9;
  --tt-area-finance-fill: #006D88;
  --tt-area-finance-fg: #FFFFFF;
  --tt-area-finance-ink: #00536A;
  --tt-area-finance-tint: #D0EDF3;
  --tt-area-contacts-fill: #A73972;
  --tt-area-contacts-fg: #FFFFFF;
  --tt-area-contacts-ink: #7F2053;
  --tt-area-contacts-tint: #F7DCEB;
  --tt-area-settings-fill: #536478;
  --tt-area-settings-fg: #FFFFFF;
  --tt-area-settings-ink: #3D4E64;
  --tt-area-settings-tint: #E1E7EF;
  --tt-hover: rgb(22 33 47 / .055);
  --tt-press: rgb(22 33 47 / .10);
  --tt-shadow-card: 0 1px 2px rgb(22 33 47 / .04), 0 6px 20px rgb(22 33 47 / .06);
  --tt-shadow-float: 0 4px 12px rgb(22 33 47 / .10), 0 24px 56px rgb(22 33 47 / .18);
  --tt-scrim: rgb(13 21 32 / .42);
}
html.dark-style {
  --tt-ground: #0F1821;
  --tt-card: #192630;
  --tt-sunk: #23323E;
  --tt-line: #334552;
  --tt-line-2: #4A5E6B;
  --tt-ink: #F0F4F6;
  --tt-ink-2: #C9D9E1;
  --tt-mute: #A9BFC9;
  --tt-faint: #9EB5C0;
  --tt-control-edge: #607986;
  --tt-control-strong: #7A97A6;
  --tt-primary: #61CAEF;
  --tt-primary-hover: #8BE3FF;
  --tt-primary-press: #4BBDE4;
  --tt-primary-fg: #092531;
  --tt-primary-icon: #092531;
  --tt-cyan-deep: #7EDAF4;
  --tt-cyan-tint: #123D4E;
  --tt-art-sun: #F2D08C;
  --tt-navy: #16212F;
  --tt-navy-hover: #1D2A3C;
  --tt-navy-press: #0D1520;
  --tt-cyan: #8FDCEB;
  --tt-navy-950: #0D1520;
  --tt-navy-900: #16212F;
  --tt-navy-850: #1D2A3C;
  --tt-navy-800: #273548;
  --tt-navy-700: #2D3D51;
  --tt-route-bright: #5FCDE2;
  --tt-ai: var(--tt-cyan-deep);
  --tt-arrive: #6FA8FE;
  --tt-arrive-deep: #BBD6FF;
  --tt-arrive-tint: #25364F;
  --tt-leave: #FE9465;
  --tt-leave-deep: #FFCAB4;
  --tt-leave-tint: #452E24;
  --tt-money: #A980E2;
  --tt-money-deep: #DAC3FF;
  --tt-money-tint: #382D48;
  --tt-stay: #5AC576;
  --tt-stay-deep: #ABE7B7;
  --tt-stay-tint: #243A29;
  --tt-chat: #E97AB2;
  --tt-chat-deep: #FEBCDA;
  --tt-chat-tint: #432B36;
  --tt-clean: #0EBCB8;
  --tt-clean-deep: #8DE5E1;
  --tt-clean-tint: #163B3A;
  --tt-fix: #E6B642;
  --tt-fix-deep: #FEDD97;
  --tt-fix-tint: #40351E;
  --tt-late: #E75F66;
  --tt-late-deep: #FDB5B4;
  --tt-late-tint: #492B2A;
  --tt-home-1: #3D324E;
  --tt-home-1-deep: #DECBFF;
  --tt-home-2: #203B50;
  --tt-home-2-deep: #B3DBFF;
  --tt-home-3: #4E2F22;
  --tt-home-3-deep: #FFC8B0;
  --tt-home-4: #443617;
  --tt-home-4-deep: #EDD39D;
  --tt-home-5: #2D3E23;
  --tt-home-5-deep: #C1E2B0;
  --tt-home-6: #12403B;
  --tt-home-6-deep: #9CE7DC;
  --tt-home-7: #4C2D39;
  --tt-home-7-deep: #FFC2D8;
  --tt-home-8: #153E4A;
  --tt-home-8-deep: #9EE2F9;
  --tt-chart-1: #3987E5;
  --tt-chart-2: #D95926;
  --tt-chart-3: #199E70;
  --tt-chart-4: #C98500;
  --tt-chart-5: #D55181;
  --tt-chart-6: #008300;
  --tt-chart-7: #9085E9;
  --tt-chart-8: #E66767;
  --tt-area-today-fill: #D6AD43;
  --tt-area-today-fg: #16212F;
  --tt-area-today-ink: #F3D47D;
  --tt-area-today-tint: #403B26;
  --tt-area-inbox-fill: #769BEC;
  --tt-area-inbox-fg: #10213D;
  --tt-area-inbox-ink: #B8CEFF;
  --tt-area-inbox-tint: #243752;
  --tt-area-calendar-fill: #49BFC5;
  --tt-area-calendar-fg: #102B30;
  --tt-area-calendar-ink: #98E0E3;
  --tt-area-calendar-tint: #1B3D43;
  --tt-area-reservations-fill: #E29468;
  --tt-area-reservations-fg: #342219;
  --tt-area-reservations-ink: #FFC5A3;
  --tt-area-reservations-tint: #483528;
  --tt-area-portfolio-fill: #A0C063;
  --tt-area-portfolio-fg: #223116;
  --tt-area-portfolio-ink: #C9E39D;
  --tt-area-portfolio-tint: #303F28;
  --tt-area-operations-fill: #B097DD;
  --tt-area-operations-fg: #2A1E3E;
  --tt-area-operations-ink: #D8C3F6;
  --tt-area-operations-tint: #3A304C;
  --tt-area-finance-fill: #62BDCF;
  --tt-area-finance-fg: #102B33;
  --tt-area-finance-ink: #A5DFEA;
  --tt-area-finance-tint: #1D3C48;
  --tt-area-contacts-fill: #DD87B1;
  --tt-area-contacts-fg: #361F2E;
  --tt-area-contacts-ink: #F5B9D9;
  --tt-area-contacts-tint: #462E40;
  --tt-area-settings-fill: #A4B4C9;
  --tt-area-settings-fg: #172B3A;
  --tt-area-settings-ink: #D1DEEE;
  --tt-area-settings-tint: #303D4C;
  --tt-hover: rgb(240 245 246 / .065);
  --tt-press: rgb(240 245 246 / .11);
  --tt-shadow-card: 0 2px 4px rgb(0 0 0 / .22), 0 8px 24px rgb(0 0 0 / .18);
  --tt-shadow-float: 0 4px 12px rgb(0 0 0 / .30), 0 24px 56px rgb(0 0 0 / .45);
  --tt-scrim: rgb(0 0 0 / .60);
}

/* Existing aliases are re-bound at the root, never to literal old colours. */
:root, html.dark-style {
  --tt-focus: 0 0 0 2px var(--tt-card), 0 0 0 4px var(--tt-cyan-deep);
  --tt-control-line: var(--tt-control-edge);
  --tt-selection-bg: var(--tt-cyan);
  --tt-selection-fg: var(--tt-navy-950);
}
::selection { background: var(--tt-selection-bg); color: var(--tt-selection-fg); }

/* Stat card (the Today card, client ruling Nov 2026): a white card, a 4px edge at the inline start and a small tinted icon tile
   in the meaning's colour; label, big figure, one quiet line in plain ink. Every stat row in the CRM is this one card. */
html .tt-stat, html .ops .kpis:not(.ob-figs, .itl-figs, .ldg-figs) > .kpi { background: var(--tt-card); border-inline-start: 4px solid var(--tt-tile-edge, var(--tt-cyan)) !important; padding-inline-start: 14px; }
html .tt-stat .tt-stat__context:is(.is-late, .is-fix) { justify-self: start; border-radius: 4px; padding-inline: 4px; }
html .tt-stat .tt-stat__context.is-late { color: var(--tt-late-deep); background: var(--tt-late-tint); }
html .tt-stat .tt-stat__context.is-fix { color: var(--tt-fix-deep); background: var(--tt-fix-tint); }

/* Eight architectural postcards, selected by Kit::homeTint(id). No image requests.
   Pseudo-elements stay behind real photos, including a late-loading cached image.
   Their geometry survives tiny thumbnails; no extra markup or attribute is needed. */
html .tt-photo { isolation: isolate; --tt-art-x: 76%; --tt-art-y: 28%; --tt-art-flip: 1; }
html .tt-photo > .tt-ic { visibility: hidden; }
html .tt-photo::before, html .tt-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
html .tt-photo::before {
  background:
    radial-gradient(circle at var(--tt-art-x) var(--tt-art-y), var(--tt-art-sun) 0 11%, transparent 11.5%),
    linear-gradient(0deg, color-mix(in srgb, var(--tt-home-deep) 40%, var(--tt-home)) 0 18%, transparent 18%),
    linear-gradient(0deg, color-mix(in srgb, var(--tt-home-deep) 18%, var(--tt-home)) 0 36%, transparent 36%),
    var(--tt-home);
}
html .tt-photo::after {
  background: var(--tt-home-deep);
  opacity: .85;
  transform: scaleX(var(--tt-art-flip));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200' preserveAspectRatio='none'%3E%3Cpath fill='black' fill-rule='evenodd' d='M24 176V80Q24 28 76 28Q128 28 128 80V176ZM44 148H108V82Q108 49 76 49Q44 49 44 82ZM152 176V98H214V176ZM166 112V126H178V112ZM188 112V126H200V112ZM166 138V152H178V138ZM188 138V152H200V138ZM238 176V67H282V176ZM250 82V96H270V82ZM250 110V124H270V110ZM250 138V152H270V138ZM0 176H320V185H0Z'/%3E%3C/svg%3E") center bottom / contain no-repeat;
}
html .tt-photo > img { z-index: 1; }
html .tt-photo.tt-home-1 { --tt-art-x: 78%; --tt-art-y: 25%; }
html .tt-photo.tt-home-2 { --tt-art-x: 30%; --tt-art-y: 30%; --tt-art-flip: -1; }
html .tt-photo.tt-home-3 { --tt-art-x: 72%; --tt-art-y: 20%; }
html .tt-photo.tt-home-4 { --tt-art-x: 34%; --tt-art-y: 28%; --tt-art-flip: -1; }
html .tt-photo.tt-home-5 { --tt-art-x: 70%; --tt-art-y: 32%; }
html .tt-photo.tt-home-6 { --tt-art-x: 25%; --tt-art-y: 22%; --tt-art-flip: -1; }
html .tt-photo.tt-home-7 { --tt-art-x: 82%; --tt-art-y: 26%; }
html .tt-photo.tt-home-8 { --tt-art-x: 24%; --tt-art-y: 30%; --tt-art-flip: -1; }

html .tt-stat:has(> .tt-itile.tt-m-arrive) { --tt-tile-edge: var(--tt-arrive); }
html .tt-stat:has(> .tt-itile.tt-m-leave) { --tt-tile-edge: var(--tt-leave); }
html .tt-stat:has(> .tt-itile.tt-m-money) { --tt-tile-edge: var(--tt-money); }
html .tt-stat:has(> .tt-itile.tt-m-stay) { --tt-tile-edge: var(--tt-stay); }
html .tt-stat:has(> .tt-itile.tt-m-chat) { --tt-tile-edge: var(--tt-chat); }
html .tt-stat:has(> .tt-itile.tt-m-clean) { --tt-tile-edge: var(--tt-clean); }
html .tt-stat:has(> .tt-itile.tt-m-fix) { --tt-tile-edge: var(--tt-fix); }
html .tt-stat:has(> .tt-itile.tt-m-late) { --tt-tile-edge: var(--tt-late); }
html .tt-stat:has(> .tt-itile.tt-m-brand) { --tt-tile-edge: var(--tt-cyan); }
/* Figure strips (x-tt figs: keys, service charges, cheques, Holidayonus, inspections, tiles) that sit on the page ground are the same
   stat card, one per figure; a strip inside a card or sheet stays a quiet ruled line. */
html .tt-figs:not(.hf-side):not(:is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs) { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); grid-auto-columns: auto; justify-content: stretch; gap: var(--tt-gap, 16px); }
html .tt-figs:not(.hf-side):not(:is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs) > .tt-figs__col { display: grid; align-content: start; gap: 4px; min-width: 0; margin: 0; padding: 16px 18px 16px 14px; border: 0; border-inline-start: 4px solid var(--tt-tile-edge, var(--tt-cyan)); border-radius: var(--tt-r-card); background: var(--tt-card); box-shadow: var(--tt-shadow-card); }
html .tt-figs:not(.hf-side):not(:is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs) > .tt-figs__col::after { display: none; }
html :is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs:not(.tt-figs--tiles) > .tt-figs__col { border-inline-start: 1px solid var(--tt-rule-2, var(--tt-line)); }
html :is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs:not(.tt-figs--tiles) > .tt-figs__col:first-child { border-inline-start: 0; }
/* A figure card with its icon tile: the tile sits at the inline end of the label line, exactly like .tt-stat. Its meaning picks the
   edge unless a state (late, due, wait, done) already did. */
html .tt-figs:not(.hf-side):not(:is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs) > .tt-figs__col:has(> .tt-itile) { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
html .tt-figs:not(.hf-side):not(:is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs) > .tt-figs__col > .tt-itile { grid-column: 2; grid-row: 1; width: 32px; height: 32px; }
html .tt-figs:not(.hf-side):not(:is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs) > .tt-figs__col:has(> .tt-itile) > .tt-figs__label { align-self: center; white-space: normal; line-height: 1.3; }
html .tt-figs:not(.hf-side):not(:is(.tt-card, .tt-sheet, .card, .tt-modal, .tt-dialog, .modal) .tt-figs) > .tt-figs__col:has(> .tt-itile) > :is(.tt-figs__n, .tt-figs__sub) { grid-column: 1 / -1; }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-arrive)) { --tt-tile-edge: var(--tt-arrive); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-leave)) { --tt-tile-edge: var(--tt-leave); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-money)) { --tt-tile-edge: var(--tt-money); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-stay)) { --tt-tile-edge: var(--tt-stay); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-chat)) { --tt-tile-edge: var(--tt-chat); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-clean)) { --tt-tile-edge: var(--tt-clean); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-fix)) { --tt-tile-edge: var(--tt-fix); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-late)) { --tt-tile-edge: var(--tt-late); }
html .tt-figs__col:where(:has(> .tt-itile.tt-m-brand)) { --tt-tile-edge: var(--tt-cyan); }
html .tt-figs__col.is-late { --tt-tile-edge: var(--tt-late); }
html .tt-figs__col.is-due { --tt-tile-edge: var(--tt-fix); }
html .tt-figs__col.is-wait { --tt-tile-edge: var(--tt-money); }
html .tt-figs__col.is-done { --tt-tile-edge: var(--tt-stay); }
/* the back-office .kpi tile (x-ops.kpis, x-portal.kpis): its icon tone g/b/o/v/r/k picks the edge */
html .ops .kpi:has(> .ic.g) { --tt-tile-edge: var(--tt-stay); }
html .ops .kpi:has(> .ic.b) { --tt-tile-edge: var(--tt-arrive); }
html .ops .kpi:has(> .ic.o) { --tt-tile-edge: var(--tt-leave); }
html .ops .kpi:has(> .ic.v) { --tt-tile-edge: var(--tt-money); }
html .ops .kpi:has(> .ic.r) { --tt-tile-edge: var(--tt-late); }
html .ops .kpi:has(> .ic.k) { --tt-tile-edge: var(--tt-faint); }

/* Status chips retain their words/icons and a shape distinct from area plates.
   These cues are necessary: nine section hues cannot be all-pairs CVD-safe. */
html .tt-chip--late { border: 1px solid var(--tt-late-deep); }
html .tt-chip:is(.tt-chip--fix, .tt-chip--due) { border: 1px dashed var(--tt-fix-deep); border-radius: 5px; }
html .tt-chip:is(.tt-chip--stay, .tt-chip--done) { border: 1px solid var(--tt-stay-deep); border-radius: 999px; }
/* No new motion: existing shared motion and its reduced-motion switch survive. */

/* The rail on the SwiftStay navy (client redesign 2026-11, prototype "--nav: #2D3E52"): dark blue, light text, the
   current page in the light SwiftStay blue. Only the rail's own tokens change, so every rail part (search, bell,
   sections, sub-pages, the collapsed flyouts, the account row) follows; the pop-overs it opens live outside it. */
html .tt-rail {
  --tt-card: #2D3E52;
  --tt-ink: #FFFFFF;
  --tt-ink-2: #C5CDE0;
  --tt-mute: #8E9AB2;
  --tt-faint: rgb(255 255 255 / .28);
  --tt-line: rgb(255 255 255 / .10);
  --tt-line-2: rgb(255 255 255 / .18);
  --tt-ground: rgb(255 255 255 / .06);
  --tt-sunk: rgb(255 255 255 / .09);
  --tt-hover: rgb(255 255 255 / .08);
  --tt-press: rgb(255 255 255 / .13);
  --tt-primary: #51CCE1;
  --tt-primary-press: #45B8CC;
  --tt-primary-fg: #FFFFFF;
  --tt-cyan-tint: rgb(81 204 225 / .18);
  --tt-cyan-deep: #9DE6F2;
  background: #2D3E52;
  color: var(--tt-ink-2);
  border-inline-end-color: #2D3E52;
}
html .tt-rail .tt-rail__item.is-active .tt-rail__badge { background: #FFFFFF; color: #2D3E52; }
html .tt-rail .tt-rail__badge { background: #E0566B; color: #FFFFFF; }
html .tt-rail .tt-rail__tile { background: #1F2C3B; }
html .tt-rail .tt-rail__ask { box-shadow: none; }
html .tt-rail .tt-kbd { background: rgb(255 255 255 / .08); }
