/* ClipKnight stylesheet.
 *
 * Palette: a deep ink-teal for the brand, a warm coral for actions, and
 * neutral paper greys for surfaces. Deliberately not the purple-blue gradient
 * every downloader site uses -- the brand has to be recognisable at a glance.
 */

/* A component with its own display value would otherwise ignore the
   hidden attribute. */
[hidden] {
  display: none !important;
}

:root {
  --ink: #0d1b24;
  --ink-2: #16303c;
  --ink-3: #2c4a58;
  --brand: #0f6d7a;
  --brand-dark: #0a5461;
  --brand-tint: #e6f2f3;
  --accent: #e2603c;
  --accent-dark: #c44a29;
  --accent-tint: #fdeee9;
  --paper: #ffffff;
  --paper-2: #f7f9f9;
  --paper-3: #eef2f2;
  --line: #dfe6e6;
  --line-strong: #c6d2d2;
  --text: #16282f;
  --text-muted: #5c7078;
  --text-faint: #8b9ca1;
  --ok: #1f7a4d;
  --err: #b8362a;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(13, 27, 36, 0.06);
  --shadow: 0 4px 16px rgba(13, 27, 36, 0.08);
  --shadow-lg: 0 18px 48px rgba(13, 27, 36, 0.12);

  --shell: 1120px;
  --shell-narrow: 760px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.35rem);
  letter-spacing: -0.028em;
}

h2 {
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.95rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.shell-narrow {
  max-width: var(--shell-narrow);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.16em;
}

.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-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* --- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-primary:disabled {
  background: var(--line-strong);
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-muted);
  padding: 9px 15px;
  font-size: 0.875rem;
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.btn-download {
  background: var(--brand);
  color: #fff;
  padding: 9px 16px;
  font-size: 0.875rem;
}

.btn-download:hover {
  background: var(--brand-dark);
  color: #fff;
}

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--brand-dark);
}

.logo {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--brand);
}

.logo svg {
  width: 100%;
  height: 100%;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  position: relative;
}

.nav-trigger,
.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-trigger:hover,
.icon-button:hover {
  background: var(--paper-3);
  color: var(--ink);
}

.chev {
  width: 0.85em;
  height: 0.85em;
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.has-dropdown.is-open .chev {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 232px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}

.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-right {
  left: auto;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  min-width: 190px;
}

.dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
}

.dropdown a:hover {
  background: var(--brand-tint);
  color: var(--brand-dark);
  text-decoration: none;
}

.dropdown a.is-current {
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.lang-menu {
  position: relative;
}

.menu-toggle {
  display: none;
}

/* --- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 400px at 50% -120px, var(--brand-tint), transparent 70%),
    linear-gradient(180deg, var(--paper-2), var(--paper));
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  text-align: center;
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero h1 {
  margin-bottom: 14px;
}

.hero-sub {
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.16rem);
  color: var(--text-muted);
  max-width: 62ch;
  margin-inline: auto;
}

.hero-tool {
  text-align: left;
  padding: 56px 0 48px;
}

.hero-tool .hero-sub {
  margin-inline: 0;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 26px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* The row of networks the site can read, under the paste form. */
.platform-strip {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
}

.platform-strip-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.platform-chip[data-platform="x"] {
  border-color: rgba(15, 109, 122, 0.35);
}

.platform-chip[data-platform="facebook"] {
  border-color: rgba(43, 92, 168, 0.35);
}

.platform-chip[data-platform="instagram"] {
  border-color: rgba(226, 96, 60, 0.35);
}

.platform-chip[data-platform="tiktok"] {
  border-color: rgba(24, 32, 44, 0.35);
}

.platform-chip[data-platform="youtube"] {
  border-color: rgba(196, 46, 46, 0.35);
}

/* The badge that says which network a result came from. */
.result-platform {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft, rgba(15, 109, 122, 0.12));
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-trust .icon {
  color: var(--brand);
}

/* --- Downloader widget ------------------------------------------------- */

.downloader {
  margin-top: 30px;
}

.paste-form {
  margin: 0;
}

.paste-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.paste-row:focus-within {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
}

.paste-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-faint);
  pointer-events: none;
}

.paste-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.98rem;
  padding: 13px 40px 13px 40px;
  border-radius: var(--radius);
  outline: none;
  color: var(--text);
}

.paste-input::placeholder {
  color: var(--text-faint);
}

.paste-clear {
  position: absolute;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--text-muted);
  cursor: pointer;
}

.paste-clear:hover {
  background: var(--line);
  color: var(--ink);
}

.paste-submit {
  border-radius: var(--radius);
  padding-inline: 24px;
  flex: none;
}

.paste-submit.is-busy {
  opacity: 0.75;
}

.paste-status {
  margin: 12px 2px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.paste-status.is-error {
  color: var(--err);
  font-weight: 500;
}

.paste-status.is-loading {
  color: var(--brand-dark);
}

.disclaimer {
  margin: 16px auto 0;
  max-width: 68ch;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-faint);
}

