.tools-container:has(.tool-page-cors-checker) {
  width: min(1280px, calc(100% - 32px));
  max-width: 1280px;
  padding-left: 28px;
  padding-right: 28px;
}
.tool-page.tool-page-cors-checker,
.shared-result-main.tool-page-cors-checker { width: 100%; max-width: 100%; min-width: 0; color: var(--tf-text); }
.cors-page, .cors-results, .cors-report, .cors-table-wrap { min-width: 0; max-width: 100%; }
.tool-page-cors-checker .tool-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "mark title back" "mark text back";
  column-gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.cors-mark {
  grid-area: mark;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #2459e0;
  color: #fff;
}
.tool-page-cors-checker .tool-header h1 { grid-area: title; margin: 0; font-size: 34px; line-height: 1.1; }
.tool-page-cors-checker .tool-description { grid-area: text; margin: 4px 0 0; }
.tool-page-cors-checker .tf-back { grid-area: back; align-self: start; }
.cors-page { display: grid; gap: 16px; }
.cors-card, .cors-report {
  background: var(--tf-card);
  border: 1px solid var(--tf-line);
  border-radius: 16px;
  padding: 22px;
}
.cors-card h2, .cors-report h2 { margin: 0; color: var(--tf-text); }
.cors-lead, .cors-related-head p { margin: 0 0 16px; color: var(--tf-muted); line-height: 1.5; }
.cors-related-head h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.3; }
.cors-field { min-width: 0; }
.cors-field label, .cors-names label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 650; }
.tool-page-cors-checker .cors-field .tool-input,
.tool-page-cors-checker .cors-names .tool-input,
.shared-result-main.tool-page-cors-checker .cors-field .tool-input {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  background: #fff;
  color: #182b49;
  border: 1px solid var(--tf-line);
}
.cors-hint { margin: 6px 0 0; color: var(--tf-muted); font-size: 13px; line-height: 1.45; }
.cors-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.cors-switch { display: flex; align-items: center; gap: 10px; min-height: 46px; font-weight: 650; }
.cors-switch input { width: 18px; height: 18px; }
.cors-form-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.cors-submit {
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #2459e0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cors-submit:disabled { opacity: 0.7; cursor: progress; }
.cors-error { margin: 10px 0 0; color: #b42318; }
.cors-error[hidden], .cors-lower[hidden], [hidden] { display: none !important; }
.cors-names { margin-top: 14px; border-top: 1px solid var(--tf-line); }
.cors-names summary { cursor: pointer; padding: 12px 0; font-weight: 650; list-style: none; }
.cors-names:not([open]) > :not(summary),
.cors-fold:not([open]) > :not(summary),
.cors-faq details:not([open]) > :not(summary),
.cors-understand details:not([open]) > :not(summary) { display: none; }
.cors-names summary::-webkit-details-marker,
.cors-fold summary::-webkit-details-marker,
.cors-faq summary::-webkit-details-marker,
.cors-understand summary::-webkit-details-marker { display: none; }
.cors-names summary::marker,
.cors-fold summary::marker,
.cors-faq summary::marker,
.cors-understand summary::marker { content: ""; }
.cors-explain, .cors-split, .cors-stats, .cors-rel-grid, .cors-context { display: grid; gap: 12px; }
.cors-explain, .cors-context { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.cors-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0; }
.cors-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cors-rel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cors-explain article, .cors-rel, .cors-stat, .cors-context article {
  border: 1px solid var(--tf-line);
  border-radius: 14px;
  background: var(--tf-card);
  padding: 14px;
}
.cors-explain article span, .cors-rel-icon, .cors-stat-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef3ff;
  color: #2459e0;
  margin-bottom: 8px;
}
.cors-stat { display: flex; align-items: flex-start; gap: 12px; }
.cors-stat-icon { flex: 0 0 36px; margin-bottom: 0; }
.cors-explain h3, .cors-stat strong { margin: 0 0 4px; font-size: 15px; }
.cors-explain p, .cors-stat p, .cors-rel span span, .cors-context p { margin: 0; color: var(--tf-muted); font-size: 13px; line-height: 1.45; }
.cors-stat b { display: block; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.cors-context strong { display: block; margin-bottom: 4px; }
.cors-context p { overflow-wrap: anywhere; }
.cors-rel { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.cors-rel strong, .cors-rel span span { display: block; }
.cors-rel-open { color: #2459e0; font-weight: 650; }
.cors-note, .cors-banner, .cors-footnote {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef3ff;
  color: var(--tf-text);
}
.cors-banner { background: #fff7ed; }
.cors-banner.is-ok { background: #ecfdf3; }
.cors-banner.is-bad { background: #fef3f2; }
.cors-note-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  background: #2459e0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cors-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: corsstep; }
.cors-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; }
.cors-steps li::before {
  counter-increment: corsstep;
  content: counter(corsstep);
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #2459e0;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.cors-steps strong, .cors-steps span { display: block; grid-column: 2; }
.cors-steps span { color: var(--tf-muted); font-size: 14px; }
.cors-faq details, .cors-understand details, .cors-fold { border-top: 1px solid var(--tf-line); }
.cors-faq summary, .cors-understand summary, .cors-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 14px 0;
  font-weight: 650;
  list-style: none;
}
.cors-faq summary::after, .cors-understand summary::after, .cors-fold summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid #5c6b82;
  border-bottom: 2px solid #5c6b82;
  transform: rotate(45deg) translateY(-2px);
}
.cors-faq details[open] summary::after, .cors-understand details[open] summary::after, .cors-fold[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.cors-faq p, .cors-understand p, .cors-fold p { margin: 0 0 12px; color: var(--tf-muted); }
.cors-report-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.cors-report-head h2 { font-size: 22px; }
.cors-kicker { margin: 4px 0 0; color: var(--tf-muted); font-size: 13px; }
.cors-share, .cors-actions button, .cors-retry, .cors-configure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--tf-line);
  background: var(--tf-card);
  color: var(--tf-text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 650;
}
.cors-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.cors-section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 18px; }
.cors-section-head h3 { margin: 0; font-size: 18px; }
.cors-table-wrap { overflow-x: auto; }
.cors-table { width: 100%; border-collapse: collapse; }
.cors-table th { text-align: left; font-size: 13px; color: var(--tf-muted); padding: 8px 10px; border-bottom: 1px solid var(--tf-line); }
.cors-table td { padding: 10px; border-bottom: 1px solid var(--tf-line); vertical-align: top; overflow-wrap: anywhere; }
.cors-raw { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.cors-pill { font-weight: 700; }
.cors-pill.permitted { color: #067647; }
.cors-pill.not_permitted, .cors-pill.invalid { color: #b42318; }
.cors-pill.not_tested, .cors-pill.indeterminate, .cors-pill.lookup_failed { color: #5c6b82; }
.cors-pill.informational { color: #2459e0; }
.cors-results { scroll-margin-top: 96px; }
.cors-stale { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; }
.cors-fail h2 { margin-bottom: 8px; }
.cors-list { margin: 8px 0 0; padding-left: 18px; color: var(--tf-muted); }
[data-theme="dark"] .tool-page-cors-checker .cors-field .tool-input,
[data-theme="dark"] .tool-page-cors-checker .cors-names .tool-input,
[data-theme="dark"] .cors-related .cors-rel,
[data-theme="dark"] .tool-page-cors-checker .cors-share,
[data-theme="dark"] .tool-page-cors-checker .cors-actions button,
[data-theme="dark"] .shared-result-main.tool-page-cors-checker .cors-share,
[data-theme="dark"] .shared-result-main.tool-page-cors-checker .cors-actions button {
  background: #070d18;
  color: var(--tf-text);
}
[data-theme="dark"] .tool-page-cors-checker .cors-note,
[data-theme="dark"] .tool-page-cors-checker .cors-footnote,
[data-theme="dark"] .tool-page-cors-checker .cors-explain article span,
[data-theme="dark"] .tool-page-cors-checker .cors-stat-icon,
[data-theme="dark"] .shared-result-main.tool-page-cors-checker .cors-note,
[data-theme="dark"] .shared-result-main.tool-page-cors-checker .cors-footnote { background: #13203a; }
[data-theme="dark"] .cors-banner { background: #3a2a14; }
[data-theme="dark"] .cors-banner.is-ok { background: #123024; }
[data-theme="dark"] .cors-banner.is-bad { background: #3a1d1d; }
@media (max-width: 860px) {
  .cors-row, .cors-explain, .cors-split, .cors-stats, .cors-rel-grid, .cors-context { grid-template-columns: 1fr; }
  .tool-page-cors-checker .tool-header { grid-template-columns: auto 1fr; grid-template-areas: "mark title" "text text" "back back"; }
  .tool-page-cors-checker .tool-header h1 { font-size: 28px; }
  .cors-submit, .cors-share, .cors-form-foot { width: 100%; }
  .cors-form-foot { justify-content: stretch; }
  .cors-submit { justify-content: center; }
  .cors-report-head, .cors-section-head { flex-direction: column; align-items: stretch; }
  .cors-table thead { display: none; }
  .cors-table tr { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--tf-line); }
  .cors-table td { display: block; border: 0; padding: 0; }
  .cors-table td::before { content: attr(data-label); display: block; color: var(--tf-muted); font-size: 12px; font-weight: 650; }
}
