:root {
  --text: #17191f;
  --muted: #646b78;
  --line: #d9dde4;
  --bg: #ffffff;
  --band: #f5f7fa;
  --accent: #b4202c;
  --accent-dark: #8f1722;
  --blue: #225a8f;
  --green: #247247;
  --amber: #8a6200;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.brand {
  color: var(--text);
  font-weight: 800;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  color: var(--muted);
}

.topbar nav a[href="/extension/"] {
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid rgba(180, 32, 44, 0.28);
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
}

nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}

.topbar nav a[href="/extension/"][aria-current="page"] {
  color: #ffffff;
  background: var(--accent-dark);
}

.page {
  width: min(1080px, calc(100vw - 48px));
  margin: 0 auto;
}

.page h1 {
  max-width: 860px;
  margin: 0;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
}

.button.secondary {
  color: var(--accent);
  background: #ffffff;
}

.button--primary-download {
  min-width: min(100%, 420px);
  min-height: 84px;
  padding: 0 32px;
  font-size: 20px;
  box-shadow: 0 14px 30px rgba(180, 32, 44, 0.24);
}

.button:disabled,
.button[disabled] {
  border-color: #b9bec7;
  color: #707784;
  background: #eef1f5;
  cursor: not-allowed;
}

.grid {
  width: min(1080px, calc(100vw - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

article h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

article p {
  margin: 0;
  color: var(--muted);
}

.page {
  padding: 52px 0 88px;
}

.home {
  display: grid;
  gap: 26px;
}

.home-page {
  background: #ffffff;
}

.service-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 430px;
  padding: 52px 20px;
  overflow: hidden;
  color: #ffffff;
  background: #17191f;
}

.service-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(90deg, rgba(13, 15, 20, 0.9), rgba(13, 15, 20, 0.68) 46%, rgba(13, 15, 20, 0.28)),
    url("/assets/spoiler-guard-social-card-v1.png");
  background-position: center;
  background-size: cover;
}

.service-hero__body {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.service-hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

.service-hero .eyebrow {
  color: #f2cd58;
}

.service-hero .lead {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
}

.service-hero .button.secondary {
  border-color: rgba(255, 255, 255, 0.82);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.service-hero .button--primary-download {
  border-color: #d62b36;
  background: #d62b36;
}

.home-section {
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 42px 0 0;
}

.home-section--stats {
  padding-top: 22px;
}

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

.stat-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 25, 31, 0.06);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.feature-cards {
  display: grid;
  gap: 14px;
}

.feature-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 25, 31, 0.06);
}

.feature-card__icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 30px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.feature-card h3,
.work-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.work-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 25, 31, 0.08);
}

.work-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e5e8ee;
}

.work-card__body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.work-card__work {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.curation-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.curation-notice.compact {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.curation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #f2b3b8;
  border-radius: 999px;
  color: #a31621;
  background: #fff3f4;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.work-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 0;
}

.work-card__meta div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.work-card__meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.work-card__meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.work-card__meta .block-count {
  color: var(--accent);
  font-size: 24px;
  line-height: 1.15;
}

.work-card__breakdown {
  grid-column: 1 / -1;
}

.work-card__breakdown dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text);
}

.work-card__breakdown span {
  white-space: nowrap;
}

.work-card__breakdown .work-card__description {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.developer-link {
  align-self: center;
  color: #858b96;
  font-size: 12px;
}

.home-head {
  display: grid;
  gap: 12px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.video-highlight {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.video-highlight img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #e5e8ee;
}

.video-highlight h2 {
  max-width: 680px;
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.video-highlight p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
}

.actions.compact {
  margin-top: 18px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-strip div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--band);
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.published {
  color: #ffffff;
  background: var(--green);
}

.status.ended {
  color: #ffffff;
  background: #6b7280;
}

.status.draft {
  color: #2c2303;
  background: #f2cd58;
}

.status.todo {
  color: #ffffff;
  background: var(--blue);
}

.detail h1 {
  font-size: 48px;
}

.detail-note {
  max-width: 760px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--band);
}

.detail-thumbnail {
  display: block;
  width: min(760px, 100%);
  height: auto;
  aspect-ratio: 16 / 9;
  margin-top: 24px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e5e8ee;
  box-shadow: 0 14px 34px rgba(23, 25, 31, 0.08);
}

.store-promo-image {
  display: block;
  width: min(920px, 100%);
  height: auto;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 25, 31, 0.08);
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.meta div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.compact-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notice,
.flow-list,
.criteria-list,
.converter-panel {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.notice.subtle {
  background: #ffffff;
}

.notice h2,
.flow-list h2,
.criteria-list h2,
.converter-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.notice p,
.flow-list p,
.criteria-list p,
.converter-panel p {
  margin: 0;
  color: var(--muted);
}

.flow-list ol,
.criteria-list ul {
  margin: 12px 0 0;
  padding-left: 1.4em;
}

.flow-list li,
.criteria-list li {
  margin: 5px 0;
}

.converter-panel {
  display: grid;
  gap: 16px;
  background: #ffffff;
}

.file-field,
.field-block {
  display: grid;
  gap: 6px;
}

.file-field span,
.field-block span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.file-field input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.converter-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--band);
}

.converter-status[data-kind="success"] {
  border-color: #b8d8c5;
  color: #1f5f39;
  background: #eef8f1;
}

.converter-status[data-kind="error"] {
  border-color: #e5bac0;
  color: #8f1722;
  background: #fff1f3;
}

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fbfcfd;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  color: #293241;
  background: #eef1f5;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: var(--band);
}

.site-footer__inner {
  width: min(1080px, calc(100vw - 48px));
  margin: 0 auto;
  display: grid;
  gap: 18px;
  padding: 28px 0;
}

.site-footer strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 900;
}

.site-footer p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 14px;
}

.site-footer__links a {
  color: var(--muted);
}

.site-footer small {
  color: var(--muted);
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 20px;
  }

  .page h1 {
    font-size: 38px;
  }

  .detail h1 {
    font-size: 34px;
  }

  .grid,
  .meta,
  .compact-meta,
  .summary-strip,
  .video-highlight {
    grid-template-columns: 1fr;
  }

  .page,
  .grid {
    width: min(100% - 40px, 1080px);
  }

  .site-footer__inner {
    width: min(100% - 40px, 1080px);
  }

  .button--primary-download {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 760px) {
  .service-hero {
    min-height: 440px;
    padding: 64px 28px;
  }

  .service-hero h1 {
    font-size: 64px;
  }

  .home-section {
    width: min(1080px, calc(100vw - 48px));
    padding-top: 56px;
  }

  .home-section--stats {
    padding-top: 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .section-head h2 {
    font-size: 34px;
  }

  .feature-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .work-card {
    grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
    align-items: stretch;
  }

  .work-card img {
    height: 100%;
    max-height: 260px;
  }

  .work-card__body {
    padding: 24px;
  }
}
