:root {
  --ink: #5D6474;
  --muted: #5D6474;
  --line: rgba(93, 100, 116, .24);
  --paper: #ECEDE6;
  --blue: #6498AF;
  --violet: #A7A6B0;
  --white: #fafbf8;
  --surface: #f7f8f3;
  --surface-strong: #e1e3e2;
  --olive: #6498AF;
  --steel: #8CA9BD;
  --shadow: 0 18px 50px rgba(93, 100, 116, .14);
}

html {
  overflow-x: hidden;
  background: var(--paper);
}

body {
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(140, 169, 189, .38), transparent 29rem),
    var(--paper);
  color: var(--ink);
}

a,
button,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(100, 152, 175, .34);
  outline-offset: 3px;
}

.site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1180px;
  height: 76px;
  background: transparent;
}

.brand {
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -.035em;
}

.brand-mark {
  flex: 0 0 auto;
  background: var(--ink);
  box-shadow: 0 6px 18px rgba(93, 100, 116, .2);
}

.site-nav a,
.home-footer-links a,
.content-footer a {
  color: var(--muted);
}

.site-nav a:hover,
.home-footer-links a:hover,
.content-footer a:hover {
  color: var(--olive);
}

.eyebrow,
.section-kicker {
  color: var(--olive);
}

.hero {
  min-height: 0;
  padding: 70px 24px 66px;
  background:
    linear-gradient(180deg, rgba(250, 251, 248, .82), rgba(236, 237, 230, .3)),
    radial-gradient(circle at 50% 25%, rgba(140, 169, 189, .52), transparent 33rem);
}

.hero::after {
  width: 430px;
  height: 430px;
  top: 18px;
  border-color: rgba(100, 152, 175, .2);
}

.hero h1 {
  max-width: 880px;
  margin-top: 16px;
  margin-bottom: 22px;
  font-size: clamp(48px, 6.3vw, 78px);
  letter-spacing: -.06em;
  overflow-wrap: anywhere;
}

.hero h1 span {
  color: var(--olive);
}

.lead {
  max-width: 680px;
  margin-bottom: 34px;
  color: var(--muted);
}

