.yctf-tool {
  --yctf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --yctf-font-weight: 400;
  --yctf-ink: #171717;
  --yctf-muted: #5f6368;
  --yctf-link: #cc0000;
  --yctf-bg: #ffffff;
  --yctf-panel: #ffffff;
  --yctf-soft: #f6f7f8;
  --yctf-input-bg: #f6f7f8;
  --yctf-input-text: #171717;
  --yctf-input-border: #d9d9d9;
  --yctf-action: #ff0000;
  --yctf-action-hover: #cc0000;
  --yctf-button-text: #ffffff;
  --yctf-line: #e1e1e1;
  --yctf-success: #16803c;
  --yctf-error: #c5221f;
  --yctf-warning-bg: #fff8e1;
  --yctf-warning-text: #7a4b00;
  --yctf-heading-size: 20px;
  --yctf-body-size: 16px;
  --yctf-output-size: 16px;
  --yctf-helper-size: 14px;
  --yctf-button-size: 16px;
  --yctf-max-width: 920px;
  --yctf-padding: 24px;
  --yctf-radius: 12px;
  --yctf-border-width: 1px;
  --yctf-input-height: 44px;
  --yctf-input-radius: 7px;
  --yctf-button-radius: 7px;
  --yctf-result-radius: 8px;
  --yctf-result-padding: 16px;
  --yctf-gap: 14px;
  background: var(--yctf-bg);
  border: var(--yctf-border-width) solid var(--yctf-line);
  border-radius: var(--yctf-radius);
  box-sizing: border-box;
  color: var(--yctf-ink);
  font-family: var(--yctf-font);
  font-size: var(--yctf-body-size);
  font-weight: var(--yctf-font-weight);
  line-height: 1.5;
  margin: 1.5rem 0;
  max-width: var(--yctf-max-width);
  padding: var(--yctf-padding);
  text-align: left;
}

