/* =========================================================================
   TFCA product page: phone frames, the four signature sections and the interactive samples.
   Colours are the app's own tokens (lib/providers/theme_provider.dart):
   scholarBg #0A0E1A · scholarCard #111827 · scholarSurface2 #1F2937 ·
   scholarLine #26304A · scholarGold #D4AF64 · ratings #F87171 #FBBF24
   #60A5FA #4ADE80 · quiz emerald #10B981 · statusBad #EF4444.
   ========================================================================= */
.tf {
  --bg: #0A0E1A; --card: #111827; --s2: #1F2937; --s3: #374151; --tline: #26304A;
  --gold: #D4AF64; --gold-hi: #E6CE97; --gold-lo: #B8913F;
  --g08: rgba(212,175,100,0.08); --g12: rgba(212,175,100,0.12); --g20: rgba(212,175,100,0.2); --g40: rgba(212,175,100,0.4);
  --ink-soft: #E2E8F0; --mid: #9CA3AF; --dim: #6B7280;
  --again: #F87171; --hard: #FBBF24; --good: #60A5FA; --easy: #4ADE80;
  --emerald: #10B981; --crimson: #EF4444;
}
.tf svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero ---------- */
.tf-hero { padding-bottom: clamp(2rem, 5vw, 4rem); isolation: isolate; }
.tf-hero-sky {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38rem 30rem at 78% 38%, rgba(212,175,100,0.16), transparent 62%),
    radial-gradient(30rem 22rem at 10% 100%, rgba(96,165,250,0.06), transparent 60%);
}
.tf-hero-sky::before {
  content: ""; position: absolute; inset: 0; opacity: 0.55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent 60%),
    radial-gradient(1px 1px at 28% 72%, #fff, transparent 60%),
    radial-gradient(1.4px 1.4px at 46% 12%, #E6CE97, transparent 60%),
    radial-gradient(1px 1px at 63% 84%, #fff, transparent 60%),
    radial-gradient(1.2px 1.2px at 88% 14%, #fff, transparent 60%),
    radial-gradient(1px 1px at 94% 62%, #E6CE97, transparent 60%),
    radial-gradient(1px 1px at 6% 52%, #fff, transparent 60%),
    radial-gradient(1.3px 1.3px at 54% 40%, #fff, transparent 60%);
}
.tf-hero-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.tf-hero-facts { display: flex; flex-wrap: wrap; gap: clamp(1.25rem, 3vw, 2.5rem); margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.tf-hero-facts li { display: grid; gap: 0.15rem; }
.tf-hero-facts strong { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.03em; font-size: 2.4rem; line-height: 1; color: var(--gold); }
.tf-hero-facts span { font-size: 0.9rem; color: var(--muted); }

.tf-hero-stage { position: relative; min-height: 680px; display: grid; place-items: center; padding-bottom: 2.5rem; }
.tf-hero-stage .tf-phone--front { --w: 308px; position: relative; z-index: 2; transform: translateX(14%) rotate(2deg); animation: tf-float 9s ease-in-out infinite; }
.tf-hero-stage .tf-phone--back { --w: 268px; position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-96%, -46%) rotate(-7deg); filter: brightness(0.62) saturate(0.9); }
.tf-real-note { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: max-content; max-width: 100%; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--mid); text-align: center; display: inline-flex; align-items: center; gap: 0.5rem; }
.tf-real-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
@keyframes tf-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Phone frame (the screen inside is a real capture) ---------- */
.tf-phone {
  --w: 280px; --pad: calc(var(--w) * 0.034); --sw: calc(var(--w) - 2 * var(--pad));
  position: relative; margin: 0; width: var(--w); flex: none;
  padding: var(--pad); border-radius: calc(var(--w) * 0.165);
  background: linear-gradient(150deg, #3a3f4b 0%, #14171e 22%, #0b0d12 60%, #262a33 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.10), inset 0 0 0 4px #05060a,
    0 50px 90px -40px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.6),
    0 0 140px -50px rgba(212,175,100,0.45);
}
.tf-phone-screen { position: relative; overflow: hidden; border-radius: calc(var(--w) * 0.135); background: #0A0E1A; aspect-ratio: 390 / 844; }
.tf-phone-screen img { width: 100%; height: 100%; display: block; object-fit: cover; }
.tf-phone::after { /* Dynamic Island */
  content: ""; position: absolute; left: 50%; top: calc(var(--pad) + var(--sw) * 0.03);
  width: calc(var(--sw) * 0.31); height: calc(var(--sw) * 0.085); transform: translateX(-50%);
  background: #000; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.tf-status {
  position: absolute; left: var(--pad); right: var(--pad); top: var(--pad); height: calc(var(--sw) * 0.138);
  display: flex; align-items: center; justify-content: space-between; padding: 0 calc(var(--sw) * 0.1) 0 calc(var(--sw) * 0.11);
  font: 600 calc(var(--sw) * 0.042) / 1 var(--font-sans); color: #fff; letter-spacing: 0.01em; pointer-events: none;
}
.tf-status i { width: calc(var(--sw) * 0.17); height: calc(var(--sw) * 0.034); position: relative;
  background:
    linear-gradient(#fff, #fff) right center / calc(var(--sw) * 0.062) 100% no-repeat,
    radial-gradient(circle at 50% 100%, #fff 0 30%, transparent 31%) left center / calc(var(--sw) * 0.05) 100% no-repeat;
  border-radius: 2px; opacity: 0.95;
}
.tf-status i::before { /* signal bars */
  content: ""; position: absolute; left: calc(var(--sw) * 0.055); bottom: 0; width: calc(var(--sw) * 0.045); height: 100%;
  background: linear-gradient(to right, #fff 0 18%, transparent 18% 27%, #fff 27% 45%, transparent 45% 54%, #fff 54% 72%, transparent 72% 81%, #fff 81%);
  clip-path: polygon(0 75%, 100% 0, 100% 100%, 0 100%);
}

  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  --edge: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  scroll-padding-inline: var(--edge); padding-block: 1.5rem 0.5rem;
}

/* ---------- Sample panels (study, tutor) ---------- */
.tf-try { position: relative; overflow: hidden; }
.tf-try::before { content: ""; position: absolute; left: 50%; top: 22%; width: 70rem; height: 40rem; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(212,175,100,0.09), transparent); pointer-events: none; }
.tf-studio { position: relative; display: grid; gap: var(--space-6); }

.tf-panel { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.tf-panel[hidden] { display: none; }
.tf-panel.is-entering .tf-app { animation: tf-rise 0.5s var(--ease); }
@keyframes tf-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* The app surface: the app's own colours and shapes, live */
.tf-app {
  position: relative; overflow: hidden; display: grid; gap: 0.9rem; align-content: start;
  min-height: 640px; padding: 1.15rem 1.15rem 1.35rem; border-radius: 30px;
  background: linear-gradient(180deg, #0C1120, var(--bg) 30%);
  border: 1px solid rgba(212,175,100,0.16);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.85), 0 0 0 6px rgba(10,14,26,0.6), 0 0 0 7px rgba(212,175,100,0.08);
  color: #F9FAFB;
}
.tf-app-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; min-height: 44px; }
.tf-pill { justify-self: start; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid #2a3344; background: var(--card); font-size: 0.78rem; font-weight: 500; color: #F9FAFB; letter-spacing: 0.04em; }
.tf-sample { justify-self: center; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); background: var(--g08); border: 1px solid var(--g20); padding: 0.3rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.tf-label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mid); margin-top: 0.2rem; }
.tf-kind { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.tf-fine { font-size: 0.82rem; color: var(--mid); line-height: 1.5; }
.tf-toast { min-height: 1.4em; text-align: center; font-size: 0.86rem; color: var(--gold-hi); }

/* Ring (daily goal) */
.tf-ring { position: relative; width: 46px; height: 46px; justify-self: end; }
.tf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tf-ring-bg { stroke: var(--s2); stroke-width: 4; }
.tf-ring-fg { stroke: var(--gold); stroke-width: 4; stroke-linecap: butt; stroke-dasharray: var(--p, 0) 100; transition: stroke-dasharray 0.7s var(--ease); }
.tf-ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 0.68rem/1 var(--font-mono); color: #F9FAFB; }

/* Category pills */
.tf-cats { display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none; margin-inline: -0.2rem; padding: 0.1rem 0.2rem; }
.tf-cats::-webkit-scrollbar { display: none; }
.tf-cats button { flex: none; border: 1px solid var(--tline); background: var(--card); color: var(--mid); border-radius: 999px; padding: 0.38rem 0.75rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease); }
.tf-cats button b { font-family: var(--font-mono); font-weight: 500; color: var(--gold); margin-right: 0.35rem; }
.tf-cats button[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.tf-cats button[aria-selected="true"] b { color: var(--bg); }
.tf-cats button.done:not([aria-selected="true"]) { border-color: var(--g40); color: var(--ink-soft); }

.tf-level { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.tf-level i { width: 16px; height: 4px; border-radius: 2px; background: var(--s3); }
.tf-level i:first-child { background: var(--gold); }
.tf-level span { margin-left: 0.4rem; }

/* The study card */
.tf-card { display: grid; grid-template-rows: auto auto; border-radius: 22px; background: var(--card); border: 1px solid rgba(212,175,100,0.12); overflow: hidden; }
.tf-card-half { position: relative; display: grid; place-items: center; align-content: center; gap: 0.7rem; padding: 1.4rem 1.25rem; text-align: center; min-height: 196px; }
.tf-card-front .tf-kind { position: absolute; top: 0.9rem; left: 1rem; }
.tf-card-text { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; max-width: 24ch; color: #F9FAFB; }
.tf-card-back { border: 0; border-top: 2px solid var(--s2); background: transparent; color: inherit; font: inherit; cursor: pointer; width: 100%; min-height: 176px; transition: background-color 0.25s var(--ease); }
.tf-card-back:hover { background: rgba(255,255,255,0.015); }
.tf-card-back[aria-expanded="true"] { cursor: default; }
.tf-reveal-hint { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mid); display: inline-flex; align-items: center; gap: 0.5rem; }
.tf-reveal-hint::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--g20); animation: tf-pulse 1.8s ease-in-out infinite; }
@keyframes tf-pulse { 50% { box-shadow: 0 0 0 7px rgba(212,175,100,0.06); } }
.tf-back-wrap { display: grid; gap: 0.45rem; justify-items: center; }
.tf-card-back[aria-expanded="false"] .tf-back-wrap { display: none; }
.tf-card-back[aria-expanded="true"] .tf-reveal-hint { display: none; }
.tf-card-back[aria-expanded="true"] .tf-back-wrap { animation: tf-rise 0.4s var(--ease); }
.tf-card-back .tf-card-text { color: var(--gold-hi); }
.tf-card-sub { font-size: 0.9rem; color: var(--mid); max-width: 34ch; line-height: 1.45; }
.tf-speak { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #1a1406;
  background: radial-gradient(circle at 35% 30%, #EBCF8E, var(--gold) 55%, var(--gold-lo)); box-shadow: 0 4px 0 #5c4a24, 0 10px 20px -8px rgba(212,175,100,0.6); transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.tf-speak svg { width: 20px; height: 20px; stroke-width: 2; }
.tf-speak:active, .tf-speak.is-on { transform: translateY(3px); box-shadow: 0 1px 0 #5c4a24, 0 6px 14px -8px rgba(212,175,100,0.6); }
.tf-speak-sm { width: 36px; height: 36px; box-shadow: 0 3px 0 #5c4a24; }
.tf-speak-sm svg { width: 16px; height: 16px; }

/* Rating buttons: the app's four rating colours */
.tf-rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; }
.tf-rate button { --r: var(--good); display: grid; gap: 0.15rem; justify-items: center; padding: 0.7rem 0.25rem 0.6rem; border-radius: 14px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--r) 38%, transparent); background: color-mix(in srgb, var(--r) 12%, var(--card)); color: var(--r);
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease), opacity 0.25s; }
.tf-rate button b { font-weight: 700; font-size: 0.95rem; }
.tf-rate button small { font: 500 0.74rem/1 var(--font-mono); color: color-mix(in srgb, var(--r) 70%, #fff); }
.tf-rate button:hover { background: color-mix(in srgb, var(--r) 22%, var(--card)); transform: translateY(-1px); }
.tf-rate button:active { transform: translateY(1px); }
.tf-rate [data-r="again"] { --r: var(--again); } .tf-rate [data-r="hard"] { --r: var(--hard); } .tf-rate [data-r="good"] { --r: var(--good); } .tf-rate [data-r="easy"] { --r: var(--easy); }
.tf-app.is-front .tf-rate button { opacity: 0.72; }

/* Completion layer */
.tf-done { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; align-content: center; gap: 0.8rem; padding: 2rem; text-align: center; background: rgba(10,14,26,0.94); backdrop-filter: blur(6px); animation: tf-rise 0.45s var(--ease); }
.tf-done[hidden] { display: none; }
.tf-done-ring { position: relative; width: 132px; height: 132px; margin-bottom: 0.4rem; }
.tf-done-ring svg:first-child { width: 100%; height: 100%; transform: rotate(-90deg); }
.tf-done-ring .tf-ring-bg, .tf-done-ring .tf-ring-fg { stroke-width: 7; }
.tf-flame { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; color: var(--gold); fill: rgba(212,175,100,0.25) !important; animation: tf-flicker 2.4s ease-in-out infinite; }
@keyframes tf-flicker { 50% { transform: scale(1.08) rotate(-3deg); } }
.tf-done-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-serif); font-size: 2.2rem; color: #fff; }
.tf-done-t { font-family: var(--font-serif); font-size: 1.7rem; color: #fff; }
.tf-done-p { color: var(--mid); max-width: 30ch; font-size: 0.95rem; margin-bottom: 0.5rem; }


/* Chips (tutor) */
.tf-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tf-chips button { border: 1px solid var(--tline); background: var(--card); color: var(--ink-soft); border-radius: 999px; padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease); display: inline-flex; gap: 0.45rem; align-items: center; }
.tf-chips button:hover { border-color: var(--g40); }
.tf-chips button[aria-checked="true"] { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.tf-chips button .mono { font-size: 0.68rem; opacity: 0.7; letter-spacing: 0.06em; }
.tf-chips-sm button { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.tf-chips-sm button[aria-checked="true"] { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }

/* Tutor */
.tf-partners { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.tf-partners button { display: grid; justify-items: center; gap: 0.45rem; padding: 0.2rem 0; border: 0; background: none; color: var(--ink-soft); cursor: pointer; font-weight: 600; font-size: 0.86rem; border-radius: 12px; }
.tf-partners img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tline); transition: border-color 0.2s var(--ease), transform 0.25s var(--ease); background: var(--card); }
.tf-partners button:hover img { transform: scale(1.05); }
.tf-partners button[aria-checked="true"] { color: var(--gold); }
.tf-partners button[aria-checked="true"] img { border: 2.5px solid var(--gold); box-shadow: 0 0 0 4px var(--g12); }
.tf-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.25rem; padding: 0.3rem; border-radius: 14px; background: var(--card); border: 1px solid var(--tline); }
.tf-seg button { border: 0; background: transparent; color: var(--mid); border-radius: 10px; padding: 0.55rem 0.3rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; line-height: 1.25; transition: all 0.2s var(--ease); }
.tf-seg button[aria-checked="true"] { background: var(--gold); color: var(--bg); }
.tf-chat { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.7rem; align-items: end; min-height: 128px; padding: 0.3rem 0; }
.tf-chat-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--gold); }
.tf-bubble { padding: 0.85rem 1rem; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--tline); }
.tf-bubble.is-new { animation: tf-rise 0.4s var(--ease); }
.tf-bubble-name { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; }
.tf-bubble-t { font-size: 1.02rem; line-height: 1.45; color: #F9FAFB; }
.tf-bubble-tr { font-size: 0.86rem; color: var(--mid); margin-top: 0.35rem; line-height: 1.4; }
.tf-bubble-tr:empty { display: none; }
.tf-varwrap { display: grid; gap: 0.5rem; }
.tf-varwrap[hidden] { display: none; }
.tf-typing { display: inline-flex; gap: 4px; padding: 0.2rem 0; }
.tf-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--mid); animation: tf-dot 1s infinite; }
.tf-typing i:nth-child(2) { animation-delay: 0.15s; } .tf-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tf-dot { 50% { opacity: 0.25; transform: translateY(-2px); } }

/* Explanations beside each sample */
.tf-explain { display: grid; gap: var(--space-4); align-content: center; max-width: 34rem; }
.tf-explain h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.12; }
.tf-explain > p { color: var(--muted); font-size: 1.04rem; }
.tf-ladder { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.tf-ladder li { --r: var(--good); display: grid; gap: 0.2rem; padding: 0.9rem 0.8rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--tline); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.3s; }
.tf-ladder li span { font-size: 1.15rem; color: #fff; }
.tf-ladder li b { font-size: 0.82rem; font-weight: 600; color: var(--r); }
.tf-ladder [data-step="again"] { --r: var(--again); } .tf-ladder [data-step="hard"] { --r: var(--hard); } .tf-ladder [data-step="good"] { --r: var(--good); } .tf-ladder [data-step="easy"] { --r: var(--easy); }
.tf-ladder li.on { border-color: var(--r); background: color-mix(in srgb, var(--r) 12%, var(--bg)); transform: translateY(-3px); }
.tf-sources, .tf-checks { display: grid; gap: 0.6rem; margin-top: var(--space-2); }
.tf-sources li { display: flex; align-items: center; gap: 0.75rem; color: var(--ink-soft); }
.tf-sources svg { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--g12); color: var(--gold); flex: none; }
.tf-checks li { position: relative; padding-left: 1.8rem; color: var(--ink-soft); }
.tf-checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--g20) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF64' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }


/* ---------- Features (on the TFCA page) ---------- */
.tf-features .feature { padding: var(--space-5); border-radius: var(--radius-m); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), transparent); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.tf-features .feature:hover { border-color: var(--g40); transform: translateY(-2px); }
.tf-features { gap: var(--space-4); }