.disclaimer a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* --- Results ----------------------------------------------------------- */

.results {
  margin-top: 24px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.results-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.results-title h3 {
  margin: 0;
  font-size: 1rem;
}

.results-check {
  color: var(--ok);
  width: 1.3em;
  height: 1.3em;
}

.results-body {
  padding: 16px 18px 18px;
}

.post-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}

.post-meta {
  min-width: 0;
  flex: 1;
}

.post-meta strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
}

.post-handle {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-left: 6px;
}

.post-text {
  margin: 5px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.post-open {
  flex: none;
  font-size: 0.82rem;
  color: var(--brand-dark);
}

.media-list {
  display: grid;
  gap: 8px;
}

.media-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.media-row:hover {
  border-color: var(--line-strong);
}

.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  color: var(--brand-dark);
  flex: none;
}

.media-info {
  flex: 1;
  min-width: 0;
}

.media-quality {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.media-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.btn-audio {
  flex: none;
}

/* --- Media preview ------------------------------------------------------ */

/* The preview sits above the author card: it is the answer to "did we get
   the right thing?", so it should be the first thing you see. */
.preview {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
}

.preview-img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: var(--paper-3);
}

.preview-cap {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.82rem;
  color: var(--ok);
  font-weight: 600;
}

.preview-cap .icon {
  flex: none;
}

.media-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex: none;
  background: var(--paper-3);
  border: 1px solid var(--line);
}

/* --- Profile viewer ----------------------------------------------------- */

.profile-results {
  margin-top: 24px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-results .results-head {
  border-bottom: 1px solid var(--line);
}

.profile-results .media-list {
  padding: 14px 18px 18px;
}

/* --- Sections ---------------------------------------------------------- */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 30px;
}

.section-head h2 {
  margin-bottom: 6px;
}

.section-sub {
  color: var(--text-muted);
  margin: 0;
}

.prose-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.prose-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.prose-grid p {
  margin: 0;
  color: var(--text-muted);
}

/* --- Feature grid ------------------------------------------------------ */

.feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature p {
  margin: 0;
  color: var(--text);
  font-size: 0.93rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  color: var(--brand-dark);
  flex: none;
}

/* --- Stat band --------------------------------------------------------- */

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: var(--paper);
  padding: 20px 16px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Split band -------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

.split-copy p {
  color: var(--text-muted);
}

.split-lead {
  color: var(--ink) !important;
  font-weight: 500;
}

.visual-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.visual-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.visual-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.visual-url {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-rows {
  padding: 8px;
  display: grid;
  gap: 6px;
}

.vrow {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.vrow-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  color: var(--brand-dark);
  flex: none;
}

.vrow-label {
  font-family: var(--mono);
  font-size: 0.83rem;
  color: var(--text);
  flex: 1;
}

.vrow-tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-dark);
  background: var(--brand-tint);
  padding: 3px 9px;
  border-radius: 999px;
}

.vrow-action {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  flex: none;
}

.visual-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 0.8rem;
  color: var(--ok);
  font-weight: 600;
}

/* --- Steps ------------------------------------------------------------- */

.step-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step p {
  margin: 0;
  color: var(--text);
  font-size: 0.93rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex: none;
}

/* --- FAQ --------------------------------------------------------------- */

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--line-strong);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: var(--paper-2);
}

.faq-item .chev {
  flex: none;
  transition: transform 0.15s ease;
}

.faq-item[open] .chev {
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 18px 16px;
}

.faq-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* --- Callouts and tips -------------------------------------------------- */

.callout {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 15px 18px;
  border-radius: var(--radius);
  background: var(--accent-tint);
  border: 1px solid #f6d9cf;
  color: var(--text);
  font-size: 0.92rem;
}

.callout p {
  margin: 0;
}

.callout-safe {
  background: var(--brand-tint);
  border-color: #cbe4e6;
}

.callout-safe .icon {
  color: var(--brand-dark);
}

.tip-list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 11px;
}

.tip-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.tip-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.tip-list .icon {
  color: var(--ok);
  margin-top: 4px;
}

/* --- Static pages ------------------------------------------------------ */

.page-hero {
  padding: 52px 0 40px;
  background:
    radial-gradient(760px 320px at 50% -140px, var(--brand-tint), transparent 70%),
    var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-bottom: 8px;
}

