:root {
  color-scheme: dark;
  --tk-navy: #081222;
  --tk-blue: #173b6c;
  --tk-blue-bright: #5f91d8;
  --tk-gold: #b18518;
  --tk-gold-light: #d5ad43;
  --tk-bg: #081222;
  --tk-surface: #0e1a2b;
  --tk-surface-elevated: #132238;
  --tk-surface-soft: #172a43;
  --tk-border: rgba(255, 255, 255, 0.1);
  --tk-border-strong: rgba(255, 255, 255, 0.17);
  --tk-text: #f5f7fb;
  --tk-text-muted: #aab6c7;
  --tk-success: #45c58b;
  --tk-success-soft: rgba(69, 197, 139, 0.13);
  --tk-warning: #edb14a;
  --tk-warning-soft: rgba(237, 177, 74, 0.14);
  --tk-danger: #ef6b73;
  --tk-danger-soft: rgba(239, 107, 115, 0.13);
  --tk-info: #74a8ee;
  --tk-info-soft: rgba(95, 145, 216, 0.14);
  --tk-radius-lg: 24px;
  --tk-radius-md: 16px;
  --tk-radius-sm: 11px;
  --tk-shadow: 0 22px 55px rgba(0, 0, 0, 0.25);
  --tk-transition: 180ms ease;
}

body.tk-ai-page,
body.tk-ai-page * {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.tk-ai-page {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(23, 59, 108, 0.38), transparent 31rem),
    radial-gradient(circle at 90% 20%, rgba(177, 133, 24, 0.09), transparent 27rem),
    var(--tk-bg);
  color: var(--tk-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.tk-ai-page button,
.tk-ai-page input,
.tk-ai-page textarea {
  font: inherit;
}

.tk-ai-page button,
.tk-ai-page a,
.tk-ai-page input,
.tk-ai-page textarea {
  -webkit-tap-highlight-color: transparent;
}

.tk-ai-page a {
  color: inherit;
}

.tk-ai-page [hidden] {
  display: none !important;
}

.tk-ai-page .tk-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--tk-text);
  color: var(--tk-navy);
  font-weight: 800;
  text-decoration: none;
}

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

.tk-ai-page .tk-ai-tool {
  width: min(1340px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.tk-ai-page .tk-tool-navigation {
  margin-bottom: 20px;
}

.tk-ai-page .tk-back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--tk-text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--tk-transition), transform var(--tk-transition);
}

.tk-ai-page .tk-back-link:hover {
  color: var(--tk-text);
  transform: translateX(-2px);
}

.tk-ai-page .tk-ai-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: center;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--tk-border);
  border-radius: 28px;
  background:
    linear-gradient(125deg, rgba(23, 59, 108, 0.34), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--tk-surface);
  box-shadow: var(--tk-shadow);
}

.tk-ai-page .tk-ai-hero::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(95, 145, 216, 0.08);
  content: "";
  filter: blur(4px);
  pointer-events: none;
}

.tk-ai-page .tk-ai-hero__content,
.tk-ai-page .tk-ai-hero-visual {
  position: relative;
  z-index: 1;
}

.tk-ai-page .tk-brand-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tk-ai-page .tk-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(213, 173, 67, 0.42);
  border-radius: 11px;
  background: rgba(177, 133, 24, 0.12);
  color: var(--tk-gold-light);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.tk-ai-page .tk-eyebrow,