.yctf-tool *, .yctf-tool *::before, .yctf-tool *::after { box-sizing: border-box; }
.yctf-tool button, .yctf-tool input { font: inherit; }
.yctf-custom-title { color: var(--yctf-ink); font-size: var(--yctf-heading-size); line-height: 1.3; margin: 0 0 var(--yctf-gap); }
.yctf-form { display: block; }
.yctf-source-row { margin-bottom: var(--yctf-gap); }
.yctf-source-choice { align-items: center; border: 0; display: flex; flex-wrap: wrap; gap: calc(var(--yctf-gap) / 2) var(--yctf-gap); margin: 0; padding: 0; }
.yctf-source-choice legend { color: var(--yctf-muted); float: left; font-size: var(--yctf-helper-size); margin-right: 3px; padding: 0; }
.yctf-source-choice label { align-items: center; color: var(--yctf-ink); cursor: pointer; display: inline-flex; font-size: var(--yctf-helper-size); font-weight: 600; gap: 5px; white-space: nowrap; }
.yctf-source-choice input { accent-color: var(--yctf-action); margin: 0; }
.yctf-url-action-row { align-items: end; display: grid; gap: var(--yctf-gap); grid-template-columns: minmax(0, 1fr) auto; }
.yctf-field { color: var(--yctf-ink); display: grid; font-weight: 600; gap: 6px; }
.yctf-field span { font-size: var(--yctf-helper-size); }
.yctf-field input {
  appearance: none;
  background: var(--yctf-input-bg);
  border: var(--yctf-border-width) solid var(--yctf-input-border);
  border-radius: var(--yctf-input-radius);
  color: var(--yctf-input-text);
  min-height: var(--yctf-input-height);
  padding: 9px 11px;
  width: 100%;
}
.yctf-field input:focus, .yctf-submit:focus, .yctf-evidence summary:focus, .yctf-evidence a:focus, .yctf-latest-video a:focus { outline: 3px solid var(--yctf-action); outline-offset: 2px; }
.yctf-submit {
  background: var(--yctf-action);
  border: var(--yctf-border-width) solid var(--yctf-action);
  border-radius: var(--yctf-button-radius);
  color: var(--yctf-button-text);
  cursor: pointer;
  font-size: var(--yctf-button-size);
  font-weight: 700;
  min-height: var(--yctf-input-height);
  padding: 9px 16px;
  white-space: nowrap;
}
.yctf-submit:hover:not(:disabled) { background: var(--yctf-action-hover); border-color: var(--yctf-action-hover); }
.yctf-submit:disabled { cursor: wait; opacity: .65; }
.yctf-help, .yctf-metadata, .yctf-method { color: var(--yctf-muted); font-size: var(--yctf-helper-size); line-height: 1.5; }
.yctf-help { margin: var(--yctf-gap) 0 0; }
.yctf-status { font-weight: 600; margin: var(--yctf-gap) 0 0; min-height: 1.5em; }
.yctf-status.is-working { color: var(--yctf-action); }
.yctf-status.is-success { color: var(--yctf-success); }
.yctf-status.is-error { color: var(--yctf-error); }
.yctf-status.is-working::before { animation: yctf-pulse 1.2s ease-in-out infinite; background: currentColor; border-radius: 50%; content: ''; display: inline-block; height: .52rem; margin: 0 .45rem .05rem 0; vertical-align: middle; width: .52rem; }
.yctf-results { font-size: var(--yctf-output-size); margin-top: var(--yctf-gap); }
.yctf-result-summary, .yctf-empty, .yctf-escalation-card {
  background: var(--yctf-soft);
  border: var(--yctf-border-width) solid var(--yctf-line);
  border-radius: var(--yctf-result-radius);
  padding: var(--yctf-result-padding);
}
.yctf-summary-line { color: var(--yctf-ink); font-size: var(--yctf-output-size); font-weight: 700; line-height: 1.45; margin: 0; }
.yctf-result-summary .yctf-metadata, .yctf-result-summary .yctf-method { margin: 8px 0 0; }
.yctf-warnings { background: var(--yctf-warning-bg); border: var(--yctf-border-width) solid var(--yctf-warning-text); border-radius: var(--yctf-result-radius); color: var(--yctf-warning-text); margin-top: var(--yctf-gap); padding: var(--yctf-result-padding); }
.yctf-warnings p { margin: 2px 0; }
.yctf-empty { line-height: 1.55; margin: var(--yctf-gap) 0 0; }
.yctf-topic-list { display: grid; gap: var(--yctf-gap); list-style: none; margin: var(--yctf-gap) 0 0; padding: 0; }
.yctf-topic { background: var(--yctf-panel); border: var(--yctf-border-width) solid var(--yctf-line); border-radius: var(--yctf-result-radius); padding: var(--yctf-result-padding); }
.yctf-topic-heading { align-items: baseline; display: flex; flex-wrap: wrap; gap: 6px var(--yctf-gap); }
.yctf-topic-name { color: var(--yctf-ink); font-size: var(--yctf-output-size); line-height: 1.4; }
.yctf-topic-count, .yctf-latest-video, .yctf-evidence-source { color: var(--yctf-muted); font-size: var(--yctf-helper-size); }
.yctf-latest-video, .yctf-evidence-source { font-weight: 600; margin: 0 0 6px; }
.yctf-latest-video a, .yctf-evidence-list a, .yctf-api-guide, .yctf-evidence summary { color: var(--yctf-link); }
.yctf-evidence { margin-top: var(--yctf-gap); }
.yctf-evidence summary { cursor: pointer; font-size: var(--yctf-helper-size); font-weight: 600; width: max-content; }
.yctf-evidence-list { color: var(--yctf-muted); font-size: var(--yctf-helper-size); line-height: 1.5; margin: 9px 0 0 18px; padding: 0; }
.yctf-evidence-list li + li { margin-top: 8px; }
.yctf-evidence-list q { color: var(--yctf-ink); display: block; }
.yctf-evidence-list a, .yctf-latest-video a { text-decoration: underline; }
.yctf-escalation { margin-top: var(--yctf-gap); }
.yctf-escalation-card { color: var(--yctf-ink); display: grid; gap: var(--yctf-gap); }
.yctf-escalation-card p { margin: 0; }
.yctf-escalation-title { font-size: var(--yctf-output-size); }
.yctf-escalation-button { justify-self: start; }
.yctf-api-key-privacy { color: var(--yctf-muted); font-size: var(--yctf-helper-size); line-height: 1.5; }
.yctf-api-guide { font-size: var(--yctf-helper-size); font-weight: 600; width: max-content; }
.yctf-escalation[hidden] { display: none !important; }

@keyframes yctf-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .yctf-status.is-working::before { animation: none; } }
@media (max-width: 680px) {
  .yctf-source-choice { align-items: flex-start; flex-direction: column; }
  .yctf-source-choice legend { float: none; }
  .yctf-url-action-row { grid-template-columns: 1fr; }
  .yctf-url-action-row .yctf-submit, .yctf-escalation-button { width: 100%; }
}

.yctf-date-range { align-items: end; display: grid; gap: var(--yctf-gap); grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); margin: 0 0 var(--yctf-gap); }
.yctf-date-range-label { color: var(--yctf-muted); font-size: var(--yctf-helper-size); font-weight: 600; padding-bottom: calc((var(--yctf-input-height) - var(--yctf-helper-size)) / 2); }
.yctf-date-range[hidden] { display: none !important; }
@media (max-width: 680px) {
  .yctf-date-range { grid-template-columns: 1fr; }
  .yctf-date-range-label { padding-bottom: 0; }
}