.download-form {
  max-width: 1040px;
  border-color: rgba(93, 100, 116, .28);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-wrap input,
.quality-wrap select {
  background: transparent;
  color: var(--ink);
}

.input-wrap input::placeholder {
  color: rgba(93, 100, 116, .66);
}

.quality-wrap {
  border-color: var(--line);
}

.quality-wrap span,
.hint {
  color: rgba(93, 100, 116, .72);
}

.download-form button,
.download-file {
  background: var(--ink);
  color: var(--surface);
}

.download-form button:hover,
.download-file:hover {
  background: var(--olive);
}

.status-card,
.history-list,
.feature-grid article,
.seo-guide-grid a,
.inline-player-card,
.watch-card,
.content-cta,
.contact-card,
.faq-list details,
.access-log-table-wrap {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.progress {
  background: rgba(140, 169, 189, .4);
}

.progress > div {
  background: linear-gradient(90deg, var(--steel), var(--olive));
}

.history-section {
  padding-top: 66px;
}

.history-empty {
  border-color: rgba(93, 100, 116, .38);
  background: rgba(250, 251, 248, .4);
  color: var(--muted);
}

.history-list li,
.share-slot,
.content-section,
.content-hero,
.content-footer,
footer {
  border-color: var(--line);
}

.history-action,
.permanent-link,
.description-toggle,
.admin-video-title,
.official-links a,
.contact-card a {
  color: var(--olive);
}

.history-badge {
  background: rgba(167, 166, 176, .28);
  color: var(--muted);
}

.history-badge.is-complete {
  background: rgba(100, 152, 175, .16);
  color: #455c6a;
}

.history-badge.is-failed {
  background: rgba(93, 100, 116, .12);
  color: var(--ink);
}

.history-badge.is-downloading {
  background: rgba(140, 169, 189, .48);
  color: var(--ink);
}

.features {
  padding-top: 82px;
  padding-bottom: 82px;
}

.feature-grid article > span {
  background: var(--steel);
  color: var(--ink);
}

.feature-grid p,
.seo-copy p,
.content-section p,
.content-hero .content-intro,
.faq-list details p,
.retention-note,
.inline-player-author,
.inline-player-description,
.description,
.author {
  color: var(--muted);
}

.seo-copy {
  margin-bottom: 48px;
  border-color: var(--line);
}

.seo-guides {
  padding-top: 30px;
}

.seo-guide-grid a {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.seo-guide-grid a:hover {
  border-color: var(--olive);
  box-shadow: 0 18px 38px rgba(93, 100, 116, .16);
}

footer,
.content-footer {
  color: var(--muted);
}

.watch-main,
.content-main {
  width: 100%;
  min-width: 0;
}

.watch-card,
.inline-player-card {
  background: var(--surface);
}

.player-stage,
.inline-player-stage {
  background: var(--ink);
}

.video-copy h1,
.inline-player-copy h2,
.content-hero h1,
.content-section h2,
.message-page h1,
.access-log-heading h1,
.admin-video-title {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.share-button {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--ink);
}

.share-button:hover,
.share-button:focus-visible {
  border-color: var(--olive);
  color: var(--olive);
}

.share-button.is-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.content-main {
  max-width: 960px;
  padding-top: 38px;
}

.breadcrumbs {
  flex-wrap: wrap;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--olive);
}

.content-hero h1 {
  max-width: 900px;
  font-size: clamp(42px, 6.5vw, 68px);
}

.content-hero .content-intro {
  max-width: 790px;
}

.content-hero .document-updated {
  color: rgba(93, 100, 116, .7);
}

.legal-table-wrap {
  border-color: var(--line);
}

.legal-table {
  background: var(--surface);
}

.legal-table th,
.legal-table td {
  border-color: var(--line);
}

.legal-table td {
  color: var(--muted);
}

.official-links a {
  border-color: var(--line);
  background: rgba(167, 166, 176, .18);
}

.contact-card {
  border-color: rgba(100, 152, 175, .38);
  background: rgba(140, 169, 189, .3);
}

.content-cta {
  background:
    linear-gradient(135deg, rgba(167, 166, 176, .32), transparent 60%),
    var(--surface);
}

.admin-page {
  background: var(--paper);
}

.admin-tabs,
.log-filters {
  border-color: var(--line);
  background: var(--surface);
}

.admin-tabs a,
.log-filters a {
  color: var(--muted);
}

.admin-tabs a.is-active,
.log-filters a.is-active {
  background: var(--ink);
  color: var(--surface);
}

.access-log-table-wrap th {
  background: var(--surface-strong);
  color: var(--muted);
}

.access-log-table-wrap th,
.access-log-table-wrap td {
  border-color: var(--line);
}

.access-log-table-wrap tbody tr:hover {
  background: rgba(140, 169, 189, .15);
}

.method,
.admin-source-link:hover {
  color: var(--olive);
}

.status-2xx { background: rgba(100, 152, 175, .2); color: #455c6a; }
.status-3xx { background: rgba(140, 169, 189, .48); color: var(--ink); }
.status-4xx { background: rgba(167, 166, 176, .34); color: #515664; }
.status-5xx { background: rgba(93, 100, 116, .16); color: var(--ink); }

.pagination a {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.pagination a.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-page > footer {
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
}

.error-main {
  display: grid;
  flex: 1;
  place-items: center;
  width: 100%;
  padding: 54px 24px 90px;
}

.error-card {
  position: relative;
  width: min(100%, 760px);
  padding: 62px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(140, 169, 189, .4), transparent 18rem),
    var(--surface);
  box-shadow: var(--shadow);
}

.error-code {
  position: absolute;
  top: -42px;
  right: 18px;
  color: rgba(93, 100, 116, .07);
  font-size: clamp(150px, 27vw, 250px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.09em;
  pointer-events: none;
}

.error-card .section-kicker,
.error-card h1,
.error-description,
.error-actions {
  position: relative;
}

.error-card h1 {
  max-width: 590px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 68px);
  line-height: .98;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.error-description {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 34px;
}

.error-secondary {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.error-secondary:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .site-header {
    height: 64px;
    padding: 0 16px;
  }

  .brand {
    max-width: 100%;
    font-size: 19px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    padding: 34px 14px 42px;
  }

  .hero::after {
    width: 330px;
    height: 330px;
    top: 18px;
  }

  .hero h1 {
    max-width: 360px;
    margin-top: 12px;
    margin-bottom: 18px;
    font-size: clamp(36px, 11.2vw, 44px);
    line-height: .98;
    letter-spacing: -.055em;
  }

  .lead {
    max-width: 350px;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.48;
  }

  .download-form {
    gap: 0;
    padding: 7px;
    border-radius: 17px;
  }

  .input-wrap {
    min-width: 0;
    padding: 0 10px;
  }

  .input-wrap input {
    height: 58px;
    font-size: 15px;
  }

  .quality-wrap {
    padding: 10px 11px 11px;
  }

  .download-form button {
    min-height: 52px;
    margin-top: 2px;
  }

  .hint {
    max-width: 350px;
    margin: 13px auto 0;
    font-size: 11px;
    line-height: 1.45;
  }

  .status-card {
    margin-top: 16px;
    padding: 16px;
  }

  .history-section {
    padding: 45px 14px 0;
  }

  .history-heading h2,
  .features h2,
  .seo-copy h2,
  .seo-guides h2 {
    overflow-wrap: anywhere;
  }

  .history-list li {
    align-items: flex-start;
  }

  .history-url {
    max-width: calc(100vw - 100px);
  }

  .features {
    padding: 62px 14px;
  }

  .feature-grid {
    gap: 12px;
  }

  .feature-grid article {
    padding: 22px;
    border-radius: 16px;
  }

  .feature-grid h3 {
    margin-top: 24px;
  }

  .seo-copy {
    margin-bottom: 20px;
    padding: 48px 16px;
  }

  .seo-guides {
    padding: 28px 14px 58px;
  }

  footer,
  .content-footer {
    margin-right: 14px;
    margin-left: 14px;
  }

  .content-main {
    padding: 22px 16px 58px;
  }

  .breadcrumbs {
    margin-bottom: 30px;
    line-height: 1.35;
  }

  .breadcrumbs span:last-child {
    max-width: calc(100vw - 105px);
  }

  .content-hero {
    padding-bottom: 34px;
  }

  .content-hero h1 {
    max-width: 100%;
    margin: 10px 0 18px;
    font-size: clamp(26px, 8vw, 34px);
    line-height: .98;
    letter-spacing: -.05em;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .content-hero .content-intro {
    font-size: 16px;
    line-height: 1.55;
  }

  .content-section {
    padding: 34px 0;
  }

  .content-section h2 {
    font-size: 27px;
    overflow-wrap: anywhere;
  }

  .content-section p,
  .content-section li {
    font-size: 15px;
  }

  .content-section ul {
    padding-left: 19px;
  }

  .legal-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .legal-table tr {
    margin-bottom: 9px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
  }

  .legal-table th,
  .legal-table td {
    padding: 0;
    border: 0;
  }

  .legal-table th {
    margin-bottom: 6px;
  }

  .official-links {
    display: grid;
  }

  .official-links a {
    line-height: 1.4;
  }

  .contact-card {
    padding: 18px;
  }

  .contact-card a {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .content-cta {
    margin-top: 42px;
  }

  .watch-main {
    padding: 20px 10px 60px;
  }

  .watch-card,
  .inline-player-card {
    border-radius: 15px;
  }

  .video-copy,
  .inline-player-copy {
    padding: 20px 15px;
  }

  .video-copy h1,
  .inline-player-copy h2 {
    font-size: 27px;
  }

  .share-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-button {
    min-width: 0;
    min-height: 42px;
    padding: 9px 7px;
  }

  .admin-page .site-header {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .admin-tabs {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .admin-tabs a {
    min-width: 0;
    padding: 9px 6px;
    font-size: 11px;
    text-align: center;
  }

  .access-log-main {
    padding: 22px 12px 55px;
  }

  .access-log-heading {
    margin-bottom: 18px;
  }

  .access-log-heading h1 {
    font-size: 34px;
  }

  .log-filters {
    width: 100%;
  }

  .log-filters a {
    flex: 1;
    text-align: center;
  }

  .access-log-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .access-log-table-wrap table,
  .access-log-table-wrap tbody,
  .access-log-table-wrap tr,
  .access-log-table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .access-log-table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .access-log-table-wrap tbody tr {
    margin-bottom: 10px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(93, 100, 116, .08);
  }

  .access-log-table-wrap tbody td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    max-width: none;
    padding: 7px 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .access-log-table-wrap tbody td::before {
    content: attr(data-label);
    color: rgba(93, 100, 116, .72);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .access-log-table-wrap .uri,
  .access-log-table-wrap .agent,
  .access-log-table-wrap .referer,
  .admin-video-title,
  .admin-video-description {
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-source-link {
    white-space: normal;
  }

  .pagination {
    margin-top: 16px;
  }

  .error-main {
    align-items: start;
    padding: 34px 14px 64px;
  }

  .error-card {
    padding: 38px 22px;
    border-radius: 20px;
  }

  .error-code {
    top: -20px;
    right: 10px;
    font-size: 132px;
  }

  .error-card h1 {
    font-size: 37px;
  }

  .error-description {
    font-size: 16px;
  }

  .error-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .error-actions .download-file {
    width: 100%;
  }

  .error-secondary {
    padding: 10px;
    text-align: center;
  }

  .error-page > footer {
    width: calc(100% - 28px);
    margin-right: 14px;
    margin-left: 14px;
  }
}

@media (max-width: 380px) {
  .content-hero h1 {
    font-size: 23px;
    letter-spacing: -.04em;
    overflow-wrap: normal;
  }

  .hero h1 {
    font-size: 35px;
  }

  .share-buttons {
    grid-template-columns: 1fr;
  }
}