.tk-ai-page .tk-section-kicker {
  margin: 0;
  color: var(--tk-gold-light);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.tk-ai-page .tk-ai-hero__title {
  max-width: 850px;
  margin: 0;
  color: var(--tk-text);
  font-size: clamp(2.1rem, 4.4vw, 4.25rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.tk-ai-page .tk-ai-hero__lead {
  max-width: 810px;
  margin: 22px 0 0;
  color: #c5cedb;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.72;
}

.tk-ai-page .tk-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.tk-ai-page .tk-trust-list li {
  padding: 8px 11px;
  border: 1px solid var(--tk-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #d4dbe5;
  font-size: 0.78rem;
  font-weight: 700;
}

.tk-ai-page .tk-ai-hero-visual {
  min-width: 0;
  padding: 22px;
  transform: rotate(1.4deg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: #0a1525;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.tk-ai-page .tk-ai-visual__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 23px;
}

.tk-ai-page .tk-ai-visual__header > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.23);
}

.tk-ai-page .tk-ai-visual__header strong {
  margin-left: auto;
  color: var(--tk-text-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
}

.tk-ai-page .tk-ai-visual__line {
  width: 68%;
  height: 8px;
  margin: 11px 0;
  border-radius: 999px;
  background: rgba(116, 168, 238, 0.2);
}

.tk-ai-page .tk-ai-visual__line--wide {
  width: 91%;
}

.tk-ai-page .tk-ai-visual__checks {
  display: grid;
  gap: 8px;
  margin-top: 23px;
}

.tk-ai-page .tk-ai-visual__checks span {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 9px;
  color: #d8e0eb;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
}

.tk-ai-page .tk-ai-visual__checks span::after {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
}

.tk-ai-page .tk-ai-visual__checks .is-allowed {
  background: var(--tk-success-soft);
}

.tk-ai-page .tk-ai-visual__checks .is-allowed::after {
  color: var(--tk-success);
  content: "ALLOW";
}

.tk-ai-page .tk-ai-visual__checks .is-blocked {
  background: var(--tk-danger-soft);
}

.tk-ai-page .tk-ai-visual__checks .is-blocked::after {
  color: var(--tk-danger);
  content: "BLOCK";
}

.tk-ai-page .tk-ai-visual__checks .is-neutral {
  background: var(--tk-info-soft);
}

.tk-ai-page .tk-ai-visual__checks .is-neutral::after {
  color: var(--tk-info);
  content: "CONTEXT";
}

.tk-ai-page .tk-ai-visual__result {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
  color: var(--tk-text-muted);
  font-size: 0.75rem;
}

.tk-ai-page .tk-ai-visual__result span,
.tk-ai-page .tk-live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--tk-success);
  box-shadow: 0 0 0 4px rgba(69, 197, 139, 0.1);
}

.tk-ai-page .tk-ai-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0;
  padding: 13px 15px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: rgba(14, 26, 43, 0.82);
}

.tk-ai-page .tk-ai-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tk-ai-page .tk-live-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--tk-text-muted);
  font-size: 0.82rem;
}

.tk-ai-page .tk-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color var(--tk-transition),
    border-color var(--tk-transition),
    color var(--tk-transition),
    transform var(--tk-transition);
}

.tk-ai-page .tk-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.tk-ai-page .tk-button:active:not(:disabled) {
  transform: translateY(0);
}

.tk-ai-page .tk-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.tk-ai-page .tk-button--primary {
  background: var(--tk-blue-bright);
  color: #07111e;
}

.tk-ai-page .tk-button--primary:hover:not(:disabled) {
  background: #79adf2;
}

.tk-ai-page .tk-button--secondary {
  border-color: rgba(116, 168, 238, 0.34);
  background: rgba(95, 145, 216, 0.1);
  color: #dceaff;
}

.tk-ai-page .tk-button--secondary:hover:not(:disabled) {
  border-color: rgba(116, 168, 238, 0.57);
  background: rgba(95, 145, 216, 0.19);
}

.tk-ai-page .tk-button--quiet {
  border-color: var(--tk-border);
  background: transparent;
  color: var(--tk-text-muted);
}

.tk-ai-page .tk-button--quiet:hover:not(:disabled) {
  border-color: var(--tk-border-strong);
  color: var(--tk-text);
}

.tk-ai-page .tk-button--full {
  width: 100%;
}

.tk-ai-page .tk-ai-workbench {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px;
  align-items: start;
}

.tk-ai-page .tk-card {
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.021), transparent 95px), var(--tk-surface);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
}

.tk-ai-page .tk-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.tk-ai-page .tk-card-heading--wide {
  align-items: center;
}

.tk-ai-page .tk-section-title {
  margin: 5px 0 0;
  color: var(--tk-text);
  font-size: clamp(1.28rem, 2vw, 1.7rem);
  font-weight: 820;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tk-ai-page .tk-section-intro {
  margin: 0 0 22px;
  color: var(--tk-text-muted);
  font-size: 0.92rem;
}

.tk-ai-page .tk-reference-badge,
.tk-ai-page .tk-analysis-state {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(116, 168, 238, 0.27);
  border-radius: 999px;
  background: var(--tk-info-soft);
  color: #bad7ff;
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tk-ai-page .tk-analysis-state.is-loading {
  border-color: rgba(237, 177, 74, 0.34);
  background: var(--tk-warning-soft);
  color: #ffd58d;
}

.tk-ai-page .tk-analysis-state.is-ready {
  border-color: rgba(69, 197, 139, 0.3);
  background: var(--tk-success-soft);
  color: #93e2bc;
}

.tk-ai-page .tk-analysis-state.is-error {
  border-color: rgba(239, 107, 115, 0.34);
  background: var(--tk-danger-soft);
  color: #ffadb2;
}

.tk-ai-page .tk-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid var(--tk-border);
  border-radius: 13px;
  background: #091524;
}

.tk-ai-page .tk-mode-tab {
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--tk-text-muted);
  cursor: pointer;
  font-weight: 800;
  transition: color var(--tk-transition), background-color var(--tk-transition);
}