/* ---------- Languages ---------- */
.tf-langs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--radius-l); border: 1px solid var(--line); background: radial-gradient(40rem 20rem at 100% 0%, rgba(212,175,100,0.08), transparent 60%), var(--surface); }
.tf-langs h2 { font-size: var(--fs-h2); margin: 1rem 0; }
.tf-lang-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.tf-lang-grid li { display: grid; gap: 0.1rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--bg); border: 1px solid var(--tline); transition: border-color 0.25s var(--ease), transform 0.25s var(--ease); }
.tf-lang-grid li:hover { border-color: var(--g40); transform: translateY(-2px); }
.tf-lang-grid .mono { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--gold); }
.tf-lang-grid b { font-size: 1.08rem; font-weight: 650; }
.tf-lang-grid small { font-family: var(--font-serif); font-style: italic; color: var(--mid); font-size: 0.95rem; }

/* ---------- Download ---------- */
.tf-download { align-items: start; }
.tf-stores { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: var(--space-5); position: relative; z-index: 1; }
.tf-store { display: inline-flex; align-items: center; gap: 0.75rem; min-width: 190px; padding: 0.7rem 1.2rem 0.7rem 0.95rem; border-radius: 14px; background: #000; border: 1px solid rgba(255,255,255,0.22); color: #fff; text-decoration: none; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.tf-store svg { width: 28px; height: 28px; color: var(--gold); flex: none; }
.tf-store span { display: grid; line-height: 1.15; }
.tf-store small { font-size: 0.7rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.7); }
.tf-store b { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
.tf-store[href]:hover { border-color: var(--gold); transform: translateY(-1px); }
.tf-store[aria-disabled="true"] { cursor: default; border-style: dashed; border-color: rgba(255,255,255,0.18); }
.tf-store[aria-disabled="true"] small { color: var(--gold); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.62rem; }
.tf-store[aria-disabled="true"] b { color: rgba(255,255,255,0.75); }
.tf-download .btn-row { margin-top: var(--space-4); }

/* ---------- The service: four signature features ---------- */
.tf-index-sec { padding-top: clamp(1rem, 3vw, 2rem); padding-bottom: var(--space-4); }
.tf-index-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; margin-bottom: var(--space-5); }
.tf-index-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; }
.tf-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.tf-index a { position: relative; display: grid; gap: 0.35rem; align-content: start; height: 100%; padding: 1.25rem 1.2rem 1.35rem; border-radius: var(--radius-l); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), transparent 140%); color: inherit; text-decoration: none; transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.25s; }
.tf-index a:hover, .tf-index a:focus-visible { border-color: var(--g40); transform: translateY(-3px); }
.tf-index-n { position: absolute; top: 1.2rem; right: 1.2rem; font-size: 0.72rem; letter-spacing: 0.12em; color: var(--dim); }
.tf-index-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--g12); color: var(--gold); margin-bottom: 0.6rem; }
.tf-index-ico svg { width: 21px; height: 21px; }
.tf-index b { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.01em; }
.tf-index span:last-child { color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
.tf-index li:first-child a { border-color: var(--g40); background: radial-gradient(18rem 10rem at 100% 0%, rgba(212,175,100,0.14), transparent 70%), var(--surface); }
.tf-sig-n { color: var(--gold); letter-spacing: 0.1em; }
.tf-sig .section-head { max-width: 50rem; }

/* ---------- 01 · YouTube: the three-step flow of real screens ---------- */
.tf-flow { list-style: none; margin: 0 0 var(--space-8); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.75rem); align-items: start; }
.tf-flow-step { display: grid; grid-template-rows: 566px auto; gap: 1.6rem; justify-items: center; }
.tf-flow-step > figure { align-self: center; }
.tf-phone--md { --w: min(270px, 100%); }
.tf-phone--sm { --w: 200px; }
.tf-phone--xs { --w: 120px; }
.tf-shot { margin: 0; width: min(270px, 100%); padding: 9px; border-radius: 30px; background: linear-gradient(150deg, #262a33, #0b0d12 60%); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 50px 90px -40px rgba(0,0,0,0.9), 0 0 140px -50px rgba(212,175,100,0.45); }
.tf-shot img { display: block; width: 100%; height: auto; border-radius: 22px; }
.tf-flow-copy { display: grid; gap: 0.5rem; max-width: 22rem; }
.tf-flow-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--g40); color: var(--gold); font-size: 0.8rem; }
.tf-flow-copy h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
.tf-flow-copy p { color: var(--muted); font-size: 0.98rem; line-height: 1.55; }

