/* ThisaiTV Fan Wall 1.1.0. Fonts: Plus Jakarta Sans + Noto Sans Tamil (self-hosted, OFL).
   Colours come from the site (--tvn-*, --thisai-accent), so light and dark mode follow the theme. */
@font-face {
  font-family: 'TFW Sans';
  src: url('fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'TFW Sans';
  src: url('fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'TFW Sans';
  src: url('fonts/noto-sans-tamil-tamil-wght-normal.woff2') format('woff2');
  font-weight: 200 800; /* same range as the other faces, or Chrome won't combine them */
  font-display: swap;
  unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
}

.tfw {
  --tfw-ink: var(--tvn-ink, #1F1712);
  --tfw-text: var(--tvn-text, #6B5A4E);
  --tfw-line: var(--tvn-line, #E8DFD6);
  --tfw-accent: var(--thisai-accent, #FF6B3D);
  --tfw-surface: #FFFFFF;
  --tfw-soft: var(--tvn-card, #F7F2EC);
  --tfw-link: var(--tvn-link, #8A5A00);
  --tfw-radius: 16px;
  --tfw-shadow: 0 1px 2px rgba(31, 23, 18, .05), 0 8px 24px -12px rgba(31, 23, 18, .18);
  margin: 40px 0;
  padding: 0;
  border: 1px solid var(--tfw-line);
  border-radius: 20px;
  background: var(--tfw-surface);
  box-shadow: var(--tfw-shadow);
  color: var(--tfw-ink);
  font-family: 'TFW Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Tamil', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
html.thisai-dark .tfw {
  --tfw-surface: var(--tvn-card, #3A2A21);
  --tfw-soft: rgba(255, 255, 255, .05);
  --tfw-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
}
.tfw * { box-sizing: border-box; }
.tfw [hidden] { display: none !important; }
.tfw button, .tfw input, .tfw textarea { font-family: inherit; letter-spacing: inherit; }

/* header */
.tfw .tfw-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--tfw-line);
}
.tfw .tfw-title {
  margin: 0;
  font-family: inherit;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--tfw-ink);
}
.tfw .tfw-sub { margin: 4px 0 0; color: var(--tfw-text); font-size: 13.5px; }
.tfw-badges { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding-top: 2px; }
.tfw-total { font-size: 12.5px; font-weight: 600; color: var(--tfw-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tfw-total:empty { display: none; }
.tfw-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: rgba(22, 163, 74, .1);
  color: #15803D;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
html.thisai-dark .tfw-live { background: rgba(74, 222, 128, .12); color: #4ADE80; }
.tfw-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: tfw-pulse 2s ease-in-out infinite;
}
@keyframes tfw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tfw-live::before { animation: none; } }
.tfw .tfw-note { margin: 16px 24px; padding: 12px 14px; border-radius: 12px; background: var(--tfw-soft); font-size: 14px; }

/* composer */
.tfw-form { padding: 18px 24px 16px; border-bottom: 1px solid var(--tfw-line); background: var(--tfw-soft); }
.tfw-compose { display: flex; gap: 12px; align-items: flex-start; }
.tfw-fields {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--tfw-line);
  border-radius: 14px;
  background: var(--tfw-surface);
  transition: border-color .15s, box-shadow .15s;
}
.tfw-fields:focus-within { border-color: var(--tfw-accent); box-shadow: 0 0 0 4px rgba(255, 107, 61, .14); }
.tfw-form input[type=text], .tfw-form textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tfw-ink);
  font-size: 16px; /* 16px stops iPhones from zooming in */
  line-height: 1.45;
}
.tfw-form input[type=text]:focus, .tfw-form textarea:focus { outline: none; box-shadow: none; }
.tfw-form input::placeholder, .tfw-form textarea::placeholder { color: var(--tfw-text); opacity: .75; }
.tfw-form input.tfw-name, .tfw-form textarea.tfw-body { color: var(--tfw-ink); background: transparent; border: 0; box-shadow: none; }
.tfw-form input.tfw-name { height: auto; min-height: 0; padding: 12px 14px 2px; font-weight: 650; font-size: 15px; }
.tfw-form textarea.tfw-body { height: 72px; min-height: 72px; max-height: 260px; padding: 4px 14px 10px; resize: none; overflow-y: auto; }
.tfw-form .tfw-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.tfw-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--tfw-line); }

.tfw-spoil { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--tfw-text); user-select: none; }
.tfw-spoil input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tfw-switch { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--tfw-line); transition: background .15s; }
.tfw-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tfw-spoil input:checked + .tfw-switch { background: var(--tfw-accent); }
.tfw-spoil input:checked + .tfw-switch::after { transform: translateX(12px); }
.tfw-spoil input:focus-visible + .tfw-switch { outline: 2px solid var(--tfw-accent); outline-offset: 2px; }
.tfw-spoil input:checked ~ .tfw-spoil-text { color: var(--tfw-ink); }

.tfw-count { margin-left: auto; font-size: 12px; color: var(--tfw-text); font-variant-numeric: tabular-nums; }
.tfw-count.is-near { color: #C2410C; font-weight: 700; }
.tfw .tfw-send {
  min-height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--tfw-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .1s, filter .15s;
}
.tfw .tfw-send:hover { filter: brightness(1.06); }
.tfw .tfw-send:active { transform: scale(.97); }
.tfw .tfw-send:disabled { opacity: .55; cursor: default; transform: none; }
.tfw-ts { margin: 10px 0 0 52px; }
.tfw-ts:empty { display: none; }
.tfw .tfw-msg { margin: 10px 0 0 52px; font-size: 13.5px; font-weight: 600; }
.tfw .tfw-msg:empty { display: none; }
.tfw .tfw-msg.is-err { color: #DC2626; }
.tfw .tfw-msg.is-ok { color: #15803D; }
html.thisai-dark .tfw .tfw-msg.is-err { color: #F87171; }
html.thisai-dark .tfw .tfw-msg.is-ok { color: #4ADE80; }
.tfw .tfw-rules { margin: 10px 0 0 52px; font-size: 12px; color: var(--tfw-text); }

/* feed */
.tfw .tfw-list { list-style: none; margin: 0; padding: 0; }
.tfw .tfw-item {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--tfw-line);
  background: transparent;
  transition: background-color 1.2s;
}
.tfw .tfw-item:last-child { border-bottom: 0; }
.tfw .tfw-item.tfw-new { background: rgba(255, 107, 61, .08); transition: none; }
.tfw-av {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tfw-line);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}
.tfw-me { color: var(--tfw-text); background: var(--tfw-line); }
.tfw-me[style*=background] { color: #fff; }
.tfw-main { min-width: 0; flex: 1; }
.tfw-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.3; }
.tfw-who { color: var(--tfw-ink); font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.tfw-you { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: rgba(255, 107, 61, .14); color: var(--tfw-accent); }
.tfw-time { font-size: 13px; color: var(--tfw-text); }
.tfw-time::before { content: '·'; margin-right: 6px; }
.tfw .tfw-ep {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 6px 0 0;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--tfw-soft);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tfw-link);
  text-decoration: none;
}
.tfw .tfw-ep::before { content: '▶'; font-size: 9px; }
.tfw .tfw-ep:hover { text-decoration: underline; }
.tfw .tfw-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--tfw-ink); font-size: 15px; line-height: 1.55; }
.tfw .tfw-text.tfw-hidden { display: none; }
.tfw .tfw-ep + .tfw-reveal, .tfw .tfw-ep + .tfw-text { margin-top: 8px; }
.tfw .tfw-reveal {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 10px 14px;
  border: 1px dashed var(--tfw-line);
  border-radius: 12px;
  background: var(--tfw-soft);
  color: var(--tfw-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.tfw .tfw-reveal::before { content: '👁'; }
.tfw-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 0 -6px; }
.tfw .tfw-rx {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--tfw-text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.tfw .tfw-rx:hover { background: var(--tfw-soft); }
.tfw .tfw-rx:active { transform: scale(.92); }
.tfw .tfw-rx.is-on { border-color: rgba(255, 107, 61, .35); background: rgba(255, 107, 61, .1); color: var(--tfw-ink); }
.tfw .tfw-report {
  margin-left: auto;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tfw-text);
  font-size: 12px;
  font-weight: 600;
  opacity: .7;
  cursor: pointer;
}
.tfw .tfw-report:hover { opacity: 1; background: var(--tfw-soft); }
.tfw .tfw-report:disabled { opacity: .5; cursor: default; background: transparent; }
.tfw .tfw-empty { margin: 0; padding: 28px 24px; text-align: center; color: var(--tfw-text); font-size: 14px; }
.tfw .tfw-more {
  display: block;
  width: calc(100% - 48px);
  margin: 4px 24px 16px;
  min-height: 42px;
  border: 1px solid var(--tfw-line);
  border-radius: 12px;
  background: transparent;
  color: var(--tfw-ink);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.tfw .tfw-more:hover { background: var(--tfw-soft); }
.tfw .tfw-wall-link {
  display: flex;
  justify-content: center;
  padding: 14px 24px;
  border-top: 1px solid var(--tfw-line);
  font-size: 14px;
  font-weight: 700;
  color: var(--tfw-link);
  text-decoration: none;
}
.tfw .tfw-wall-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .tfw { margin: 28px 0; border-radius: 16px; }
  .tfw .tfw-top { padding: 16px 16px 14px; flex-direction: column; gap: 8px; }
  .tfw-badges { padding-top: 0; }
  .tfw .tfw-title { font-size: 18px; }
  .tfw-form { padding: 14px 16px; }
  .tfw-compose .tfw-me { display: none; }
  .tfw-ts, .tfw .tfw-msg, .tfw .tfw-rules { margin-left: 0; }
  .tfw .tfw-item { padding: 14px 16px; gap: 10px; }
  .tfw-av { flex-basis: 36px; width: 36px; height: 36px; font-size: 15px; }
  .tfw .tfw-more { width: calc(100% - 32px); margin: 4px 16px 14px; }
}

/* The site forces "Baloo 2" with !important: on posts html.tvp:root body :is(...), on the home page
   html.tvn:root body.home :is(...). The repeated class makes this stronger than both; it only touches the Talk box. */
html:root body section.tfw.tfw.tfw.tfw,
html:root body section.tfw.tfw.tfw.tfw :is(h1, h2, h3, h4, p, a, span, button, li, strong, small, time, label, div, input, textarea, ol) {
  font-family: 'TFW Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Tamil', sans-serif !important;
}

/* home page teaser (1.3.0) */
.tfw[data-mode="home"] .tfw-list { border-top: 0; }
.tfw .tfw-wall-link.tfw-join {
  margin: 14px 24px 20px;
  padding: 0;
  min-height: 46px;
  align-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--tfw-accent);
  color: #fff;
  font-size: 15px;
  text-decoration: none;
}
.tfw .tfw-wall-link.tfw-join:hover { filter: brightness(1.06); text-decoration: none; }
@media (max-width: 560px) { .tfw .tfw-wall-link.tfw-join { margin: 12px 16px 16px; } }