.tk-ai-page .tk-mode-tab:hover {
  color: var(--tk-text);
}

.tk-ai-page .tk-mode-tab.is-active {
  background: var(--tk-surface-soft);
  color: var(--tk-text);
  box-shadow: inset 0 0 0 1px rgba(116, 168, 238, 0.16);
}

.tk-ai-page .tk-mode-panel {
  min-width: 0;
}

.tk-ai-page .tk-field + .tk-field {
  margin-top: 19px;
}

.tk-ai-page .tk-label,
.tk-ai-page .tk-subsection-title {
  display: block;
  margin: 0 0 7px;
  color: #e6ebf2;
  font-size: 0.88rem;
  font-weight: 800;
}

.tk-ai-page .tk-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tk-ai-page .tk-counter {
  color: var(--tk-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.tk-ai-page .tk-input,
.tk-ai-page .tk-textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--tk-border-strong);
  border-radius: 11px;
  outline: none;
  background: #091524;
  color: var(--tk-text);
  transition: border-color var(--tk-transition), box-shadow var(--tk-transition), background-color var(--tk-transition);
}

.tk-ai-page .tk-input {
  min-height: 48px;
  padding: 11px 13px;
}

.tk-ai-page .tk-textarea {
  display: block;
  min-height: 290px;
  padding: 13px;
  resize: vertical;
}

.tk-ai-page .tk-input::placeholder,
.tk-ai-page .tk-textarea::placeholder {
  color: #6f7f94;
  opacity: 1;
}

.tk-ai-page .tk-input:hover,
.tk-ai-page .tk-textarea:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.tk-ai-page .tk-input:focus,
.tk-ai-page .tk-textarea:focus {
  border-color: var(--tk-blue-bright);
  box-shadow: 0 0 0 3px rgba(95, 145, 216, 0.16);
}

.tk-ai-page .tk-input[aria-invalid="true"],
.tk-ai-page .tk-textarea[aria-invalid="true"] {
  border-color: var(--tk-danger);
}

.tk-ai-page .tk-input:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.tk-ai-page .tk-code-input,
.tk-ai-page .tk-code-output,
.tk-ai-page .tk-rule-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  tab-size: 2;
}

.tk-ai-page .tk-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.tk-ai-page .tk-help,
.tk-ai-page .tk-field-error {
  margin: 7px 0 0;
  font-size: 0.77rem;
  line-height: 1.5;
}

.tk-ai-page .tk-help {
  color: var(--tk-text-muted);
}

.tk-ai-page .tk-field-error {
  min-height: 1.2em;
  color: #ff9ba2;
  font-weight: 700;
}

.tk-ai-page .tk-connector-note {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(116, 168, 238, 0.19);
  border-radius: 11px;
  background: rgba(95, 145, 216, 0.07);
  color: var(--tk-text-muted);
}

.tk-ai-page .tk-connector-note svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--tk-info);
}

.tk-ai-page .tk-connector-note p {
  margin: 0;
  font-size: 0.78rem;
}

.tk-ai-page .tk-connector-note.is-checking {
  border-color: rgba(237, 177, 74, 0.27);
  background: var(--tk-warning-soft);
}

.tk-ai-page .tk-connector-note.is-checking svg {
  color: var(--tk-warning);
}

.tk-ai-page .tk-connector-note.is-success {
  border-color: rgba(69, 197, 139, 0.27);
  background: var(--tk-success-soft);
}

.tk-ai-page .tk-connector-note.is-success svg {
  color: var(--tk-success);
}

.tk-ai-page .tk-connector-note.is-error {
  border-color: rgba(239, 107, 115, 0.3);
  background: var(--tk-danger-soft);
}

.tk-ai-page .tk-connector-note.is-error svg {
  color: var(--tk-danger);
}

.tk-ai-page .tk-path-tester {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.75fr);
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--tk-border);
}

.tk-ai-page .tk-path-tester .tk-subsection-title,
.tk-ai-page .tk-path-tester .tk-help {
  margin: 0;
}

.tk-ai-page .tk-empty-state {
  display: grid;
  min-height: 425px;
  place-items: center;
  align-content: center;
  padding: 32px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: var(--tk-radius-md);
  background: rgba(8, 18, 34, 0.38);
  text-align: center;
}

.tk-ai-page .tk-empty-state__icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 17px;
  background: var(--tk-info-soft);
  color: var(--tk-info);
}

.tk-ai-page .tk-empty-state h3 {
  margin: 0 0 5px;
  font-size: 1.08rem;
}

.tk-ai-page .tk-empty-state p {
  max-width: 480px;
  margin: 0;
  color: var(--tk-text-muted);
  font-size: 0.87rem;
}

