/* ==========================================================================
   Think Tanks Collective — design system.
   The Think Tanks look: off-white paper, near-black ink, one teal accent,
   gold for work in progress, hairline rules, square corners, no shadows.
   Helvetica Neue for reading; Menlo for labels, buttons and numbers.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	color-scheme: light;
	--bg: #F8F8F6; --paper: #FFFFFF; --panel: #F1F1EE; --subtle: #F8F8F6; --hover: #F3F3F0;
	--ink: #111111; --ink-2: #2B2B2B; --muted: #666666; --faint: #999999;
	--line: #E4E4E0; --line-2: #D6D6D6; --ring: #D6D6D6;
	--signal: #3A5F5F; --signal-ink: #FFFFFF; --signal-soft: #E6EDED; --signal-line: #A9BEBE;
	--ok: #3A5F5F; --ok-soft: #E6EDED; --warn: #A07E28; --warn-soft: #F5EFDF;
	--err: #C73A2B; --err-soft: #FBEAE7; --info: #5A7A7A; --info-soft: #EAF0F0;
	--btn: #111111; --btn-ink: #F8F8F6; --btn-hover: #2B2B2B;
	--side-bg: #111111; --side-ink: #E8E6E1; --side-muted: #8B8A86; --side-line: #2A2A28; --side-hover: rgba(255, 255, 255, .06); --side-on: rgba(255, 255, 255, .1);
	--display: "Helvetica Neue", Helvetica, Arial, sans-serif; --text: "Helvetica Neue", Helvetica, Arial, sans-serif; --mono: Menlo, Monaco, "Courier New", monospace;
	--side: 244px; --rail: 64px; --top: 56px;
	--r: 0px; --r-sm: 0px; --r-lg: 0px;
	--shadow-xs: none;
	--shadow: 0 0 0 1px var(--line-2);
	--shadow-hover: 0 0 0 1px var(--ink);
	--shadow-lg: 0 0 0 1px var(--line-2), 0 12px 32px -12px rgba(17, 17, 17, .18);
	--ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #111111; --paper: #1A1A1A; --panel: #222222; --subtle: #1A1A1A; --hover: #222222;
	--ink: #E8E6E1; --ink-2: #CFCDC8; --muted: #8B8A86; --faint: #6A6966;
	--line: #2A2A28; --line-2: #3A3A37; --ring: #3A3A37;
	--signal: #7A9A9A; --signal-ink: #111111; --signal-soft: rgba(122, 154, 154, .16); --signal-line: rgba(122, 154, 154, .4);
	--ok: #7A9A9A; --ok-soft: rgba(122, 154, 154, .14); --warn: #D4A373; --warn-soft: rgba(212, 163, 115, .14);
	--err: #E0705F; --err-soft: rgba(224, 112, 95, .14); --info: #7A9A9A; --info-soft: rgba(122, 154, 154, .14);
	--btn: #E8E6E1; --btn-ink: #111111; --btn-hover: #FFFFFF;
	--side-bg: #0B0B0B; --side-line: #222220;
	--shadow: 0 0 0 1px var(--line-2);
	--shadow-hover: 0 0 0 1px var(--ink);
	--shadow-lg: 0 0 0 1px var(--line-2), 0 18px 40px -10px rgba(0, 0, 0, .7);
}
/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "tnum" 0; }
a { color: inherit; }
a:hover { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; font-family: var(--text); }
p { margin: 0 0 .7em; }
p:last-child { margin-bottom: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--signal-soft); }
.tc-icon { flex: none; vertical-align: middle; }
.tc-skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 1000; border-radius: var(--r-sm); }
.tc-skip:focus { left: 8px; }
.tc-num, .tc-money, .tc-stat__value, .tc-table td, .tc-figure, .tc-kpi__value, time { font-variant-numeric: tabular-nums; }
.tc-kbd, kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--paper); color: var(--muted); font: 600 11px/1 var(--text); }

/* ---------- Shell ---------- */
.tc-shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s var(--ease); background: linear-gradient(to right, var(--side-bg) var(--side), transparent var(--side)); }
.tc-collapsed .tc-shell { background: linear-gradient(to right, var(--side-bg) var(--rail), transparent var(--rail)); }
.tc-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side-bg); color: var(--side-ink); overflow: hidden; z-index: 40; }
.tc-side__top { display: flex; align-items: center; gap: 8px; height: var(--top); padding: 0 12px 0 14px; flex: none; }
.tc-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; color: inherit; }
.tc-brand:hover { color: inherit; }
.tc-brand__mark { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--signal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 800 12px/1 var(--display); letter-spacing: -0.02em; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.tc-brand__words { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.tc-brand img { height: 22px; width: auto; }
.tc-brand__logo { display: block; height: 38px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.tc-brand:has(.tc-brand__logo) { flex: 1; }
.tc-brand--auth .tc-brand__logo { height: 44px; }
.tc-brand:has(.tc-brand__logo) .tc-brand__mark, .tc-brand:has(.tc-brand__logo) .tc-brand__words { display: none; }
.tc-collapsed .tc-brand .tc-brand__logo { display: none; }
.tc-collapsed .tc-brand:has(.tc-brand__logo) .tc-brand__mark { display: inline-flex; }
@media (max-width: 960px) { .tc-collapsed .tc-brand .tc-brand__logo { display: block; } .tc-collapsed .tc-brand:has(.tc-brand__logo) .tc-brand__mark { display: none; } }
.tc-brand__name { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.tc-brand__app { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); }
.tc-nav { padding: 6px 10px 16px; flex: 1; overflow-y: auto; overflow-x: hidden; }
.tc-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.tc-nav__group { margin: 18px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); white-space: nowrap; }
.tc-nav__sep { height: 1px; background: var(--side-line); margin: 14px 8px; }
.tc-nav__link { display: flex; align-items: center; gap: 11px; height: 34px; padding: 0 10px; border-radius: 7px; text-decoration: none; font-weight: 550; font-size: 13.5px; color: var(--side-ink); position: relative; white-space: nowrap; transition: background .12s, color .12s; }
.tc-nav__link .tc-icon { width: 17px; height: 17px; color: var(--side-muted); transition: color .12s; }
.tc-nav__link:hover { background: var(--side-hover); color: #fff; }
.tc-nav__link:hover .tc-icon { color: #e8e8ec; }
.tc-nav__link.is-on { background: var(--side-on); color: #fff; }
.tc-nav__link.is-on .tc-icon { color: var(--signal); }
.tc-nav__link.is-on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0; background: var(--signal); }
.tc-nav__link > span { overflow: hidden; text-overflow: ellipsis; }
.tc-nav__badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.tc-nav__link.is-on .tc-nav__badge, .tc-nav__badge.is-hot { background: var(--signal); }
.tc-side__foot { display: flex; align-items: center; gap: 4px; padding: 10px; border-top: 1px solid var(--side-line); flex: none; }
.tc-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; padding: 6px; border-radius: 7px; color: inherit; }
.tc-me:hover { background: var(--side-hover); color: inherit; }
.tc-me > span:last-child { min-width: 0; }
.tc-me strong { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-me small { display: block; color: var(--side-muted); font-size: 11.5px; }
.tc-side .tc-avatar { background: #2a2a30; color: #fff; box-shadow: none; }
.tc-side .tc-icon-btn { color: var(--side-muted); }
.tc-side .tc-icon-btn:hover { background: var(--side-hover); color: #fff; border-color: transparent; }

/* Collapsed rail (desktop). */
.tc-collapsed .tc-shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
.tc-collapsed .tc-brand__words, .tc-collapsed .tc-nav__group, .tc-collapsed .tc-nav__link > span, .tc-collapsed .tc-me > span:last-child, .tc-collapsed .tc-side__foot > .tc-icon-btn { display: none; }
.tc-collapsed .tc-side__top { padding: 0; justify-content: center; }
.tc-collapsed .tc-nav { padding: 6px 10px; }
.tc-collapsed .tc-nav__link { justify-content: center; padding: 0; }
.tc-collapsed .tc-nav__link.is-on::before { left: -10px; }
.tc-collapsed .tc-nav__group + ul, .tc-collapsed .tc-nav ul + .tc-nav__group { margin-top: 0; }
.tc-collapsed .tc-nav ul + p.tc-nav__group + ul { border-top: 1px solid var(--side-line); padding-top: 8px; margin-top: 8px; }
.tc-collapsed .tc-nav__badge { position: absolute; top: 3px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; background: var(--signal); }
.tc-collapsed .tc-side__foot { justify-content: center; padding: 10px 0; }
.tc-collapsed .tc-me { flex: none; padding: 4px; }
.tc-tip { position: fixed; z-index: 200; pointer-events: none; padding: 5px 9px; border-radius: 6px; background: #000; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-lg); transform: translateY(-50%); }

/* Top bar */
.tc-main-wrap { min-width: 0; display: flex; flex-direction: column; }
.tc-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: var(--top); padding: 0 24px 0 16px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.tc-menu-btn { display: inline-flex; }
.tc-top__crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 0; }
.tc-top__crumb a { text-decoration: none; font-weight: 600; color: var(--muted); }
.tc-top__crumb a:hover { color: var(--ink); }
.tc-top__crumb strong { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.tc-top__crumb .tc-icon { width: 14px; height: 14px; color: var(--faint); }
.tc-top__search { flex: 0 1 380px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; background: var(--paper); border-radius: var(--r); padding: 0 6px 0 10px; box-shadow: var(--shadow); color: var(--faint); cursor: text; transition: box-shadow .15s; }
.tc-top__search:hover { box-shadow: var(--shadow-hover); }
.tc-top__search .tc-icon { width: 16px; height: 16px; }
.tc-top__search input { border: 0; outline: 0; background: transparent; height: 32px; width: 100%; min-width: 0; font-size: 13.5px; color: var(--ink); }
.tc-top__search input::placeholder { color: var(--faint); }
.tc-top__search .tc-kbd { flex: none; }
.tc-top__right { display: flex; align-items: center; gap: 4px; }
.tc-quick, .tc-pop { position: relative; }
.tc-quick summary, .tc-pop summary { list-style: none; cursor: pointer; }
.tc-quick summary::-webkit-details-marker, .tc-pop summary::-webkit-details-marker { display: none; }
.tc-quick__menu, .tc-pop__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; animation: tc-pop .14s var(--ease); }
.tc-quick__menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-decoration: none; border-radius: var(--r-sm); font-weight: 600; font-size: 13.5px; }
.tc-quick__menu a .tc-icon { width: 16px; height: 16px; color: var(--muted); }
.tc-quick__menu a:hover { background: var(--hover); }
.tc-quick__menu a .tc-kbd { margin-left: auto; }
.tc-pop__menu { width: min(380px, calc(100vw - 24px)); padding: 0; }
.tc-pop__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; font-weight: 700; font-size: 13px; }
.tc-pop__body { max-height: 420px; overflow-y: auto; padding: 0 14px 10px; }
.tc-pop__foot { border-top: 1px solid var(--line); padding: 8px 14px; font-size: 13px; }
.tc-bell { position: relative; }
.tc-bell__dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--bg); }
@keyframes tc-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.tc-main { padding: 26px 32px 72px; width: 100%; max-width: 1440px; }
.tc-theme-btn .tc-icon--sun { display: none; }
[data-theme="dark"] .tc-theme-btn .tc-icon--sun { display: block; }
[data-theme="dark"] .tc-theme-btn .tc-icon--moon { display: none; }

/* Loading bar for page changes. */
.tc-loadbar { position: fixed; left: 0; top: 0; height: 2px; width: 0; background: var(--signal); z-index: 300; opacity: 0; transition: width .3s ease, opacity .3s; }
.is-loading .tc-loadbar { opacity: 1; width: 82%; transition: width 8s cubic-bezier(.1, .7, .1, 1), opacity .1s; }

/* ---------- Header, tabs ---------- */
.tc-head { margin-bottom: 22px; }
.tc-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.tc-back .tc-icon { width: 15px; height: 15px; }
.tc-back:hover { color: var(--ink); }
.tc-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tc-head__text { min-width: 0; }
.tc-h1 { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.tc-head__sub { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.tc-head__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -8px 0 22px; overflow-x: auto; scrollbar-width: none; }
.tc-tabs::-webkit-scrollbar { display: none; }
.tc-tab { position: relative; padding: 10px 12px 11px; font-weight: 600; font-size: 13.5px; color: var(--muted); text-decoration: none; white-space: nowrap; border-radius: 6px 6px 0 0; transition: color .12s; }
.tc-tab:hover { color: var(--ink); }
.tc-tab.is-on { color: var(--ink); }
.tc-tab.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 0; background: var(--signal); }
.tc-tab b { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; font-size: 11px; font-weight: 700; background: var(--signal-soft); color: var(--signal); }

/* ---------- Buttons ---------- */
.tc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--r); border: 1px solid transparent; background: var(--btn); color: var(--btn-ink); font-weight: 650; font-size: 13.5px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, box-shadow .12s, color .12s, transform .06s; box-shadow: var(--shadow-xs); user-select: none; }
.tc-btn:hover { background: var(--btn-hover); color: var(--btn-ink); }
.tc-btn:active { transform: translateY(1px); }
.tc-btn .tc-icon { width: 16px; height: 16px; }
.tc-btn--primary { background: var(--btn); color: var(--btn-ink); }
.tc-head__actions > .tc-btn--primary, .tc-head__actions > form > .tc-btn--primary, .tc-toolbar .tc-btn--primary, .tc-empty__cta .tc-btn--primary, .tc-btn--signal { background: var(--signal); color: var(--signal-ink); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12), var(--shadow-xs); }
.tc-head__actions > .tc-btn--primary:hover, .tc-head__actions > form > .tc-btn--primary:hover, .tc-toolbar .tc-btn--primary:hover, .tc-empty__cta .tc-btn--primary:hover, .tc-btn--signal:hover { background: color-mix(in srgb, var(--signal) 88%, #000); color: #fff; }
.tc-btn--ghost { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset, var(--shadow-xs); }
.tc-btn--ghost:hover { background: var(--hover); color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--line-2) 60%, var(--ink)) inset, var(--shadow-xs); }
.tc-btn--danger { background: var(--paper); color: var(--err); box-shadow: 0 0 0 1px color-mix(in srgb, var(--err) 30%, transparent) inset; }
.tc-btn--danger:hover { background: var(--err); color: #fff; }
.tc-btn--link { background: none; border: 0; color: var(--ink); padding: 0; height: auto; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); font-weight: 600; }
.tc-btn--link:hover { background: none; color: var(--signal); text-decoration-color: currentColor; }
.tc-btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.tc-btn--sm .tc-icon { width: 14px; height: 14px; }
.tc-btn[disabled], .tc-btn.is-busy { opacity: .6; cursor: progress; }
.tc-btn.is-busy::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tc-spin .6s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }
.tc-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: var(--r); background: transparent; cursor: pointer; color: var(--muted); text-decoration: none; transition: background .12s, color .12s; position: relative; }
.tc-icon-btn:hover { background: var(--panel); color: var(--ink); }
.tc-icon-btn .tc-icon { width: 18px; height: 18px; }
.tc-linklike { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; font-weight: 600; }
.tc-linklike:hover { color: var(--signal); }
.tc-inline-form { display: inline; margin: 0; }
.tc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Cards, grids ---------- */
.tc-card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.tc-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; min-height: 46px; }
.tc-card__title { font-size: 14px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.tc-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-card__actions .tc-btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
.tc-card__body { padding: 12px 18px 18px; }
.tc-card > .tc-card__body:first-child { padding-top: 18px; }
.tc-card--flush .tc-card__body { padding: 0; }
.tc-card--flush > .tc-card__head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tc-card--signal { border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: var(--shadow), inset 3px 0 0 var(--signal); }
.tc-card--dark { background: #17171a; color: #ededf0; }
.tc-card--dark .tc-card__title { color: #fff; }
.tc-grid { display: grid; gap: 18px; align-items: start; }
.tc-grid > .tc-grid__col > .tc-card:last-child, .tc-grid > div > .tc-card:last-child { margin-bottom: 0; }
.tc-grid { margin-bottom: 18px; }
.tc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tc-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tc-grid--main { grid-template-columns: minmax(0, 1fr) 360px; }
.tc-grid--side { grid-template-columns: 280px minmax(0, 1fr); }
.tc-grid--chat { grid-template-columns: 280px minmax(0, 1fr); }

/* Stat / KPI tiles */
.tc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tc-stat { position: relative; display: flex; flex-direction: column; gap: 2px; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 16px 14px; text-decoration: none; overflow: hidden; transition: box-shadow .15s, transform .15s; min-width: 0; }
a.tc-stat:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.tc-stat__label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tc-stat__value { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; margin-top: 2px; }
.tc-stat__sub { font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-stat.is-alert .tc-stat__value { color: var(--signal); }
.tc-stat.is-warn .tc-stat__value { color: var(--warn); }
.tc-stat__spark { position: absolute; right: 12px; bottom: 14px; width: 30%; max-width: 84px; height: 28px; color: var(--signal); opacity: .9; }
.tc-stat__spark--muted { color: var(--faint); }
.tc-delta { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 700; }
.tc-delta--up { background: var(--ok-soft); color: var(--ok); }
.tc-delta--down { background: var(--err-soft); color: var(--err); }
.tc-delta--flat { background: var(--panel); color: var(--muted); }

/* ---------- Tables, lists ---------- */
.tc-table-wrap { overflow-x: auto; }
.tc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tc-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--subtle); white-space: nowrap; }
.tc-table th:first-child { border-top-left-radius: var(--r-lg); }
.tc-table th:last-child { border-top-right-radius: var(--r-lg); }
.tc-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tc-table td:first-child, .tc-table th:first-child { padding-left: 18px; }
.tc-table td:last-child, .tc-table th:last-child { padding-right: 18px; }
.tc-table tbody tr:last-child td { border-bottom: 0; }
.tc-table tbody tr { transition: background .1s; }
.tc-table tbody tr:hover td { background: var(--hover); }
.tc-table tr.is-link { cursor: pointer; }
.tc-table td strong { font-weight: 650; }
.tc-table td small, .tc-sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.tc-table .tc-col-actions { text-align: right; white-space: nowrap; }
.tc-table .tc-col-amount, .tc-table .tc-col-total, .tc-table .tc-col-value, .tc-table .tc-col-balance, .tc-num { text-align: right; white-space: nowrap; }
.tc-card > .tc-card__body > .tc-table-wrap { margin: -12px -18px -18px; }
.tc-card > .tc-card__body:first-child > .tc-table-wrap { margin-top: -18px; }
.tc-card--flush > .tc-card__body > .tc-table-wrap { margin: 0; }
.tc-card--flush > .tc-card__head + .tc-card__body .tc-table th { border-radius: 0; }
.tc-col-act { white-space: nowrap; text-align: right; }
.tc-col-act .tc-inline-form { display: inline-block; margin-left: 4px; }
@media (hover: hover) and (min-width: 961px) {
	.tc-table tbody td.tc-col-act > *, .tc-table tbody td.tc-col-actions > * { opacity: .45; transition: opacity .12s; }
	.tc-table tbody tr:hover td.tc-col-act > *, .tc-table tbody tr:hover td.tc-col-actions > *, .tc-table tbody tr:focus-within td.tc-col-act > *, .tc-table tbody tr:focus-within td.tc-col-actions > * { opacity: 1; }
}
.tc-list { list-style: none; margin: 0; padding: 0; }
.tc-list li { border-bottom: 1px solid var(--line); }
.tc-list li:last-child { border-bottom: 0; }
.tc-list a, .tc-list .tc-list__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.tc-list > li > a { margin: 0 -10px; padding: 10px; border-radius: var(--r-sm); transition: background .1s; }
.tc-list > li > a:hover { background: var(--hover); }
.tc-list a strong { font-weight: 650; }
.tc-list span { color: var(--muted); font-size: 12.5px; text-align: right; }
.tc-list .tc-icon { color: var(--muted); }
.tc-kv { margin: 0; display: grid; gap: 0; }
.tc-kv > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tc-kv > div:last-child { border-bottom: 0; }
.tc-kv dt { color: var(--muted); font-size: 13px; font-weight: 500; }
.tc-kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.tc-kv dd a { text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.tc-feed { list-style: none; margin: 0; padding: 0; }
.tc-feed li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: flex-start; }
.tc-feed li:last-child { border-bottom: 0; }
.tc-feed .tc-avatar { width: 26px; height: 26px; font-size: 10px; }
.tc-feed time { font-size: 12px; color: var(--faint); }
.tc-feed p { margin: 0; color: var(--ink-2); }
.tc-feed p strong { color: var(--ink); font-weight: 650; }
.tc-feed a { text-decoration: none; font-weight: 600; color: var(--ink); }
.tc-feed a:hover { text-decoration: underline; }

/* ---------- Badges, chips, avatars ---------- */
.tc-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 650; background: var(--panel); color: var(--ink-2); white-space: nowrap; line-height: 1; vertical-align: middle; }
.tc-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.tc-badge--ok, .tc-badge--paid, .tc-badge--active, .tc-badge--published, .tc-badge--accepted, .tc-badge--delivered, .tc-badge--confirmed, .tc-badge--sent, .tc-badge--done, .tc-badge--connected, .tc-badge--replied, .tc-badge--converted, .tc-badge--won, .tc-badge--complete, .tc-badge--completed { background: var(--ok-soft); color: var(--ok); }
.tc-badge--warn, .tc-badge--overdue, .tc-badge--pending, .tc-badge--draft, .tc-badge--scheduled, .tc-badge--paused, .tc-badge--awaiting, .tc-badge--in_progress, .tc-badge--approval, .tc-badge--opened, .tc-badge--partial { background: var(--warn-soft); color: var(--warn); }
.tc-badge--err, .tc-badge--failed, .tc-badge--declined, .tc-badge--cancelled, .tc-badge--lost, .tc-badge--unsubscribed, .tc-badge--expired { background: var(--err-soft); color: var(--err); }
.tc-badge--info, .tc-badge--publishing, .tc-badge--sending, .tc-badge--contacted, .tc-badge--booked, .tc-badge--researched { background: var(--info-soft); color: var(--info); }
.tc-badge--draft, .tc-badge--pending { background: var(--panel); color: var(--muted); }
.tc-badge--overdue { background: var(--err-soft); color: var(--err); }
.tc-badge--signal { background: var(--signal-soft); color: var(--signal); }
.tc-badge--dark { background: var(--ink); color: var(--paper); }
.tc-badge--dark::before { display: none; }
.tc-chips { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-bottom: 16px; padding: 3px; background: var(--panel); border-radius: 9px; max-width: 100%; }
.tc-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; transition: background .12s, color .12s; }
.tc-chip:hover { color: var(--ink); }
.tc-chip.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--ring); }
.tc-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--signal-soft); color: var(--signal); font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.tc-avatar--lg { width: 48px; height: 48px; font-size: 16px; border-radius: 12px; }
.tc-avatar--xl { width: 56px; height: 56px; font-size: 19px; border-radius: 14px; font-family: var(--display); }
.tc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); vertical-align: 1px; margin-right: 6px; flex: none; }

