:root {
  color-scheme: light;
  --ink: #17191d;
  --muted: #626974;
  --line: #d9dde3;
  --soft: #f4f6f8;
  --white: #ffffff;
  --brand: #c92a2a;
  --brand-dark: #9f2020;
  --pass: #147d4f;
  --pass-soft: #e9f7f0;
  --warn: #9a5b00;
  --warn-soft: #fff5dc;
  --fail: #b42318;
  --fail-soft: #ffefed;
  --focus: #1769aa;
  --shadow: 0 14px 40px rgba(23, 25, 29, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

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

a {
  color: #155a94;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(23, 105, 170, 0.3);
  outline-offset: 3px;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner,
.footer-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--white);
  background: var(--ink);
  font-size: 12px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.privacy-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pass);
}

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

.language-switch {
  height: 36px;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(42px, auto));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.language-switch a {
  min-width: 42px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.language-switch a:first-child {
  border-left: 0;
}

.language-switch a[aria-current="page"] {
  color: var(--white);
  background: var(--ink);
}

.tool-band {
  padding: 48px 0 64px;
  background: var(--white);
}

.title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

h3 {
  margin: 0;
  font-size: 17px;
}

.lede {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 15px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-primary {
  color: var(--white);
  background: var(--brand);
}

.button-primary:hover:not(:disabled) {
  background: var(--brand-dark);
}

.button-secondary,
.button-quiet {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.button-success {
  color: var(--white);
  background: var(--pass);
}

.upload-zone {
  min-height: 118px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border: 2px dashed #b9c0c9;
  border-radius: 8px;
  padding: 24px;
  background: var(--soft);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: var(--brand);
  background: #fff7f6;
}

.upload-zone p {
  margin: 3px 0 0;
  color: var(--muted);
}

.upload-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 28px;
}

.status-message {
  min-height: 24px;
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 36px;
  align-items: start;
}

.preview-toolbar,
.result-heading-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.segment {
  min-width: 76px;
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
}

.segment:last-child {
  border-right: 0;
}

.segment.is-active {
  color: var(--ink);
  background: #e9edf1;
  font-weight: 750;
}

.preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #aeb5be;
  border-radius: 6px;
  background: #1e2228;
  box-shadow: var(--shadow);
}

.placement-stage {
  width: 100%;
}

.placement-context {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 10px;
  padding: 12px 4px 2px;
}

.channel-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dfe3e8;
}

.placement-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.placement-copy strong,
.placement-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.placement-copy strong {
  font-size: 14px;
}

.placement-copy span,
.context-menu {
  color: var(--muted);
  font-size: 12px;
}

.context-menu {
  text-align: center;
  font-weight: 800;
}

.preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  color: #d8dde3;
  text-align: center;
}

.preview-empty span {
  color: #9da5af;
  font-size: 14px;
}

.safe-overlay {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.preview-frame.has-image .safe-overlay {
  display: block;
}

.duration-chip {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.menu-dots {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  font-weight: 800;
}

.safe-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 6px;
  color: var(--white);
  background: rgba(23, 25, 29, 0.72);
  font-size: 11px;
}

.preview-frame[data-mode="mobile"]::after {
  content: "";
  position: absolute;
  inset: 7% 10%;
  border: 1px dashed rgba(255, 255, 255, 0.85);
}

.placement-stage[data-mode="mobile"] {
  max-width: 640px;
  border: 1px solid var(--line);
  padding: 7px;
  background: var(--white);
}

.placement-stage[data-mode="mobile"] .menu-dots,
.placement-stage[data-mode="compact"] .menu-dots,
.placement-stage[data-mode="compact"] .safe-label {
  display: none;
}

.placement-stage[data-mode="compact"] {
  display: grid;
  grid-template-columns: minmax(180px, 46%) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.placement-stage[data-mode="compact"] .placement-context {
  grid-template-columns: minmax(0, 1fr) 20px;
  padding: 4px 0 0;
}

.placement-stage[data-mode="compact"] .channel-avatar {
  display: none;
}

.placement-stage[data-mode="compact"] .placement-copy strong {
  white-space: normal;
}

.placement-stage[data-mode="compact"] .duration-chip {
  right: 4px;
  bottom: 4px;
  font-size: 10px;
}

.preview-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.results-column {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.result-status {
  min-width: 82px;
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}

.result-status.is-empty {
  color: var(--muted);
  background: var(--soft);
}

.result-status.is-pass {
  color: var(--pass);
  background: var(--pass-soft);
}

.result-status.is-warning {
  color: var(--warn);
  background: var(--warn-soft);
}

.result-status.is-fail {
  color: var(--fail);
  background: var(--fail-soft);
}

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

.check-row,
.empty-result {
  min-height: 66px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.check-row {
  grid-template-columns: 20px 1fr;
  gap: 10px;
}

.check-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
}

.check-row[data-status="pass"] .check-indicator { background: var(--pass); }
.check-row[data-status="warning"] .check-indicator { background: var(--warn); }
.check-row[data-status="fail"] .check-indicator { background: var(--fail); }

.check-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
}

.label-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.check-status {
  flex: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.check-row[data-status="pass"] .check-status { color: var(--pass); }
.check-row[data-status="warning"] .check-status { color: var(--warn); }
.check-row[data-status="fail"] .check-status { color: var(--fail); }

.check-copy strong {
  font-size: 14px;
}

.check-copy span,
.check-copy small,
.empty-result {
  color: var(--muted);
  font-size: 13px;
}

.check-copy small {
  grid-column: 1 / -1;
}

.correction-panel {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}

.correction-panel > p {
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.file-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}

.file-comparison div {
  padding: 10px;
  background: var(--soft);
}

.file-comparison dt {
  color: var(--muted);
  font-size: 12px;
}

.file-comparison dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 750;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-band,
.faq-band {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.guide-band {
  background: var(--soft);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
}

.guide-main > p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  border: 1px solid var(--line);
}

.requirements-grid article {
  min-height: 190px;
  padding: 24px;
  background: var(--white);
}

.requirements-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.requirement-number {
  display: block;
  margin-bottom: 30px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.privacy-panel {
  align-self: start;
  border-top: 4px solid var(--pass);
  padding: 22px 0;
}

.privacy-panel p,
.privacy-panel li {
  color: var(--muted);
}

.privacy-panel ul {
  padding-left: 20px;
}

.faq-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 70px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq-list summary {
  font-weight: 750;
  cursor: pointer;
}

.faq-list p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--white);
}

.site-footer a {
  color: #dbe5ef;
}

.footer-inner p {
  margin: 0;
}

.footer-inner p:last-child {
  color: #aeb6c0;
  font-size: 14px;
}

@media (max-width: 860px) {
  .workspace,
  .guide-layout,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .results-column {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 30px;
    padding-left: 0;
  }

  .guide-layout,
  .faq-layout {
    gap: 36px;
  }

  .privacy-panel {
    max-width: 560px;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 58px;
  }

  .privacy-badge {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .language-switch a {
    padding: 0 8px;
  }

  .tool-band {
    padding: 32px 0 48px;
  }

  .title-row {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 38px;
  }

  .upload-zone {
    grid-template-columns: auto 1fr;
    padding: 18px;
  }

  .upload-zone > .button {
    grid-column: 1 / -1;
  }

  .preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control,
  .segment {
    width: 100%;
    min-width: 0;
  }

  .placement-stage[data-mode="compact"] {
    grid-template-columns: minmax(145px, 46%) minmax(0, 1fr);
  }

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

  .requirements-grid article {
    min-height: 164px;
  }

  .file-comparison {
    grid-template-columns: 1fr;
  }

  .action-row .button {
    width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