.tk-ai-page .tk-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.tk-ai-page .tk-summary-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--tk-border);
  border-radius: 13px;
  background: rgba(8, 18, 34, 0.44);
}

.tk-ai-page .tk-summary-card > span,
.tk-ai-page .tk-summary-card small {
  display: block;
}

.tk-ai-page .tk-summary-card > span {
  overflow: hidden;
  color: var(--tk-text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tk-ai-page .tk-summary-card strong {
  display: block;
  margin: 2px 0;
  font-size: 1.65rem;
  line-height: 1.15;
}

.tk-ai-page .tk-summary-card small {
  color: #8594a8;
  font-size: 0.64rem;
  line-height: 1.35;
}

.tk-ai-page .tk-summary-card--success strong {
  color: var(--tk-success);
}

.tk-ai-page .tk-summary-card--danger strong {
  color: var(--tk-danger);
}

.tk-ai-page .tk-summary-card--neutral strong {
  color: var(--tk-info);
}

.tk-ai-page .tk-summary-card--warning strong {
  color: var(--tk-warning);
}

.tk-ai-page .tk-result-context {
  margin: 14px 0;
  padding: 11px 13px;
  border-left: 3px solid var(--tk-blue-bright);
  border-radius: 0 9px 9px 0;
  background: rgba(95, 145, 216, 0.08);
  color: #c4d0de;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.tk-ai-page .tk-primary-diagnosis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(116, 168, 238, 0.24);
  border-radius: 13px;
  background: rgba(95, 145, 216, 0.08);
}

.tk-ai-page .tk-primary-diagnosis[data-level="warning"] {
  border-color: rgba(237, 177, 74, 0.3);
  background: var(--tk-warning-soft);
}

.tk-ai-page .tk-primary-diagnosis[data-level="danger"] {
  border-color: rgba(239, 107, 115, 0.32);
  background: var(--tk-danger-soft);
}

.tk-ai-page .tk-primary-diagnosis[data-level="success"] {
  border-color: rgba(69, 197, 139, 0.27);
  background: var(--tk-success-soft);
}

.tk-ai-page .tk-primary-diagnosis__icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: rgba(116, 168, 238, 0.14);
  color: var(--tk-info);
  font-weight: 900;
}

.tk-ai-page .tk-primary-diagnosis[data-level="warning"] .tk-primary-diagnosis__icon {
  background: rgba(237, 177, 74, 0.14);
  color: var(--tk-warning);
}

.tk-ai-page .tk-primary-diagnosis[data-level="danger"] .tk-primary-diagnosis__icon {
  background: rgba(239, 107, 115, 0.14);
  color: var(--tk-danger);
}

.tk-ai-page .tk-primary-diagnosis[data-level="success"] .tk-primary-diagnosis__icon {
  background: rgba(69, 197, 139, 0.14);
  color: var(--tk-success);
}

.tk-ai-page .tk-primary-diagnosis__label {
  display: block;
  margin-bottom: 2px;
  color: var(--tk-text-muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tk-ai-page .tk-primary-diagnosis h3,
.tk-ai-page .tk-primary-diagnosis p {
  margin: 0;
}

.tk-ai-page .tk-primary-diagnosis h3 {
  color: var(--tk-text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.tk-ai-page .tk-primary-diagnosis p {
  margin-top: 5px;
  color: #b9c6d6;
  font-size: 0.75rem;
  line-height: 1.5;
}

.tk-ai-page .tk-filter-bar {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 7px;
  margin-bottom: 13px;
}

.tk-ai-page .tk-filter-button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--tk-border);
  border-radius: 999px;
  background: transparent;
  color: var(--tk-text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.tk-ai-page .tk-filter-button:hover,
.tk-ai-page .tk-filter-button.is-active {
  border-color: rgba(116, 168, 238, 0.38);
  background: var(--tk-info-soft);
  color: #d9e9ff;
}

.tk-ai-page .tk-http-summary {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(116, 168, 238, 0.2);
  border-radius: 13px;
  background: rgba(8, 18, 34, 0.44);
}

.tk-ai-page .tk-http-summary__heading,
.tk-ai-page .tk-http-summary__metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tk-ai-page .tk-http-summary__heading > div,
.tk-ai-page .tk-http-summary__heading span,
.tk-ai-page .tk-http-summary > p {
  min-width: 0;
}

.tk-ai-page .tk-http-summary__heading strong,
.tk-ai-page .tk-http-summary__heading > div > span {
  display: block;
}

.tk-ai-page .tk-http-summary__heading strong {
  font-size: 0.86rem;
}

.tk-ai-page .tk-http-summary__heading > div > span,
.tk-ai-page .tk-http-summary > p {
  color: var(--tk-text-muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.tk-ai-page .tk-http-summary__metrics {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tk-ai-page .tk-http-summary__metrics > span {
  padding: 6px 9px;
  border: 1px solid var(--tk-border);
  border-radius: 9px;
  color: #aebccc;
  font-size: 0.68rem;
}

.tk-ai-page .tk-http-summary__metrics strong {
  margin-right: 3px;
  color: var(--tk-text);
}

.tk-ai-page .tk-http-summary > p {
  margin: 10px 0 0;
}

.tk-ai-page .tk-bot-table-head {
  display: grid;
  grid-template-columns: minmax(170px, 1.55fr) minmax(86px, 0.7fr) minmax(106px, 0.85fr) minmax(118px, 1.1fr);
  gap: 10px;
  padding: 0 13px 7px;
  color: #7f8fa4;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tk-ai-page .tk-bot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.tk-ai-page .tk-bot-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 1.55fr) minmax(86px, 0.7fr) minmax(106px, 0.85fr) minmax(118px, 1.1fr);
  min-width: 0;
  min-height: 82px;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--tk-border);
  border-radius: 13px;
  background: #0a1626;
  color: var(--tk-text);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--tk-transition), background-color var(--tk-transition), transform var(--tk-transition);
}

.tk-ai-page .tk-bot-card:hover {
  border-color: rgba(116, 168, 238, 0.33);
  transform: translateY(-1px);
}

.tk-ai-page .tk-bot-card.is-selected {
  border-color: var(--tk-blue-bright);
  background: rgba(23, 59, 108, 0.22);
}

.tk-ai-page .tk-bot-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--tk-info);
  box-shadow: 0 0 0 4px rgba(116, 168, 238, 0.1);
}

.tk-ai-page .tk-bot-card[data-status="allowed"] .tk-bot-status-dot {
  background: var(--tk-success);
  box-shadow: 0 0 0 4px rgba(69, 197, 139, 0.1);
}

.tk-ai-page .tk-bot-card[data-status="blocked"] .tk-bot-status-dot {
  background: var(--tk-danger);
  box-shadow: 0 0 0 4px rgba(239, 107, 115, 0.1);
}

.tk-ai-page .tk-bot-card[data-status="unknown"] .tk-bot-status-dot {
  background: var(--tk-warning);
  box-shadow: 0 0 0 4px rgba(237, 177, 74, 0.1);
}

.tk-ai-page .tk-bot-card__identity,
.tk-ai-page .tk-bot-card__cell {
  min-width: 0;
}

.tk-ai-page .tk-bot-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tk-ai-page .tk-bot-card__identity > span:last-child {
  min-width: 0;
}

.tk-ai-page .tk-bot-card__identity strong {
  overflow-wrap: anywhere;
  font-size: 0.87rem;
}

.tk-ai-page .tk-bot-card__provider {
  display: block;
  margin-top: 1px;
  color: var(--tk-text-muted);
  font-size: 0.68rem;
}

.tk-ai-page .tk-status-label {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--tk-info-soft);
  color: #b9d8ff;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.tk-ai-page .tk-bot-card__cell {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.tk-ai-page .tk-bot-cell-label {
  display: none;
  color: #7f8fa4;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tk-ai-page .tk-bot-card__cell small {
  color: #7f8fa4;
  font-size: 0.61rem;
  line-height: 1.35;
}

.tk-ai-page .tk-http-label {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(139, 154, 174, 0.12);
  color: #bdc9d7;
  font-size: 0.63rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tk-ai-page .tk-bot-card[data-http-status="success"] .tk-http-label,
.tk-ai-page .tk-http-detail[data-status="success"] .tk-http-label {
  background: var(--tk-success-soft);
  color: #8de0b9;
}

.tk-ai-page .tk-bot-card[data-http-status="redirect"] .tk-http-label,
.tk-ai-page .tk-http-detail[data-status="redirect"] .tk-http-label {
  background: var(--tk-info-soft);
  color: #b9d8ff;
}

.tk-ai-page .tk-bot-card[data-http-status="denied"] .tk-http-label,
.tk-ai-page .tk-bot-card[data-http-status="error"] .tk-http-label,
.tk-ai-page .tk-http-detail[data-status="denied"] .tk-http-label,
.tk-ai-page .tk-http-detail[data-status="error"] .tk-http-label {
  background: var(--tk-danger-soft);
  color: #ffadb2;
}

.tk-ai-page .tk-bot-card[data-status="allowed"] .tk-status-label {
  background: var(--tk-success-soft);
  color: #8de0b9;
}

.tk-ai-page .tk-bot-card[data-status="blocked"] .tk-status-label {
  background: var(--tk-danger-soft);
  color: #ffadb2;
}

.tk-ai-page .tk-bot-card[data-status="unknown"] .tk-status-label {
  background: var(--tk-warning-soft);
  color: #ffd58d;
}

.tk-ai-page .tk-bot-card__purpose {
  display: block;
  margin-top: 5px;
  color: #aebccc;
  font-size: 0.7rem;
  line-height: 1.4;
}

.tk-ai-page .tk-bot-card__result strong {
  max-width: 100%;
  color: #c5d0dd;
  font-size: 0.69rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tk-ai-page .tk-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.tk-ai-page .tk-technical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.tk-ai-page .tk-signal {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--tk-border);
  border-radius: 12px;
  background: rgba(8, 18, 34, 0.42);
}

.tk-ai-page .tk-signal span,
.tk-ai-page .tk-signal strong,
.tk-ai-page .tk-signal small {
  display: block;
}

.tk-ai-page .tk-signal span {
  color: var(--tk-text-muted);
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tk-ai-page .tk-signal strong {
  margin-top: 3px;
  color: var(--tk-text);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.tk-ai-page .tk-signal small {
  margin-top: 2px;
  color: #8594a8;
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.tk-ai-page .tk-diagnostic-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.tk-ai-page .tk-diagnostic {
  display: flex;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--tk-border);
  border-radius: 10px;
  background: rgba(8, 18, 34, 0.35);
  color: #bfcbda;
  font-size: 0.75rem;
}

.tk-ai-page .tk-diagnostic::before {
  flex: 0 0 auto;
  color: var(--tk-info);
  font-weight: 900;
  content: "i";
}

.tk-ai-page .tk-diagnostic--warning::before {
  color: var(--tk-warning);
  content: "!";
}

.tk-ai-page .tk-diagnostic--danger::before {
  color: var(--tk-danger);
  content: "×";
}

.tk-ai-page .tk-rule-explanation {
  min-height: 235px;
  color: var(--tk-text-muted);
}

.tk-ai-page .tk-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.tk-ai-page .tk-rule-head h3 {
  margin: 0;
  color: var(--tk-text);
  font-size: 1.08rem;
}

.tk-ai-page .tk-rule-head[data-status="allowed"] .tk-status-label {
  background: var(--tk-success-soft);
  color: #8de0b9;
}

.tk-ai-page .tk-rule-head[data-status="blocked"] .tk-status-label {
  background: var(--tk-danger-soft);
  color: #ffadb2;
}

.tk-ai-page .tk-rule-head[data-status="unknown"] .tk-status-label {
  background: var(--tk-warning-soft);
  color: #ffd58d;
}

.tk-ai-page .tk-rule-copy {
  margin: 0 0 13px;
  color: #c2cddd;
  font-size: 0.82rem;
}

.tk-ai-page .tk-http-detail {
  margin: 0 0 13px;
  padding: 11px 12px;
  border: 1px solid var(--tk-border);
  border-radius: 11px;
  background: rgba(8, 18, 34, 0.42);
}

.tk-ai-page .tk-http-detail__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tk-ai-page .tk-http-detail__heading strong {
  color: var(--tk-text);
  font-size: 0.77rem;
}

.tk-ai-page .tk-http-detail p {
  margin: 6px 0 0;
  color: var(--tk-text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tk-ai-page .tk-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 13px;
}

.tk-ai-page .tk-guidance-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--tk-border);
  border-radius: 11px;
  background: rgba(8, 18, 34, 0.42);
}

.tk-ai-page .tk-guidance-panel--action {
  border-color: rgba(116, 168, 238, 0.2);
  background: rgba(95, 145, 216, 0.07);
}

.tk-ai-page .tk-guidance-label {
  display: block;
  margin-bottom: 5px;
  color: var(--tk-gold-light);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.tk-ai-page .tk-guidance-panel strong,
.tk-ai-page .tk-guidance-panel p {
  display: block;
  margin: 0;
}

.tk-ai-page .tk-guidance-panel strong {
  color: var(--tk-text);
  font-size: 0.79rem;
  line-height: 1.4;
}

.tk-ai-page .tk-guidance-panel p {
  margin-top: 5px;
  color: var(--tk-text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.tk-ai-page .tk-action-list {
  margin: 10px 0 13px;
  padding-left: 20px;
  color: #c3cfdd;
  font-size: 0.76rem;
}

.tk-ai-page .tk-action-list li {
  margin: 6px 0;
}

.tk-ai-page .tk-remedy {
  margin: 13px 0;
  overflow: hidden;
  border: 1px solid rgba(116, 168, 238, 0.23);
  border-radius: 11px;
  background: #07111f;
}

.tk-ai-page .tk-remedy__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--tk-border);
}

.tk-ai-page .tk-remedy__header strong,
.tk-ai-page .tk-remedy__header small {
  display: block;
}

.tk-ai-page .tk-remedy__header strong {
  font-size: 0.75rem;
}

.tk-ai-page .tk-remedy__header small {
  margin-top: 2px;
  color: var(--tk-text-muted);
  font-size: 0.64rem;
}

.tk-ai-page .tk-button--small {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.7rem;
}

.tk-ai-page .tk-remedy .tk-rule-code {
  border: 0;
  border-radius: 0;
}

.tk-ai-page .tk-rule-code {
  margin: 0;
  padding: 13px;
  overflow-x: auto;
  border: 1px solid var(--tk-border);
  border-radius: 11px;
  background: #07111f;
  color: #d7e5f8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tk-ai-page .tk-rule-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.tk-ai-page .tk-rule-meta span {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--tk-text-muted);
  font-size: 0.7rem;
}

.tk-ai-page .tk-rule-meta strong {
  color: var(--tk-text);
}

.tk-ai-page .tk-policy-builder {
  margin-top: 20px;
}

.tk-ai-page .tk-policy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tk-ai-page .tk-policy-option {
  position: relative;
  display: flex;
  min-height: 125px;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--tk-border);
  border-radius: 14px;
  background: rgba(8, 18, 34, 0.42);
  cursor: pointer;
  transition: border-color var(--tk-transition), background-color var(--tk-transition), transform var(--tk-transition);
}

.tk-ai-page .tk-policy-option:hover {
  border-color: rgba(116, 168, 238, 0.34);
  transform: translateY(-1px);
}

.tk-ai-page .tk-policy-option.is-selected {
  border-color: var(--tk-blue-bright);
  background: rgba(23, 59, 108, 0.2);
}

.tk-ai-page .tk-policy-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--tk-blue-bright);
}

.tk-ai-page .tk-policy-option strong,
.tk-ai-page .tk-policy-option small {
  display: block;
}

.tk-ai-page .tk-policy-option strong {
  color: var(--tk-text);
  font-size: 0.84rem;
  line-height: 1.35;
}

.tk-ai-page .tk-policy-option small {
  margin-top: 6px;
  color: var(--tk-text-muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

.tk-ai-page .tk-code-output-wrap {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--tk-border);
  border-radius: 15px;
  background: #07111f;
}

.tk-ai-page .tk-code-output__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--tk-border);
  background: rgba(255, 255, 255, 0.025);
}

.tk-ai-page .tk-code-output__header strong,
.tk-ai-page .tk-code-output__header span {
  display: block;
}

.tk-ai-page .tk-code-output__header strong {
  font-size: 0.84rem;
}

.tk-ai-page .tk-code-output__header span {
  margin-top: 2px;
  color: var(--tk-text-muted);
  font-size: 0.69rem;
}

.tk-ai-page .tk-code-output {
  max-height: 420px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  color: #d8e6f8;
  white-space: pre;
}

.tk-ai-page .tk-editorial {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tk-ai-page .tk-editorial-card {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-lg);
  background: rgba(14, 26, 43, 0.66);
}

.tk-ai-page .tk-editorial-card h2 {
  margin: 7px 0 11px;
  color: var(--tk-text);
  font-size: 1.16rem;
  line-height: 1.35;
}

.tk-ai-page .tk-editorial-card p:not(.tk-section-kicker) {
  margin: 0;
  color: var(--tk-text-muted);
  font-size: 0.84rem;
}

.tk-ai-page .tk-editorial-card ul {
  margin: 0;
  padding-left: 19px;
}

.tk-ai-page .tk-editorial-card li {
  margin: 7px 0;
  color: var(--tk-text-muted);
  font-size: 0.78rem;
}

.tk-ai-page .tk-editorial-card a {
  color: #bcd8ff;
  text-underline-offset: 3px;
}

.tk-ai-page .tk-editorial-card a:hover {
  color: var(--tk-text);
}

.tk-ai-page .tk-tool-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 22px 4px 0;
  border-top: 1px solid var(--tk-border);
  color: var(--tk-text-muted);
  font-size: 0.76rem;
}

.tk-ai-page .tk-tool-footer p {
  margin: 0;
}

.tk-ai-page .tk-tool-footer strong {
  color: var(--tk-text);
}

.tk-ai-page .tk-toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  display: grid;
  width: min(380px, calc(100% - 36px));
  gap: 9px;
  pointer-events: none;
}

