:root {
    --tf-bg: #eef2f8;
    --tf-card: rgba(255,255,255,.91);
    --tf-text: #172033;
    --tf-muted: #6b7280;
    --tf-line: rgba(15,23,42,.09);
    --tf-blue: #2563eb;
    --tf-indigo: #4f46e5;
    --tf-green: #16a34a;
    --tf-amber: #d97706;
    --tf-red: #dc2626;
}
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color: var(--tf-text);
    background: radial-gradient(circle at 15% 0%, #f8faff 0, #edf2fb 38%, #e3e9f4 72%, #dce4f1 100%);
}
.tf-page { min-height: 100vh; display:flex; flex-direction:column; }
.tf-container { max-width: 1220px; }
.tf-header { background:rgba(255,255,255,.82); backdrop-filter:blur(16px); border-bottom:1px solid var(--tf-line); position:sticky; top:0; z-index:20; }
.tf-brand { display:flex; align-items:center; gap:.65rem; color:var(--tf-text); text-decoration:none; }
.tf-brand > span:last-child { display:flex; flex-direction:column; line-height:1.05; }
.tf-brand strong { font-size:1rem; }
.tf-brand small { font-size:.72rem; color:var(--tf-muted); margin-top:.13rem; }
.tf-logo { width:34px; height:34px; border-radius:999px; background:linear-gradient(135deg,var(--tf-blue),var(--tf-indigo)); display:grid; place-items:center; box-shadow:0 8px 20px rgba(37,99,235,.28); }
.tf-logo span { width:8px; height:8px; background:white; border-radius:999px; }
.tf-header-note { color:var(--tf-muted); font-size:.8rem; }
.tf-main { flex:1; padding:2.2rem 0 3rem; }
.tf-footer { border-top:1px solid var(--tf-line); padding:1rem 0; color:var(--tf-muted); font-size:.8rem; background:rgba(255,255,255,.45); }
.tf-card { background:var(--tf-card); border:1px solid rgba(148,163,184,.22); box-shadow:0 18px 48px rgba(15,23,42,.08); border-radius:18px; padding:1.45rem; backdrop-filter:blur(12px); }
.tf-eyebrow { font-size:.72rem; text-transform:uppercase; letter-spacing:.13em; color:#8791a5; font-weight:700; margin-bottom:.3rem; }
h1 { font-size:clamp(1.75rem,3vw,2.55rem); font-weight:650; letter-spacing:-.035em; margin:0 0 .45rem; }
h2 { font-size:1.28rem; font-weight:650; margin:0; }
h3 { font-size:1rem; font-weight:650; margin:0; }
p { color:var(--tf-muted); }
.btn { border-radius:999px; font-size:.86rem; padding:.5rem 1rem; font-weight:600; }
.btn-primary { border:0; background:linear-gradient(135deg,var(--tf-blue),var(--tf-indigo)); }
.form-control,.form-select { border-radius:10px; border-color:#d8dee9; font-size:.88rem; }
.form-control:focus,.form-select:focus { border-color:#7c9cf5; box-shadow:0 0 0 .18rem rgba(37,99,235,.12); }
.tf-landing { min-height:calc(100vh - 170px); display:grid; grid-template-columns:1.05fr .95fr; align-items:center; gap:4rem; padding:2rem 0 4rem; }
.tf-landing-copy h1 span { background:linear-gradient(135deg,var(--tf-blue),var(--tf-indigo)); -webkit-background-clip:text; color:transparent; }
.tf-landing-copy > p { max-width:620px; font-size:1.02rem; line-height:1.7; }
.tf-landing-pills { display:flex; flex-wrap:wrap; gap:.45rem; }
.tf-landing-pills span,.tf-object-type { border-radius:999px; background:rgba(37,99,235,.07); border:1px solid rgba(37,99,235,.14); color:#3159b8; padding:.28rem .62rem; font-size:.75rem; }
.tf-landing-visual { padding:1.25rem; transform:rotate(1deg); }
.tf-mini-top,.tf-mini-footer,.tf-mini-row { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.tf-mini-top { font-weight:650; font-size:1.05rem; }
.tf-mini-ok { color:var(--tf-green); font-size:.78rem; }
.tf-mini-meta { color:var(--tf-muted); font-size:.76rem; padding:.35rem 0 1rem; border-bottom:1px solid var(--tf-line); }
.tf-mini-row { padding:.8rem .15rem; border-bottom:1px solid var(--tf-line); font-size:.85rem; }
.tf-mini-row span { color:#556075; }
.tf-mini-footer { padding-top:1rem; color:var(--tf-muted); font-size:.75rem; }
.tf-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:2rem; }
.tf-hero p { margin:0; }
.tf-readonly-pill { border-radius:999px; padding:.35rem .7rem; color:#3159b8; background:#eef4ff; border:1px solid #d4e1ff; font-size:.76rem; white-space:nowrap; }
.tf-section-heading { display:flex; justify-content:space-between; margin:1.5rem .2rem .8rem; }
.tf-section-heading p { font-size:.82rem; margin:.2rem 0 0; }
.tf-hub-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.tf-hub-card { display:block; color:inherit; text-decoration:none; background:rgba(255,255,255,.83); border:1px solid rgba(148,163,184,.23); border-radius:16px; padding:1.25rem; transition:.16s ease; box-shadow:0 9px 28px rgba(15,23,42,.05); }
.tf-hub-card:hover { transform:translateY(-2px); box-shadow:0 17px 40px rgba(15,23,42,.1); border-color:rgba(37,99,235,.22); }
.tf-hub-card-top { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.tf-hub-card h3 { margin-top:.65rem; font-size:1.12rem; }
.tf-chevron { color:var(--tf-blue); font-size:1.2rem; }
.tf-hub-meta { display:flex; justify-content:space-between; gap:1rem; margin-top:1.15rem; padding-top:.8rem; border-top:1px solid var(--tf-line); font-size:.75rem; color:var(--tf-muted); }
.tf-breadcrumbs { display:flex; gap:.5rem; align-items:center; font-size:.78rem; color:var(--tf-muted); margin:0 .2rem .75rem; }
.tf-breadcrumbs a { color:#526174; text-decoration:none; }
.tf-hub-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.tf-hub-header-meta { display:flex; flex-wrap:wrap; gap:.6rem 1rem; color:var(--tf-muted); font-size:.78rem; }
.tf-health { display:flex; align-items:center; gap:.45rem; padding:.4rem .7rem; border-radius:999px; font-size:.78rem; background:#ecfdf5; color:#166534; border:1px solid #bbf7d0; }
.tf-health.warn,.tf-health.warning { background:#fffbeb; color:#92400e; border-color:#fde68a; }
.tf-health.error { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.tf-health-dot { width:7px; height:7px; border-radius:99px; background:currentColor; }
.tf-toolbar { display:flex; align-items:end; justify-content:space-between; gap:1rem; padding:1rem 1.2rem; }
.tf-state-picker { display:flex; align-items:center; gap:.6rem; }
.tf-state-picker label,.tf-compare-selectors label { font-size:.75rem; color:var(--tf-muted); font-weight:650; }
.tf-state-picker .form-select { width:220px; }
.tf-toolbar-actions { display:flex; gap:.6rem; align-items:center; }
.tf-search { width:min(300px,35vw); }
.tf-viewer-grid { display:grid; grid-template-columns:300px minmax(0,1fr); gap:1rem; min-height:560px; }
.tf-object-list-card { padding:.8rem; }
.tf-list-head { display:flex; justify-content:space-between; align-items:center; color:#606b7e; font-size:.78rem; padding:.2rem .35rem .65rem; }
.tf-object-list { display:flex; flex-direction:column; gap:.18rem; max-height:690px; overflow:auto; }
.tf-object-row { width:100%; border:0; background:transparent; border-radius:10px; display:flex; justify-content:space-between; align-items:center; padding:.65rem .7rem; font-size:.86rem; color:#344054; text-align:left; }
.tf-object-row:hover { background:#f3f6fb; }
.tf-object-row.active { background:#eaf1ff; color:#214ba4; font-weight:650; }
.tf-row-status { width:7px; height:7px; border-radius:99px; background:#22c55e; }
.tf-row-status.warning,.tf-row-status.warn { background:#f59e0b; }
.tf-row-status.error { background:#ef4444; }
.tf-object-detail-card { min-width:0; }
.tf-detail-placeholder { min-height:500px; display:grid; place-items:center; align-content:center; text-align:center; color:var(--tf-muted); }
.tf-detail-placeholder p { margin:.2rem 0; }
.tf-detail-icon { font-size:2rem; color:#9aa5b7; }
.tf-detail-header { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; padding-bottom:1rem; border-bottom:1px solid var(--tf-line); }
.tf-detail-header h2 { font-size:1.55rem; }
.tf-status-label { border-radius:999px; padding:.3rem .6rem; background:#eefbf3; color:#16803f; font-size:.72rem; }
.tf-source-group { padding-top:1.2rem; }
.tf-source-group h3 { color:#5c6679; font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; margin-bottom:.45rem; }
.tf-field-grid { border-top:1px solid var(--tf-line); }
.tf-field-row { display:grid; grid-template-columns:minmax(140px,.65fr) 1fr; gap:1rem; padding:.67rem .2rem; border-bottom:1px solid var(--tf-line); font-size:.84rem; }
.tf-field-name { color:#647084; }
.tf-field-value { font-weight:550; word-break:break-word; }
.tf-field-row.missing .tf-field-value,.tf-field-row.no-match .tf-field-value { color:var(--tf-amber); }
.tf-field-row.intentional-empty .tf-field-value { color:#64748b; }
.tf-compare-head p { margin:.25rem 0 0; font-size:.82rem; }
.tf-compare-selectors { display:grid; grid-template-columns:1fr auto 1fr auto; align-items:end; gap:.8rem; margin-top:1.1rem; }
.tf-compare-selectors label { display:block; margin-bottom:.3rem; }
.tf-compare-arrow { padding-bottom:.55rem; color:#94a3b8; }
.tf-stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.8rem; }
.tf-stat-card { background:rgba(255,255,255,.79); border:1px solid var(--tf-line); border-radius:14px; padding:1rem; display:flex; flex-direction:column; }
.tf-stat-card strong { font-size:1.55rem; }
.tf-stat-card span { color:var(--tf-muted); font-size:.76rem; }
.tf-change-list { border-top:1px solid var(--tf-line); }
.tf-change-row { display:grid; grid-template-columns:110px minmax(130px,1fr) minmax(130px,1fr) 30px minmax(130px,1fr); gap:.6rem; align-items:center; padding:.72rem .2rem; border-bottom:1px solid var(--tf-line); font-size:.8rem; }
.tf-change-object { font-weight:650; }
.tf-change-field { color:#5e687a; }
.tf-change-value { border-radius:7px; padding:.25rem .45rem; background:#f6f7f9; overflow:hidden; text-overflow:ellipsis; }
.tf-change-value.old { color:#8a3f3f; }
.tf-change-value.new { color:#24633f; }
.tf-change-arrow { color:#9aa5b7; text-align:center; }
.tf-empty-state { text-align:center; padding:3rem; }
.tf-empty-inline { color:var(--tf-muted); padding:1.5rem .2rem; }
@media(max-width:900px){
    .tf-landing{grid-template-columns:1fr;gap:2rem}.tf-hub-grid{grid-template-columns:1fr}.tf-viewer-grid{grid-template-columns:1fr}.tf-object-list{max-height:280px}.tf-toolbar{align-items:stretch;flex-direction:column}.tf-toolbar-actions{justify-content:space-between}.tf-search{width:100%}.tf-stat-grid{grid-template-columns:repeat(2,1fr)}.tf-change-row{grid-template-columns:80px 1fr}.tf-change-value,.tf-change-arrow{grid-column:2}.tf-compare-selectors{grid-template-columns:1fr}.tf-compare-arrow{display:none}
}
@media(max-width:600px){.tf-main{padding:1.2rem 0 2rem}.tf-card{border-radius:14px;padding:1rem}.tf-header-note{display:none}.tf-stat-grid{grid-template-columns:1fr 1fr}.tf-field-row{grid-template-columns:1fr}.tf-hub-header{flex-direction:column}.tf-state-picker{width:100%}.tf-state-picker .form-select{width:100%}.tf-toolbar-actions{flex-direction:column;align-items:stretch}}
/* Hub Admin */
.tf-admin-login-wrap{min-height:calc(100vh - 220px);display:grid;place-items:center}.tf-admin-login-card{width:min(440px,100%)}
.tf-admin-head{display:flex;justify-content:space-between;align-items:flex-start;gap:2rem}.tf-admin-table-head{padding:1rem 1.25rem;border-bottom:1px solid var(--tf-line);display:flex;justify-content:space-between;color:#556075;font-size:.82rem}.tf-admin-table th{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:#7b8495;background:#f8fafc;border-bottom-color:var(--tf-line)}.tf-admin-table td{font-size:.84rem;border-bottom-color:var(--tf-line);padding:.9rem 1rem}.tf-admin-sub{font-size:.72rem;color:var(--tf-muted);margin-top:.15rem}.tf-admin-hub-row{display:flex;justify-content:space-between;align-items:flex-start;gap:2rem}.tf-admin-hub-meta{display:flex;gap:.6rem 1.1rem;flex-wrap:wrap;color:var(--tf-muted);font-size:.76rem;margin-top:.65rem}.tf-danger-zone{min-width:220px;color:#8b3440;font-size:.78rem}.tf-danger-zone summary{cursor:pointer;text-align:right;font-weight:650}.tf-admin-danger-card{border-color:rgba(220,38,38,.2)}.tf-delete-input{max-width:260px}
@media(max-width:700px){.tf-admin-head,.tf-admin-hub-row{flex-direction:column}.tf-danger-zone{width:100%}.tf-danger-zone summary{text-align:left}}

/* Admin lifecycle – Web 0.3 */
.tf-admin-lifecycle{display:inline-flex;align-items:center;padding:.2rem .55rem;border-radius:999px;font-size:.75rem;font-weight:700;background:#eef1f4;color:#475569}
.tf-admin-lifecycle.active{background:#e8f5e9;color:#1b5e20}.tf-admin-lifecycle.inactive{background:#fff4e5;color:#9a5b00}.tf-admin-lifecycle.long{background:#fdecec;color:#a12424}.tf-admin-lifecycle.archived{background:#eceff1;color:#455a64}
.tf-share-card{max-width:680px;margin:2rem auto}.tf-qr-wrap{display:flex;justify-content:center;align-items:center;background:#fff;padding:24px;border:1px solid #e3e7eb;border-radius:14px}.tf-qr-wrap svg{width:min(360px,80vw);height:auto}