/* ---------- Forms ---------- */
.tc-form { display: grid; gap: 14px; }
.tc-form--narrow { max-width: 560px; }
.tc-form--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.tc-form--2 .tc-field--full, .tc-form--2 .tc-form__full { grid-column: 1 / -1; }
.tc-form--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.tc-form--3 .tc-field--full { grid-column: 1 / -1; }
.tc-field { display: grid; gap: 6px; min-width: 0; align-content: start; } /* 5.14: label, box, help stay together; boxes in a row line up */
.tc-field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tc-field label em { font-weight: 500; color: var(--faint); font-style: normal; }
.tc-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .tc-field select, .tc-field textarea, .tc-input, .tc-chanedit textarea, .tc-chat__form textarea { width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; font-size: 14px; }
.tc-field select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.tc-field input[type=file] { font-size: 13px; color: var(--muted); }
.tc-field input[type=file]::file-selector-button { margin-right: 10px; height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--panel); color: var(--ink); font-weight: 600; cursor: pointer; }
.tc-field textarea { resize: vertical; line-height: 1.5; }
.tc-field input:hover:not(:focus), .tc-field select:hover:not(:focus), .tc-field textarea:hover:not(:focus) { border-color: color-mix(in srgb, var(--line-2) 70%, var(--ink)); }
.tc-field input:focus, .tc-field select:focus, .tc-field textarea:focus, .tc-input:focus, .tc-chanedit textarea:focus, .tc-chat__form textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.tc-help { margin: 0; font-size: 12.5px; color: var(--muted); }
.tc-check, .tc-radio { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 550; cursor: pointer; font-size: 13.5px; }
.tc-check input, .tc-radio input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--signal); flex: none; }
.tc-checks, .tc-radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tc-radios { gap: 6px; }
.tc-radios .tc-radio { padding: 6px 11px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2) inset; align-items: center; }
.tc-radios .tc-radio input { margin-top: 0; }
.tc-radios .tc-radio:has(input:checked) { box-shadow: 0 0 0 1.5px var(--signal) inset; background: var(--signal-soft); }
.tc-money { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow-xs); }
.tc-money span { padding: 0 2px 0 11px; color: var(--muted); font-weight: 600; }
.tc-money input { border: 0 !important; box-shadow: none !important; padding-left: 2px !important; background: transparent !important; }
.tc-money:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.tc-fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0; }
.tc-fieldset legend { font-weight: 700; padding: 0 6px; font-size: 13px; }
.tc-form > .tc-btn, .tc-form > button.tc-btn { justify-self: start; }
.tc-form__foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.tc-search { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: var(--r); padding: 0 10px; min-width: 220px; height: 34px; box-shadow: 0 0 0 1px var(--line-2) inset, var(--shadow-xs); color: var(--faint); }
.tc-search:focus-within { box-shadow: 0 0 0 1px var(--signal) inset, 0 0 0 3px var(--signal-soft); }
.tc-search .tc-icon { width: 16px; height: 16px; }
.tc-search input { border: 0; outline: 0; height: 32px; background: transparent; width: 100%; color: var(--ink); font-size: 13.5px; }
.tc-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.tc-toolbar .tc-chips { margin: 0; }
.tc-toolbar select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.tc-toolbar select:focus, .tc-toolbar .tc-input:focus { outline: none; box-shadow: 0 0 0 1px var(--signal) inset, 0 0 0 3px var(--signal-soft); }
.tc-toolbar select, .tc-toolbar .tc-input { height: 34px; min-height: 34px; padding: 0 30px 0 11px; border: 0; border-radius: var(--r); background-color: var(--paper); box-shadow: 0 0 0 1px var(--line-2) inset, var(--shadow-xs); font-size: 13.5px; }
.tc-toolbar__right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.tc-rte { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); overflow: hidden; }
.tc-rte:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.tc-rte__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--subtle); }
.tc-rte__bar button { border: 0; background: transparent; padding: 4px 9px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tc-rte__bar button:hover, .tc-rte__bar button.is-on { background: var(--panel); color: var(--ink); }
.tc-rte__area { min-height: 220px; padding: 12px 14px; outline: none; overflow-wrap: anywhere; }
.tc-rte__area h3 { font-size: 17px; margin: .6em 0 .3em; }
.tc-rte__src { width: 100%; border: 0; padding: 12px; font-family: var(--mono); font-size: 13px; min-height: 220px; background: var(--paper); }

/* ---------- Slide-over panels (all <dialog class="tc-dialog">) ---------- */
.tc-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px, 100vw); height: 100vh; height: 100dvh; max-height: none; max-width: 100vw; border: 0; border-radius: 0; padding: 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.tc-dialog--wide { width: min(880px, 100vw); }
.tc-dialog[open] { display: flex; flex-direction: column; animation: tc-slide .26s var(--ease); }
.tc-dialog::backdrop { background: rgba(10, 10, 12, .38); backdrop-filter: blur(2px); animation: tc-fade .2s ease; }
@keyframes tc-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tc-fade { from { opacity: 0; } to { opacity: 1; } }
.tc-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 14px 0 22px; height: 60px; border-bottom: 1px solid var(--line); flex: none; background: var(--paper); }
.tc-dialog__head h2 { font-size: 16px; font-weight: 700; font-family: var(--text); }
.tc-dialog__body { padding: 20px 22px 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.tc-dialog__body::after { content: ""; display: block; height: 22px; }
.tc-dialog__foot { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; margin: 22px -22px -22px; padding: 14px 22px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }

/* ---------- Notices, toasts ---------- */
.tc-notice { display: block; padding: 11px 14px; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 16px; font-size: 13.5px; border: 0; box-shadow: inset 3px 0 0 currentColor; }
.tc-notice .tc-icon { width: 16px; height: 16px; vertical-align: -3px; }
.tc-notice--info { background: var(--info-soft); color: var(--info); }
.tc-notice--ok { background: var(--ok-soft); color: var(--ok); }
.tc-notice--warn { background: var(--warn-soft); color: var(--warn); }
.tc-notice--err { background: var(--err-soft); color: var(--err); }
.tc-notice strong, .tc-notice a { color: inherit; }
.tc-notice > * { color: var(--ink); }
.tc-notice { color: var(--ink); }
.tc-notice--info { box-shadow: inset 3px 0 0 var(--info); }
.tc-notice--ok { box-shadow: inset 3px 0 0 var(--ok); }
.tc-notice--warn { box-shadow: inset 3px 0 0 var(--warn); }
.tc-notice--err { box-shadow: inset 3px 0 0 var(--err); }
.tc-flash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: var(--r); margin-bottom: 14px; font-weight: 600; font-size: 13.5px; background: #17171a; color: #fff; }
.tc-flash--err { background: var(--err); }
.tc-flash__x { border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; opacity: .7; padding: 0 2px; }
.tc-flash__x:hover { opacity: 1; }
.tc-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 32px); }
.tc-toasts .tc-flash { pointer-events: auto; margin: 0; min-width: 260px; max-width: 420px; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset; animation: tc-toast .3s var(--ease); }
.tc-toasts .tc-flash::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: #2fbf71 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.tc-toasts .tc-flash--err::before { background: rgba(255, 255, 255, .22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17v.01'/%3E%3C/svg%3E") center / 12px no-repeat; }
.tc-toasts .tc-flash > span { flex: 1; }
.tc-toasts .tc-flash.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes tc-toast { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.tc-empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.tc-empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13l2.5-7h11L20 13'/%3E%3Cpath d='M4 13v6h16v-6h-5l-1 2h-4l-1-2z'/%3E%3C/svg%3E") center / 22px no-repeat; }
.tc-empty__title { font-weight: 700; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.tc-empty__text { font-size: 13px; max-width: 46ch; margin: 0 auto; }
.tc-card .tc-empty { padding: 18px 12px 14px; }
.tc-card .tc-empty::before { width: 36px; height: 36px; border-radius: 10px; background-size: 18px; margin-bottom: 10px; }
.tc-empty__cta { margin-top: 14px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Command palette ---------- */
.tc-pal { position: fixed; inset: 0; margin: 11vh auto auto; width: min(640px, calc(100vw - 24px)); max-height: 72vh; padding: 0; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg), 0 30px 80px -20px rgba(0, 0, 0, .45); overflow: hidden; }
.tc-pal[open] { display: flex; flex-direction: column; animation: tc-pop .16s var(--ease); }
.tc-pal::backdrop { background: rgba(10, 10, 12, .4); backdrop-filter: blur(3px); }
.tc-pal__input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); flex: none; color: var(--faint); }
.tc-pal__input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; height: 54px; color: var(--ink); }
.tc-pal__list { overflow-y: auto; padding: 6px; flex: 1; }
.tc-pal__group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.tc-pal__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; cursor: pointer; font-size: 14px; color: var(--ink); }
.tc-pal__item .tc-icon { width: 17px; height: 17px; color: var(--muted); flex: none; }
.tc-pal__item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-pal__item small { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.tc-pal__item.is-on { background: var(--hover); border-radius: 0 8px 8px 0; box-shadow: inset 3px 0 0 var(--signal); }
.tc-pal__item.is-on .tc-icon { color: var(--signal); }
.tc-pal__empty { padding: 28px; text-align: center; color: var(--muted); }
.tc-pal__foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); flex: none; background: var(--subtle); }
.tc-pal__foot span { display: inline-flex; align-items: center; gap: 5px; }
.tc-skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--panel), var(--hover), var(--panel)); background-size: 200% 100%; animation: tc-shimmer 1.2s linear infinite; }
@keyframes tc-shimmer { to { background-position: -200% 0; } }
.tc-keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; margin: 0; font-size: 13.5px; }
.tc-keys dt { display: flex; gap: 4px; }
.tc-keys dd { margin: 0; color: var(--ink-2); }

/* ---------- Record header (lead, client, prospect, invoice) ---------- */
.tc-rec { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px 0; margin-bottom: 18px; }
.tc-rec__top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tc-rec__main { flex: 1; min-width: 220px; }
.tc-rec__title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.tc-rec__title .tc-h1 { font-size: 22px; }
.tc-rec__sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.tc-rec__sub > span { display: inline-flex; align-items: center; gap: 5px; }
.tc-rec__sub .tc-icon { width: 14px; height: 14px; color: var(--faint); }
.tc-rec__sub a { text-decoration: none; }
.tc-rec__sub a:hover { color: var(--ink); text-decoration: underline; }
.tc-rec__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tc-rec__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 16px -20px 0; border-top: 1px solid var(--line); }
.tc-rec__facts > div { padding: 11px 20px 13px; border-right: 1px solid var(--line); min-width: 0; }
.tc-rec__facts > div:last-child { border-right: 0; }
.tc-rec__facts dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.tc-rec__facts dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tc-rec__facts dd.is-signal { color: var(--signal); }
.tc-rec__facts dd.is-err { color: var(--err); font-weight: 700; }
.tc-card--err { box-shadow: var(--shadow), inset 3px 0 0 var(--err); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tc-card--err .tc-card__title { color: var(--err); }
.tc-missed h3 { margin: 0 0 8px; font-size: 14px; }
.tc-missed + .tc-missed { border-top: 1px solid var(--line); padding-top: 14px; }
.tc-override { padding: 6px 0; }
.tc-override + .tc-override { border-top: 1px solid var(--line); }
.tc-list li.is-err > a strong { color: var(--err); }
.tc-rec__facts dd.is-ok { color: var(--ok); }
.tc-rec + .tc-tabs { margin-top: 0; }
.tc-rec__stages { display: flex; gap: 3px; margin: 14px 0 0; }
.tc-rec__stages button, .tc-rec__stages span { flex: 1; height: 30px; display: flex; align-items: center; justify-content: center; padding: 0 8px; border: 0; background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); transition: background .12s, color .12s; min-width: 0; }
.tc-rec__stages > :first-child { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.tc-rec__stages > :last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%); border-radius: 0 6px 6px 0; }
.tc-rec__stages button:hover { background: var(--line-2); color: var(--ink); }
.tc-rec__stages .is-past { background: color-mix(in srgb, var(--signal) 18%, var(--panel)); color: var(--ink-2); }
.tc-rec__stages .is-on { background: var(--signal); color: #fff; }
.tc-rec__stages .is-lost.is-on { background: var(--err); }
.tc-rec__stages .is-won.is-on { background: var(--ok); }
.tc-rec__stagesform { margin: 0 0 16px; }

/* ---------- Timeline ---------- */
.tc-timeline { list-style: none; margin: 0; padding: 4px 0 0; position: relative; }
.tc-event { display: flex; gap: 12px; padding: 0 0 18px; position: relative; }
.tc-event::before { content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--line); }
.tc-event:last-child { padding-bottom: 0; }
.tc-event:last-child::before { display: none; }
.tc-event__icon { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--paper); color: var(--muted); flex: none; box-shadow: 0 0 0 1px var(--line-2) inset; position: relative; z-index: 1; }
.tc-event__icon .tc-icon { width: 14px; height: 14px; }
.tc-event.is-signal .tc-event__icon { background: var(--signal-soft); color: var(--signal); box-shadow: none; }
.tc-event.is-ok .tc-event__icon { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.tc-event__main { min-width: 0; flex: 1; padding-top: 5px; }
.tc-event__title { margin: 0; font-weight: 650; font-size: 13.5px; }
.tc-event__body { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); background: var(--subtle); box-shadow: 0 0 0 1px var(--line) inset; padding: 9px 12px; border-radius: var(--r); white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-event__when { margin: 3px 0 0; font-size: 12px; color: var(--faint); }
.tc-composer { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 18px; }
.tc-composer textarea { flex: 1; min-height: 38px; max-height: 180px; resize: none; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); font-size: 13.5px; line-height: 1.45; }
.tc-composer textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }

/* ---------- Pipeline board ---------- */
.tc-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: start; }
.tc-col { background: var(--panel); border-radius: var(--r-lg); padding: 8px; min-height: 140px; transition: background .12s, box-shadow .12s; }
.tc-col__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 10px; }
.tc-col__name { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.tc-col__meta { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-col__name .tc-col__meta { display: inline-flex; min-width: 20px; height: 18px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 9px; background: var(--paper); margin-left: 4px; }
.tc-col__list { display: grid; gap: 8px; min-height: 40px; }
.tc-col.is-over { background: var(--signal-soft); box-shadow: 0 0 0 2px var(--signal-line) inset; }
.tc-lead { background: var(--paper); border-radius: 10px; padding: 11px 12px; cursor: grab; text-decoration: none; display: block; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.tc-lead:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); color: inherit; }
.tc-lead.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.tc-lead__name { font-weight: 700; font-size: 13.5px; display: block; }
.tc-lead__sub { font-size: 12.5px; color: var(--muted); display: block; margin-top: 2px; }
.tc-lead__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.tc-lead__foot > span:first-child { display: inline-flex; padding: 1px 7px; border-radius: 9px; background: var(--panel); font-weight: 600; }
.tc-lead__next { color: var(--signal); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.tc-lead__next .tc-icon { width: 13px; height: 13px; }

/* ---------- Dashboard pieces ---------- */
.tc-funnel { display: grid; gap: 8px; }
.tc-funnel__row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 92px; align-items: center; gap: 12px; text-decoration: none; padding: 3px 0; border-radius: 6px; }
.tc-funnel__row:hover .tc-funnel__name { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tc-funnel__name { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-funnel__track { height: 26px; border-radius: 6px; background: var(--subtle); position: relative; overflow: hidden; }
.tc-funnel__bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; min-width: 4px; opacity: .9; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-size: 12px; font-weight: 700; transition: width .6s var(--ease); }
.tc-funnel__num { text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-funnel__num strong { color: var(--ink); font-size: 13.5px; margin-right: 4px; }
.tc-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 8px 0 0; border-bottom: 1px solid var(--line); position: relative; }
.tc-chart::before { content: ""; position: absolute; inset: 0 0 0 0; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); opacity: .7; pointer-events: none; }
.tc-chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; z-index: 1; min-width: 0; }
.tc-chart__bar { width: min(36px, 70%); border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--signal) 30%, var(--panel)); min-height: 3px; position: relative; transition: background .12s; }
.tc-chart__col.is-now .tc-chart__bar { background: var(--signal); }
.tc-chart__col:hover .tc-chart__bar { background: color-mix(in srgb, var(--signal) 70%, var(--panel)); }
.tc-chart__val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tc-chart__labels { display: flex; gap: 10px; padding-top: 6px; }
.tc-chart__labels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.tc-chart__labels span.is-now { color: var(--ink); }
.tc-agenda { list-style: none; margin: 0; padding: 0; position: relative; }
.tc-agenda li { display: grid; grid-template-columns: 54px 14px minmax(0, 1fr); gap: 10px; align-items: start; padding: 0 0 14px; position: relative; }
.tc-agenda li:last-child { padding-bottom: 0; }
.tc-agenda li::before { content: ""; position: absolute; left: 70px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.tc-agenda li:last-child::before { display: none; }
.tc-agenda time { font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding-top: 1px; text-align: right; }
.tc-agenda i { width: 10px; height: 10px; margin: 5px 2px 0; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--line-2); position: relative; z-index: 1; }
.tc-agenda .is-call i { box-shadow: 0 0 0 2px var(--signal); background: var(--signal); }
.tc-agenda .is-meeting i { box-shadow: 0 0 0 2px var(--info); background: var(--info); }
.tc-agenda .is-task i { box-shadow: 0 0 0 2px var(--line-2); }
.tc-agenda .is-past { opacity: .5; }
.tc-agenda a, .tc-agenda div { text-decoration: none; min-width: 0; }
.tc-agenda strong { display: block; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-agenda a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.tc-agenda small { display: block; color: var(--muted); font-size: 12.5px; }
.tc-agenda__now { height: 0; border-top: 2px dashed var(--signal); margin: -6px 0 10px 64px; position: relative; }
.tc-agenda__now::before { content: "Now"; position: absolute; left: -64px; top: -9px; width: 54px; text-align: right; font-size: 11px; font-weight: 800; color: var(--signal); }
.tc-todo { list-style: none; margin: 0; padding: 0; }
.tc-todo li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tc-todo li:last-child { border-bottom: 0; }
.tc-todo__icon { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--muted); flex: none; }
.tc-todo__icon .tc-icon { width: 15px; height: 15px; }
.tc-todo a { flex: 1; min-width: 0; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.tc-todo a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.tc-todo strong { display: block; font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-todo small { display: block; color: var(--muted); font-size: 12.5px; }
.tc-todo .tc-icon.is-arrow { width: 15px; height: 15px; color: var(--faint); margin-left: auto; }

/* Tasks */
.tc-tasks { list-style: none; margin: 0; padding: 0; }
.tc-task { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); transition: opacity .2s; }
.tc-task:last-child { border-bottom: 0; }
.tc-task__tick { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--paper); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: transparent; transition: border-color .12s, background .12s, color .12s; }
.tc-task__tick .tc-icon { width: 13px; height: 13px; }
.tc-task__tick:hover { border-color: var(--ok); color: var(--ok); }
.tc-task.is-done .tc-task__tick, .tc-task.is-ticking .tc-task__tick { background: var(--ok); border-color: var(--ok); color: #fff; cursor: default; }
.tc-task.is-ticking { opacity: .5; }
.tc-task__main { flex: 1; min-width: 0; }
.tc-task__main strong { display: block; font-weight: 600; font-size: 13.5px; }
.tc-task.is-done .tc-task__main strong { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.tc-task__main small { display: block; color: var(--muted); font-size: 12.5px; }
.tc-task__meta { text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tc-task__meta .is-late { color: var(--signal); font-weight: 700; }

/* ---------- Media grid, thumbs ---------- */
.tc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tc-tile { position: relative; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.tc-tile:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); color: inherit; }
.tc-tile__img { aspect-ratio: 4 / 3; background: var(--subtle); display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.tc-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tc-tile__body { padding: 9px 12px 11px; font-size: 13px; }
.tc-tile__body strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.tc-tile__body small { color: var(--muted); }
.tc-tile input[type=checkbox] { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; accent-color: var(--signal); }
.tc-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r); background: var(--panel); display: inline-flex; align-items: center; justify-content: center; flex-direction: column; flex: none; }
.tc-thumb--icon small { font-size: 9px; font-weight: 800; color: var(--muted); }
.tc-tile__img .tc-thumb { width: 64px; height: 64px; }
.tc-file { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tc-file:last-child { border-bottom: 0; }
.tc-file__main { flex: 1; min-width: 0; }
.tc-file__main a { font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.tc-file__main a:hover { text-decoration: underline; }
.tc-file__main small { display: block; color: var(--muted); font-size: 12.5px; }
.tc-drop { position: relative; display: block; cursor: pointer; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 24px; text-align: center; color: var(--muted); background: var(--subtle); transition: border-color .12s, background .12s; }
.tc-drop:hover { border-color: color-mix(in srgb, var(--line-2) 50%, var(--ink)); }
.tc-drop.is-over { border-color: var(--signal); background: var(--signal-soft); color: var(--ink); }
.tc-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.tc-drop__note { display: block; margin-top: 4px; font-size: 12px; color: var(--faint); }
.tc-drop.has-files { border-color: var(--ok); background: var(--ok-soft); color: var(--ink); }
.tc-drop:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }
.tc-drop [data-drop-label] { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Progress, misc ---------- */
.tc-progress { height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.tc-progress span { display: block; height: 100%; background: var(--signal); border-radius: 3px; }
.tc-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel); gap: 2px; }
.tc-bar span { display: block; height: 100%; }
.tc-muted { color: var(--muted); }
.tc-small { font-size: 12.5px; }
.tc-mono { font-family: var(--mono); font-size: 12.5px; }
.tc-right { text-align: right; }
.tc-nowrap { white-space: nowrap; }
.tc-mt { margin-top: 14px; }
.tc-mb0 { margin-bottom: 0; }
.tc-split { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-prose { max-width: 760px; font-size: 14.5px; line-height: 1.7; }
.tc-prose h2, .tc-prose h3 { margin: 1.3em 0 .45em; font-size: 18px; }
.tc-prose ul, .tc-prose ol { padding-left: 1.3em; }
.tc-prose img { height: auto; border-radius: var(--r); }
.tc-prose a { color: var(--signal); }
.tc-copyfield { display: flex; gap: 6px; }
.tc-copyfield input { flex: 1; font-family: var(--mono); font-size: 12.5px; }
.tc-copyfield--plain input { font-family: inherit; font-size: 14px; }
.tc-secret { font-family: var(--mono); letter-spacing: .06em; }
.tc-secret.is-shown { color: var(--ink); background: var(--warn-soft); padding: 1px 6px; border-radius: 5px; }
.tc-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; }
.tc-steps li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--faint); }
.tc-steps li::after { content: ""; width: 18px; height: 2px; border-radius: 0; background: var(--line-2); margin-left: 4px; }
.tc-steps li:last-child::after { display: none; }
.tc-steps li span { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1.5px currentColor inset; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.tc-steps li.is-done { color: var(--ok); }
.tc-steps li.is-done span { background: var(--ok-soft); box-shadow: none; }
.tc-steps li.is-on { color: var(--ink); }
.tc-steps li.is-on span { background: var(--signal); color: #fff; box-shadow: none; }
.tc-steps li.is-miss { color: var(--err); }
.tc-steps li.is-miss span { background: var(--err); color: #fff; box-shadow: none; font-weight: 800; }
.tc-steps li.is-over span { background: var(--ok-soft); box-shadow: 0 0 0 1.5px var(--ok) inset; }
.tc-steps li em { font-style: normal; font-weight: 500; color: var(--muted); }
.tc-steps li.is-skip { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.tc-steps--mini { margin: 0; }
.tc-steps--mini li { font-size: 12px; }
.tc-steps--mini li.is-on { color: var(--signal); }
.tc-pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.tc-pager span { margin-right: auto; }
.tc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.tc-cal__h { padding: 8px 10px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--subtle); }
.tc-cal__d { position: relative; min-height: 110px; padding: 6px; background: var(--paper); font-size: 12px; }
.tc-cal__d.is-out, .tc-cal__d.is-blank { background: var(--subtle); color: var(--faint); }
.tc-cal__d.is-today .tc-cal__n { background: var(--signal); color: #fff; }
.tc-cal__n { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.tc-cal__e { display: block; padding: 3px 7px; margin-bottom: 3px; border-radius: 0 5px 5px 0; background: var(--panel); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; box-shadow: inset 3px 0 0 var(--ink-2); }
.tc-cal__e:hover { filter: brightness(.97); }
.tc-cal__e.is-booking { box-shadow: inset 3px 0 0 var(--signal); background: var(--signal-soft); }
.tc-cal__e.is-post { box-shadow: inset 3px 0 0 var(--info); background: var(--info-soft); }
.tc-cal__e--published { box-shadow: inset 3px 0 0 var(--ok); background: var(--ok-soft); }
.tc-cal__e--scheduled { box-shadow: inset 3px 0 0 var(--info); background: var(--info-soft); }
.tc-cal__e--approval, .tc-cal__e--draft { box-shadow: inset 3px 0 0 var(--warn); background: var(--warn-soft); }
.tc-cal__e--failed, .tc-cal__e--partial { box-shadow: inset 3px 0 0 var(--err); background: var(--err-soft); }
.tc-cal__add { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 6px; display: none; align-items: center; justify-content: center; text-decoration: none; background: var(--ink); color: var(--paper); font-weight: 800; line-height: 1; }
.tc-cal__d:hover .tc-cal__add, .tc-cal__add:focus { display: inline-flex; }
.tc-chat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 420px; }
.tc-chat__log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tc-msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px; }
.tc-msg--user { align-self: flex-end; background: var(--btn); color: var(--btn-ink); border-bottom-right-radius: 4px; }
.tc-msg--assistant { align-self: flex-start; background: var(--subtle); box-shadow: 0 0 0 1px var(--line) inset; border-bottom-left-radius: 4px; }
.tc-msg--busy { color: var(--muted); font-style: italic; }
.tc-chat__form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.tc-chat__form textarea { min-height: 46px; max-height: 200px; resize: none; padding: 11px 13px; }
.tc-chat__tools { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.tc-chat__tools .tc-check { margin-right: auto; font-size: 13px; }
.tc-chat__hello { margin: auto; max-width: 480px; text-align: left; color: var(--muted); }
.tc-chat__hello .tc-h3 { color: var(--ink); font-size: 19px; font-family: var(--display); }
.tc-figure { font-weight: 750; font-size: 32px; letter-spacing: -0.03em; line-height: 1.05; }
.tc-figure--signal { color: var(--signal); }
.tc-report { background: var(--paper); box-shadow: var(--shadow); border-radius: var(--r-lg); padding: 36px; max-width: 860px; }
.tc-report h1 { font-size: 27px; margin-bottom: 6px; font-family: var(--display); }
.tc-report h2 { font-size: 18px; margin: 26px 0 10px; }
.tc-h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.tc-err { color: var(--err); }
.tc-list--plain li { padding: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-actions--stack { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-crumbs { font-size: 13.5px; color: var(--muted); }
.tc-crumbs a { font-weight: 650; text-decoration: none; color: var(--ink-2); }
.tc-crumbs a:hover { text-decoration: underline; }
.tc-icon-btn--sm { width: 28px; height: 28px; }
.tc-icon-btn--sm .tc-icon { width: 15px; height: 15px; }

/* ---------- Social ---------- */
.tc-tiles--posts { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tc-tile__img--text { padding: 14px; font-size: 13px; line-height: 1.45; color: var(--muted); align-items: flex-start; justify-content: flex-start; text-align: left; }
.tc-tile__img--icon .tc-icon { width: 40px; height: 40px; color: var(--faint); }
.tc-tile--folder .tc-tile__img { aspect-ratio: 5 / 3; }
.tc-tile--folder .tc-tile__img--icon .tc-icon { color: var(--signal); opacity: .8; }
.tc-tile__body small .tc-badge { margin-right: 4px; }
.tc-chans { display: flex; gap: 4px; margin-top: 6px; }
.tc-chan { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--muted); }
.tc-chan .tc-icon { width: 13px; height: 13px; }
.tc-chan--published { background: var(--ok-soft); color: var(--ok); }
.tc-chan--failed { background: var(--err-soft); color: var(--err); }
.tc-chan--manual { background: var(--warn-soft); color: var(--warn); }
.tc-chan--skipped { display: none; }
.tc-chanedit { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.tc-chanedit:first-child { padding-top: 0; }
.tc-chanedit:last-child { border-bottom: 0; padding-bottom: 0; }
.tc-chanedit .tc-check span { display: inline-flex; align-items: center; gap: 6px; }
.tc-chanedit.is-off { opacity: .55; }
.tc-media-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.tc-media-pick__item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; text-decoration: none; }
.tc-media-pick__item .tc-thumb { width: 96px; height: 96px; }
.tc-chanstatus { list-style: none; margin: 0; padding: 0; }
.tc-chanstatus__row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tc-chanstatus__row:last-child { border-bottom: 0; }
.tc-chanstatus__name { margin: 0 0 6px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tc-chanstatus__row .tc-small { margin: 6px 0 0; }

/* ---------- Files, office ---------- */
.tc-preview { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: var(--r); background: #111; }
.tc-preview--doc { width: 100%; height: 70vh; border: 0; background: #fff; }
.tc-card--preview .tc-card__body { padding: 12px; background: var(--subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.tc-files { list-style: none; margin: 0; padding: 0; }
.tc-tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.tc-tree a { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; text-decoration: none; font-weight: 550; font-size: 13.5px; color: var(--ink-2); }
.tc-tree a:hover { background: var(--hover); color: var(--ink); }
.tc-tree a.is-on { background: var(--signal-soft); color: var(--ink); font-weight: 650; }
.tc-tree a.is-on .tc-icon { color: var(--signal); }
.tc-tree a .tc-icon { width: 16px; height: 16px; flex: none; color: var(--muted); }
.tc-list small { display: block; color: var(--faint); font-size: 12px; white-space: nowrap; }
.tc-list a span { flex: 1; text-align: left; }

/* ---------- Team ---------- */
.tc-thoughts { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tc-thought { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.tc-thought header { display: flex; align-items: center; gap: 10px; }
.tc-thought header small { display: block; color: var(--muted); font-size: 12px; }
.tc-thought dl { margin: 0; }
.tc-thought dt { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); margin-top: 10px; }
.tc-thought dd { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.tc-thought dd p { margin: 0 0 6px; }
.tc-thought footer { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tc-hr { border-radius: var(--r); padding: 10px 14px; margin-bottom: 8px; background: var(--paper); box-shadow: var(--shadow); }
.tc-hr summary { cursor: pointer; font-weight: 600; }
.tc-table td .tc-avatar { vertical-align: middle; margin-right: 8px; }

/* ---------- AI ---------- */
.tc-grid--chat .tc-card { margin-bottom: 0; }
.tc-grid--chat .tc-chat { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.tc-convs { list-style: none; margin: 0; padding: 6px; max-height: calc(100vh - 280px); overflow-y: auto; }
.tc-convs a { display: block; padding: 8px 10px; border-radius: 7px; text-decoration: none; font-size: 13.5px; font-weight: 600; }
.tc-convs a span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-convs a small { color: var(--faint); font-size: 12px; font-weight: 500; }
.tc-convs a:hover { background: var(--hover); }
.tc-convs a.is-on { background: var(--signal-soft); }
.tc-convs a.is-on small { color: var(--muted); }
.tc-convs .tc-icon { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- Sign-in ---------- */
.tc-auth { min-height: 100vh; display: block; background: var(--bg); background-image: radial-gradient(1200px 500px at 50% -10%, var(--signal-soft), transparent 70%); }
.tc-auth__wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.tc-auth__box { width: min(400px, 100%); background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 0 30px 28px; overflow: hidden; }
.tc-auth__brand { margin: 0 -30px 26px; padding: 20px 30px; background: #131315; }
.tc-auth__brand .tc-brand--auth { margin: 0; }
.tc-auth__brand .tc-brand__name { color: #fff; }
.tc-auth__box > .tc-h1:first-child { margin-top: 30px; }
.tc-auth__box .tc-h1 { margin-bottom: 6px; font-size: 24px; }
.tc-brand--auth { padding: 0; margin: 0 0 26px; gap: 10px; }
.tc-brand--auth .tc-brand__name { color: #fff; font-size: 15px; }
.tc-brand--auth .tc-brand__app { color: var(--signal); }
.tc-auth__text { color: var(--muted); margin-bottom: 18px; }
.tc-auth__err { color: var(--err); font-weight: 650; margin: 0; padding: 9px 12px; background: var(--err-soft); border-radius: var(--r); font-size: 13.5px; }
.tc-auth__ok { color: var(--ok); font-weight: 650; margin: 0; padding: 9px 12px; background: var(--ok-soft); border-radius: var(--r); font-size: 13.5px; }
.tc-auth__small { font-size: 13px; text-align: center; margin: 4px 0 0; color: var(--muted); }
.tc-auth .tc-btn { width: 100%; height: 40px; }
.tc-auth .tc-linklike { justify-self: center; font-size: 13px; }
.tc-auth__box--wide { max-width: 860px; width: 100%; }
.tc-auth__box--wide .tc-btn { width: auto; }

/* Client portal page (public, no sidebar). */
.tc-portal { background: var(--bg); }
.tc-portal .tc-top { background: var(--paper); padding: 0 24px; }
.tc-portal .tc-brand__name { color: var(--ink); }
.tc-portal .tc-main { max-width: 1080px; }

/* ---------- Small buttons inside dense lists ---------- */
.tc-thought footer .tc-btn, .tc-col-act .tc-btn, .tc-list--plain .tc-btn, .tc-table .tc-btn { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.tc-list .tc-btn span { color: inherit; font-size: inherit; text-align: inherit; }
.tc-list .tc-btn .tc-icon { color: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
	.tc-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tc-grid--main { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
	.tc-grid--main { grid-template-columns: minmax(0, 1fr); }
	.tc-top__crumb { display: none; }
}
@media (max-width: 960px) {
	.tc-shell, .tc-collapsed .tc-shell { grid-template-columns: minmax(0, 1fr); }
	.tc-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; height: 100%; z-index: 60; transform: translateX(-100%); transition: transform .24s var(--ease); box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
	.tc-collapsed .tc-brand__words, .tc-collapsed .tc-nav__group, .tc-collapsed .tc-nav__link > span, .tc-collapsed .tc-me > span:last-child, .tc-collapsed .tc-side__foot > .tc-icon-btn { display: revert; }
	.tc-collapsed .tc-nav__link { justify-content: flex-start; padding: 0 10px; }
	.tc-collapsed .tc-nav__badge { position: static; }
	.tc-collapsed .tc-side__top { padding: 0 12px 0 14px; justify-content: flex-start; }
	.tc-collapsed .tc-me { flex: 1; }
	.tc-side-open .tc-side { transform: none; }
	.tc-side-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 10, 12, .45); z-index: 50; animation: tc-fade .2s; }
	.tc-top { padding: 0 12px; }
	.tc-top__search { flex: 1 1 auto; margin-left: 4px; }
	.tc-main { padding: 20px 16px 56px; }
	.tc-grid--2, .tc-grid--3, .tc-grid--side, .tc-grid--chat { grid-template-columns: minmax(0, 1fr); }
	.tc-form--2, .tc-form--3 { grid-template-columns: minmax(0, 1fr); }
	.tc-rec__stages { overflow-x: auto; }
	.tc-rec__stages button, .tc-rec__stages span { min-width: 92px; }
}
@media (max-width: 640px) {
	.tc-grid--4 { grid-template-columns: minmax(0, 1fr); }
	.tc-top__search .tc-kbd, .tc-top__search input::placeholder { display: none; color: transparent; }
	.tc-top__search { flex: 0 0 34px; width: 34px; padding: 0; justify-content: center; margin-left: auto; box-shadow: none; background: transparent; }
	.tc-top__search input { position: absolute; width: 1px; opacity: 0; pointer-events: none; }
	.tc-top__search .tc-icon { width: 18px; height: 18px; color: var(--muted); }
	.tc-h1 { font-size: 21px; }
	.tc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.tc-stat__value { font-size: 21px; }
	.tc-stat__spark { display: none; }
	.tc-kv > div { grid-template-columns: 1fr; gap: 2px; }
	.tc-table thead { display: none; }
	.tc-table, .tc-table tbody, .tc-table tr, .tc-table td { display: block; width: 100%; }
	.tc-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
	.tc-table tbody tr:last-child { border-bottom: 0; }
	.tc-table td { border: 0; padding: 3px 16px !important; text-align: left !important; }
	.tc-table td:empty { display: none; }
	.tc-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
	.tc-table td.tc-col-act::before, .tc-table td.tc-col-actions::before { display: none; }
	.tc-table .tc-col-actions { text-align: left; }
	.tc-head__actions { width: 100%; }
	.tc-cal { grid-template-columns: 1fr; }
	.tc-cal__h { display: none; }
	.tc-cal__d { min-height: 0; }
	.tc-cal__d.is-out { display: none; }
	.tc-msg { max-width: 94%; }
	.tc-thoughts { grid-template-columns: 1fr; }
	.tc-chat { height: calc(100vh - 170px); }
	.tc-funnel__row { grid-template-columns: 96px minmax(0, 1fr) 64px; gap: 8px; }
	.tc-rec__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tc-rec__facts > div:nth-child(2n) { border-right: 0; }
	.tc-rec__facts > div { border-bottom: 1px solid var(--line); }
	.tc-toasts { right: 12px; left: 12px; bottom: 12px; align-items: stretch; }
	.tc-toasts .tc-flash { max-width: none; min-width: 0; }
	.tc-dialog { width: 100vw; }
	.tc-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.tc-quick summary span { display: none; }
	.tc-quick summary { width: 34px; padding: 0; }
	.tc-top__right .tc-theme-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Print (reports, invoices) ---------- */
@media print {
	.tc-side, .tc-top, .tc-tabs, .tc-head__actions, .tc-rec__actions, .tc-flash, .tc-toasts, .tc-noprint, .tc-loadbar { display: none !important; }
	.tc-shell { display: block; }
	.tc-main { padding: 0; max-width: none; }
	body { background: #fff; }
	.tc-card, .tc-report, .tc-rec { box-shadow: none; border: 0; }
}

/* ---------- Assistant bubble + panel ---------- */
.tc-fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: 52px; height: 52px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--signal); color: #fff; cursor: pointer; box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--signal) 60%, transparent), 0 2px 6px rgba(0, 0, 0, .15); transition: transform .15s var(--ease), box-shadow .15s; }
.tc-fab:hover { transform: translateY(-2px) scale(1.04); }
.tc-fab .tc-icon { width: 24px; height: 24px; }
.tc-assist-open .tc-fab { transform: scale(0); pointer-events: none; }
.tc-assist { position: fixed; top: 0; right: 0; bottom: 0; z-index: 65; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--shadow-lg); transform: translateX(104%); transition: transform .25s var(--ease); }
.tc-assist.is-open { transform: none; }
.tc-assist__head { display: flex; align-items: center; gap: 2px; height: var(--top); padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.tc-assist__title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-right: auto; }
.tc-assist__title .tc-icon { color: var(--signal); }
.tc-chat--panel { flex: 1; height: auto; min-height: 0; }
.tc-chat--panel .tc-chat__log { padding: 16px; }
.tc-chat--panel .tc-msg { max-width: 90%; font-size: 13.5px; }
.tc-chat--panel .tc-chat__hello { margin: 8px 0; }
.tc-chat__hello .tc-linklike { text-align: left; font-weight: 500; text-decoration: none; color: var(--ink-2); padding: 8px 10px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line) inset; width: 100%; display: block; }
.tc-chat__hello .tc-linklike:hover { background: var(--hover); color: var(--ink); }
.tc-chat__hello .tc-list--plain li { padding: 4px 0; border: 0; }
.tc-msg--err { color: var(--err); background: var(--err-soft); box-shadow: none; }
.tc-msg--busy::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: tc-dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes tc-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.tc-acts { align-self: flex-start; display: grid; gap: 4px; max-width: 90%; margin-top: -6px; }
.tc-act { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r); background: var(--ok-soft); color: var(--ink); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.tc-act .tc-icon { width: 14px; height: 14px; color: var(--ok); flex: none; }
.tc-act .tc-icon:last-child { color: var(--muted); margin-left: auto; }
a.tc-act:hover { box-shadow: 0 0 0 1px var(--ok) inset; color: var(--ink); }
.tc-act span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-toasts { bottom: 86px; }
@media (min-width: 1280px) {
	.tc-assist-open .tc-main-wrap { margin-right: 420px; }
	.tc-assist { box-shadow: -1px 0 0 var(--line), var(--shadow-lg); }
}
@media (max-width: 640px) {
	.tc-fab { right: 14px; bottom: 14px; width: 48px; height: 48px; }
	.tc-toasts { bottom: 72px; }
}
@media print { .tc-fab, .tc-assist { display: none !important; } }

/* ---------- Pay online (client portal) ---------- */
.tc-pay .tc-split { align-items: flex-start; }
.tc-pay__buttons { width: min(320px, 100%); min-height: 50px; }
.tc-pay__msg { margin: 10px 0 0; font-weight: 650; }
.tc-pay__msg.is-ok { color: var(--ok); }
.tc-pay__msg.is-err { color: var(--err); }
@media print { .tc-pay { display: none !important; } }
.tc-pay { max-width: 860px; }

/* ---------- 4.4: agreements, signing, sign-off, checklist ---------- */
.tc-agr { position: relative; }
.tc-agr__logo { height: 28px; width: auto; display: block; margin-bottom: 18px; }
.tc-agr h3 { font-size: 14px; margin: 18px 0 6px; }
.tc-agr ul { margin: 0 0 .7em; padding-left: 20px; }
.tc-agr li { margin: 3px 0; }
.tc-agr__facts { margin: 8px 0 6px; }
.tc-agr .tc-table tr.is-total td { border-top: 1.5px solid var(--ink); }
.tc-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 10px; }
.tc-sig__label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.tc-sig__line { min-height: 64px; border-bottom: 1.5px solid var(--ink-2); display: flex; align-items: flex-end; padding: 0 2px 4px; margin-bottom: 8px; color: #1b2550; }
:root[data-theme="dark"] .tc-sig__line { color: #c9d3ff; }
.tc-sig__typed { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive; font-size: 30px; line-height: 1.1; }
.tc-sig__mark { display: block; width: 92px; height: 69px; margin-bottom: -6px; }
.tc-sig__img { max-height: 60px; width: auto; display: block; }
.tc-sig--preview { max-width: 260px; margin-top: 6px; }
.tc-agr__sec { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 8px; }
.tc-clause { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); margin: 0 0 8px; }
.tc-clause > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 14px; font-weight: 600; }
.tc-clause > summary::-webkit-details-marker { display: none; }
.tc-clause > summary::before { content: "›"; color: var(--faint); transition: transform .15s; margin-right: 2px; }
.tc-clause[open] > summary::before { transform: rotate(90deg); }
.tc-clause > summary > span:first-of-type { flex: 1; }
.tc-clause > .tc-form { padding: 4px 14px 14px; }
.tc-clause__badges { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tc-clause.is-off > summary { color: var(--faint); text-decoration: line-through; }
.tc-clause--new > summary { color: var(--muted); font-weight: 500; }
.tc-agr__care { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.tc-agr__care legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.tc-radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); cursor: pointer; }
.tc-radio-card input { margin-top: 3px; accent-color: var(--signal); }
/* The chosen option gets the same straight teal line as other highlights. */
.tc-radio-card:has(input:checked) { border-color: var(--signal-line); border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: inset 3px 0 0 var(--signal); }
.tc-agr__oneoff { display: none; padding: 12px 14px; background: var(--warn-soft); border-radius: var(--r); }
.tc-agr__care:has(input[data-oneoff]:checked) .tc-agr__oneoff { display: grid; gap: 10px; }
.tc-code { font-size: 22px; letter-spacing: .35em; font-family: var(--mono); max-width: 220px; text-align: center; }
.tc-sigpad { position: relative; border: 1px dashed var(--line-2); border-radius: var(--r); background: #fff; }
.tc-sigpad canvas { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; }
.tc-sigpad [data-sigpad-clear] { position: absolute; right: 8px; top: 8px; }
.tc-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tc-check-item { display: flex; gap: 10px; align-items: flex-start; }
.tc-check-item.is-done > span:last-child { color: var(--muted); text-decoration: line-through; }
.tc-check-item.is-done .tc-task__tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.tc-check-item .tc-inline-form { display: inline-flex; }
@media (max-width: 640px) { .tc-sigs { grid-template-columns: 1fr; } }
@media print { #sign, .tc-agr__care { display: none !important; } }
#sign { max-width: 860px; }
.tc-task__go { color: var(--muted); text-decoration: none; } .tc-task__go:hover { border-color: var(--signal); color: var(--signal); } .tc-task__go .tc-icon { width: 12px; height: 12px; }
.tc-tl-edit { margin-top: 6px; } .tc-tl-edit > summary { color: var(--faint); }

/* ---------- 4.6: plain-words help, next step, progress ---------- */
.tc-q { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin: 0 0 0 5px; padding: 0; border: 0; border-radius: 50%; background: var(--panel); color: var(--muted); font: 800 10.5px/1 var(--text); cursor: help; vertical-align: 1px; flex: none; text-transform: none; letter-spacing: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.tc-q:hover, .tc-q:focus-visible, .tc-q[aria-describedby] { background: var(--ink); color: var(--paper); box-shadow: none; }
.tc-qpop { position: fixed; z-index: 300; max-width: min(300px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 500; line-height: 1.45; text-align: left; white-space: normal; box-shadow: var(--shadow-lg); pointer-events: none; }
.tc-explain { margin: 0 0 18px; border-radius: var(--r-lg); background: var(--info-soft); }
.tc-explain > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 700; font-size: 13.5px; color: var(--info); }
.tc-explain > summary::-webkit-details-marker { display: none; }
.tc-explain > summary .tc-icon { width: 17px; height: 17px; }
.tc-explain__toggle { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.tc-explain__toggle::after { content: "Show"; }
.tc-explain[open] .tc-explain__toggle::after { content: "Hide"; }
.tc-explain__body { padding: 0 16px 14px 39px; font-size: 13.5px; line-height: 1.55; color: var(--ink); max-width: 860px; }
.tc-explain__body p { margin: 0 0 .6em; }
.tc-explain__body ol, .tc-explain__body ul { margin: 0 0 .7em; padding-left: 18px; }
.tc-explain__body li { margin: 3px 0; }
.tc-explain:not([open]) { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.tc-explain:not([open]) > summary { padding: 7px 14px; font-size: 13px; color: var(--muted); }
.tc-next { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 14px 18px; margin: 0 0 18px; border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--paper); box-shadow: var(--shadow), inset 3px 0 0 var(--signal); }
.tc-next__text { flex: 1 1 300px; min-width: 0; }
.tc-next__label { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--signal); }
.tc-next__text p { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.tc-next__text p small { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; color: var(--muted); }
.tc-next__do { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tc-next__do .tc-inline-form { display: inline-flex; }
.tc-next--wait .tc-next__label { color: var(--info); }
.tc-next--done .tc-next__label { color: var(--ok); }
.tc-next--warn .tc-next__label { color: var(--err); }
.tc-steps--page { margin: 2px 0 16px; }
.tc-card__title .tc-q { vertical-align: 0; }
.tc-table th .tc-q { width: 15px; height: 15px; font-size: 9.5px; margin-left: 4px; }
.tc-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
@media print { .tc-q, .tc-explain, .tc-next { display: none !important; } }
.tc-table th.tc-num { text-align: right; }
.tc-today { list-style: none; margin: 0; padding: 0; }
.tc-today__item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tc-today__item:first-child { border-top: 0; padding-top: 0; }
.tc-today__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel); color: var(--ink-2); }
.tc-today__icon .tc-icon { width: 15px; height: 15px; }
.tc-today__item p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; }
.tc-today__do { flex: none; display: flex; gap: 6px; }
.tc-today__do .tc-btn { height: 30px; padding: 0 12px; font-size: 13px; }
.tc-today__item.is-warn .tc-today__icon { background: var(--err-soft); color: var(--err); }
.tc-today__item.is-wait .tc-today__icon { background: var(--info-soft); color: var(--info); }
.tc-today__wait { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.tc-today__wait > summary { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.tc-today__wait .tc-today__item:first-child { padding-top: 6px; }
@media (max-width: 640px) { .tc-today__item { flex-wrap: wrap; } .tc-today__do { margin-left: 42px; } }
/* Stage bar: every stage readable; scrolls sideways when there are many. */
.tc-rec__stages { position: relative; overflow-x: auto; padding-bottom: 2px; }
.tc-rec__stages button, .tc-rec__stages span { flex: 1 0 auto; padding: 0 14px 0 17px; overflow: visible; text-overflow: clip; }
/* Phones and tablets: the sidebar slides in, so the shell has no dark sidebar column behind the page. */
@media (max-width: 960px) { .tc-shell, .tc-collapsed .tc-shell { background: var(--bg); } }
@media (max-width: 640px) {
	.tc-next { padding: 14px; gap: 10px; }
	.tc-next__text p { font-size: 14.5px; }
	.tc-next__do { width: 100%; }
	.tc-explain__body { padding-left: 16px; }
	.tc-today__item { gap: 10px; }
	.tc-today__do { margin-left: 40px; }
}
@media (max-width: 960px) { .tc-side { box-shadow: none; } .tc-side-open .tc-side { box-shadow: 0 0 60px rgba(0, 0, 0, .35); } }
@media (max-width: 640px) { .tc-today__item p { flex: 1 1 calc(100% - 50px); } .tc-today__do { margin-left: 40px; } }
/* Buttons inside lists keep their own shape (list links are padded rows). */
.tc-list a.tc-btn { display: inline-flex; justify-content: center; padding: 0 13px; margin: 0; flex: none; }
.tc-list .tc-btn span { flex: none; color: inherit; font-size: inherit; text-align: center; }
.tc-list .tc-btn--ghost:hover { background: var(--hover); }

/* ---------- 4.6.1: brand scrollbars, time back, the call page ---------- */
/* Scrollbars in the brand colours: a thin, straight teal bar on a quiet
   track, everywhere (page, sidebar, boards, dialogs, the client portal). */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { min-height: 36px; min-width: 36px; border: 3px solid transparent; border-radius: 0; background: var(--signal) padding-box; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { border-width: 2px; }
@supports not selector(::-webkit-scrollbar) {
	* { scrollbar-color: var(--signal) transparent; scrollbar-width: thin; }
}

/* Time back: the hours a week our work gives back to the client's team. */
.tc-gain { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 18px; padding: 14px 18px; border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--signal-soft); box-shadow: inset 3px 0 0 var(--signal); }
.tc-gain__fig { flex: none; display: flex; flex-direction: column; color: var(--signal); }
.tc-gain__fig strong { font-weight: 750; font-size: 34px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tc-gain__fig strong small { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.tc-gain__fig > span { margin-top: 5px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tc-gain__text { flex: 1 1 260px; min-width: 0; }
.tc-gain__title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.4; color: var(--ink); }
.tc-gain__sub { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.tc-gain__do { flex: none; display: flex; gap: 8px; flex-wrap: wrap; }
.tc-report .tc-gain { margin: 22px 0; }
.tc-fixline { margin: 0 0 14px; padding: 4px 0 4px 14px; box-shadow: inset 3px 0 0 var(--signal); }
.tc-fixline__gain { display: block; margin-top: 2px; font-size: 13px; font-weight: 650; color: var(--signal); }
@media print { .tc-gain, .tc-fixline { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* The call page. */
.tc-callink { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.tc-callink a { font-weight: 700; }
.tc-callink span { font-size: 12.5px; overflow-wrap: anywhere; }
.tc-narrow { max-width: 760px; }
.tc-outcome__more { display: none; margin: -2px 0 6px 38px; }
.tc-outcome__more .tc-field { margin: 0; }
.tc-outcome__more input[type="date"] { max-width: 220px; }
.tc-outcome:has(input[value="follow_up"]:checked) .tc-outcome__more[data-for="follow_up"],
.tc-outcome:has(input[value="no_show"]:checked) .tc-outcome__more[data-for="no_show"] { display: block; }
@supports not selector(:has(a)) { .tc-outcome__more { display: block; } }
@media (max-width: 640px) { .tc-outcome__more { margin-left: 0; } .tc-gain__fig strong { font-size: 30px; } }
.tc-stat.is-good .tc-stat__value { color: var(--ok); }
/* Long lines in list rows wrap (the portal's "Waiting for you", say), and on phones the button drops below. */
.tc-list__row > span:first-child { flex: 1 1 auto; min-width: 0; }
.tc-list__row small, .tc-list > li > a > span small { white-space: normal; }
@media (max-width: 640px) { .tc-list__row { flex-wrap: wrap; } .tc-list__row > span:last-child { margin-left: auto; } }

/* =====================================================================
   5.0: one journey per company
   ===================================================================== */

/* Stage badge: coloured by stage. */
.tc-stage { background: color-mix(in srgb, var(--stage, #6b7280) 14%, transparent); color: var(--stage, #6b7280); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stage, #6b7280) 28%, transparent); }
:root[data-theme="dark"] .tc-stage { color: color-mix(in srgb, var(--stage, #6b7280) 60%, #fff); }

/* Stage strip (engagement stages). */
.tc-journey { display: flex; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: j; overflow-x: auto; scrollbar-width: none; }
.tc-journey::-webkit-scrollbar { display: none; }
.tc-journey li { flex: 1 1 0; min-width: 76px; position: relative; padding: 22px 4px 0; text-align: center; font-size: 12.5px; font-weight: 650; color: var(--faint); counter-increment: j; }
.tc-journey li::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 3px; background: var(--line-2); }
.tc-journey li:first-child::before { left: 50%; }
.tc-journey li:last-child::before { right: 50%; }
.tc-journey li::after { content: ""; position: absolute; top: 2px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--line-2) inset; }
.tc-journey li.is-done { color: var(--ink-2); }
.tc-journey li.is-done::before, .tc-journey li.is-on::before { background: var(--ok); }
.tc-journey li.is-on::before { background: linear-gradient(90deg, var(--ok) 50%, var(--line-2) 50%); }
.tc-journey li:last-child.is-on::before { background: var(--ok); }
.tc-journey li.is-done::after { background: var(--ok); box-shadow: none; }
.tc-journey li.is-on { color: var(--ink); }
.tc-journey li.is-on::after { background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
.tc-journey.is-closed li { opacity: .55; }
.tc-journey__closed { margin: -8px 0 16px; font-size: 13.5px; color: var(--muted); }

/* Company page: section tabs under the next step. */
.tc-sectabs { margin-top: 4px; }
.tc-sectabs .tc-tabs { margin-top: 0; }
.tc-sectabs .tc-tabs b { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--panel); font-size: 11px; line-height: 18px; text-align: center; color: var(--muted); }
.tc-sechead { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin: 0 0 14px; }
.tc-sechead h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-sechead .tc-steps { margin: 0; }
.tc-subhead { margin: 18px 0 6px; font-size: 14px; font-weight: 750; }

/* Pipeline board: one column per stage, the next step on each card. */
.tc-board--journey { grid-auto-columns: minmax(230px, 1fr); }
.tc-board--journey .tc-lead { cursor: pointer; }
.tc-lead__next { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.4; font-weight: 500; color: var(--ink-2); }
.tc-lead__next b { display: block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--signal); }
.tc-lead.is-warn { box-shadow: var(--shadow), inset 3px 0 0 var(--err); }
.tc-lead.is-warn .tc-lead__next b { color: var(--err); }
.tc-lead.is-wait .tc-lead__next b { color: var(--muted); }
.tc-lead__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--faint); }
.tc-col__empty { margin: 8px 4px; font-size: 12.5px; line-height: 1.45; color: var(--faint); }

/* Repeating rows. */
.tc-rep__rows { display: grid; gap: 8px; }
.tc-rep__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 10px; align-items: end; padding: 10px 40px 10px 12px; position: relative; border-radius: var(--r); background: var(--panel); }
.tc-rep__cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; font-weight: 650; color: var(--muted); }
.tc-rep__cell.is-wide { grid-column: span 2; }
.tc-rep__cell input, .tc-rep__cell textarea, .tc-rep__cell select { width: 100%; min-width: 0; font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper); }
.tc-rep__cell textarea { resize: vertical; min-height: 36px; }
.tc-rep__del { position: absolute; top: 8px; right: 6px; }
.tc-rep > .tc-btn { margin-top: 8px; }
@media (max-width: 640px) { .tc-rep__cell.is-wide { grid-column: auto; } .tc-rep__row { grid-template-columns: 1fr; } }

/* Checklists (project, portal). */
.tc-checklist li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tc-checklist li .tc-icon { width: 15px; height: 15px; color: var(--faint); flex: none; }
.tc-checklist li.is-done > span { color: var(--muted); text-decoration: line-through; }
.tc-checklist li.is-done .tc-icon { color: var(--ok); }
.tc-checklist li > span { flex: 1; min-width: 0; }
.tc-tick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--paper); color: var(--faint); cursor: pointer; padding: 0; }
.tc-tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.tc-tick[aria-pressed="true"] .tc-icon { color: #fff; }

/* Portal navigation. */
.tc-portal__nav { display: flex; gap: 4px; margin: 0 0 22px; padding: 4px; border-radius: 12px; background: var(--panel); overflow-x: auto; scrollbar-width: none; }
.tc-portal__nav::-webkit-scrollbar { display: none; }
.tc-portal__nav a { flex: none; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 650; color: var(--ink-2); text-decoration: none; }
.tc-portal__nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.tc-portal .tc-main { padding-left: 16px; padding-right: 16px; }

/* Dashboard Today: stage badge instead of an icon. */
.tc-today__icon:has(.tc-stage) { width: auto; height: auto; background: none; border-radius: 0; min-width: 72px; justify-content: flex-start; }
.tc-today__item.is-warn p strong { color: var(--err); }
.tc-form--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .tc-form--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tc-form--4 { grid-template-columns: minmax(0, 1fr); } }

/* Dashboard: where everyone is, at a glance. */
.tc-glance { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.tc-glance__col { min-width: 0; padding: 10px; border-radius: var(--r); background: var(--panel); }
.tc-glance__head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 750; color: var(--ink); text-decoration: none; }
.tc-glance__head span { flex: 1; min-width: 0; }
.tc-glance__head b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tc-glance ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.tc-glance li a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink-2); text-decoration: none; padding: 3px 6px; border-radius: 6px; background: var(--paper); }
.tc-glance li a:hover { color: var(--signal); }
.tc-glance li a.is-warn { color: var(--err); box-shadow: inset 2px 0 0 var(--err); }
.tc-glance .tc-muted { margin: 8px 0 0; }
.tc-glance__more { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .tc-glance { grid-template-columns: repeat(7, 150px); } }
.tc-contacts td:last-child { white-space: nowrap; text-align: right; }
.tc-contacts .tc-icon-btn { display: inline-flex; }

/* ---------- 5.1: rich text, comments, projects ---------- */
.tc-rich { line-height: 1.6; overflow-wrap: anywhere; }
.tc-rich > :first-child { margin-top: 0; } .tc-rich > :last-child { margin-bottom: 0; }
.tc-rich p { margin: 0 0 .6em; } .tc-rich h3 { font-size: 15px; margin: .8em 0 .3em; }
.tc-rich ul, .tc-rich ol { margin: 0 0 .6em; padding-left: 1.3em; }
.tc-rich a { color: var(--info); }
.tc-thread { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.tc-comment { background: var(--subtle); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; }
.tc-comment__meta { color: var(--muted); font-size: 12px; margin: 0 0 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tc-tl-comment { margin-top: 8px; } .tc-tl-comment > summary { color: var(--faint); cursor: pointer; font-size: 12px; }
.tc-tl-comment textarea, .tc-tl-comment .tc-input { width: 100%; }

/* Project list and tabs */
.tc-projlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tc-projlist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); }
.tc-projlist li.is-on { background: var(--panel); }
.tc-projlist a { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: grid; }
.tc-projlist a span { color: var(--muted); font-size: 12px; }
.tc-projtabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 2px; }
.tc-projtabs a { flex: 0 0 auto; display: grid; padding: 8px 12px; border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); color: inherit; text-decoration: none; max-width: 240px; }
.tc-projtabs a span { font-size: 12px; color: var(--muted); }
.tc-projtabs a[aria-current] { box-shadow: 0 0 0 2px var(--signal); }

/* Gantt */
.tc-gantt { position: relative; font-size: 13px; }
.tc-gantt__head, .tc-gantt__row, .tc-gantt__overlay { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 12px; align-items: center; }
.tc-gantt__scale { position: relative; height: 22px; }
.tc-gantt__tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--faint); white-space: nowrap; }
.tc-gantt__tick:first-child { transform: none; }
.tc-gantt__rows { list-style: none; margin: 0; padding: 0; }
.tc-gantt__row { padding: 7px 0; border-top: 1px solid var(--line); }
.tc-gantt__label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tc-gantt__label > span:last-child { display: grid; min-width: 0; }
.tc-gantt__label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-gantt__label small { color: var(--muted); font-size: 12px; }
.tc-gantt__label form { margin: 0; }
.tc-gantt__label .tc-btn { padding: 2px 6px; min-height: 0; }
.tc-gantt__mark { color: var(--faint); display: inline-flex; }
.tc-gantt__track { position: relative; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--subtle) 0 1px, transparent 1px 100%); background-color: var(--subtle); }
.tc-gantt__bar { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--line-2); min-width: 6px; transition: background .15s var(--ease); }
.tc-gantt__row.is-on .tc-gantt__bar { background: var(--info); }
.tc-gantt__row.is-done .tc-gantt__bar { background: var(--ok); }
.tc-gantt__row.is-done .tc-gantt__mark, .tc-gantt__row.is-done .tc-gantt__label .tc-btn { color: var(--ok); }
.tc-gantt__row.is-late .tc-gantt__bar { background: var(--err); }
.tc-gantt__row.is-late small { color: var(--err); }
.tc-gantt__overlay { position: absolute; inset: 22px 0 0 0; pointer-events: none; }
.tc-gantt__overlay .tc-gantt__scale { height: 100%; }
.tc-gantt__today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--signal); }
.tc-gantt__today span { position: absolute; bottom: -18px; left: -16px; font-size: 10px; color: var(--signal); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tc-gantt { padding-bottom: 18px; }
@media (max-width: 640px) {
	.tc-gantt__head, .tc-gantt__row, .tc-gantt__overlay { grid-template-columns: 1fr; gap: 4px; }
	.tc-gantt__head .tc-gantt__label, .tc-gantt__overlay { display: none; }
}

/* Deliverables and updates */
.tc-delivs, .tc-updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tc-deliv, .tc-update { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.tc-deliv:first-child, .tc-update:first-child { border-top: 0; padding-top: 0; }
.tc-deliv__head, .tc-update__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tc-deliv__acts { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.tc-update__head small { margin-left: auto; }
.tc-update.is-draft { opacity: .85; }
.tc-update-form { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.tc-updates:empty + .tc-update-form { border-top: 0; margin-top: 0; padding-top: 0; }
.tc-filechips { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tc-filechips a { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--panel); color: inherit; text-decoration: none; font-size: 12px; max-width: 260px; }
.tc-filechips a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-filechips a:hover { background: var(--line-2); }
.tc-rep__cell--date input { min-width: 140px; }

/* Drafts */
.tc-drafts { list-style: none; margin: 0; padding: 0; }
.tc-drafts li { display: flex; align-items: center; border-top: 1px solid var(--line); }
.tc-drafts li:first-child { border-top: 0; }
.tc-drafts a, .tc-drafts__btn { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 10px 16px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.tc-drafts a:hover, .tc-drafts__btn:hover { background: var(--hover); }
.tc-drafts__kind { flex: 0 0 auto; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 2px 8px; min-width: 64px; text-align: center; }
.tc-drafts__main { flex: 1; min-width: 0; display: grid; }
.tc-drafts__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-drafts__main small { color: var(--muted); font-size: 12px; }
.tc-drafts li > form { padding-right: 10px; }

/* Website chats */
.tc-chatrows { list-style: none; margin: 0; padding: 0; }
.tc-chatrows > li { border-top: 1px solid var(--line); }
.tc-chatrows > li:first-child { border-top: 0; }
.tc-chatrow > summary { list-style: none; cursor: pointer; padding: 10px 16px; }
.tc-chatrow > summary::-webkit-details-marker { display: none; }
.tc-chatrow > summary:hover { background: var(--hover); }
.tc-chatrow[open] { padding-bottom: 12px; }
.tc-chatrow[open] > :not(summary) { margin-left: 16px; margin-right: 16px; }
.tc-chatrow__main { display: grid; gap: 2px; }
.tc-chatrow__main small { color: var(--muted); font-size: 12px; }
.tc-chatrow__sum { color: var(--ink-2); font-size: 13px; }
ol.tc-chat { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.tc-chat__msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; background: var(--subtle); }
.tc-chat__msg p { margin: 2px 0 0; }
.tc-chat__msg small { color: var(--muted); font-size: 11px; }
.tc-chat__msg.is-user { justify-self: end; background: var(--info-soft); }
.tc-chat__msg.is-principal { background: var(--ok-soft); }

/* Assistant confirmation cards */
.tc-confirm { margin: 8px 0 4px; padding: 12px 14px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--signal-line), var(--shadow-xs); display: grid; gap: 8px; max-width: 520px; }
.tc-confirm__head { display: flex; gap: 8px; align-items: flex-start; }
.tc-confirm__head .tc-icon { color: var(--signal); flex: 0 0 auto; margin-top: 2px; }
.tc-confirm__lines { margin: 0; padding: 0 0 0 18px; color: var(--ink-2); font-size: 13px; }
.tc-confirm__preview summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.tc-confirm__preview .tc-rich { margin-top: 6px; padding: 8px 10px; background: var(--subtle); border-radius: var(--r-sm); font-size: 13px; max-height: 260px; overflow: auto; }
.tc-confirm__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-confirm__edit label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.tc-confirm__note { margin: 0; font-size: 12px; color: var(--muted); }
.tc-confirm__note.is-err { color: var(--err); }
.tc-confirm__status { margin: 0; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.tc-confirm.is-done { box-shadow: 0 0 0 1px var(--ok-soft), var(--shadow-xs); }
.tc-confirm.is-done .tc-confirm__status { color: var(--ok); }
.tc-confirm.is-cancelled { opacity: .7; box-shadow: 0 0 0 1px var(--line); }
.tc-confirm.is-cancelled .tc-confirm__head .tc-icon { color: var(--faint); }

/* Draft cards on a contact's tabs */
.tc-draftcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tc-draftcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); border-left: 3px solid var(--warn); }
.tc-draftcard:hover { background: var(--hover); }
.tc-draftcard__main { flex: 1; min-width: 0; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.tc-draftcard__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-draftcard__main small { color: var(--muted); font-size: 12px; }
.tc-draftcard__kind { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }
.tc-draftcard__acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tc-draftcard__acts form { margin: 0; }
@media (max-width: 640px) { .tc-draftcard { flex-direction: column; align-items: stretch; } .tc-draftcard__acts { justify-content: flex-start; } }

/* Care choices and replies */
.tc-choice { padding: 14px; border-radius: var(--r); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); }
.tc-choice h3 { font-size: 15px; margin: 0 0 6px; }
.tc-reply { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--ok); background: var(--ok-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* 5.3: deleting contacts */
.tc-icon-btn--danger:hover { background: var(--err-soft); color: var(--err); }
.tc-icon-btn.is-off { opacity: .35; cursor: not-allowed; }
.tc-locked { display: flex; gap: 6px; align-items: center; color: var(--warn); }
.tc-locked .tc-icon { width: 15px; height: 15px; }
td .tc-inline-form { display: inline-flex; }
.tc-attach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tc-attach li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-attach .tc-icon { width: 16px; height: 16px; color: var(--muted); }
.tc-attach .tc-check { margin-left: auto; }
.tc-file__acts { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tc-filechips li { display: inline-flex; align-items: center; gap: 2px; }
.tc-filechips__x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 50%; }
.tc-filechips__x:hover { background: var(--err-soft); color: var(--err); }

/* 5.3: documents in the Think Tanks look (invoices, statements, agreements; team and portal) */
.tc-doc { --doc-ink: #151515; --doc-signal: #3A5F5F; --doc-line: #dad7ce; --doc-muted: #5b5a56; background: #fff; color: var(--doc-ink); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.tc-doc h1, .tc-doc h2, .tc-doc h3 { color: var(--doc-ink); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.tc-doc h2 { position: relative; padding-top: 10px; }
.tc-doc h2::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 3px; background: var(--doc-signal); }
.tc-doc .tc-muted, .tc-doc .tc-kv dt { color: var(--doc-muted); }
.tc-doc .tc-table th { color: var(--doc-muted); border-bottom: 2px solid var(--doc-signal); background: transparent; }
.tc-doc .tc-table td { border-color: var(--doc-line); color: var(--doc-ink); }
.tc-doc a { color: var(--doc-signal); }
.tc-doc__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--doc-line); position: relative; }
.tc-doc__head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 48px; height: 3px; background: var(--doc-signal); }
.tc-doc__logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--doc-ink); }
.tc-doc__logo img { height: 28px; width: auto; display: block; }
.tc-doc__logo span { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.tc-doc__label { text-align: right; display: grid; }
.tc-doc__label strong { font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; }
.tc-doc__label span { color: var(--doc-muted); font-size: 13px; }
.tc-doc__foot { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--doc-line); font-size: 12px; color: var(--doc-muted); }
.tc-doc__foot p { margin: 0 0 4px; }
.tc-doc__foot strong { color: var(--doc-ink); }
.tc-doc .tc-badge { font-family: inherit; }
.tc-look { margin-top: 12px; }
.tc-look__frame { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--r); background: #f6f5f1; }
button.tc-chip { border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.tc-doc a.tc-doc__logo, .tc-doc a.tc-doc__logo span { color: var(--doc-ink); text-decoration: none; }
/* The portal: the website's black button. */
.tc-portal .tc-btn--primary { box-shadow: none; }
.tc-portal .tc-top .tc-brand img { height: 26px; width: auto; }

/* 5.4: notifications */
.tc-notices li { display: flex; gap: 10px; align-items: flex-start; }
.tc-notice-i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--ink-2); }
.tc-notice-i .tc-icon { width: 14px; height: 14px; }
.tc-notices li.is-bad .tc-notice-i { background: var(--err-soft); color: var(--err); }
.tc-notices p { margin: 0; font-size: 13.5px; line-height: 1.4; }
.tc-notices a { color: var(--ink); text-decoration: none; }
.tc-notices a:hover { text-decoration: underline; }
.tc-pop__foot { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.tc-notify td, .tc-notify th { vertical-align: middle; }
.tc-notify .tc-c { text-align: center; width: 140px; }
.tc-notify__grp th { background: var(--panel); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; }
.tc-radio-dot input { width: 18px; height: 18px; accent-color: var(--signal); cursor: pointer; }

/* 5.4: file cards, the viewer and naming files on upload */
.tc-fcards { display: grid; gap: 8px; margin: 10px 0 0; }
.tc-fcard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.tc-fcard__icon { flex: none; width: 46px; height: 54px; border-radius: 6px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--panel); color: var(--ink-2); border-bottom: 3px solid var(--line-2); overflow: hidden; }
.tc-fcard__icon .tc-icon { width: 18px; height: 18px; }
.tc-fcard__icon b { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; }
.tc-fcard__icon img { width: 100%; height: 100%; object-fit: cover; }
.tc-fk--pdf { background: var(--panel); color: var(--ink); border-bottom-color: var(--signal); }
.tc-fk--video, .tc-fk--audio { background: #ece8f7; color: #5a3fb0; border-bottom-color: #7b61d1; }
.tc-fk--doc { background: #e6eefb; color: #2b5bd0; border-bottom-color: #2b5bd0; }
.tc-fk--sheet { background: #e4f2e7; color: #2f6b3a; border-bottom-color: #2f6b3a; }
.tc-fk--slides { background: var(--warn-soft); color: var(--warn); border-bottom-color: var(--warn); }
.tc-fk--image { border-bottom-color: var(--signal); }
.tc-fcard__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tc-fcard__main strong { font-size: 14.5px; overflow-wrap: anywhere; }
.tc-fcard__main p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.tc-fcard__main small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.tc-fcard__main .tc-badge { justify-self: start; margin-top: 4px; }
.tc-fcard__acts { flex: none; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.tc-fcard--compact { padding: 9px 11px; }
.tc-fcard--compact .tc-fcard__icon { width: 36px; height: 42px; }
@media (max-width: 640px) { .tc-fcard { flex-wrap: wrap; } .tc-fcard__acts { width: 100%; justify-content: flex-start; } }
.tc-viewer { width: min(1100px, 96vw); height: min(90vh, 900px); padding: 0; border: 0; border-radius: var(--r-lg); background: #111; color: #fff; overflow: hidden; }
.tc-viewer[open] { display: flex; flex-direction: column; }
.tc-viewer::backdrop { background: rgba(10,10,10,.75); }
.tc-viewer__bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; color: var(--ink); border-bottom: 3px solid var(--signal); }
.tc-viewer__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-viewer__body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tc-viewer__body img, .tc-viewer__body video { max-width: 100%; max-height: 100%; }
.tc-viewer__body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.tc-viewer__body.is-audio { background: #fff; }
.tc-filemeta { display: grid; gap: 8px; margin-top: 8px; }
.tc-filemeta:empty { display: none; }
.tc-filemeta__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 8px; align-items: center; padding: 8px 10px; background: var(--panel); border-radius: var(--r); }
.tc-filemeta__file { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) { .tc-filemeta__row { grid-template-columns: 1fr; } }
.tc-preview--pdf { width: 100%; height: 70vh; border: 0; background: #fff; }
.tc-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel); border-radius: 9px; margin-bottom: 10px; }
.tc-seg label { cursor: pointer; }
.tc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.tc-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-weight: 650; font-size: 13.5px; color: var(--muted); }
.tc-seg span .tc-icon { width: 15px; height: 15px; }
.tc-seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--ring); }
.tc-seg input:focus-visible + span { outline: 2px solid var(--signal); }
.tc-share .tc-share__email { display: none; }
.tc-share:has(input[value=email]:checked) .tc-share__email { display: block; }
.tc-share:has(input[value=email]:checked) .tc-share__linkhelp { display: none; }
.tc-share-ready .tc-copyfield { margin-top: 8px; }
.tc-sharebox { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.tc-sharebox > summary { cursor: pointer; font-weight: 650; }
.tc-sharebox[open] > summary { margin-bottom: 10px; }
.tc-picks { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.tc-pick { padding: 6px 8px; border-radius: 6px; }
.tc-pick:hover { background: var(--panel); }
.tc-sharebox { margin: 4px 0; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.tc-sharebox .tc-sharebox__more { display: none; margin-top: 10px; }
.tc-sharebox:has(input[name=share_on]:checked) .tc-sharebox__more { display: block; }
.tc-pf-opts { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.tc-pf-new { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* 5.4: reminders */
.tc-rems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tc-rem { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.tc-rem.is-draft { border-style: dashed; background: var(--panel); }
.tc-rem.is-late { box-shadow: inset 3px 0 0 var(--err); }
.tc-rem__main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tc-rem__main small { color: var(--muted); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tc-rem__main small .tc-icon { width: 12px; height: 12px; }
.tc-rem__main .tc-badge { justify-self: start; }
.tc-rem__acts { display: flex; gap: 2px; align-items: center; flex: none; }

/* 5.4: Calendar */
.tc-cal__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-cal__nav { display: flex; align-items: center; gap: 6px; }
.tc-cal__title { font-size: 18px; margin: 0 0 0 8px; }
.tc-cal__opts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tc-cal__opts .tc-chips { margin: 0; }
.tc-cal__type { display: inline-flex; gap: 6px; align-items: center; }
.tc-wk { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.tc-wk__head, .tc-wk__body { display: grid; grid-template-columns: 56px repeat(var(--days, 7), minmax(0, 1fr)); }
.tc-wk--1 { --days: 1; } .tc-wk--7 { --days: 7; }
.tc-wk__head { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 2; }
.tc-wk__day { display: grid; justify-items: center; padding: 8px 4px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--line); }
.tc-wk__day small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.tc-wk__day b { font-size: 18px; }
.tc-wk__day.is-today b { background: var(--signal); color: #fff; border-radius: 50%; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.tc-wk__body { height: calc(var(--h) * var(--hours)); position: relative; }
.tc-wk__axis { position: relative; border-right: 1px solid var(--line); }
.tc-wk__axis span { position: absolute; right: 6px; font-size: 11px; color: var(--muted); transform: translateY(-50%); }
.tc-wk__axis span:first-child { transform: none; }
.tc-wk__col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--h) - 1px), var(--line) calc(var(--h) - 1px), var(--line) var(--h)); }
.tc-wk__col.is-today { background-color: color-mix(in srgb, var(--signal) 3%, transparent); }
.tc-wk__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--signal); z-index: 3; }
.tc-wk__now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.tc-ev { left: 3px; right: 3px; display: block; overflow: hidden; padding: 3px 7px; border-radius: 6px; font-size: 12px; line-height: 1.3; text-decoration: none; color: var(--ink); background: var(--panel); border: 0; text-align: left; font-family: inherit; z-index: 1; }
.tc-ev b { font-weight: 700; }
.tc-ev small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-ev.is-call { background: var(--ink); color: #fff; box-shadow: inset 3px 0 0 var(--signal); }
.tc-ev.is-call small { color: rgba(255,255,255,.7); }
.tc-ev.is-call.tone-err { background: var(--err); box-shadow: none; }
.tc-ev.is-meeting { background: var(--info-soft); color: var(--info); box-shadow: inset 3px 0 0 var(--info); }
.tc-ev.is-block { background: repeating-linear-gradient(135deg, var(--panel), var(--panel) 6px, var(--line) 6px, var(--line) 8px); color: var(--ink-2); }
.tc-ev.is-block summary { cursor: pointer; list-style: none; }
.tc-ev.is-block[open] { height: auto !important; z-index: 4; background: var(--paper); box-shadow: var(--shadow); }
.tc-ev.is-reminder { background: var(--paper); border: 1px solid var(--signal); color: var(--ink); white-space: nowrap; z-index: 2; }
.tc-ev.is-reminder.is-done { opacity: .5; text-decoration: line-through; }
.tc-ev.is-free { background: transparent; border: 1px dashed color-mix(in srgb, var(--ok) 55%, transparent); color: var(--ok); cursor: pointer; opacity: .8; }
.tc-ev.is-free:hover { background: var(--ok-soft); opacity: 1; }
.tc-cal__legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.tc-cal__legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tc-cal__legend .is-call::before { background: var(--ink); box-shadow: inset 2px 0 0 var(--signal); }
.tc-cal__legend .is-meeting::before { background: var(--info-soft); box-shadow: inset 2px 0 0 var(--info); }
.tc-cal__legend .is-block::before { background: var(--line); }
.tc-cal__legend .is-reminder::before { border: 1px solid var(--signal); }
.tc-cal__legend .is-free::before { border: 1px dashed var(--ok); }
.tc-month { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tc-month__head, .tc-month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tc-month__head span { padding: 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.tc-month__day { min-height: 110px; padding: 6px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 3px; }
.tc-month__day:nth-child(7n+1) { border-left: 0; }
.tc-month__day.is-out { background: var(--bg); }
.tc-month__day.is-out .tc-month__n { color: var(--faint); }
.tc-month__n { font-weight: 700; font-size: 13px; color: var(--ink); text-decoration: none; justify-self: start; }
.tc-month__day.is-today .tc-month__n { background: var(--signal); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.tc-month .tc-ev { position: static; height: auto !important; white-space: nowrap; }
.tc-month .tc-ev small { display: none; }
.tc-month__more { font-size: 11.5px; color: var(--muted); }
@media (max-width: 900px) { .tc-wk--7 .tc-wk__head, .tc-wk--7 .tc-wk__body { min-width: 760px; } .tc-wk--7 { overflow-x: auto; } .tc-month__day { min-height: 70px; } .tc-month .tc-ev span { display: none; } }

/* 5.5: Funnel card (Dashboard) and Follow-ups steps (Outreach). */
.tc-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tc-funnel__step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label n" "sub sub"; gap: 0 10px; padding: 8px 10px; border-radius: var(--r); overflow: hidden; }
.tc-funnel__bar { position: absolute; inset: 0 auto 0 0; background: var(--signal-soft); border-radius: var(--r); z-index: 0; }
.tc-funnel__label, .tc-funnel__step b, .tc-funnel__step small { position: relative; z-index: 1; }
.tc-funnel__label { grid-area: label; font-weight: 600; font-size: 13.5px; }
.tc-funnel__step b { grid-area: n; font-family: var(--display); font-size: 16px; }
.tc-funnel__step small { grid-area: sub; color: var(--muted); font-size: 12px; }
.tc-flowstep { border: 1px solid var(--line); border-radius: var(--r); margin: 10px 0; background: var(--paper); }
.tc-flowstep > summary { cursor: pointer; padding: 10px 14px; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tc-flowstep > summary::-webkit-details-marker { display: none; }
.tc-flowstep[open] > summary { border-bottom: 1px solid var(--line); }
.tc-flowstep > .tc-form { padding: 12px 14px; }

/* 5.5.1: the Think Tanks logo with "Platform" under it. */
.tc-brand__lockup { display: flex; flex-direction: row; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.tc-brand__lockup .tc-brand__logo { width: auto; height: 40px; max-width: 160px; }
.tc-brand__tag { font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--side-muted); padding-left: 1px; line-height: 1; }
.tc-brand--auth .tc-brand__lockup .tc-brand__logo { max-width: 240px; height: auto; }
.tc-collapsed .tc-brand__lockup { display: none; }
@media (max-width: 960px) { .tc-collapsed .tc-brand__lockup { display: flex; } }
.tc-brand.no-logo .tc-brand__mark, .tc-brand.no-logo .tc-brand__words { display: inline-flex; }

/* 5.6: legal links under the portal */
.tc-portal__legal { max-width: 960px; margin: 8px auto 32px; padding: 0 20px; text-align: center; font-size: 12.5px; color: var(--muted, #6b6b6b); }
.tc-portal__legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tc-portal__legal a:hover { color: var(--ink, #151515); }

/* 5.7: a grid of equal cards (Settings → Payments: 2 by 2) */
.tc-grid--cards { align-items: stretch; }
.tc-grid--cards > .tc-card { margin: 0; height: 100%; display: flex; flex-direction: column; }
.tc-grid--cards > .tc-card > .tc-card__body { flex: 1; }
@media (max-width: 960px) { .tc-grid--cards { grid-template-columns: 1fr; } }

/* 5.7: a person confirms (unsubscribe) */
.tc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tc-human { display: grid; gap: 14px; justify-items: start; margin: 18px 0 10px; }
.tc-human__tick { font-weight: 600; }

/* 5.7: filter bars and sortable headers */
.tc-filterbar { gap: 8px; }
.tc-filterbar .tc-search { flex: 1 1 220px; max-width: 340px; }
.tc-filterbar select.tc-input { width: auto; }
.tc-range { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tc-range__dates { display: none; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.tc-range.is-custom .tc-range__dates { display: inline-flex; }
.tc-toolbar .tc-range__dates input.tc-input { width: 150px; padding-right: 8px; }
.tc-filterbar__clear { color: var(--muted); }
.tc-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; white-space: nowrap; }
.tc-sort:hover { color: var(--ink); }
.tc-sort__arrow { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .25; }
.tc-sort.is-asc .tc-sort__arrow { border-top: 0; border-bottom: 5px solid currentColor; opacity: 1; color: var(--signal); }
.tc-sort.is-desc .tc-sort__arrow { opacity: 1; color: var(--signal); }
.tc-sort:hover .tc-sort__arrow { opacity: .7; }
.tc-countline { margin: -6px 0 12px; color: var(--muted); font-size: 13px; }

.tc-bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px; background: var(--panel); border-radius: var(--r); }
.tc-bulkbar .tc-input { height: 32px; min-height: 32px; width: auto; }
.tc-bulkbar .tc-check { margin-right: auto; font-size: 13px; }
.tc-col-pick { width: 34px; }

/* =====================================================================
   5.7 Social
   ===================================================================== */
.tc-spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tc-spin .7s linear infinite; vertical-align: -1px; margin-right: 5px; flex: none; }
.tc-ok { color: var(--ok); font-weight: 650; }
.tc-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel); border-radius: 9px; }
.tc-seg__b { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tc-seg__b .tc-icon { width: 15px; height: 15px; }
.tc-seg__b.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-xs); }
.tc-head__actions .tc-seg { margin-left: 4px; }

/* Posts */
.tc-livestrip { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 11px 14px; border-radius: var(--r-lg); background: var(--signal-soft); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--signal-line); }
.tc-livestrip .tc-spin { color: var(--signal); }
.tc-livestrip > span:nth-child(2) { flex: 1; }
.tc-tile.is-live { box-shadow: 0 0 0 2px var(--signal), var(--shadow); }
.tc-tile__img { position: relative; }
.tc-tile__count { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; font-weight: 700; }
.tc-tiles--posts .tc-tile__img { aspect-ratio: 4 / 5; }
.tc-tile__theme { margin-left: auto; font-size: 11.5px; color: var(--muted); align-self: center; }
.tc-rowpost { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.tc-rowpost img, .tc-rowpost__none { width: 40px; height: 50px; border-radius: 6px; object-fit: cover; flex: none; background: var(--subtle); display: inline-flex; align-items: center; justify-content: center; color: var(--faint); }
.tc-rowpost strong { display: block; }
.tc-rowpost small { color: var(--muted); }
.tc-badge .tc-spin { width: 9px; height: 9px; border-width: 1.5px; margin-right: 4px; }

/* Editor: slides */
.tc-slides { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tc-slides:empty { display: none; }
.tc-slide { position: relative; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2) inset; overflow: hidden; cursor: grab; user-select: none; }
.tc-slide img, .tc-slide__vid { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--subtle); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); pointer-events: none; }
.tc-slide__n { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.tc-slide.is-cover { box-shadow: 0 0 0 2px var(--signal) inset; }
.tc-slide.is-cover .tc-slide__n { background: var(--signal); color: #fff; }
.tc-slide__name { padding: 6px 8px 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-slide__acts { display: flex; justify-content: space-between; padding: 4px; }
.tc-slide__acts .tc-icon-btn { width: 28px; height: 28px; font-size: 16px; }
.tc-slide.is-dragging { opacity: .4; }
.tc-slides--ro .tc-slide { cursor: default; }
.tc-slides--ro .tc-slide__name { padding-bottom: 8px; }
.tc-slides__format { margin: -2px 0 12px; font-size: 13px; font-weight: 650; }
.tc-uploads { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tc-uploads:empty { display: none; }
.tc-upload { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r); background: var(--subtle); font-size: 13px; }
.tc-upload.is-err { background: var(--err-soft); color: var(--err); }

/* Editor: AI and prompts */
.tc-aibox { padding: 14px; border-radius: var(--r-lg); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); }
.tc-aibox__t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.tc-aibox__t .tc-icon { color: var(--signal); }
.tc-aibox__go .tc-btn { width: 100%; justify-content: center; }
.tc-aibox__more { margin: 2px 0 0; font-size: 13px; }
.tc-prompts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.tc-prompt { padding: 12px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2) inset; background: var(--paper); }
.tc-prompt__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tc-prompt textarea { width: 100%; font-size: 13.5px; line-height: 1.5; }
.tc-prompt__on { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.tc-prompt__on input { flex: 1; height: 32px; }

/* Editor: where and when */
.tc-chanedit__own { margin-top: 6px; }
.tc-chanedit__own summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.tc-chanedit__own textarea { margin-top: 6px; }
.tc-radios--stack { display: grid; }
.tc-radios--stack .tc-radio { justify-content: flex-start; }
.tc-when__at { display: none; }
[data-when].is-at .tc-when__at { display: block; }
.tc-when__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-when__chips .tc-chip { border: 0; cursor: pointer; background: var(--panel); font: inherit; font-size: 12.5px; }
.tc-when__chips .tc-chip small { color: var(--muted); }
.tc-when__chips .tc-chip.is-on { background: var(--signal-soft); box-shadow: inset 0 0 0 1.5px var(--signal); }

/* Going out */
.tc-golive.is-live { box-shadow: 0 0 0 2px var(--signal), var(--shadow); }
.tc-golive.is-published { box-shadow: 0 0 0 1.5px var(--ok), var(--shadow); }
.tc-golive.is-failed, .tc-golive.is-partial { box-shadow: 0 0 0 1.5px var(--err), var(--shadow); }
.tc-golive__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tc-golive__head .tc-card__title { display: flex; align-items: center; }
.tc-golive__head .tc-spin { color: var(--signal); width: 14px; height: 14px; }
.tc-golive__time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.tc-golive__bar { height: 6px; border-radius: 99px; background: var(--panel); overflow: hidden; margin-bottom: 14px; }
.tc-golive__bar span { display: block; height: 100%; background: var(--signal); border-radius: inherit; transition: width .5s ease; }
.tc-golive.is-published .tc-golive__bar span { background: var(--ok); }
.tc-golive.is-live .tc-golive__bar span { background-image: linear-gradient(90deg, var(--signal) 0, color-mix(in srgb, var(--signal) 60%, #fff) 50%, var(--signal) 100%); background-size: 200% 100%; animation: tc-shimmer 1.4s linear infinite; }
@keyframes tc-shimmer { to { background-position: -200% 0; } }
.tc-golive__log { margin-top: 12px; font-size: 12.5px; }
.tc-golive__log summary { cursor: pointer; font-weight: 650; color: var(--muted); }
.tc-golive__log ol { list-style: none; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r); background: var(--subtle); max-height: 240px; overflow: auto; display: grid; gap: 4px; }
.tc-golive__log time { color: var(--faint); font-variant-numeric: tabular-nums; margin-right: 8px; }
.tc-golive__log li.is-ok { color: var(--ok); }
.tc-golive__log li.is-err { color: var(--err); }
.tc-golive__log li.is-warn { color: var(--warn); }
@media (prefers-reduced-motion: reduce) { .tc-spin, .tc-golive.is-live .tc-golive__bar span { animation: none; } }

/* Calendar: week board */
.tc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.tc-week__day { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 260px; transition: box-shadow .12s; }
.tc-week__day.is-today { box-shadow: 0 0 0 1.5px var(--signal), var(--shadow); }
.tc-week__day.is-past { background: var(--subtle); }
.tc-week__head { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); }
.tc-week__head span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tc-week__head b { font-size: 18px; }
.tc-week__head em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--signal); }
.tc-week__body { position: relative; flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.tc-week__none { margin: 6px 2px; font-size: 12px; color: var(--faint); }
.tc-week__add { align-self: flex-start; margin-top: auto; width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 800; opacity: 0; transition: opacity .12s; }
.tc-week__day:hover .tc-week__add, .tc-week__add:focus { opacity: 1; }
.tc-slot { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 7px 9px; font-size: 12px; color: var(--muted); display: grid; gap: 4px; transition: background .12s, border-color .12s; }
.tc-slot b { color: var(--ink); }
.tc-slot__add { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; color: var(--signal); text-decoration: none; }
.tc-slot__add .tc-icon { width: 13px; height: 13px; }
.tc-slot.is-past { opacity: .55; }
.tc-slot small { color: var(--faint); }
.tc-cal__e--card { display: flex; gap: 8px; align-items: flex-start; white-space: normal; padding: 7px 8px 7px 10px; border-radius: 0 var(--r) var(--r) 0; }
.tc-cal__e--card img { width: 34px; height: 42px; border-radius: 4px; object-fit: cover; flex: none; }
.tc-cal__e--card small { display: block; font-weight: 500; color: var(--muted); margin-top: 2px; }
.tc-cal__e[draggable=true] { cursor: grab; }
.tc-cal__e.is-dragging { opacity: .4; }
.tc-cal__ch .tc-icon { width: 12px; height: 12px; vertical-align: -2px; margin-left: 2px; }
.tc-cal__open { font-style: normal; color: var(--signal); margin-left: 4px; font-size: 14px; letter-spacing: 1px; }
.is-dragging-post [data-drop-day], .is-dragging-post [data-drop-at] { outline: 1.5px dashed var(--line-2); outline-offset: -3px; }
.is-dropover { background: var(--signal-soft) !important; outline: 2px solid var(--signal) !important; outline-offset: -2px; }
.tc-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-tray .tc-cal__e { width: 220px; margin: 0; }
@media (max-width: 1100px) { .tc-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tc-week { grid-template-columns: 1fr; } .tc-week__day { min-height: 0; } }

/* Settings */
.tc-checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.tc-checks li { display: flex; gap: 10px; align-items: flex-start; }
.tc-checks__mark { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.tc-checks .is-ok .tc-checks__mark { background: var(--ok-soft); color: var(--ok); }
.tc-checks .is-bad .tc-checks__mark { background: var(--err-soft); color: var(--err); }
.tc-checks .is-skip .tc-checks__mark { background: var(--panel); color: var(--muted); }
.tc-checks .is-bad strong { color: var(--err); }
.tc-guide { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; }
.tc-guide strong { display: block; word-break: break-word; }
.tc-guide small { color: var(--muted); }
.tc-guide__lock { width: 36px; height: 36px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); }
.tc-guide__text { white-space: pre-wrap; font: 13px/1.55 var(--font, inherit); max-height: 60vh; overflow: auto; margin: 0; }

.tc-when__chips .tc-chip small { margin-left: 5px; }
.tc-badge:has(.tc-spin)::before { display: none; }
.tc-filterbar .tc-seg__b { padding: 4px 10px; }

/* 5.8: Instagram connection */
.tc-where { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14.5px; }
.tc-where .tc-icon { width: 20px; height: 20px; }
.tc-howto { margin: 14px 0; padding: 0; list-style: none; counter-reset: howto; display: grid; gap: 12px; }
.tc-howto li { position: relative; padding-left: 38px; line-height: 1.55; font-size: 14px; }
.tc-howto li::before { counter-increment: howto; content: counter(howto); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.tc-howto em { font-style: normal; font-weight: 650; }

/* 5.9 Outreach autopilot */
.tc-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.tc-details > summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.tc-details[open] > summary { color: var(--ink); }
#tc-autopilot .tc-checklist { margin: 12px 0 14px; }
#tc-autopilot .tc-checklist li { color: var(--muted); }
#tc-autopilot .tc-checklist li.is-done { color: var(--ink); }
.tc-lead-in { font-size: 15px; }

/* 5.10 Prospect logo */
.tc-logo-field__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tc-logo-field__img { display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 48px; padding: 6px 10px; border: 1px solid var(--line); background: repeating-conic-gradient(#f1efe9 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.tc-logo-field__img img { max-height: 36px; max-width: 160px; display: block; }
.tc-optional { font-weight: 400; color: var(--muted); }

/* 5.11 Calendar: client time as a plain list */
.tc-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--signal); text-decoration: underline; cursor: pointer; }
.tc-calx__intro { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 18px; margin: 0 0 20px; font-size: 14.5px; color: var(--ink-2); }
.tc-calx__intro summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.tc-calx__intro ul { margin: 10px 0 0; padding-left: 20px; }
.tc-calx__intro li { margin-bottom: 6px; line-height: 1.55; }
.tc-calx { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.tc-calx__day { margin-bottom: 22px; }
.tc-calx__day h2 { font: 600 14.5px/1.3 var(--text); color: var(--muted); margin: 0 0 8px; }
.tc-calx__day h2 b { color: var(--ink); font-size: 17px; font-weight: 800; margin-right: 4px; }
.tc-calx__day.is-late h2 b { color: var(--warn); }
.tc-calx__item { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 14px; align-items: start; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow), inset 4px 0 0 var(--k, var(--line-2)); padding: 14px 16px 14px 18px; margin-bottom: 8px; }
.tc-calx__item time { font-weight: 700; font-size: 15px; }
.tc-calx__item time small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.tc-calx__main h3 { margin: 0; font: 700 16px/1.35 var(--text); }
.tc-calx__main p { margin: 3px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.tc-calx__kind { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 8px; margin-bottom: 4px; background: var(--panel); color: var(--muted); }
.tc-calx__item.is-call { --k: var(--signal); }
.tc-calx__item.is-call .tc-calx__kind { background: var(--signal-soft); color: var(--signal); }
.tc-calx__item.is-todo { --k: var(--warn); }
.tc-calx__item.is-todo .tc-calx__kind { background: var(--warn-soft); color: var(--warn); }
.tc-calx__item.is-done { opacity: .65; }
.tc-calx__item.is-done h3 { text-decoration: line-through; }
.tc-calx__item.is-off { --k: var(--faint); background: var(--subtle); }
.tc-calx__need, .tc-calx__ok, .tc-calx__wait { margin-top: 10px; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
.tc-calx__need { background: var(--warn-soft); color: var(--ink); }
.tc-calx__ok { background: var(--ok-soft); color: var(--ok); }
.tc-calx__wait { background: var(--panel); color: var(--ink-2); }
.tc-calx__need > span, .tc-calx__ok > span { display: block; margin-top: 8px; }
.tc-calx__acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.tc-calx__acts .tc-inline-form, .tc-calx__acts .tc-btn { width: 100%; }
.tc-calx__acts .tc-inline-form .tc-btn { width: 100%; padding: 6px 12px; font-size: 13px; }
.tc-calx__empty { color: var(--ink-2); font-size: 14.5px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 8px; }
.tc-calx__more { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.tc-calx__back { color: var(--muted); font-size: 14px; }
.tc-calx__nav { margin: 0 0 14px; }
.tc-calx__panel { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; }
.tc-calx__panel h2 { font: 700 18px/1.3 var(--text); margin: 0 0 6px; }
.tc-calx__panel > p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.tc-calx__next { background: var(--ok-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; }
.tc-calx__next b { display: block; color: var(--ok); font-size: 16px; margin: 2px 0 8px; }
.tc-calx__next.is-none { background: var(--warn-soft); }
.tc-calx__hours { list-style: none; margin: 0; padding: 0; }
.tc-calx__hours li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.tc-calx__hours li:first-child { border-top: 0; }
.tc-calx__hours .is-closed { color: var(--muted); }
.tc-calx__change { width: 100%; margin: 10px 0; justify-content: center; }
.tc-calx__lead { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.tc-calx__steps { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--muted); }
.tc-calx__steps li.is-on { color: var(--ink); font-weight: 700; }
.tc-calx__types { display: grid; gap: 8px; }
.tc-calx__type { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.tc-calx__type:has(input:checked) { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.tc-calx__type input { margin-top: 3px; accent-color: var(--signal); }
.tc-calx__type small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.tc-calx__times { display: grid; gap: 12px; max-height: 300px; overflow: auto; margin-bottom: 10px; }
.tc-calx__tday h4 { margin: 0 0 6px; font-size: 14px; }
.tc-calx__tday > div { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-calx__tday label { cursor: pointer; }
.tc-calx__tday input { position: absolute; opacity: 0; pointer-events: none; }
.tc-calx__tday span { display: inline-block; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 14px; }
.tc-calx__tday input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tc-calx__tday input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.tc-calx__err { color: var(--err); font-weight: 600; font-size: 14px; margin: 8px 0 0; }
.tc-calx__hrows { margin-bottom: 6px; }
.tc-calx__hrow { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.tc-calx__hrow:first-child { border-top: 0; }
.tc-calx__hset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.tc-calx__hset input { width: auto; padding: 5px 7px; }
.tc-calx__hset em { font-style: normal; }
.tc-calx__hrow.is-off .tc-calx__hset { opacity: .4; }
@media (max-width: 1000px) { .tc-calx { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tc-calx__item { grid-template-columns: 62px minmax(0, 1fr); } .tc-calx__acts { grid-column: 2; flex-direction: row; flex-wrap: wrap; } .tc-calx__acts .tc-inline-form, .tc-calx__acts .tc-btn { width: auto; } .tc-calx__hrow { grid-template-columns: 1fr; } }
.tc-calx__fold summary { cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 14px; margin: 4px 0 10px; }
/* ==========================================================================
   5.13: VAT threshold, uploads, wiki attachments, expenses, logins, locked items
   ========================================================================== */

/* VAT threshold card (admins). */
.tc-card--warn { box-shadow: var(--shadow), inset 3px 0 0 var(--warn); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tc-card--warn .tc-card__title { color: var(--warn); }
.tc-card--warn .tc-progress span { background: var(--warn); }
.tc-card--err .tc-progress span { background: var(--err); }
.tc-vat__nums { margin: 0 0 8px; font-size: 20px; font-variant-numeric: tabular-nums; }
.tc-vat__nums .tc-muted { font-size: 14px; }
.tc-vat .tc-help { margin-top: 8px; }

/* Upload button with a small drop panel under it. */
.tc-uploader { display: inline-flex; }
/* The drop zone opens in the page, under the header (or a card's head), lined up with everything else. */
.tc-uploader__panel { position: relative; max-width: 520px; margin: 0 0 20px; animation: tc-fade .18s ease; }
.tc-uploader__panel[hidden] { display: none; }
.tc-uploader__panel form { margin: 0; }
.tc-card > .tc-uploader__panel { max-width: none; margin: 12px 18px 0; }
.tc-uploader__close { position: absolute; top: 8px; right: 8px; z-index: 2; }
.tc-drop--compact { padding: 22px 44px; }
.tc-drop--compact [data-drop-label] { font-size: 14px; }
/* Dragging files over the page: the zone is the target. */
.is-dropping .tc-uploader__panel .tc-drop { border-color: var(--signal); background: var(--signal-soft); color: var(--ink); }
.is-dropping .tc-main { outline: 2px dashed var(--signal-line); outline-offset: -8px; border-radius: var(--r-lg); }
.tc-head__actions > .tc-uploader > .tc-btn--primary { background: var(--signal); color: var(--signal-ink); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12), var(--shadow-xs); }
.tc-head__actions > .tc-uploader > .tc-btn--primary:hover { background: color-mix(in srgb, var(--signal) 88%, #000); color: #fff; }

/* Password categories dialog. */
.tc-cats { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.tc-cats__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.tc-cats__form { display: flex; gap: 8px; align-items: center; min-width: 0; }
.tc-cats__form .tc-input { flex: 1; min-width: 0; }
.tc-cats__row small { white-space: nowrap; }
@media (max-width: 640px) { .tc-cats__row { grid-template-columns: 1fr auto; } .tc-cats__row small { grid-column: 1 / -1; } }

/* Wiki attachments and the "Link from Files" picker. */
.tc-wiki-files { margin-top: 16px; }
.tc-wiki-files .tc-card__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tc-wiki-files .tc-fcard__acts { flex-wrap: wrap; }
.tc-pick { display: grid; gap: 2px; max-height: 55vh; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.tc-pick__row { padding: 8px; border-radius: var(--r-sm); align-items: flex-start; }
.tc-pick__row:hover { background: var(--hover); }
.tc-pick__row[hidden] { display: none; }
.tc-pick__row span { display: grid; gap: 2px; }
.tc-pick__row small { color: var(--muted); }

/* Expenses. */
.tc-exp__amount { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px); gap: 8px; }
.tc-exp__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-exp__filters .tc-input { width: auto; }
.tc-exp__receipt .tc-preview { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto 14px; border-radius: var(--r); }
.tc-exp__receipt .tc-preview--doc { width: 100%; height: 70vh; border: 0; }
[data-exp-paid][hidden] { display: none; }
td.tc-col-amount small, td.tc-col-what small { display: block; color: var(--muted); font-size: 12px; }

/* Locked items. */
.tc-fcard--locked { background: var(--subtle); }
.tc-fcard--locked .tc-fcard__icon { color: var(--warn); background: var(--warn-soft); display: inline-flex; align-items: center; justify-content: center; }
.tc-lockbox { padding: 12px 14px; border-radius: var(--r); background: var(--warn-soft); }
.tc-lockbox .tc-field { margin-bottom: 6px; }
.tc-lockbox legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; }

/* Client logins: the team's "Sent by them" list. */
.tc-pendings { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tc-pending { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tc-pending:last-child { border-bottom: 0; padding-bottom: 0; }
.tc-pending p { margin: 4px 0 0; }
td.tc-col-tool small { display: block; color: var(--muted); font-size: 12px; }

/* The portal's Logins page. */
.tc-plogins { list-style: none; margin: 0; padding: 0; }
.tc-plogin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tc-plogin:last-child { border-bottom: 0; }
.tc-plogin__main { display: grid; gap: 2px; min-width: 0; }
.tc-plogin__main a { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tc-plogin__creds { margin: 0; display: grid; gap: 6px; }
.tc-plogin__creds div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; align-items: center; }
.tc-plogin__creds dt { color: var(--muted); font-size: 12px; }
.tc-plogin__creds dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.tc-plogin .tc-inline-form { display: inline-flex; gap: 8px; align-items: center; }
@media (max-width: 640px) { .tc-plogin { grid-template-columns: 1fr; gap: 8px; } }

.tc-gate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.tc-notice a.tc-btn--primary { color: var(--btn-ink); text-decoration: none; }
.tc-notice a.tc-btn--ghost { text-decoration: none; }

/* 5.14: messages with a client (contact's Messages tab and their portal) */
.tc-threads { display: grid; gap: 0; }
.tc-threads > .tc-thread { padding: 16px 18px; border-top: 1px solid var(--line); }
.tc-threads > .tc-thread:first-child { border-top: 0; }
.tc-thread__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tc-thread__head small { margin-left: auto; }
.tc-thread .tc-card__head { gap: 10px; }
.tc-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tc-msg { max-width: 84%; padding: 10px 14px; border-radius: var(--r-lg); background: var(--subtle); box-shadow: 0 0 0 1px var(--line) inset; }
.tc-msg p { margin: 0 0 6px; }
.tc-msg p:last-child { margin-bottom: 0; }
.tc-msg--us { margin-left: auto; background: var(--info-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--info) 18%, transparent) inset; }
.tc-msg__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 4px; font-size: 13px; }
:root[data-theme="dark"] .tc-msg--us { background: color-mix(in srgb, var(--info) 18%, var(--paper)); }
@media (max-width: 640px) { .tc-msg { max-width: 100%; } }

/* 5.14: Passwords filter bar, typeable category filter, filter tags, favourites */
.tc-catpick { position: relative; display: inline-flex; align-items: center; }
.tc-catpick .tc-icon { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.tc-toolbar .tc-catpick .tc-input, .tc-catpick .tc-input { padding-left: 32px; padding-right: 11px; min-width: 210px; background-image: none; }
.tc-pwbar__more { position: relative; }
.tc-pwbar__more > summary { list-style: none; }
.tc-pwbar__more > summary::-webkit-details-marker { display: none; }
.tc-pwbar__more[open] > summary { background: var(--panel); }
.tc-pwbar__morebox { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.tc-pwbar .tc-pwbar__more[open] { flex-basis: 100%; }
.tc-ftags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 14px; }
.tc-ftag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; border-radius: 999px; background: var(--info-soft); color: var(--ink-2); font-size: 12.5px; text-decoration: none; }
.tc-ftag .tc-icon { width: 13px; height: 13px; opacity: .65; }
.tc-ftag:hover { background: color-mix(in srgb, var(--info) 16%, var(--paper)); }
.tc-ftag:hover .tc-icon { opacity: 1; }
.tc-ftags__clear { font-size: 12.5px; margin: 0 6px; }
.tc-star { font-size: 16px; line-height: 1; color: var(--faint); }
.tc-star.is-on { color: #d99a00; }
.tc-pw-table .tc-col-fav { width: 34px; padding-right: 0; }
.tc-warn-text { color: var(--warn); font-weight: 600; }

/* 5.14: one height for every single-line box (text, select, money), so rows line up */
.tc-field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), .tc-field select:not([multiple]) { height: 38px; min-height: 38px; }
.tc-field .tc-money { height: 38px; }
.tc-field .tc-money input { height: 36px !important; min-height: 36px !important; }
/* Choices with long labels: one per line, full width */
.tc-field--stack .tc-radios { display: grid; gap: 6px; }
.tc-field--stack .tc-radios .tc-radio { justify-content: flex-start; padding: 9px 12px; }
.tc-care-offer .tc-help { margin-top: -2px; }

/* 5.14: Care plans in Settings → Journey: one card per plan (name and fee, then what's included) */
.tc-careplans .tc-rep__rows { gap: 10px; }
.tc-careplans .tc-rep__row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; padding: 14px 44px 14px 14px; background: var(--subtle); box-shadow: 0 0 0 1px var(--line) inset; }
.tc-careplans .tc-rep__cell--textarea { grid-column: 1 / -1; }
.tc-careplans .tc-rep__cell textarea { line-height: 1.5; resize: vertical; }
.tc-careplans .tc-rep__row:first-child { box-shadow: 0 0 0 1.5px var(--signal-line) inset; }
.tc-careplans .tc-rep__row:first-child::before { content: "Default on new proposals"; grid-column: 1 / -1; justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--signal-soft); color: var(--signal); font-size: 11.5px; font-weight: 650; }
.tc-careplans .tc-rep__del { position: absolute; top: 10px; right: 8px; }
.tc-careplans + .tc-help { margin-top: 2px; }
.tc-careplans .tc-rep__top { grid-column: 1 / -1; justify-self: start; }
.tc-careplans .tc-rep__row:first-child .tc-rep__top { display: none; }


/* ==========================================================================
   Think Tanks overrides: square, flat, Menlo labels.
   ========================================================================== */
.tc-app *, .tc-portal *, .tc-auth * { border-radius: 0 !important; }
.tc-app .tc-dot, .tc-portal .tc-dot, .tc-bell__dot, .tc-status-dot, .tc-status::before { border-radius: 50% !important; }
.tc-btn, .tc-nav__group, .tc-eyebrow, .tc-badge, .tc-kbd, .tc-label, .tc-field__label, label.tc-label, .tc-table th, .tc-tabs a, .tc-stat__label, .tc-brand__app, .tc-chip, .tc-pnav__link, .tc-auth__small, .tc-help { font-family: var(--mono); letter-spacing: .01em; }
.tc-btn { font-weight: 400; }
.tc-h1, h1 { font-weight: 500; letter-spacing: -0.015em; }
.tc-card, .tc-stat, .tc-record { box-shadow: none !important; border: 1px solid var(--line-2); }
.tc-btn--signal, .tc-btn--primary { background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); }
.tc-btn--signal:hover, .tc-btn--primary:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.tc-btn--ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.tc-btn--ghost:hover { border-color: var(--ink); }
.tc-brand__mark { background: var(--signal); box-shadow: none; font-family: var(--mono); font-weight: 400; }
.tc-brand__name { font-weight: 500; }
.tc-eyebrow { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 4px; }
.tc-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; }
.tc-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.tc-status--wip::before, .tc-status--warn::before { background: var(--warn); }
.tc-status--ok::before, .tc-status--live::before { background: var(--signal); }
.tc-status--err::before { background: var(--err); }
.tc-table__group th { background: var(--panel); text-align: left; }

/* ---------- Client portal ---------- */
.tc-portal { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.tc-preview-bar { background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--warn); padding: 8px 24px; font-family: var(--mono); font-size: 12.5px; }
.tc-preview-bar a { margin-left: 8px; }
.tc-ptop { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--line-2); background: var(--paper); }
.tc-ptop__brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.tc-ptop__brand .tc-brand__logo { height: 34px; }
.tc-ptop__brand .tc-brand__name { color: var(--ink); }
.tc-ptop__brand .tc-brand__app { color: var(--muted); }
.tc-ptop__who { display: flex; align-items: center; gap: 10px; }
.tc-ptop__who > span { display: flex; flex-direction: column; text-align: right; font-size: 13.5px; margin-right: 6px; }
.tc-ptop__who small { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.tc-pnav { border-bottom: 1px solid var(--line-2); background: var(--paper); padding: 0 24px; overflow-x: auto; }
.tc-pnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.tc-pnav__link { display: block; padding: 12px 12px 11px; text-decoration: none; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tc-pnav__link:hover { color: var(--ink); }
.tc-pnav__link.is-on { color: var(--ink); border-bottom-color: var(--signal); }
.tc-pmain { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; }
.tc-pfoot { padding: 20px 32px; border-top: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
@media (max-width: 720px) { .tc-ptop { padding: 12px 16px; } .tc-ptop__who > span { display: none; } .tc-pmain { padding: 20px 14px 48px; } }
.tc-auth__alt { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.tc-brand__lockup { display: flex; align-items: center; gap: 10px; }
.tc-brand__tag { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 10px; }
.tc-brand:has(.tc-brand__lockup) .tc-brand__mark, .tc-brand:has(.tc-brand__lockup) .tc-brand__words, .tc-ptop__brand:has(.tc-brand__lockup) .tc-brand__mark, .tc-ptop__brand:has(.tc-brand__lockup) .tc-brand__words { display: none; }
.tc-ptop__brand.no-logo .tc-brand__mark, .tc-brand.no-logo .tc-brand__mark { display: inline-flex; }
.tc-ptop__brand.no-logo .tc-brand__words, .tc-brand.no-logo .tc-brand__words { display: flex; }
.tc-auth .tc-brand__name { color: var(--ink); }
.tc-auth { background: var(--bg) !important; background-image: none !important; }
.tc-auth__brand { background: var(--paper) !important; border-bottom: 1px solid var(--line-2); }
.tc-auth__box { box-shadow: none !important; border: 1px solid var(--line-2); }

.tc-msg--user { background: var(--btn); color: var(--btn-ink); }
.tc-msg--user a { color: inherit; }

/* ==========================================================================
   Studio shell (1.1): a light sidebar, centred modals.
   ========================================================================== */
:root {
	--side-bg: #FFFFFF; --side-ink: #111111; --side-muted: #777777; --side-line: #E4E4E0;
	--side-hover: rgba(17, 17, 17, .045); --side-on: rgba(58, 95, 95, .09);
}
:root[data-theme="dark"] {
	--side-bg: #151515; --side-ink: #E8E6E1; --side-muted: #8B8A86; --side-line: #2A2A28;
	--side-hover: rgba(255, 255, 255, .05); --side-on: rgba(122, 154, 154, .16);
}
.tc-shell { background: linear-gradient(to right, var(--side-bg) var(--side), transparent var(--side)); }
.tc-side { border-right: 1px solid var(--side-line); }
.tc-nav__link:hover, .tc-nav__link.is-on { color: var(--side-ink); }
.tc-nav__link:hover .tc-icon { color: var(--side-ink); }
.tc-nav__link.is-on { font-weight: 600; }
.tc-nav__link.is-on .tc-icon { color: var(--signal); }
.tc-nav__badge { background: var(--panel); color: var(--side-ink); }
.tc-nav__link.is-on .tc-nav__badge, .tc-nav__badge.is-hot { background: var(--signal); color: #fff; }
.tc-brand__name, .tc-me strong { color: var(--side-ink); }
.tc-side .tc-avatar { background: var(--panel); color: var(--side-ink); }
.tc-side .tc-icon-btn:hover { color: var(--side-ink); }
.tc-me:hover { color: inherit; }
.tc-tip { background: var(--ink); color: var(--paper); }

/* Modals: centred, square, a hairline frame; they save in place. */
.tc-dialog { inset: 0; margin: auto; width: min(600px, calc(100vw - 32px)); height: auto; max-height: calc(100dvh - 64px); border: 1px solid var(--ink); box-shadow: 0 24px 60px -24px rgba(17, 17, 17, .35); }
.tc-dialog--wide { width: min(900px, calc(100vw - 32px)); }
.tc-dialog[open] { animation: tc-pop .18s var(--ease); }
.tc-dialog::backdrop { background: rgba(17, 17, 17, .32); backdrop-filter: none; }
.tc-dialog__head { height: 54px; }
.tc-dialog__head h2 { font-weight: 500; font-size: 16px; }
.tc-dialog__foot { margin: 22px -22px 0; background: var(--paper); backdrop-filter: none; }
@keyframes tc-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .tc-dialog { width: 100vw; max-height: 100dvh; margin: auto 0 0; } }

/* Audience picker (who sees it). */
.tc-aud { display: grid; gap: 8px; }
.tc-aud__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-aud__opts label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.tc-aud__opts input { accent-color: var(--signal); margin: 0; }
.tc-aud__opts label:has(input:checked) { border-color: var(--ink); background: var(--panel); }
.tc-aud__people { display: none; }
.tc-aud:has(input[value="people"]:checked) .tc-aud__people { display: block; }
.tc-aud__people select { width: 100%; min-height: 96px; }
.tc-aud-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tc-ptop__client { margin-right: auto; margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--line-2); display: flex; align-items: center; }
.tc-ptop__client img { max-height: 32px; width: auto; }
/* Long tab rows (the client organiser) wrap instead of hiding tabs off the edge. */
.tc-tabs { flex-wrap: wrap; row-gap: 2px; overflow: visible; }

/* ==========================================================================
   Feedback round: wider sidebar, larger menu, consistent fields, more teal.
   ========================================================================== */
:root { --side: 305px; }
.tc-nav__link { height: 40px; font-size: 15.5px; gap: 12px; padding: 0 12px; }
.tc-nav__link .tc-icon { width: 19px; height: 19px; }
.tc-nav__group { font-size: 11.5px; margin: 22px 12px 8px; color: var(--signal); }
.tc-brand__name { font-size: 16px; }
.tc-side__top { height: 64px; padding: 0 16px; }
.tc-brand .tc-brand__logo { height: 34px; }
.tc-collapsed .tc-brand .tc-brand__logo { display: none; }

/* The logo on the light sidebar; the words in dark mode (the logo is dark ink). */
.tc-side .tc-brand__tag { font-size: 10.5px; }
:root[data-theme="dark"] .tc-side .tc-brand__lockup { display: none; }
:root[data-theme="dark"] .tc-side .tc-brand:has(.tc-brand__lockup) .tc-brand__mark { display: inline-flex; }
:root[data-theme="dark"] .tc-side .tc-brand:has(.tc-brand__lockup) .tc-brand__words { display: flex; }

/* Every field looks the same, whatever screen it's on. */
.tc-app input[type="text"], .tc-app input[type="email"], .tc-app input[type="search"], .tc-app input[type="number"], .tc-app input[type="url"], .tc-app input[type="tel"], .tc-app input[type="password"], .tc-app input[type="date"], .tc-app input[type="datetime-local"], .tc-app input[type="time"], .tc-app input[type="month"], .tc-app select, .tc-app textarea,
.tc-portal input[type="text"], .tc-portal input[type="email"], .tc-portal input[type="search"], .tc-portal input[type="number"], .tc-portal input[type="url"], .tc-portal input[type="tel"], .tc-portal input[type="password"], .tc-portal input[type="date"], .tc-portal input[type="datetime-local"], .tc-portal input[type="time"], .tc-portal select, .tc-portal textarea,
.tc-auth input[type="text"], .tc-auth input[type="email"], .tc-auth input[type="password"] {
	-webkit-appearance: none; appearance: none; box-sizing: border-box; max-width: 100%;
	min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 0; box-shadow: none;
	background: var(--paper); color: var(--ink); font: 400 14px/1.4 var(--text); transition: border-color .12s, box-shadow .12s;
}
.tc-app select, .tc-portal select { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: right 16px top 50%, right 11px top 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.tc-app select[multiple], .tc-portal select[multiple] { background-image: none; padding-right: 12px; }
.tc-app textarea, .tc-portal textarea { min-height: 96px; resize: vertical; }
.tc-app input:hover, .tc-app select:hover, .tc-app textarea:hover { border-color: var(--muted); }
.tc-app input:focus, .tc-app select:focus, .tc-app textarea:focus, .tc-portal input:focus, .tc-portal select:focus, .tc-portal textarea:focus, .tc-auth input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.tc-app input::placeholder, .tc-app textarea::placeholder, .tc-portal input::placeholder { color: var(--faint); }
.tc-app input[type="checkbox"], .tc-app input[type="radio"], .tc-portal input[type="checkbox"], .tc-portal input[type="radio"] { accent-color: var(--signal); width: 16px; height: 16px; }
/* Labels above fields, in Menlo; inline filter rows line up on one baseline. */
.tc-app label.tc-label, .tc-app .tc-field > label, .tc-app .tc-field__label { display: block; margin: 0 0 6px; font: 400 12px/1.3 var(--mono); color: var(--ink-2); letter-spacing: .01em; }
.tc-app form.tc-inline-form, .tc-app .tc-filters, .tc-app .tc-filterbar form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.tc-app .tc-filters > *, .tc-app form.tc-inline-form > * { margin: 0; }
.tc-app .tc-btn { min-height: 40px; }
.tc-app .tc-btn--sm { min-height: 32px; }
/* Tables of editable rows (folders, categories, statuses): fields fill their cell. */
.tc-app td > input[type="text"], .tc-app td > select { width: 100%; }

/* More teal, used for meaning: primary actions, the current place, links, focus. */
.tc-btn--signal, .tc-btn--primary { background: var(--signal); border-color: var(--signal); color: #fff; }
.tc-btn--signal:hover, .tc-btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tc-main .tc-rich a, .tc-main .tc-card__body p a:not(.tc-btn), .tc-pmain .tc-rich a { color: var(--signal); text-decoration-color: var(--signal-line); text-underline-offset: 3px; }
.tc-nav__link.is-on { background: var(--signal-soft); color: var(--signal); }
.tc-nav__link.is-on::before { background: var(--signal); }
.tc-tab.is-on, .tc-tabs a.is-on { color: var(--ink); border-bottom-color: var(--signal); }
.tc-eyebrow, .tc-card__title .tc-eyebrow { color: var(--signal); }
.tc-stat__value { color: var(--ink); }
.tc-stat:hover, .tc-card--link:hover { border-color: var(--signal) !important; }
.tc-head .tc-h1::after { content: ""; display: block; width: 28px; height: 2px; margin-top: 10px; background: var(--signal); }
.tc-badge--ok, .tc-badge--signal { background: var(--signal-soft); color: var(--signal); border-color: var(--signal-line); }
::selection { background: var(--signal-soft); }
:focus-visible { outline-color: var(--signal); }
.tc-fab { background: var(--signal); }

/* Sign-in: form left, photo right. */
.tc-auth__split { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; min-height: 100vh; }
.tc-auth__panel { display: flex; align-items: center; background: var(--paper); border-right: 1px solid var(--line-2); padding: 48px 56px; }
.tc-auth__inner { width: 100%; max-width: 380px; }
.tc-auth__panel .tc-auth__brand { margin: 0 0 40px; padding: 0; background: none !important; border: 0 !important; }
.tc-auth__panel .tc-h1 { font-size: 28px; margin-bottom: 8px; }
.tc-auth__panel .tc-h1::after { content: ""; display: block; width: 28px; height: 2px; margin-top: 12px; background: var(--signal); }
.tc-auth__panel .tc-auth__text { color: var(--muted); margin: 14px 0 22px; }
.tc-auth__panel .tc-form { margin-top: 18px; }
.tc-auth__panel .tc-btn--primary, .tc-auth__panel button[type="submit"].tc-btn { width: 100%; justify-content: center; }
.tc-auth__legal { margin-top: 40px; font: 11px/1.4 var(--mono); color: var(--faint); }
.tc-auth__photo { background: var(--ink) center / cover no-repeat; min-height: 100%; }
.tc-auth__photo--plain { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; background: #111111; overflow: hidden; }
.tc-auth__photo--plain p { position: relative; color: #E8E6E1; font: 15px/1.6 var(--text); max-width: 34ch; margin: 0; }
.tc-auth__mark { position: absolute; inset: 0; }
.tc-auth__mark span { position: absolute; border: 1px solid rgba(232, 230, 225, .16); }
.tc-auth__mark span:nth-child(1) { left: 12%; top: 14%; width: 46%; height: 46%; background: #3A5F5F; border-color: #3A5F5F; }
.tc-auth__mark span:nth-child(2) { left: 46%; top: 36%; width: 38%; height: 38%; }
.tc-auth__mark span:nth-child(3) { left: 30%; top: 8%; width: 2px; height: 72%; background: #A07E28; border: 0; }
.tc-auth .tc-auth__wrap { display: none; }
@media (max-width: 860px) {
	.tc-auth__split { grid-template-columns: 1fr; grid-template-rows: 160px auto; }
	.tc-auth__photo { order: -1; min-height: 160px; }
	.tc-auth__photo--plain p { display: none; }
	.tc-auth__panel { padding: 32px 22px 48px; border-right: 0; }
}
/* Search boxes with a built-in icon keep a single frame (the wrapper's). */
.tc-app .tc-search, .tc-app .tc-top__search { height: 40px; box-shadow: 0 0 0 1px var(--line-2) inset; }
.tc-app .tc-search input, .tc-app .tc-top__search input, .tc-portal .tc-search input { border: 0 !important; box-shadow: none !important; background: transparent !important; min-height: 0; height: 38px; padding: 0 4px; }
.tc-app .tc-search:focus-within, .tc-app .tc-top__search:focus-within { box-shadow: 0 0 0 1px var(--signal) inset, 0 0 0 3px var(--signal-soft); }

/* ---------- Polish (fork P): filter rows, search fields, scrollable tables ---------- */
/* Filter rows: one line, one height (40px), wrapping on narrow screens. */
.tc-app .tc-filterbar, .tc-app .tc-toolbar, .tc-app .tc-filters, .tc-portal .tc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.tc-app .tc-filterbar > *, .tc-app .tc-toolbar > *, .tc-app .tc-filters > * { margin: 0; }
.tc-app .tc-toolbar select, .tc-app .tc-toolbar .tc-input, .tc-app .tc-filterbar select, .tc-app .tc-filterbar input:not([type="checkbox"]):not([type="radio"]), .tc-app .tc-filters select, .tc-app .tc-filters input:not([type="checkbox"]):not([type="radio"]) { height: 40px; min-height: 40px; box-shadow: none; border: 1px solid var(--line-2); padding-top: 0; padding-bottom: 0; }
.tc-app .tc-toolbar select, .tc-app .tc-filterbar select, .tc-app .tc-filters select { width: auto; min-width: 150px; }
.tc-app .tc-filterbar > input[type="search"], .tc-app .tc-filterbar > input[type="text"], .tc-app .tc-filters > input[type="search"], .tc-app .tc-filters > input[type="text"] { flex: 1 1 240px; max-width: 360px; }
.tc-app .tc-filterbar .tc-btn, .tc-app .tc-toolbar .tc-btn, .tc-app .tc-filters .tc-btn { height: 40px; min-height: 40px; }
/* Labelled filter rows (Find a collaborator): labels on top, fields on one line. */
.tc-app .tc-filters--labelled { align-items: flex-end; }
.tc-app .tc-filters--labelled > label, .tc-app .tc-filters--labelled > .tc-field { display: flex; flex-direction: column; gap: 6px; margin: 0; flex: 1 1 200px; font: 400 12px/1.3 var(--mono); color: var(--ink-2); }
.tc-app .tc-filters--labelled > label > input, .tc-app .tc-filters--labelled > label > select, .tc-app .tc-filters--labelled .tc-field input, .tc-app .tc-filters--labelled .tc-field select { width: 100%; max-width: none; font: 400 14px/1.4 var(--text); color: var(--ink); }
/* The search field: an icon inside one box (the input itself has no border). */
.tc-app .tc-search, .tc-portal .tc-search { height: 40px; border: 1px solid var(--line-2); box-shadow: none; padding: 0 12px; }
.tc-app .tc-search:focus-within, .tc-portal .tc-search:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.tc-app .tc-search input, .tc-portal .tc-search input { border: 0 !important; box-shadow: none !important; min-height: 0; height: 38px; padding: 0; background: transparent; }
.tc-app .tc-search input:focus { box-shadow: none !important; }
span.tc-search { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 360px; background: var(--paper); color: var(--faint); }
/* Wide tables scroll sideways inside their card instead of breaking the layout. */
.tc-card__body > .tc-table, .tc-card__body > table, .tc-scroll { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tc-card__body > .tc-table, .tc-card__body > table { width: 100%; }
.tc-card__body > .tc-table > tbody, .tc-card__body > .tc-table > thead { display: table; width: 100%; table-layout: auto; }
.tc-scroll > table { min-width: 100%; }
/* Modal footers sit apart from the fields above them. */
.tc-dialog .tc-form + .tc-btn, .tc-dialog form > .tc-btn:last-child, .tc-dialog .tc-actions { margin-top: 18px; }
.tc-dialog__body .tc-table td { padding-top: 8px; padding-bottom: 8px; vertical-align: middle; }
/* Empty states inside cards: quieter, with room to breathe. */
.tc-card .tc-empty { padding: 28px 12px; }
.tc-empty strong, .tc-empty__title { font-weight: 500; }
.tc-empty p { max-width: 56ch; margin-left: auto; margin-right: auto; }
/* Editable rows inside modals (folders, categories, statuses) and inline "add" rows. */
.tc-edit-rows td { padding: 8px 12px; }
.tc-edit-rows td:first-child { width: 60%; }
.tc-edit-rows td input[type="text"] { width: 100%; }
.tc-cell-act { text-align: right; white-space: nowrap; }
.tc-num { text-align: right; }
.tc-actions--split { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.tc-subsection { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.tc-subsection .tc-h3 { margin: 0 0 10px; font-size: 14px; font-weight: 500; }
.tc-inline-add { display: flex; gap: 8px; align-items: stretch; }
.tc-inline-add input { flex: 1; }
.tc-inline-add .tc-btn { height: auto; }
/* A wide main column with a narrower side column (lists with an "add" panel). */
.tc-grid--main-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .tc-grid--main-side { grid-template-columns: 1fr; } }
/* Modals size to their content (a pinned top and bottom made "auto" stretch to full height). */
.tc-dialog { height: fit-content; }
.tc-dialog[open] { display: flex; flex-direction: column; }
.tc-dialog__body { flex: 1 1 auto; min-height: 0; }
/* Polish: code samples (not .tc-code, which is the 2FA input). */
.tc-codeblock { font: 12.5px/1.6 var(--mono); background: var(--subtle); box-shadow: 0 0 0 1px var(--line) inset; padding: 12px 14px; margin: 8px 0 12px; overflow-x: auto; white-space: pre; max-width: 100%; }
/* Polish: editable status table (Settings > Projects) and module permission selects. */
.tc-status-rows td input[type="text"], .tc-status-rows td select { width: 100%; min-width: 120px; }
.tc-status-rows td .tt-pct { width: 80px; height: 40px; }
.tc-status-rows td:first-child { width: 110px; }
.tc-app .tc-grid-table select { min-width: 128px; height: 34px; }
/* Polish: long link rows in side cards wrap instead of pushing the arrow off the card. */
.tc-todo a { min-width: 0; }
.tc-todo a > span { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.tc-todo a > .tc-icon { flex: 0 0 auto; }
/* Polish: portal overview org line (clients.css isn't loaded on the overview). */
.tc-portal-org { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--paper); box-shadow: 0 0 0 1px var(--line) inset; }
.tc-portal-org > span { display: flex; flex-direction: column; gap: 2px; }
.tc-portal-org strong { display: block; font-size: 15px; }
.tc-portal-org a { font-size: 13px; color: var(--signal); }
/* Polish: client logo base rules, needed on every portal page (copied from clients.css). */
.tc-clogo { flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: var(--paper); border: 1px solid var(--line-2); vertical-align: middle; }
.tc-clogo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tc-clogo--initials { background: var(--panel); color: var(--ink-2); font-family: var(--mono); font-weight: 700; letter-spacing: .02em; }
.tc-clogo--xs { width: 22px; height: 22px; font-size: 9px; }
.tc-clogo--sm { width: 32px; height: 32px; font-size: 11px; }
.tc-clogo--md { width: 44px; height: 44px; font-size: 13px; }
.tc-clogo--lg { width: 56px; height: 56px; font-size: 16px; }
/* ---------- Assistant history view (fork P) ---------- */
.tc-assist__head .tc-assist__title { margin-right: auto; }
.tc-assist__chats-btn { margin: 0 2px; }
.tc-assist__chats-btn.is-on { background: var(--panel); color: var(--ink); }
.tc-assist__history { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.tc-assist__history[hidden], .tc-chat--panel[hidden] { display: none !important; }
.tc-assist__history-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tc-assist__history-list { flex: 1 1 auto; overflow-y: auto; }
.tc-assist__chats { list-style: none; margin: 0; padding: 0; }
.tc-assist__chats li + li { border-top: 1px solid var(--line); }
.tc-assist__chat { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; padding: 12px 16px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.tc-assist__chat:hover, .tc-assist__chat:focus-visible { background: var(--subtle); }
.tc-assist__chat.is-on { box-shadow: inset 2px 0 0 var(--signal); background: var(--subtle); }
.tc-assist__chat-title { font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tc-assist__chat-when { font: 11px var(--mono); color: var(--muted); }
/* Action rows above a card sit with it, not floating. */
.tc-main > .tc-actions:first-child, .tc-main .tc-actions + .tc-card { margin-top: 0; }
.tc-main .tc-actions { margin-bottom: 14px; }
.tc-pmain > .tc-table-wrap, .tc-pmain > .tc-table { background: var(--paper); border: 1px solid var(--line-2); }

/* Feedback round 3: larger, regular-weight menu; a tidy logo lockup. */
.tc-nav__link, .tc-nav__link.is-on { font-size: 17.8px; font-weight: 400; height: 44px; }
.tc-nav__link .tc-icon { width: 20px; height: 20px; }
.tc-nav__group { font-size: 12px; }
.tc-side__top { height: 76px; padding: 0 18px; }
.tc-side .tc-brand, .tc-ptop__brand { flex: 1; justify-content: flex-start; min-width: 0; }
.tc-brand__lockup { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; min-width: 0; }
.tc-brand .tc-brand__logo, .tc-ptop__brand .tc-brand__logo, .tc-brand--auth .tc-brand__logo { width: auto; height: 40px; max-width: 160px; object-fit: contain; object-position: left center; flex: none; }
.tc-brand__lockup .tc-brand__words { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; min-width: 0; }
.tc-brand__lockup .tc-brand__name { color: var(--ink); font-size: 16px; font-weight: 500; white-space: nowrap; }
.tc-brand__lockup .tc-brand__app { color: var(--signal); font-size: 10.5px; }
.tc-brand__tag { display: none; }
.tc-side__top { justify-content: flex-start; }
.tc-side .tc-brand { display: flex; width: 100%; justify-content: flex-start; align-items: center; text-align: left; }
.tc-brand .tc-brand__lockup .tc-brand__words, .tc-ptop__brand .tc-brand__lockup .tc-brand__words { display: flex !important; }
.tc-brand__lockup { margin: 0; }
/* Logo lockup on sign-in and portal: mark left, words beside it, fixed height */
.tc-auth .tc-brand__lockup, .tc-ptop__brand .tc-brand__lockup { flex-direction: row !important; justify-content: flex-start; align-items: center; flex: 0 1 auto; gap: 12px; }
.tc-auth .tc-brand__lockup .tc-brand__logo, .tc-ptop__brand .tc-brand__lockup .tc-brand__logo { width: auto !important; height: 44px !important; max-width: 160px; }
.tc-auth .tc-brand { justify-content: flex-start; }

/* ---------- Assistant chat search (fork D): assistant panel only ---------- */
.tc-assist__search { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tc-assist__search-box { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); }
.tc-assist__search-box:focus-within { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.tc-assist__search-box svg { width: 15px; height: 15px; flex: none; }
.tc-app .tc-assist__search-box input[type="search"] { flex: 1; min-width: 0; width: auto; height: 100%; min-height: 0; border: 0; padding: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; outline: none; box-shadow: none; }
.tc-assist__search-box input::-webkit-search-cancel-button { cursor: pointer; }
.tc-assist__chat-snippet { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tc-assist__results mark { background: rgba(160, 126, 40, .22); color: inherit; padding: 0 1px; }
[data-assist-results][aria-busy="true"] { opacity: .6; }
.tc-assist__search-none { padding: 16px; margin: 0; font-size: 13px; color: var(--muted); }
/* Email senders table */
.tt-senders td, .tt-routes td { vertical-align: middle; }
.tt-senders .tt-mailin { width: 100%; min-width: 150px; }
.tt-senders td:first-child { min-width: 200px; }
.tt-routes .tc-field { margin: 0; }
.tt-routes .tc-field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tt-routes select { max-width: 360px; }
.tt-senders td:first-child { min-width: 0; width: 26%; }
.tt-senders td:first-child .tc-help { font-size: 11px; }
.tt-senders .tt-mailin { min-width: 0; font-size: 13px; }
.tt-senders td:nth-child(3) { width: 30%; }