.tk-ai-page .tk-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(69, 197, 139, 0.3);
  border-radius: 12px;
  background: #10271f;
  color: #e4f8ed;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
  font-weight: 750;
  pointer-events: auto;
  animation: tk-toast-in 180ms ease both;
}

.tk-ai-page .tk-toast::before {
  color: var(--tk-success);
  content: "✓";
  font-weight: 900;
}

.tk-ai-page .tk-toast--warning {
  border-color: rgba(237, 177, 74, 0.32);
  background: #2b2312;
  color: #fff0d2;
}

.tk-ai-page .tk-toast--warning::before {
  color: var(--tk-warning);
  content: "!";
}

.tk-ai-page .tk-toast--error {
  border-color: rgba(239, 107, 115, 0.34);
  background: #2b171d;
  color: #ffe7e9;
}

.tk-ai-page .tk-toast--error::before {
  color: var(--tk-danger);
  content: "×";
}

.tk-ai-page .tk-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.tk-ai-page :where(button, a, input, textarea):focus-visible {
  outline: 3px solid rgba(116, 168, 238, 0.86);
  outline-offset: 3px;
}

@keyframes tk-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1099px) {
  .tk-ai-page .tk-ai-hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.55fr);
  }

  .tk-ai-page .tk-ai-workbench {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-summary-grid {
    grid-template-columns: repeat(4, minmax(100px, 1fr));
  }

  .tk-ai-page .tk-bot-grid {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 759px) {
  .tk-ai-page .tk-ai-tool {
    width: min(100% - 24px, 680px);
    padding-top: 12px;
  }

  .tk-ai-page .tk-tool-navigation {
    margin-bottom: 10px;
  }

  .tk-ai-page .tk-ai-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .tk-ai-page .tk-ai-hero__title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .tk-ai-page .tk-ai-hero-visual {
    display: none;
  }

  .tk-ai-page .tk-ai-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-ai-page .tk-card {
    padding: 20px;
    border-radius: 19px;
  }

  .tk-ai-page .tk-card-heading,
  .tk-ai-page .tk-card-heading--wide {
    align-items: flex-start;
  }

  .tk-ai-page .tk-input-action {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tk-ai-page .tk-bot-grid,
  .tk-ai-page .tk-analysis-layout,
  .tk-ai-page .tk-policy-grid,
  .tk-ai-page .tk-editorial {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-bot-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    align-items: start;
  }

  .tk-ai-page .tk-bot-table-head {
    display: none;
  }

  .tk-ai-page .tk-bot-card__identity,
  .tk-ai-page .tk-bot-card__result {
    grid-column: 1 / -1;
  }

  .tk-ai-page .tk-bot-card__cell {
    padding-top: 8px;
    border-top: 1px solid var(--tk-border);
  }

  .tk-ai-page .tk-bot-cell-label {
    display: block;
  }

  .tk-ai-page .tk-http-summary__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-ai-page .tk-path-tester {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-code-output__header,
  .tk-ai-page .tk-tool-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-ai-page .tk-policy-option {
    min-height: 0;
  }
}

@media (max-width: 479px) {
  .tk-ai-page .tk-ai-tool {
    width: calc(100% - 16px);
  }

  .tk-ai-page .tk-ai-hero {
    padding: 24px 17px;
  }

  .tk-ai-page .tk-brand-line {
    align-items: flex-start;
  }

  .tk-ai-page .tk-trust-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tk-ai-page .tk-trust-list li {
    border-radius: 10px;
    font-size: 0.7rem;
    text-align: center;
  }

  .tk-ai-page .tk-ai-toolbar__actions,
  .tk-ai-page .tk-ai-toolbar__actions .tk-button,
  .tk-ai-page .tk-code-output__header .tk-button {
    width: 100%;
  }

  .tk-ai-page .tk-card {
    padding: 17px;
  }

  .tk-ai-page .tk-card-heading {
    display: block;
  }

  .tk-ai-page .tk-card-heading .tk-reference-badge,
  .tk-ai-page .tk-card-heading .tk-analysis-state {
    margin-top: 10px;
  }

  .tk-ai-page .tk-mode-tabs {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-summary-card {
    padding: 11px;
  }

  .tk-ai-page .tk-bot-card {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-bot-card__identity,
  .tk-ai-page .tk-bot-card__result {
    grid-column: auto;
  }

  .tk-ai-page .tk-http-summary__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tk-ai-page .tk-summary-card > span {
    font-size: 0.65rem;
  }

  .tk-ai-page .tk-technical-grid,
  .tk-ai-page .tk-rule-meta,
  .tk-ai-page .tk-guidance-grid {
    grid-template-columns: 1fr;
  }

  .tk-ai-page .tk-remedy__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-ai-page .tk-remedy__header .tk-button {
    width: 100%;
  }

  .tk-ai-page .tk-code-output {
    padding: 14px;
    font-size: 0.74rem;
  }

  .tk-ai-page .tk-toast-region {
    right: 8px;
    bottom: 8px;
    width: calc(100% - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tk-ai-page *,
  .tk-ai-page *::before,
  .tk-ai-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