/* ---------- 01 · YouTube: the interactive sample ---------- */
.tf-yt-sec, .tf-sig { overflow-x: clip; }
.tf-yt-demo { position: relative; margin-bottom: var(--space-8); scroll-margin-top: calc(var(--header-h, 72px) + 1rem); }
.tf-yt-demo::before { content: ""; position: absolute; left: 50%; top: 10%; width: 80rem; max-width: 140vw; height: 46rem; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(212,175,100,0.08), transparent); pointer-events: none; z-index: -1; }
.tf-yt-demo-head { display: grid; gap: 0.75rem; max-width: 44rem; margin-bottom: var(--space-6); }
.tf-yt-demo-head h3 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.12; }
.tf-yt-demo-head > p:last-child { color: var(--muted); font-size: 1.04rem; }
.tf-yt {
  position: relative; display: grid; gap: 1rem; padding: 1.15rem clamp(1rem, 2.5vw, 1.75rem) 1.5rem; border-radius: 30px;
  background: linear-gradient(180deg, #0C1120, var(--bg) 30%); border: 1px solid rgba(212,175,100,0.16);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.85), 0 0 0 6px rgba(10,14,26,0.6), 0 0 0 7px rgba(212,175,100,0.08); color: #F9FAFB;
}
.tf-yt-reset { justify-self: end; border: 1px solid var(--tline); background: var(--card); color: var(--ink-soft); border-radius: 999px; padding: 0.45rem 0.9rem; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.tf-yt-reset:hover { border-color: var(--g40); color: #fff; }
.tf-yt-reset[hidden] { display: none; }

.tf-yt-start { display: grid; gap: 0.75rem; max-width: 760px; width: 100%; justify-self: center; padding: 0.5rem 0 0.25rem; }
.tf-yt-start[hidden], .tf-yt-result[hidden] { display: none; }
.tf-yt-url { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem 0.35rem 0.45rem; border-radius: 14px; background: var(--card); border: 1.5px solid rgba(212,175,100,0.3); transition: border-color 0.2s var(--ease); }
.tf-yt-url:focus-within { border-color: var(--gold); }
.tf-yt-url-ico { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: rgba(239,68,68,0.15); color: var(--again); }
.tf-yt-url-ico svg { width: 16px; height: 16px; }
.tf-yt-url input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: 500 1rem/1.4 var(--font-sans); padding: 0.55rem 0.2rem; outline: none; }
.tf-yt-own { min-height: 1.2em; font-size: 0.84rem; color: var(--gold-hi); }
.tf-yt-own:empty { display: none; }
.tf-yt-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.tf-yt-samples button { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0.75rem; align-items: center; text-align: left; padding: 0.55rem 0.7rem 0.55rem 0.55rem; border-radius: 14px; border: 1px solid var(--tline); background: var(--card); color: var(--ink-soft); cursor: pointer; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.tf-yt-samples button:hover { border-color: var(--g40); transform: translateY(-1px); }
.tf-yt-samples button[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px var(--g12); }
.tf-yt-sthumb { width: 64px; aspect-ratio: 16 / 10; border-radius: 9px; }
.tf-yt-smeta { display: grid; gap: 0.15rem; min-width: 0; }
.tf-yt-smeta b { font-size: 0.92rem; font-weight: 600; color: #fff; line-height: 1.25; }
.tf-yt-smeta small { font-size: 0.68rem; letter-spacing: 0.08em; color: var(--mid); }
.tf-yt-opts { display: grid; grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr); gap: 1rem; padding: 0.9rem 1rem; border-radius: 16px; background: rgba(17,24,39,0.6); border: 1px solid var(--tline); }
.tf-yt-opts .tf-label { margin: 0 0 0.45rem; }
.tf-yt-langval { font-size: 1.02rem; font-weight: 600; }
.tf-yt-kinds { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.35rem; }
.tf-yt-kinds button { display: grid; justify-items: center; gap: 0.1rem; padding: 0.45rem 0.2rem; border-radius: 10px; border: 1px solid var(--tline); background: #161f33; color: var(--mid); font-size: 0.74rem; font-weight: 600; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.tf-yt-kinds button b { font-size: 0.68rem; opacity: 0.8; }
.tf-yt-kinds button[aria-pressed="true"] { border-color: #9a7f43; background: rgba(212,175,100,0.09); color: var(--gold); }
.tf-yt-go { justify-self: stretch; justify-content: center; margin-top: 0.25rem; --btn-bg: var(--gold); --btn-fg: var(--bg); }
.tf-yt-go svg { width: 18px; height: 18px; }
.tf-yt-go[disabled] { opacity: 0.45; cursor: not-allowed; }
.tf-yt-steps { list-style: none; margin: 0.25rem 0 0; padding: 0.9rem 1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; border-radius: 14px; background: var(--card); border: 1px solid var(--tline); }
.tf-yt-steps[hidden] { display: none; }
.tf-yt-steps li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--dim); transition: color 0.25s; }
.tf-yt-steps i { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--s3); }
.tf-yt-steps li.now { color: #fff; }
.tf-yt-steps li.now i { border-color: var(--gold); border-right-color: transparent; animation: tf-spin 0.8s linear infinite; }
.tf-yt-steps li.done { color: var(--ink-soft); }
.tf-yt-steps li.done i { border-color: var(--easy); background: var(--easy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0E1A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 75% no-repeat; }
@keyframes tf-spin { to { transform: rotate(360deg); } }

.tf-yt-result { display: grid; gap: 0.9rem; }
.tf-yt-banner { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.95rem; border-radius: 12px; background: #0A1F12; border: 1px solid #14532D; color: #86EFAC; font-size: 0.9rem; line-height: 1.4; }
.tf-yt-banner::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; background: #22C55E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1F12' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }
.tf-yt-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--tline); }
.tf-yt-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.8rem 0.4rem; border: 0; border-bottom: 2.5px solid transparent; margin-bottom: -1px; background: none; color: var(--mid); font-weight: 650; font-size: 0.95rem; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.tf-yt-tabs button svg { width: 18px; height: 18px; }
.tf-yt-tabs button:hover { color: #fff; }
.tf-yt-tabs button[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.tf-yt-tabs button b { font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--g12); color: var(--gold); }
.tf-yt-panel[hidden] { display: none; }

/* Watch: player stand-in on the left, synced transcript on the right */
.tf-yt-watch { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(1rem, 2.4vw, 1.75rem); align-items: start; }
.tf-yt-left { display: grid; gap: 0.6rem; }
.tf-yt-player { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; isolation: isolate; box-shadow: 0 20px 50px -25px rgba(0,0,0,0.9); }
.p-mercado { background: radial-gradient(circle at 78% 70%, #E84328 0 9%, transparent 9.5%), radial-gradient(circle at 88% 42%, #F58C28 0 8%, transparent 8.5%), radial-gradient(circle at 70% 36%, #62A046 0 7%, transparent 7.5%), radial-gradient(circle at 94% 82%, #D63031 0 10%, transparent 10.5%), radial-gradient(circle at 62% 86%, #FABE3C 0 8%, transparent 8.5%), radial-gradient(circle at 82% 16%, #C8203C 0 7%, transparent 7.5%), linear-gradient(90deg, rgba(20,10,8,0.75), rgba(20,10,8,0.05) 70%), linear-gradient(160deg, #C46234, #78302A); }
.p-boulangerie { background: radial-gradient(ellipse 22% 9% at 76% 40%, #E3A857 0 70%, transparent 72%), radial-gradient(ellipse 22% 9% at 82% 62%, #D49A48 0 70%, transparent 72%), radial-gradient(ellipse 22% 9% at 72% 82%, #E8B567 0 70%, transparent 72%), radial-gradient(circle at 92% 22%, #F4D9A3 0 6%, transparent 6.5%), linear-gradient(90deg, rgba(30,18,8,0.8), rgba(30,18,8,0.05) 70%), linear-gradient(160deg, #8C5A2B, #3E2614); }
.p-pancakes { background: radial-gradient(circle at 78% 58%, #F2C26B 0 18%, #D99A3E 18.5% 20%, transparent 20.5%), radial-gradient(circle at 78% 52%, #F7D58C 0 16%, transparent 16.5%), radial-gradient(circle at 74% 45%, #FFF3D6 0 3%, transparent 3.5%), radial-gradient(circle at 90% 20%, #F9E04B 0 5%, transparent 5.5%), linear-gradient(90deg, rgba(14,24,32,0.8), rgba(14,24,32,0.05) 70%), linear-gradient(160deg, #2F6F7E, #12333B); }
.tf-yt-poster { position: absolute; inset: 0; display: grid; align-content: center; gap: 0.6rem; padding: 0 8% 0 6%; }
.tf-yt-tag { justify-self: start; padding: 0.2rem 0.55rem; border-radius: 6px; background: #FFD65A; color: #28140A; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.tf-yt-ptitle { max-width: 11ch; font-weight: 800; font-size: clamp(1.4rem, 3.2vw, 2.3rem); line-height: 1.02; letter-spacing: -0.02em; text-transform: uppercase; color: #FFFAF0; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.tf-yt-big { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; border: 0; background: rgba(0,0,0,0.62); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform 0.2s var(--ease), background-color 0.2s; }
.tf-yt-big:hover { transform: translate(-50%, -50%) scale(1.06); background: rgba(0,0,0,0.75); }
.tf-yt-big svg { width: 30px; height: 30px; margin-left: 3px; }
.tf-yt-big[hidden] { display: none; }
.tf-yt-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; background: linear-gradient(transparent, rgba(0,0,0,0.7)); font-size: 0.72rem; color: #fff; }
.tf-yt-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); overflow: hidden; }
.tf-yt-track i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s linear; }
.tf-yt-standin { font-size: 0.68rem; letter-spacing: 0.06em; color: var(--dim); }
.tf-yt-ctrls { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 2fr); gap: 0.5rem; }
.tf-yt-ctl { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--tline); background: var(--s2); color: var(--gold); font-weight: 700; font-size: 0.86rem; cursor: pointer; transition: border-color 0.2s, background-color 0.2s; }
.tf-yt-ctl svg { width: 18px; height: 18px; }
.tf-yt-ctl:hover { border-color: var(--g40); }
.tf-yt-ctl[hidden] { display: none; }
.tf-yt-play .i-pause, .is-playing .tf-yt-play .i-play { display: none; }
.is-playing .tf-yt-play .i-pause { display: block; }
.tf-yt-narr[aria-pressed="true"] { background: rgba(212,175,100,0.16); border-color: rgba(212,175,100,0.5); }
.tf-yt-review { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.tf-yt-review:hover { background: var(--gold-hi); }

.tf-yt-tr { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 0.6rem; min-width: 0; height: 100%; max-height: 470px; padding: 0.85rem 0.9rem 0.7rem; border-radius: 16px; background: rgba(17,24,39,0.55); border: 1px solid var(--tline); }
.tf-yt-trhead { display: flex; align-items: center; gap: 0.5rem; }
.tf-yt-count { font-size: 0.66rem; padding: 0.12rem 0.45rem; border-radius: 4px; background: var(--s2); color: var(--mid); }
.tf-yt-show { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.tf-yt-show > span { flex: none; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mid); }
.tf-yt-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 2px; }
.tf-yt-pills::-webkit-scrollbar { display: none; }
.tf-yt-pills button { flex: none; display: inline-flex; align-items: baseline; gap: 0.35rem; padding: 0.38rem 0.7rem; border-radius: 999px; border: 1px solid var(--tline); background: var(--card); color: var(--ink-soft); font-size: 0.8rem; cursor: pointer; transition: border-color 0.2s; }
.tf-yt-pills button b { font-size: 0.7rem; color: var(--mid); }
.tf-yt-pills button small { font-size: 0.66rem; color: var(--dim); }
.tf-yt-pills button:hover { border-color: var(--g40); }
.tf-yt-pills button[aria-checked="true"] { border: 1.5px solid var(--gold); background: rgba(212,175,100,0.1); color: var(--gold); }
.tf-yt-pills button[aria-checked="true"] b, .tf-yt-pills button[aria-checked="true"] small { color: var(--gold); }
.tf-yt-lines { list-style: none; margin: 0; padding: 0 0.15rem 0 0; overflow-y: auto; display: grid; gap: 1px; align-content: start; scrollbar-width: thin; scrollbar-color: var(--s3) transparent; position: relative; }
.tf-yt-lines button { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.4rem; width: 100%; text-align: left; padding: 0.42rem 0.55rem; border: 0; border-left: 2px solid transparent; border-radius: 6px; background: transparent; color: var(--mid); font-size: 0.92rem; line-height: 1.42; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.tf-yt-lines button .mono { font-size: 0.68rem; color: var(--dim); padding-top: 0.2rem; }
.tf-yt-lines button:hover { background: rgba(255,255,255,0.03); color: var(--ink-soft); }
.tf-yt-lines button.past { color: var(--dim); }
.tf-yt-lines button.now { background: rgba(212,175,100,0.12); border-left-color: var(--gold); color: #fff; font-weight: 500; }
.tf-yt-lines button.now .mono { color: var(--gold); }
.tf-yt-hint { font-size: 0.74rem; }

/* Transcript (Review & Clean): highlights and the sheet */
.tf-yt-text { position: relative; display: grid; gap: 0.8rem; min-height: 420px; align-content: start; }
.tf-yt-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.8rem; color: var(--mid); }
.tf-yt-legend > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.tf-yt-legend .sw { width: 14px; height: 9px; border-radius: 2px; }
.sw-a { background: rgba(79,209,165,0.55); } .sw-b { background: rgba(91,163,224,0.55); }
.tf-yt-flow { max-width: 58rem; font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 2.05; color: #E5E7EB; }
.tf-yt-flow .w { cursor: text; border-radius: 3px; }
.tf-yt-flow .w:hover { background: rgba(255,255,255,0.06); }
.tf-yt-flow .hl { font: inherit; line-height: 1.5; padding: 0.05em 0.12em; margin: 0; border: 0; border-radius: 3px; cursor: pointer; transition: filter 0.2s, opacity 0.2s; }
.tf-yt-flow .hl-a { background: #13361F; color: #6EE7B7; }
.tf-yt-flow .hl-b { background: #13284A; color: #93C5FD; }
.tf-yt-flow .hl:hover { filter: brightness(1.25); }
.tf-yt-flow .hl.mine { background: rgba(212,175,100,0.18); color: var(--gold-hi); }
.tf-yt-flow .hl.rm { background: transparent; color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(239,68,68,0.7); }
.tf-yt-flow ::selection { background: rgba(212,175,100,0.35); color: #fff; }
.tf-yt-sheet { position: sticky; bottom: 0; z-index: 2; justify-self: center; width: min(100%, 460px); animation: tf-rise 0.3s var(--ease); }
.tf-yt-sheet[hidden] { display: none; }
.tf-yt-sheet-in { display: grid; gap: 0.5rem; padding: 1.1rem 1.1rem 0.6rem; border-radius: 20px; background: var(--card); border: 1px solid var(--tline); box-shadow: 0 -10px 40px -10px rgba(0,0,0,0.7); }
.tf-yt-sheet-f { font-size: 1.12rem; font-weight: 700; color: #fff; line-height: 1.3; }
.tf-yt-sheet-b { font-size: 1rem; color: var(--ink-soft); }
.tf-yt-sheet-s, .tf-yt-quote { font-size: 0.9rem; color: var(--mid); }
.tf-yt-rm { margin-top: 0.35rem; padding: 0.75rem; border-radius: 10px; border: 0; background: rgba(239,68,68,0.12); color: var(--crimson); font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.tf-yt-rm.is-rm { background: rgba(255,255,255,0.06); color: #fff; }
.tf-yt-close { padding: 0.55rem; border: 0; background: none; color: var(--mid); font-weight: 600; cursor: pointer; }
.tf-yt-close:hover { color: #fff; }
.tf-yt-cat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.tf-yt-cat button { padding: 0.6rem 0.3rem; border-radius: 10px; border: 1px solid var(--tline); background: var(--bg); color: var(--ink-soft); font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.tf-yt-cat button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: rgba(212,175,100,0.1); }
.tf-yt-add { justify-content: center; --btn-bg: var(--gold); --btn-fg: var(--bg); }

/* Cards, by kind */
.tf-yt-cards { display: grid; gap: 1rem; }
.tf-yt-cards-lead { color: var(--mid); font-size: 0.92rem; }
.tf-yt-groups { columns: 3 15rem; column-gap: 0.9rem; }
.tf-yt-group { break-inside: avoid; margin-bottom: 0.9rem; }
.tf-yt-group { display: grid; gap: 0.5rem; padding: 0.85rem; border-radius: 16px; background: rgba(17,24,39,0.55); border: 1px solid var(--tline); }
.tf-yt-group h4 { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; font-weight: 650; color: var(--ink-soft); }
.tf-yt-group h4 b { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--gold); color: var(--bg); font-size: 0.72rem; }
.tf-yt-group h4 small { margin-left: auto; font-size: 0.72rem; color: var(--mid); }
.tf-yt-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.tf-yt-card { position: relative; display: grid; gap: 0.2rem; padding: 0.65rem 0.75rem; border-radius: 12px; background: var(--bg); border: 1px solid var(--s2); }
.tf-yt-card .f { font-weight: 600; font-size: 0.93rem; line-height: 1.32; color: #F9FAFB; }
.tf-yt-card .b { font-size: 0.86rem; color: var(--gold-hi); line-height: 1.35; }
.tf-yt-card .s { font-size: 0.78rem; color: var(--mid); line-height: 1.35; }
.tf-yt-card.mine { border-color: var(--g40); }
.tf-yt-card.rm { opacity: 0.45; }
.tf-yt-card.rm .f { text-decoration: line-through; }
.tf-yt-mine { justify-self: start; margin-top: 0.15rem; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.tf-yt-mc { display: grid; gap: 0.3rem; margin-top: 0.3rem; }
.tf-yt-mc button { display: flex; align-items: center; gap: 0.55rem; text-align: left; padding: 0.45rem 0.55rem; border-radius: 9px; border: 1px solid var(--s2); background: rgba(31,41,55,0.6); color: var(--ink-soft); font-size: 0.84rem; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, opacity 0.2s; }
.tf-yt-mc button b { width: 20px; height: 20px; flex: none; border-radius: 6px; display: grid; place-items: center; background: var(--s3); font-size: 0.66rem; }
.tf-yt-mc button:hover:not([disabled]) { border-color: var(--g40); }
.tf-yt-mc button[disabled] { cursor: default; }
.tf-yt-mc button.ok { background: rgba(16,185,129,0.18); border-color: rgba(212,175,100,0.8); }
.tf-yt-mc button.ok b { background: var(--emerald); color: #04140d; }
.tf-yt-mc button.no { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.7); }
.tf-yt-mc button.no b { background: var(--crimson); color: #fff; }
.tf-yt-mc button.fade { opacity: 0.45; }
.tf-yt-mcfb { font-size: 0.78rem; margin-top: 0.2rem; }
.tf-yt-mcfb.ok { color: var(--easy); } .tf-yt-mcfb.no { color: var(--again); }
.tf-yt-fine { text-align: center; font-size: 0.76rem; color: var(--dim); }

/* What makes it work on real videos */
.tf-yt-details h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -0.015em; margin-bottom: var(--space-5); }
.tf-specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.tf-specs li { display: grid; gap: 0.35rem; align-content: start; padding: 1.3rem 1.5rem 1.4rem 0; border-bottom: 1px solid var(--line); }
.tf-specs li:not(:nth-child(3n + 1)) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.tf-specs b { font-size: 1rem; font-weight: 650; }
.tf-specs span { color: var(--muted); font-size: 0.94rem; line-height: 1.55; }

/* ---------- 02 · Anything you read ---------- */
.tf-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.tf-split .section-head { margin-bottom: var(--space-6); }
.tf-six { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.tf-six li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0.1rem 0.75rem; align-items: center; padding: 0.8rem 0.9rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--tline); }
.tf-six .mono { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--g12); color: var(--gold); font-size: 0.8rem; }
.tf-six b { font-size: 0.98rem; font-weight: 650; }
.tf-six small { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }
.tf-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tf-split-media { display: grid; gap: var(--space-5); justify-items: center; }
.tf-split-note { max-width: 22rem; display: grid; gap: 0.4rem; text-align: center; }
.tf-split-note h3 { font-size: 1.2rem; }
.tf-split-note p { color: var(--muted); font-size: 0.96rem; }

/* ---------- 03 · Tutor ---------- */
.tf-duo { display: flex; gap: 1rem; justify-content: flex-start; }
.tf-duo .tf-phone:last-child { margin-top: 2.5rem; }
.tf-modes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.tf-modes li { display: grid; gap: 0.2rem; padding: 0.8rem 0.9rem; border-radius: 14px; border: 1px solid var(--tline); background: var(--bg); }
.tf-modes b { font-size: 0.95rem; font-weight: 650; color: var(--gold); }
.tf-modes span { font-size: 0.86rem; color: var(--muted); line-height: 1.4; }

/* ---------- 04 · Remember: Power Mode ---------- */
.tf-power { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; align-items: center; margin-top: var(--space-3); padding: 1rem; border-radius: var(--radius-l); border: 1px solid var(--tline); background: var(--bg); }
.tf-power h4 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.tf-power p { color: var(--muted); font-size: 0.93rem; line-height: 1.5; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .tf-hero-layout { grid-template-columns: 1fr; }
  .tf-hero-stage { min-height: 600px; }
  .tf-panel { grid-template-columns: 1fr; justify-items: center; }
  .tf-app { width: 100%; max-width: 480px; }
  .tf-explain { max-width: 480px; }
  .tf-langs { grid-template-columns: 1fr; }
  .tf-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-flow { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .tf-flow-step { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto; justify-items: start; align-items: center; gap: 1.5rem; }
  .tf-flow-step .tf-phone--md, .tf-flow-step .tf-shot { --w: 210px; width: 210px; }
  .tf-yt-watch { grid-template-columns: 1fr; }
  .tf-yt-tr { height: auto; max-height: none; }
  .tf-yt-lines { max-height: 300px; }
  .tf-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-specs li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .tf-specs li:nth-child(2n) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
  .tf-split { grid-template-columns: 1fr; }
  .tf-duo { justify-content: center; }
}
@media (max-width: 760px) {
  .features.tf-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .tf-hero-stage { min-height: 500px; margin-top: 0.5rem; }
  .tf-hero-stage .tf-phone--front { --w: 236px; transform: translateX(12%) rotate(2deg); }
  .tf-hero-stage .tf-phone--back { --w: 206px; }
  .tf-hero-facts strong { font-size: 2rem; }
  .tf-app { padding: 0.95rem 0.85rem 1.1rem; border-radius: 24px; min-height: 0; }
  .tf-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features.tf-features { grid-template-columns: 1fr; }
  .tf-store { min-width: 0; flex: 1 1 160px; }
  .tf-index { grid-template-columns: 1fr; gap: 0.5rem; }
  .tf-index a { grid-template-columns: 40px minmax(0, 1fr); gap: 0.1rem 0.9rem; padding: 0.95rem 1rem; }
  .tf-index-ico { grid-row: span 2; margin: 0; align-self: center; }
  .tf-index-n { top: 0.95rem; right: 1rem; }
  .tf-yt > .tf-app-bar { display: flex; justify-content: space-between; }
  .tf-yt > .tf-app-bar .tf-pill { display: none; }
  .tf-yt-reset { white-space: nowrap; font-size: 0.78rem; padding: 0.4rem 0.75rem; }
  .tf-yt-show { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .tf-flow-step { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .tf-flow-step .tf-phone--md, .tf-flow-step .tf-shot { --w: 240px; width: 240px; }
  .tf-yt { padding: 0.9rem 0.75rem 1.1rem; border-radius: 24px; }
  .tf-yt-samples { grid-template-columns: 1fr; }
  .tf-yt-opts { grid-template-columns: 1fr; }
  .tf-yt-kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tf-yt-steps { grid-template-columns: 1fr 1fr; }
  .tf-yt-tabs button { font-size: 0.85rem; gap: 0.3rem; }
  .tf-yt-tabs button svg { display: none; }
  .tf-yt-ctrls { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr); }
  .tf-yt-groups { columns: 1; }
  .tf-specs { grid-template-columns: 1fr; }
  .tf-specs li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .tf-six, .tf-modes, .tf-sources { grid-template-columns: 1fr; }
  .tf-duo .tf-phone { --w: 150px; }
  .tf-power { grid-template-columns: 90px minmax(0, 1fr); }
  .tf-power .tf-phone--xs { --w: 90px; }
}

/* Right-to-left */
[dir="rtl"] .tf-card-front .tf-kind { left: auto; right: 1rem; }
[dir="rtl"] .tf-checks li { padding-left: 0; padding-right: 1.8rem; }
[dir="rtl"] .tf-checks li::before { left: auto; right: 0; }
[dir="rtl"] .tf-real-note { right: auto; left: 0; text-align: left; }
[dir="rtl"] .tf-index-n { right: auto; left: 1.2rem; }
[dir="rtl"] .tf-yt-samples button, [dir="rtl"] .tf-yt-lines button, [dir="rtl"] .tf-yt-mc button { text-align: right; }
[dir="rtl"] .tf-yt-lines button { border-left: 0; border-right: 2px solid transparent; }
[dir="rtl"] .tf-yt-lines button.now { border-right-color: var(--gold); }
[dir="rtl"] .tf-specs li:not(:nth-child(3n + 1)) { padding-left: 0; padding-right: 1.5rem; border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] .tf-yt-group h4 small { margin-left: 0; margin-right: auto; }

/* Motion is an enhancement only */
@media (prefers-reduced-motion: reduce) {
  .tf *, .tf *::before, .tf *::after { animation: none !important; transition: none !important; }
}


/* ---- Ported from the earlier site: film sections, app icon badge ---- */
.p-film { overflow-x: clip; }
.p-film-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: var(--space-8); align-items: center; }
.p-film-copy { display: grid; gap: 1rem; max-width: 34rem; }
.p-film-copy h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; }
.p-film-copy .lead { color: var(--muted); }
.p-film-toggle { justify-self: start; gap: 0.6rem; width: auto !important; }
.p-film-ico { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.p-film-toggle[aria-pressed="true"] .p-film-ico { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.p-film-frame { position: relative; margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 9 / 16; max-height: 78vh;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.55); justify-self: center; width: 100%; }
.p-film-frame::before { content: ""; position: absolute; inset: -20%; z-index: -1; background: radial-gradient(closest-side, var(--accent-soft), transparent); }
.p-film-video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .p-film-layout { grid-template-columns: 1fr; gap: var(--space-6); }
  .p-film-frame { max-width: 340px; }
}
.p-hero .app-badge, .tf .app-badge { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 10px 30px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08); }
.tf .wordmark { font-weight: 800; letter-spacing: 0.04em; font-size: 1.5rem; display: inline-flex; align-items: center; gap: 0.9rem; font-family: Georgia, serif; }
.tf .wordmark::before { display: none; }
.eco-card .e-top .app-icon { width: 34px; height: 34px; border-radius: 8px; }
/* Tutors: initials until the new photos arrive */
.tf-ini { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 1.6rem; color: var(--gold); background: var(--card); border: 2px solid var(--tline); transition: border-color .2s, transform .25s; }
.tf-partners button:hover .tf-ini { transform: scale(1.05); }
.tf-partners button[aria-checked="true"] .tf-ini { border: 2.5px solid var(--gold); box-shadow: 0 0 0 4px var(--g12); }
.tf-chat-av.tf-ini { width: 40px; height: 40px; font-size: 1rem; border: 1.5px solid var(--gold); }

/* AI Chat character card, as in the app */
.ai-card { position: relative; margin: 0.4rem 0 0.9rem; border-radius: 22px; overflow: hidden; border: 1px solid var(--g20); aspect-ratio: 640 / 733; background: var(--card); }
.ai-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s; }
.ai-hint { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .9rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.ai-hint i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: #1a1408; background: radial-gradient(circle at 40% 35%, #F4E3B5, #C084FC); box-shadow: 0 0 18px rgba(192,132,252,.6); }
.ai-card figcaption { position: absolute; inset: auto 0 0 0; padding: 3.5rem 1rem 1rem; background: linear-gradient(180deg, transparent, rgba(10,14,26,.92) 45%); display: grid; gap: .25rem; }
.ai-card b[data-t="cname"] { font-family: Georgia, serif; font-size: clamp(1.8rem, 3.5vw, 2.4rem); color: #fff; line-height: 1.05; }
.ai-card small { color: #D6D3D1; font-size: .95rem; }
.ai-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.ai-btns span { border-radius: 16px; padding: .75rem; text-align: center; font-weight: 800; }
.ai-btns .call { background: #CEB06F; color: #0A0E1A; }
.ai-btns .chat { border: 1.5px solid #CEB06F; color: #CEB06F; background: rgba(0,0,0,.55); }
.ai-actions { display: flex; justify-content: space-around; margin: 0 0 1rem; }
.ai-actions span { display: grid; justify-items: center; gap: .35rem; }
.ai-actions i { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--g40); display: grid; place-items: center; font-style: normal; color: var(--gold); font-size: 1.15rem; }
.ai-actions b { font-size: .82rem; }
.ai-btns .call { display: flex; justify-content: center; align-items: center; gap: .35rem; }

/* ---- Shared from the earlier site: films, Instagram band, app icons ---- */
.p-film { overflow-x: clip; }
.p-film-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: var(--space-8); align-items: center; }
.p-film-copy { display: grid; gap: 1rem; max-width: 34rem; }
.p-film-copy h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; }
.p-film-copy .lead { color: var(--muted); }
.p-film-toggle { justify-self: start; gap: 0.6rem; width: auto !important; }
.p-film-ico { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.p-film-toggle[aria-pressed="true"] .p-film-ico { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.p-film-frame { position: relative; margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 9 / 16; max-height: 78vh;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.55); justify-self: center; width: 100%; }
.p-film-frame::before { content: ""; position: absolute; inset: -20%; z-index: -1; background: radial-gradient(closest-side, var(--accent-soft), transparent); }
.p-film-video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .p-film-layout { grid-template-columns: 1fr; gap: var(--space-6); }
  .p-film-frame { max-width: 340px; }
}
.follow-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 22px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .3s, transform .3s; }
.follow-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.follow-icon { width: 56px; height: 56px; border-radius: 13px; }
.follow-text { display: grid; gap: 0.25rem; }
.follow-handle { font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -0.01em; }
.follow-sub { color: var(--muted); font-size: 0.95rem; }
.follow-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .follow-card { grid-template-columns: auto 1fr; } .follow-btn { grid-column: 1 / -1; } }
.app-icon { border-radius: 22%; }
.app-badge { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); }
.wordmark { font-weight: 800; letter-spacing: 0.04em; font-size: 1.5rem; display: inline-flex; align-items: center; gap: 0.9rem; }
.eco-card .e-top .app-icon { width: 34px; height: 34px; border-radius: 8px; }

/* =========================================================================
   v8 — livelier TFCA page: greetings band, big gallery, zoom, colour
   ========================================================================= */
/* Greetings band */
.tf-marquee { overflow: hidden; border-block: 1px solid var(--g20); background: linear-gradient(90deg, rgba(212,175,100,0.06), rgba(192,132,252,0.06), rgba(96,165,250,0.06)); padding: 1.1rem 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tf-marquee-track { display: flex; align-items: center; gap: 1.6rem; width: max-content; animation: tf-marq 60s linear infinite; }
.tf-marquee span { font-family: Georgia, serif; font-size: clamp(1.4rem, 2.6vw, 2.1rem); color: #F4E6C4; white-space: nowrap; }
.tf-marquee span:nth-of-type(3n+2) { color: var(--gold); font-style: italic; }
.tf-marquee span:nth-of-type(3n) { color: #C9B8F5; }
.tf-marquee i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); opacity: 0.6; flex: none; }
@keyframes tf-marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tf-marquee-track { animation: none; } }

/* Big gallery */
.tf-gal-sec { overflow: hidden; background: radial-gradient(60rem 30rem at 15% 0%, rgba(212,175,100,0.10), transparent 60%), radial-gradient(50rem 30rem at 90% 100%, rgba(192,132,252,0.10), transparent 60%); }
.tf-gal-head { display: grid; grid-template-columns: 1fr minmax(0, 26rem); gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
.tf-gal-head h2 { font-size: var(--fs-h2); margin-top: 0.8rem; }
.tf-gal { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); overflow-x: auto; scroll-snap-type: x mandatory; padding: 1rem max(1.25rem, calc((100vw - 1200px) / 2)) 2rem; scrollbar-width: none; }
.tf-gal::-webkit-scrollbar { display: none; }
.tf-gal-item { flex: none; width: clamp(260px, 26vw, 340px); margin: 0; scroll-snap-align: center; display: grid; gap: 1.1rem; }
.tf-gal-phone { position: relative; display: block; width: 100%; padding: 10px; border: 0; cursor: zoom-in; border-radius: 42px; background: linear-gradient(150deg, #2a2e38, #0b0d12 60%); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.09), 0 40px 80px -40px rgba(0,0,0,0.9), 0 0 120px -50px rgba(212,175,100,0.55); transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.tf-gal-phone:hover { transform: translateY(-8px) rotate(-0.6deg); box-shadow: inset 0 0 0 1px rgba(212,175,100,0.35), 0 50px 90px -40px rgba(0,0,0,0.9), 0 0 140px -40px rgba(212,175,100,0.75); }
.tf-gal-phone img { display: block; width: 100%; height: auto; border-radius: 33px; }
.tf-zoom-ico { position: absolute; right: 18px; bottom: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,14,26,0.82); color: var(--gold); border: 1px solid var(--g40); font-size: 1rem; }
.tf-gal-item figcaption { display: grid; gap: 0.3rem; padding-inline: 0.4rem; }
.tf-gal-item figcaption b { font-family: Georgia, serif; font-size: 1.2rem; color: var(--ink); }
.tf-gal-item figcaption span { color: var(--muted); font-size: 0.93rem; }
.tf-gal-nav { display: flex; gap: 0.6rem; justify-content: flex-end; }
.tf-gal-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--g40); background: var(--card); color: var(--gold); font-size: 1.2rem; cursor: pointer; transition: background .2s, transform .2s; }
.tf-gal-btn:hover { background: var(--g12); transform: scale(1.06); }
@media (max-width: 760px) { .tf-gal-head { grid-template-columns: 1fr; } .tf-gal-item { width: 78vw; } }

/* Lightbox */
.tf-lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(5,7,14,0.92); backdrop-filter: blur(6px); padding: 3vh 4vw; cursor: zoom-out; }
.tf-lightbox[hidden] { display: none; }
.tf-lightbox img { max-height: 94vh; max-width: 92vw; width: auto; border-radius: 28px; box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 40px 120px rgba(0,0,0,0.7); }
.tf-lb-close { position: absolute; top: 16px; right: 20px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--g40); background: var(--card); color: var(--gold); font-size: 1.6rem; cursor: pointer; }
.tf .tf-phone img, .tf .tf-shot img { cursor: zoom-in; }

/* Bigger, readable phones */
.tf-hero-stage .tf-phone--front { --w: 340px; }
.tf-hero-stage .tf-phone--back { --w: 290px; }
.tf-flow-step { grid-template-rows: auto auto; }
.tf-phone--md { --w: min(320px, 100%); }
.tf-shot { width: min(320px, 100%); }
.tf-phone--sm { --w: 250px; }
.tf-phone--xs { --w: 170px; }
@media (max-width: 1100px) { .tf-flow-step .tf-phone--md, .tf-flow-step .tf-shot { --w: 280px; width: 280px; } }
@media (max-width: 640px) {
  .tf-hero-stage .tf-phone--front { --w: 270px; } .tf-hero-stage .tf-phone--back { --w: 220px; }
  .tf-flow-step .tf-phone--md, .tf-flow-step .tf-shot { --w: 300px; width: 300px; }
  .tf-duo .tf-phone { --w: 46vw; } .tf-power .tf-phone--xs { --w: 130px; }
}

/* Colourful "What TFCA does" cards (the app's vivid tiles) */
.tf-index li a { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent) !important; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 8%, transparent) 55%, var(--card)) !important; transition: transform .3s, box-shadow .3s; }
.tf-index li a:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--c) 70%, transparent); }
.tf-index li a::after { content: ""; position: absolute; top: -30px; right: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--c); opacity: 0.16; }
.tf-index-ico { width: 48px !important; height: 48px !important; border-radius: 50% !important; background: var(--c) !important; color: #0A0E1A !important; box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 45%, transparent); }
.tf-index li:nth-child(1) { --c: #F87171; } .tf-index li:nth-child(2) { --c: #60A5FA; }
.tf-index li:nth-child(3) { --c: #C084FC; } .tf-index li:nth-child(4) { --c: #D4AF64; }
.tf-index-n { color: color-mix(in srgb, var(--c) 80%, #fff) !important; }

/* Glow behind each signature section heading */
.tf-sig .section-head { position: relative; }
.tf-sig .section-head::before { content: ""; position: absolute; left: -6rem; top: -4rem; width: 28rem; height: 18rem; background: radial-gradient(closest-side, rgba(212,175,100,0.14), transparent); pointer-events: none; z-index: -1; }
#youtube .section-head::before { background: radial-gradient(closest-side, rgba(248,113,113,0.16), transparent); }
#create .section-head::before { background: radial-gradient(closest-side, rgba(96,165,250,0.16), transparent); }
#tutor .section-head::before { background: radial-gradient(closest-side, rgba(192,132,252,0.18), transparent); }
.tf-gal-item figcaption b { color: #F9FAFB; }

/* =========================================================================
   v9 — AI Chat section
   ========================================================================= */
.tf-ai { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.tf-ai-left { position: sticky; top: 90px; }
.tf-ai-left .ai-card { margin: 0 0 1.25rem; box-shadow: 0 50px 100px -50px rgba(0,0,0,0.9), 0 0 120px -40px rgba(192,132,252,0.5); }
.ai-rail { position: absolute; right: 12px; top: 26%; display: grid; gap: 0.55rem; z-index: 2; }
.ai-rail button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); background: rgba(10,14,26,0.6); font-size: 1.25rem; cursor: pointer; transition: transform .2s, border-color .2s; }
.ai-rail button.on { border: 2.5px solid #ECCA4D; transform: scale(1.14); }
.ai-btns button.chat { font: inherit; font-weight: 800; cursor: pointer; }
.tf-ai-chat { min-height: 100%; }
.tf-thread { display: grid; gap: 0.7rem; margin-top: 0.8rem; }
.tf-msg { max-width: 86%; padding: 0.75rem 1rem; border-radius: 16px; font-size: 1rem; line-height: 1.45; animation: tf-pop .35s cubic-bezier(.2,.7,.2,1); }
.tf-msg.me { justify-self: end; background: #1E1E21; border: 1px solid rgba(212,175,100,0.35); }
.tf-msg.them { justify-self: start; background: var(--card); border: 1px solid var(--line, rgba(255,255,255,0.08)); display: grid; gap: 0.2rem; }
.tf-msg.them span { color: var(--muted); font-size: 0.88rem; }
.tf-tipcard { border-left: 3px solid #60A5FA; background: #111827; border-radius: 0 14px 14px 0; padding: 0.8rem 1rem; display: grid; gap: 0.25rem; animation: tf-pop .4s .1s both; }
.tf-tipcard small { color: #60A5FA; font-weight: 800; font-size: 0.78rem; }
.tf-tipcard .x { color: #F87171; } .tf-tipcard .ok { color: #34D399; font-weight: 700; }
.tf-tipcard .why { color: #E5E7EB; font-size: 0.93rem; }
.tf-made { border: 1px solid rgba(212,175,100,0.4); background: linear-gradient(160deg, rgba(212,175,100,0.14), transparent 70%), #111827; border-radius: 16px; padding: 0.9rem 1rem; display: grid; gap: 0.5rem; animation: tf-pop .4s both; }
.tf-made small { color: var(--gold); font-weight: 800; letter-spacing: 0.04em; }
.tf-made span { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.75rem; border-radius: 10px; background: #1F2937; }
.tf-made span i { font-style: normal; color: var(--muted); }
.tf-replies { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0.4rem; }
.tf-reply { border: 1px solid var(--g40); background: rgba(212,175,100,0.06); color: var(--ink, #F9FAFB); border-radius: 14px; padding: 0.7rem 1rem; font: inherit; font-weight: 700; cursor: pointer; text-align: left; transition: transform .2s, background .2s; }
.tf-reply:hover { transform: translateY(-2px); background: rgba(212,175,100,0.14); }
.tf-reply.main { display: grid; gap: 0.15rem; width: 100%; border-style: dashed; }
.tf-reply.main .lbl { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.tf-reply.gold { background: var(--gold); color: #0A0E1A; border-color: var(--gold); }
@keyframes tf-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.tf-ai-modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.8rem; margin-top: clamp(2rem, 4vw, 3rem); }
.tf-ai-modes li { padding: 1rem; border-radius: 16px; border: 1px solid var(--line, rgba(255,255,255,0.08)); background: var(--card); }
@media (max-width: 1000px) { .tf-ai { grid-template-columns: 1fr; } .tf-ai-left { position: static; max-width: 460px; margin-inline: auto; width: 100%; } .tf-ai-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tf-ai-modes { grid-template-columns: 1fr; } }
.tf-reply { color: #F9FAFB; }
.tf-reply.gold { color: #0A0E1A; }
.ai-btns .call { white-space: nowrap; gap: .3rem; }
@media (max-width: 560px) { .ai-btns span, .ai-btns button { padding: .65rem .4rem; font-size: .9rem; } .ai-card b[data-t="cname"] { font-size: 1.8rem; } }
.ai-btns .call span { padding: 0 !important; border: 0; background: none; border-radius: 0; font-size: inherit; }
.ai-btns button.chat { border-radius: 16px; padding: .75rem; }

/* v10 — live AI chat */
.tf-live { margin-top: 1rem; border-top: 1px solid var(--g20); padding-top: 1rem; display: grid; gap: 0.7rem; }
.tf-live[hidden] { display: none; }
.tf-live-badge { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; color: #C084FC; }
.tf-live-badge i { width: 9px; height: 9px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: tf-ping 1.8s infinite; }
@keyframes tf-ping { 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.tf-live-thread { display: grid; gap: 0.6rem; max-height: 440px; overflow-y: auto; padding-right: 4px; }
.tf-live-thread:empty { display: none; }
.tf-live-form { display: flex; gap: 0.5rem; }
.tf-live-form input { flex: 1; min-width: 0; padding: 0.85rem 1.1rem; border-radius: 999px; border: 1px solid var(--g40); background: #111827; color: #F9FAFB; font: inherit; }
.tf-live-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,100,0.2); }
.tf-live-send { width: 50px; height: 50px; flex: none; border-radius: 50%; border: 0; background: var(--gold); color: #0A0E1A; font-size: 1.1rem; cursor: pointer; }
.tf-live-note { font-size: 0.78rem; color: var(--muted); }
.tf-live-err { color: #F87171; font-size: 0.9rem; }
.tf-msg .tf-typing { display: inline-flex; gap: 4px; }
.tf-msg .tf-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tf-dot 1s infinite; }
.tf-msg .tf-typing i:nth-child(2) { animation-delay: .15s; } .tf-msg .tf-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tf-dot { 50% { opacity: .3; transform: translateY(-3px); } }