.page-updated {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.legal-block {
  margin-bottom: 30px;
}

.legal-block h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.legal-block p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.legal-contact {
  margin-top: 36px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.legal-contact h2 {
  font-size: 1.05rem;
}

.legal-contact p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-paragraph {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}

/* --- Footer ------------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: #c9d6da;
  padding: 48px 0 26px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand .brand {
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand .brand:hover {
  color: #fff;
}

.footer-brand .logo {
  color: #6fd3de;
}

.footer-note {
  font-size: 0.84rem;
  color: #93a7ae;
  max-width: 42ch;
  margin: 0;
}

.footer-col h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-col a {
  color: #b6c6cb;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: #8b9ea5;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 10px 16px 18px;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 11px 12px;
  }

  /*
   * The navigation dropdowns belong inside the mobile panel, so they flow
   * with the rest of it. The language menu lives in the header instead, and
   * must stay an overlay -- made static it pushes the whole header out of
   * the viewport and its first rows cannot be reached.
   */
  .site-nav .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 0 0 6px 12px;
    padding: 0 0 0 6px;
    min-width: 0;
    display: none;
  }

  .site-nav .has-dropdown.is-open .dropdown {
    display: block;
  }

  .header-actions .dropdown-right {
    /*
     * Fixed to the viewport rather than to the button. An absolutely
     * positioned panel is measured against its nearest positioned
     * ancestor, and on a phone that can put its top edge above the
     * screen -- where no amount of scrolling brings the first rows
     * back. Fixed positioning cannot drift off the viewport.
     */
    position: fixed;
    top: 72px;
    left: 14px;
    right: 14px;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
  }

  .hero {
    padding: 48px 0 44px;
  }

  .paste-row {
    flex-direction: column;
  }

  .paste-submit {
    width: 100%;
    padding-block: 13px;
  }

  .section {
    padding: 48px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 420px) {
  .shell {
    padding-inline: 18px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  /* The results header title and the reset button compete for room on a
     phone. Let the title take the full width and drop the button below. */
  .results-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .results-title h3 {
    font-size: 0.95rem;
  }

  .results-head .btn-ghost {
    align-self: flex-start;
  }

  /* Media rows: keep the label readable and let the buttons wrap under it. */
  .media-row {
    flex-wrap: wrap;
  }

  .media-info {
    flex: 1 1 100%;
    order: 1;
  }

  .media-icon {
    order: 0;
  }

  .media-thumb {
    order: 0;
    width: 44px;
    height: 44px;
  }

  .media-row .btn-download,
  .media-row .btn-audio {
    order: 2;
    flex: 1 1 auto;
    padding-inline: 14px;
  }

  /* Keep the icons at a fixed size instead of stretching with the flex row. */
  .media-row .btn .icon,
  .media-row .btn svg {
    width: 1.05em;
    height: 1.05em;
    flex: none;
  }

  /* The profile viewer posts a caption under each row; keep it on its own
     line rather than squeezing the quality label. */
  .media-meta {
    overflow-wrap: anywhere;
  }

  .preview-img {
    max-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Right-to-left -------------------------------------------------------

   Arabic reads from the right. The text direction is handled by the
   browser's bidi engine (the html element carries dir="rtl"); these rules
   mirror the layout so the page does not end up half left, half right.

   ------------------------------------------------------------------- */

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav-list,
[dir="rtl"] .hero-trust,
[dir="rtl"] .footer-grid,
[dir="rtl"] .prose-grid,
[dir="rtl"] .feature-grid,
[dir="rtl"] .paste-row,
[dir="rtl"] .media-row,
[dir="rtl"] .results-head,
[dir="rtl"] .stat-band,
[dir="rtl"] .step-list,
[dir="rtl"] .tip-list,
[dir="rtl"] .platform-list {
  direction: rtl;
}

/* Icons that carry a direction (chevrons, arrows) keep pointing the way the
   reader expects. */
[dir="rtl"] .chev,
[dir="rtl"] .nav-trigger .chev,
[dir="rtl"] .dropdown-right .chev {
  transform: scaleX(-1);
}

/* Numbers, resolutions and product names stay left-to-right even inside a
   right-to-left sentence, which is what the bidi algorithm would do for
   most of them anyway -- but the labels around them must not flip. */
[dir="rtl"] .stat strong,
[dir="rtl"] .vrow-label,
[dir="rtl"] .vrow-tag,
[dir="rtl"] .media-meta .quality {
  direction: ltr;
  text-align: right;
}

[dir="rtl"] .dropdown {
  right: 0;
  left: auto;
}

[dir="rtl"] .dropdown-right {
  right: auto;
  left: 0;
}

/* --- Feedback form ------------------------------------------------------- */

.feedback-form {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.feedback-input {
  min-height: 9rem;
  resize: vertical;
  font: inherit;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem 0.9rem;
  color: var(--text);
}

.feedback-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.field-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field-hint.is-over {
  color: var(--err);
  font-weight: 600;
}

.radio-group {
  display: grid;
  gap: 0.5rem;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
}

.radio-row input {
  accent-color: var(--brand);
  width: 1.05rem;
  height: 1.05rem;
}

/* The honeypot. Moved off screen rather than display:none, because a bot
   that skips hidden fields would happily fill this one. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.feedback-privacy {
  margin: 0;
}

.feedback-done {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.feedback-done .icon {
  color: var(--ok);
}

.feedback-done h2 {
  margin: 0;
  font-size: 1.1rem;
}

.feedback-done p {
  margin: 0;
  color: var(--text-muted);
}
