/* TikTok Transcript — one stylesheet, no framework.
   Light-first, warm paper ground; ink text; a single electric accent. */

:root {
  --paper: #fbfaf7;
  --paper-2: #f4f2ec;
  --ink: #14130f;
  --ink-2: #43413a;
  --ink-3: #78756c;
  --line: #e2ded4;
  --line-strong: #cfc9bb;
  --accent: #2f4bff;
  --accent-ink: #1b2fd6;
  --accent-wash: #eaedff;
  --danger: #b3261e;
  --danger-wash: #fdeceb;
  --ok: #1d6b3f;
  --ok-wash: #e7f4ec;
  --radius: 14px;
  --radius-lg: 20px;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --shadow-1: 0 1px 2px rgba(20, 19, 15, .05), 0 8px 24px -12px rgba(20, 19, 15, .14);
  --shadow-2: 0 1px 2px rgba(20, 19, 15, .06), 0 18px 48px -22px rgba(20, 19, 15, .28);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111110;
    --paper-2: #191917;
    --ink: #f4f2ec;
    --ink-2: #c3bfb4;
    --ink-3: #8d897e;
    --line: #2a2a26;
    --line-strong: #3b3a34;
    --accent: #7e8cff;
    --accent-ink: #a4aeff;
    --accent-wash: #1c2040;
    --danger: #ff8a7f;
    --danger-wash: #2c1715;
    --ok: #6fd39a;
    --ok-wash: #12291c;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px -12px rgba(0, 0, 0, .7);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .6), 0 18px 48px -22px rgba(0, 0, 0, .9);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* A single hairline of colour at the very top — the one signature detail. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0 18%, transparent 18% 100%);
  z-index: 50;
  opacity: .9;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; text-decoration: none;
  transition: top .18s var(--ease); z-index: 60;
}
.skip:focus { top: 12px; }

/* ---------- masthead ---------- */

.masthead {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.012em;
}
.wordmark__mark {
  width: 20px; height: 20px;
  fill: none; stroke: var(--accent); stroke-width: 2.1; stroke-linecap: round;
}
.masthead__note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

/* ---------- hero / tool ---------- */

.hero {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 8px;
}

.hero__title {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(2.15rem, 5.4vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 620;
  color: var(--ink);
}

.hero__lede {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.55;
  color: var(--ink-2);
  letter-spacing: -.005em;
}

/* composer: input + button share one visual unit on wide screens */

.composer {
  margin: 34px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.composer__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 4px 6px 4px 14px;
  min-width: 0;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
  box-shadow: var(--shadow-1);
}
@media (prefers-color-scheme: dark) { .composer__field { background: var(--paper-2); } }

.composer__field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash), var(--shadow-1);
}

.composer__field.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-wash), var(--shadow-1);
}

.composer__icon {
  flex: none;
  width: 18px; height: 18px;
  fill: none; stroke: var(--ink-3); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .16s var(--ease);
}
.composer__field:focus-within .composer__icon { stroke: var(--accent); }

#url {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zoom-on-focus */
  padding: 15px 4px;
  letter-spacing: -.005em;
  text-overflow: ellipsis;
}
#url::placeholder { color: var(--ink-3); opacity: .85; }

.ghost {
  flex: none;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
}
.ghost:hover { background: var(--accent-wash); color: var(--accent-ink); border-color: var(--accent); }
.ghost:active { transform: translateY(.5px); }

.run {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 15px;
  font-weight: 580;
  letter-spacing: -.01em;
  padding: 0 24px;
  min-height: 56px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s var(--ease), transform .12s var(--ease), opacity .16s var(--ease);
  box-shadow: var(--shadow-1);
}
.run:hover { background: var(--accent); }
.run:active { transform: translateY(1px); }
.run[disabled] { opacity: .55; cursor: progress; }

.run__arrow {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .18s var(--ease);
}
.run:hover .run__arrow { transform: translateX(3px); }

.run.is-busy .run__arrow { animation: spin 1s linear infinite; }
.run.is-busy .run__arrow path { d: path("M8 2.2a5.8 5.8 0 1 1-5.8 5.8"); }

@keyframes spin { to { transform: rotate(360deg); } }

.hint {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.hint code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink-2);
}

.state {
  margin: 12px 0 0;
  min-height: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  transition: color .16s var(--ease);
}
.state.is-error { color: var(--danger); }
.state.is-ok { color: var(--ok); }
.state code {
  font-family: var(--mono);
  font-size: .9em;
  color: var(--ink);
}

