/* ------------------------------------------------------------------
   tubescript — site styles
   Minimal black-on-white, matching the original's palette:
   ink #0c0c0c, accent #ff4b33, hairlines #dfdfdf.
   ------------------------------------------------------------------ */

:root {
  --ink: #0c0c0c;
  --ink-soft: #1b1b1b;
  --muted: #6b6b6b;
  --accent: #ff4b33;
  --accent-cta: #fe4c33;
  --blue: #007bff;
  --blue-deep: #1976d2;
  --line: #dfdfdf;
  --line-soft: #eee;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --radius: 8px;
  --max: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { color: #000; font-weight: 600; margin: 0 0 15px; }
h1.title { font-size: 30px; line-height: 1.3; }
h2.title { font-size: 24px; }
h3 { font-size: 17px; }

p { margin: 0 0 14px; }

img, svg, iframe { max-width: 100%; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.narrow { max-width: 780px; margin: 0 auto; }

/* ---------------- header ---------------- */

.site-header { border-bottom: 1px solid #efefef; background: #fff; }

.nav-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.logo span { font-size: 16px; }

.nav-links {
  display: flex; gap: 26px; list-style: none; margin: 0; padding: 0;
  margin-left: auto;
}
.nav-links a { color: #666; font-size: 14px; }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links.mobile { display: none; flex-direction: column; gap: 0; padding: 0 20px 12px; }
.nav-links.mobile a { display: block; padding: 10px 0; border-top: 1px solid var(--line-soft); }

.language-picker { display: flex; align-items: center; gap: 6px; }
.language-picker select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ink);
}
/* The no-JS submit control. An engine that runs script does not render the
   `<noscript>` wrapper at all, so this only ever styles a button a visitor can
   actually see and press. */
.lang-go {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.burger { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.mobile:not([hidden]) { display: flex; }
  .burger { display: block; }
  .nav-bar { gap: 12px; }
}

/* ---------------- layout ---------------- */

.section { max-width: var(--max); margin: 0 auto; padding: 50px 20px 20px; }
.section-heading { margin-top: 40px; }

/* ---------------- search form ---------------- */

.search-form {
  display: flex; align-items: stretch; gap: 12px;
  margin: 28px 0 12px;
  max-width: 860px;
}
.search-form .input-wrapper { position: relative; flex: 1 1 auto; }
.search__input {
  width: 100%; height: 56px; padding: 17px 44px 17px 20px;
  border: 1px solid #d1dbe0; border-radius: 0;
  font-size: 14px; font-family: inherit; color: var(--ink);
}
.search__input:focus { outline: 2px solid var(--ink); outline-offset: -2px; }
.clear-input {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; font-size: 20px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 6px 10px;
}

.btn-activecolor {
  background: var(--ink); color: #fdfdfe; border: none;
  padding: 18px 40px; font-size: 17px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .3s, color .3s; white-space: nowrap;
}
.btn-activecolor:hover { background: var(--accent); color: #fff; }
.btn-activecolor.small { padding: 9px 16px; font-size: 14px; }
.btn-activecolor:disabled { opacity: .45; cursor: not-allowed; }

.btn-outline {
  display: inline-block; border: 1px solid var(--ink); color: var(--ink);
  background: #fff; padding: 12px 22px; font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background .25s, color .25s;
}
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline.small { padding: 8px 14px; font-size: 13px; }

.btn-accent {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-cta); color: #fff; border: none; border-radius: 50px;
  padding: 12px 20px 12px 20px; font: inherit; font-size: 16px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 20px rgba(254, 76, 51, .3), 0 0 0 1px rgba(255, 255, 255, .1);
}
.btn-accent:hover { background: #e8432c; color: #fff; }
.btn-accent.small { padding: 9px 16px; font-size: 14px; }
.btn-accent:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }

.form-error { color: var(--accent); font-size: 14px; }
.notice { background: #fff8e6; border: 1px solid #f0e0b0; padding: 10px 14px; font-size: 14px; }

.hero { padding-top: 64px; }
.hero-note { color: var(--muted); font-size: 14px; }

/* ---------------- feature cards ---------------- */

.listitem {
  display: flex; flex-wrap: wrap; gap: 16px;
  list-style: none; margin: 40px 0 0; padding: 0;
}
.listitem li {
  flex: 1 1 320px; background: #fff; border: 1px solid #eee;
  border-radius: 0; overflow: hidden;
}
.post-image { height: 84px; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); }
.post-content { padding: 20px; }
.post-content h3 { font-size: 17px; margin-bottom: 8px; }
.post-content p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* ---------------- steps ---------------- */

.liststep { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 30px 0 0; padding: 0; }
.liststep li { flex: 1 1 260px; }
.liststep .number { font-size: 32px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }

/* ---------------- faq ---------------- */

.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 16px; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* ---------------- link lists ---------------- */

.listicon { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 24px 0; padding: 0; }

.link-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.link-list li { margin-bottom: 9px; break-inside: avoid; }
@media (max-width: 640px) { .link-list { columns: 1; } }

.link-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.link-grid a { display: block; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; height: 100%; }
.link-grid strong { display: block; margin-bottom: 6px; }
.link-grid span { font-size: 13px; }
.link-grid a:hover { border-color: var(--ink); }

/* ---------------- watch page ----------------
   The result page follows the original's own palette, which is Bootstrap
   blue rather than the black used on the marketing pages. */

.watch { max-width: var(--max); margin: 0 auto; padding: 34px 20px 60px; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.badge { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--ink); }

.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 980px) { .watch-grid { grid-template-columns: 1fr; } }

.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* tabs */
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs .tab {
  padding: 16px; font: inherit; font-size: 15px; color: #555;
  background: none; border: none; border-bottom: 3px solid transparent;
  cursor: pointer;
}
.tabs .tab.active { color: #495057; font-weight: 600; border-bottom-color: #007bff; }
.tab-pane[hidden] { display: none; }

/* action panel */
#transcript-action-panel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#transcript-action-panel hr { flex-basis: 100%; border: none; border-top: 1px solid var(--line-soft); margin: 10px 0 4px; }
.btn-primary-action {
  background: var(--blue); color: #fff; border: 1px solid var(--blue);
  border-radius: 4px; padding: 6px 12px; font: inherit; font-size: 15px;
  cursor: pointer; white-space: nowrap;
}
.btn-primary-action:hover { background: #0069d9; border-color: #0062cc; color: #fff; }
.btn-primary-action:disabled { opacity: .6; cursor: not-allowed; }
.copy-flash { font-size: 13px; color: #1a7f37; }

.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
  min-width: 180px; background: #fff; border: 1px solid rgba(0,0,0,.15);
  border-radius: 4px; padding: 6px 0; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 7px 16px; color: #212529; font-size: 14px; }
.dropdown-menu a:hover { background: #f2f2f2; color: #007bff; }

.track-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.track-row select { border: 1px solid #d1dbe0; border-radius: 4px; padding: 6px 10px; font: inherit; font-size: 14px; }

/* transcript blocks */
.transcript-content { max-height: 501px; overflow-y: auto; padding-right: 4px; }
.transcript-group-box {
  background: #fafafa; border: 1px solid #ddd; border-radius: 8px;
  padding: 15px; margin-bottom: 15px; cursor: pointer; transition: border-color .2s, background .2s;
}
.transcript-group-box:hover { border-color: #bbb; }
.transcript-group-box.active { background: #f0f7ff; border-color: #007bff; }
.transcript-time { margin-bottom: 8px; }
.transcript-time a { color: #007bff; font-size: 15px; font-weight: 700; }
.transcript-text { color: #555; font-size: 15px; line-height: 1.5; }

.summary-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 20px 0; }
.summary-loading[hidden] { display: none; }

/* Shown only when a model is configured: the summary is billed per call, so
   the user asks for it explicitly instead of it firing on tab open. */
.summary-intro { padding: 20px 0; }
.summary-intro[hidden] { display: none; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #ddd; border-top-color: var(--blue);
  animation: tt-spin .8s linear infinite;
}
@keyframes tt-spin { to { transform: rotate(360deg); } }

.summary-error { text-align: center; padding: 20px; }
.summary-error[hidden] { display: none; }
.summary-error .form-error { font-size: 1.1rem; color: #dc3545; margin-bottom: 20px; }

/* Summary sections are cards with a colour-coded left border, exactly as the
   original renders them: summary blue, key points green, analogy amber,
   glossary teal. That colour coding is the section "classification". */
#summary-result { max-height: calc(100vh - 300px); overflow-y: auto; }
#summary-result[hidden] { display: none; }

.summary-section {
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--blue);
}
.summary-section[hidden] { display: none; }
.summary-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 12px;
}
.summary-section p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  margin: 0;
}
.summary-section ul { margin: 0; padding-left: 20px; }
.summary-section ul li {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 8px;
}
.summary-section ul li:last-child { margin-bottom: 0; }
.summary-section code {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
}
.summary-section a { color: var(--blue-deep); text-decoration: underline; }

.key-points-section { border-left-color: #28a745; }
.analogy-section { border-left-color: #ffc107; }
.definitions-section { border-left-color: #17a2b8; }

#summary-text { white-space: normal; }

.summary-source { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* ---------------- tool boxes ---------------- */

.tool-box { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; margin: 24px 0; background: var(--bg-soft); }
.tool-box-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.tool-box-head input[type="text"] { flex: 1 1 320px; height: 46px; padding: 0 14px; border: 1px solid #d1dbe0; font: inherit; }
.tool-box-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0; }
.tool-box textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; padding: 12px; border: 1px solid #d1dbe0; resize: vertical; }

/* The splitter's two numeric fields.
   THE INLINE STYLE THESE REPLACE WAS BLOCKED, not merely discouraged: the CSP is
   `style-src 'self'` with no `'unsafe-inline'`, so `style="width:90px"` on a
   number input is dropped by the browser and the field renders at its default
   width. The audit (A9) reported this as a CSP violation on /video-splitter/ and
   it was right — the control worked, it just did not look the way the markup
   said. Moving the width here is the whole fix; an inline style cannot pass a
   policy that forbids inline styles, and adding `'unsafe-inline'` to the
   directive would undo the protection on every page to style two inputs. */
.tool-box-actions .toggle input[type="number"] { width: 90px; }

.file-label { display: inline-block; }
.file-label input { display: none; }
.file-label span { display: inline-block; border: 1px dashed var(--ink); padding: 11px 20px; cursor: pointer; font-weight: 600; font-size: 14px; }
.file-label span:hover { background: #fff; }

.gen-results { list-style: none; padding: 0; margin: 14px 0 0; }
.gen-results li { border-bottom: 1px solid var(--line-soft); padding: 10px 2px; display: flex; justify-content: space-between; gap: 12px; }
.gen-results .copy-one { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; }

/* ---------------- data viewer ---------------- */

.data-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 24px 0; }
.data-card { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; background: #f8f9fa; }
.data-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line-soft); padding: 9px 10px; text-align: left; }
.data-table a, .data-card a { color: #1976d2; font-weight: 500; }
.pill { display: inline-block; background: #f1f6fb; color: #1976d2; border-radius: 16px; padding: 6px 14px; font-size: 13px; font-weight: 500; margin: 0 8px 8px 0; }

/* ---------------- content pages ---------------- */

.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; font-size: 20px; }
/* A long URL or a bare email address in prose has no space to break at, so it
   overflows the column and the page scrolls sideways. Measured on /privacy/ at
   390px: four pixels of horizontal scroll, from the contact address in the
   document body. `anywhere` rather than `break-word` because it is the only
   value that also lowers the element's min-content width — `break-word` breaks
   the line but still lets the intrinsic width push the container, which is the
   half of the problem that shows up as a scrollbar. */
.prose a, .prose code { overflow-wrap: anywhere; }
.error-card { border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 18px; margin: 20px 0; background: var(--bg-soft); }
.error-code { font-family: ui-monospace, monospace; font-size: 13px; color: var(--accent); margin: 0 0 8px; }

.contact-form { display: flex; flex-direction: column; gap: 8px; max-width: 560px; margin-top: 20px; }
.contact-form input, .contact-form textarea { border: 1px solid #d1dbe0; padding: 12px; font: inherit; }
.contact-form button { align-self: flex-start; margin-top: 10px; }

/* ---------------- footer ----------------
   The original's footer is light, not dark: #f5f5f5 with #1b1b1b text. */

.site-footer { background: #f5f5f5; color: var(--ink-soft); border-top: 1px solid #e5e5e5; margin-top: 60px; padding: 46px 20px 0; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand .logo span { color: var(--ink-soft); font-weight: 600; }
.footer-description { font-size: 14px; color: #666; margin: 14px 0 10px; line-height: 1.6; }
.social { display: flex; gap: 16px; font-size: 14px; }
.social a { color: #1a1a1a; }

.footer-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px; }
.footer-col-title { font-weight: 600; font-size: 15px; color: var(--ink-soft); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: #1a1a1a; font-size: 15px; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom { max-width: var(--max); margin: 34px auto 0; padding: 20px 0; border-top: 1px solid #e5e5e5; font-size: 15px; color: var(--ink-soft); }

/* The way back to the consent banner. Styled as a link because that is what the
   Privacy Policy calls it ("the 'Cookie settings' link in the site footer"),
   and because a second button next to the copyright line would read as a
   call to action rather than a preference. */
.footer-cookie-settings { margin-left: 10px; font-size: 15px; }
.footer-cookie-settings:hover { color: var(--accent); }

/* ---------------- print ---------------- */

@media print {
  .site-header, .site-footer, #transcript-action-panel, .player, .search-form, .tabs { display: none; }
  .transcript-content { max-height: none; overflow: visible; }
  .transcript-group-box { break-inside: avoid; background: none; }
  .tab-pane[hidden] { display: block; }
  .watch-grid { display: block; }
}

/* ---------------- ads and consent ----------------
   The ad slot matches the original: hidden unless the viewport is small (or
   the browser is Safari), so the layout is identical whether or not a
   provider is configured. */

.ad-slot-wrap { display: none; }
.ad-slot-wrap.is-all { display: block; }
@media (max-width: 768px) {
  .ad-slot-wrap.is-mobile,
  .ad-slot-wrap.is-safari-mobile { display: block; }
}
body.is-safari .ad-slot-wrap.is-safari-mobile { display: block; }

.ad-container { max-width: var(--max); margin: 0 auto; padding: 16px 20px 0; }

/* The placeholder itself is left completely unstyled, exactly as the original
   ships it: a bare <div id="ezoic-pub-ad-placeholder-NNN">. Two reasons not to
   dress it up:
     1. An empty block is zero-height, so an unfilled slot shifts nothing.
     2. Ad providers measure the container before injecting. A container that is
        display:none (e.g. from an :empty rule) can be skipped entirely, which
        silently costs impressions. Never hide it. */
.ad-slot { display: block; }

.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  background: #fff; border-top: 3px solid var(--blue-deep);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
  padding: 18px 20px;
}
.consent-banner[hidden] { display: none; }
.consent-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.consent-text { flex: 1 1 420px; }
.consent-text strong { display: block; margin-bottom: 6px; font-size: 15px; }
.consent-text p { margin: 0; font-size: 14px; color: #555; line-height: 1.55; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ------------------------------------------------------------------
   Contact form — honeypot and delivery states (2026-10-22)
   ------------------------------------------------------------------ */

/* Present in the DOM for a form-filler, invisible to a person. Not
   display:none: some bots skip fields that are obviously hidden, and this
   one is only worth having if it looks like an ordinary input. */
.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Said plainly when the form cannot deliver: "not connected yet", or "we could
   not deliver that". Both replace a message that used to claim success. */
.notice-warning {
  border-left: 3px solid var(--accent-cta);
  padding-left: 0.75rem;
}

/* Explanatory rather than a warning: the note above the legal pages saying the
   document below is English-only. Blue, so it does not read as something that
   has gone wrong — nothing has. */
.notice-info {
  border-left: 3px solid var(--blue);
  padding-left: 0.75rem;
}