/* ---------- result ---------- */

.result {
  width: 100%;
  max-width: 1080px;
  margin: 40px auto 0;
  padding: 0 24px;
  animation: rise .4s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.result__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.result__title {
  margin: 0;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.result__meta {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
  flex: none;
}
.copy svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.copy:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-wash); }
.copy.is-done { border-color: var(--ok); color: var(--ok); background: var(--ok-wash); }

.result__body {
  margin-top: 26px;
  padding: 4px 0 8px;
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  line-height: 1.78;
  letter-spacing: -.004em;
  color: var(--ink);
  max-width: 68ch;
  outline: none;
  overflow-wrap: anywhere;
}
.result__body:focus-visible { box-shadow: 0 0 0 3px var(--accent-wash); border-radius: 6px; }

.result__body p { margin: 0 0 .7em; }
.result__body p:last-child { margin-bottom: 0; }

.result__body .stamp {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .02em;
  color: var(--ink-3);
  margin: 0 0 2px;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* ---------- notes + faq ---------- */

.notes, .faq {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.notes { margin-top: 84px; }
.faq { margin-top: 64px; }

.notes h2, .faq h2 {
  margin: 0 0 26px;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.notes__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 52px;
}

.notes__grid h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.017em;
  color: var(--ink);
}
.notes__grid p {
  margin: 0;
  font-size: .9625rem;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 46ch;
}
.notes__grid code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 30px 18px 0;
  position: relative;
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -.012em;
  color: var(--ink);
  transition: color .14s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-ink); }
.faq summary::after {
  content: "";
  position: absolute;
  right: 4px; top: 50%;
  width: 9px; height: 9px;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s var(--ease), border-color .14s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); border-color: var(--accent); }
.faq details p {
  margin: 0 0 20px;
  max-width: 66ch;
  font-size: .9625rem;
  line-height: 1.68;
  color: var(--ink-2);
  animation: fade .22s var(--ease) both;
}
@keyframes fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.foot {
  width: 100%;
  max-width: 1080px;
  margin: 72px auto 0;
  padding: 22px 24px 40px;
  border-top: 1px solid var(--line);
}
.foot p { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---------- focus + reduced motion ---------- */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .masthead { padding-top: 20px; }
  .masthead__note { display: none; }

  .hero { padding-top: 36px; }
  .hero__title { max-width: 100%; font-size: clamp(1.95rem, 8.6vw, 2.55rem); letter-spacing: -.03em; }
  .hero__lede { margin-top: 14px; font-size: 1rem; }

  .composer {
    margin-top: 26px;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  #url { padding: 14px 4px; }
  .run { min-height: 52px; width: 100%; }

  .result { margin-top: 30px; }
  .result__head { flex-wrap: wrap; }
  .result__body { font-size: 1.02rem; line-height: 1.72; }

  .notes { margin-top: 60px; }
  .notes__grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }

  .faq { margin-top: 48px; }
  .foot { margin-top: 52px; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 1.85rem; }
  .result__body { font-size: .98rem; }
}

/* Wide screens: give the tool a little breathing room without a card-in-card look */
@media (min-width: 1081px) {
  .hero { padding-top: 72px; }
  .hero__title { font-size: 3.85rem; }
}

/* ---------- content pages: about / privacy / contact ---------- */

.page {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 56px 24px 0;
}
.page__kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.page h1 {
  margin: 0 0 18px;
  font-size: 2.15rem;
  line-height: 1.14;
  letter-spacing: -.028em;
  font-weight: 640;
  color: var(--ink);
}
.page__lede {
  margin: 0 0 34px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.page h2 {
  margin: 38px 0 10px;
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -.015em;
  color: var(--ink);
}
.page h2:first-of-type { margin-top: 30px; }
.page p, .page li {
  font-size: .9625rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 64ch;
}
.page p { margin: 0 0 14px; }
.page ul { margin: 0 0 16px; padding-left: 20px; }
.page li { margin-bottom: 7px; }
.page a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.page code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}
.page__mail {
  display: inline-block;
  margin: 4px 0 18px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.012em;
}
.page__note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.page__back {
  display: inline-block;
  margin-top: 26px;
  font-size: .9625rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
}
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}
.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 14px;
  font-size: 13px;
}
.foot__nav a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.foot__nav a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.foot__legal { margin: 0; font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 560px) {
  .nav { gap: 12px; font-size: 12.5px; }
  .page { padding-top: 36px; }
  .page h1 { font-size: 1.75rem; }
}
