
/* ── AI Sentinel — Thumbnail card (matches DotTheta tool card pattern) ──── */
.as-thumb{
  --ac:#ef4444;--ac20:rgba(239,68,68,0.12);--ac40:rgba(239,68,68,0.35);
  position:relative;overflow:hidden;display:flex;flex-direction:column;
  background:#0d1117;border:1px solid #21262d;border-radius:16px;
  padding:26px 24px 20px;text-decoration:none;gap:0;
  transition:border-color .25s,box-shadow .25s,transform .25s;
}
.as-thumb::before{
  content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:var(--ac);opacity:.7;
}
.as-thumb:hover{
  border-color:var(--ac);
  box-shadow:0 0 0 1px var(--ac20),0 8px 30px var(--ac20);
  transform:translateY(-2px);
}
.as-thumb-glow{
  position:absolute;top:-40px;right:-40px;width:120px;height:120px;
  background:radial-gradient(circle,var(--ac40) 0%,transparent 70%);
  pointer-events:none;opacity:.5;
}
.as-thumb-header{
  display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;
}
.as-thumb-logo{
  width:38px;height:38px;border-radius:10px;background:var(--ac20);
  border:1px solid var(--ac40);display:flex;align-items:center;justify-content:center;
  font-size:19px;
}
.as-thumb-arrow{
  width:28px;height:28px;border-radius:50%;border:1px solid #21262d;
  display:flex;align-items:center;justify-content:center;font-size:12px;color:#4a6278;
  transition:border-color .2s,color .2s;
}
.as-thumb:hover .as-thumb-arrow{border-color:var(--ac);color:var(--ac);}
.as-thumb-title{font-size:17px;font-weight:700;color:#e6edf3;margin-bottom:7px;letter-spacing:-.01em;}
.as-thumb-desc{font-size:12px;color:#6e7681;line-height:1.6;margin-bottom:14px;flex:1;}
.as-thumb-badges{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:16px;}
.as-badge{
  font-size:11px;padding:3px 9px;border-radius:20px;
  background:var(--ac20);color:var(--ac);border:1px solid var(--ac40);
}
.as-thumb-footer{
  display:flex;justify-content:space-between;align-items:center;
  border-top:1px solid #21262d;padding-top:12px;margin-top:auto;
}
.as-thumb-cta{font-size:12px;font-weight:600;color:var(--ac);}
.as-thumb-url{font-size:10px;color:#4a6278;font-family:monospace;}
/* AI Sentinel — Frontend Styles v1.0.0 */
:root {
  --as-bg:       #05070d;
  --as-surface:  #0d1117;
  --as-border:   #21262d;
  --as-text:     #e6edf3;
  --as-muted:    #8b949e;
  --as-accent:   #ef4444;
  --as-dim:      #ef444433;
  --as-good:     #10b981;
  --as-warn:     #f59e0b;
  --as-bad:      #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.as-full-body { background: var(--as-bg); color: var(--as-text); min-height: 100vh; }

/* ── App shell ── */
#as-app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 60px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Header ── */
.as-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--as-border);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.as-logo-wrap { display: flex; align-items: center; gap: 12px; }
.as-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--as-accent), #dc2626);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 18px var(--as-dim);
}
.as-logo-name  { font-size: 20px; font-weight: 700; color: var(--as-text); }
.as-logo-sub   { font-size: 11px; color: var(--as-accent); text-transform: uppercase; letter-spacing: .06em; }
.as-header-right { display: flex; gap: 6px; }
.as-mode-btn {
  padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--as-border); color: var(--as-muted);
  background: var(--as-surface); transition: all .15s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.as-mode-btn:hover  { border-color: var(--as-accent); color: var(--as-accent); }
.as-mode-btn.active { border-color: var(--as-accent); color: var(--as-accent); background: var(--as-dim); }

/* ── Input panel ── */
.as-input-panel {
  background: var(--as-surface);
  border: 1px solid var(--as-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.as-mode-pane { display: none; }
.as-mode-pane.active { display: block; }
.as-input-lbl {
  display: block; font-size: 10px; font-weight: 700; color: var(--as-muted);
  text-transform: uppercase; letter-spacing: .08em; font-family: monospace;
  margin-bottom: 8px;
}
.as-url-input {
  width: 100%; background: #080b10; border: 1px solid var(--as-border);
  border-radius: 7px; padding: 11px 14px; font-size: 14px; color: var(--as-text);
  outline: none; transition: border-color .2s, box-shadow .2s;
  margin-bottom: 8px;
}
.as-url-input:focus { border-color: var(--as-accent); box-shadow: 0 0 0 2px var(--as-dim); }
.as-text-input {
  width: 100%; background: #080b10; border: 1px solid var(--as-border);
  border-radius: 7px; padding: 12px 14px; font-size: 13px; color: var(--as-text);
  outline: none; transition: border-color .2s; resize: vertical;
  min-height: 140px; line-height: 1.6; font-family: inherit;
  margin-bottom: 6px;
}
.as-text-input:focus { border-color: var(--as-accent); }
.as-text-meta { font-size: 11px; color: var(--as-muted); margin-bottom: 10px; }
.as-input-hint { font-size: 12px; color: var(--as-muted); margin-bottom: 12px; line-height: 1.6; }
.as-sitemap-options { display: flex; gap: 16px; margin: 8px 0 10px; align-items: center; }
.as-sitemap-opt { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--as-muted); }
.as-sitemap-opt input { background: #080b10; border: 1px solid var(--as-border); border-radius: 5px; padding: 4px 8px; color: var(--as-text); }
.as-run-btn {
  background: var(--as-accent); color: #fff; border: none;
  border-radius: 8px; padding: 11px 28px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: opacity .15s; display: inline-flex; align-items: center; gap: 8px;
}
.as-run-btn:hover { opacity: .87; }
.as-run-btn:disabled { opacity: .5; cursor: wait; }
.as-speed-note { font-size: 11px; color: var(--as-muted); margin-left: 12px; }
.as-recent { margin-top: 14px; }
.as-recent-label { font-size: 10px; color: var(--as-muted); text-transform: uppercase; letter-spacing: .06em; font-family: monospace; margin-bottom: 8px; }
.as-recent-list { display: flex; flex-wrap: wrap; gap: 6px; }
.as-recent-item {
  font-size: 11px; padding: 4px 10px; background: #080b10; border: 1px solid var(--as-border);
  border-radius: 20px; color: var(--as-muted); cursor: pointer; transition: all .15s;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.as-recent-item:hover { border-color: var(--as-accent); color: var(--as-accent); }

/* ── Loading ── */
.as-loading { text-align: center; padding: 60px 20px; }
.as-spinner {
  width: 40px; height: 40px; margin: 0 auto 20px;
  border: 3px solid var(--as-border);
  border-top-color: var(--as-accent);
  border-radius: 50%;
  animation: as-spin .7s linear infinite;
}
@keyframes as-spin { to { transform: rotate(360deg); } }
.as-loading-text { font-size: 14px; color: var(--as-muted); margin-bottom: 12px; }
.as-loading-steps { font-size: 12px; color: var(--as-muted); line-height: 2; }
.as-loading-step { display: flex; align-items: center; justify-content: center; gap: 8px; }
.as-loading-step.done { color: var(--as-good); }
.as-loading-step.active { color: var(--as-accent); }

/* ── Empty state ── */
.as-empty { text-align: center; padding: 50px 20px; }
.as-empty-icon { font-size: 48px; margin-bottom: 20px; }
.as-empty h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.as-empty p { font-size: 14px; color: var(--as-muted); max-width: 560px; margin: 0 auto 28px; line-height: 1.7; }
.as-feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-width: 600px; margin: 0 auto;
}
.as-feature {
  background: var(--as-surface); border: 1px solid var(--as-border);
  border-radius: 8px; padding: 14px 12px; text-align: center;
}
.as-feature span { font-size: 22px; display: block; margin-bottom: 6px; }
.as-feature strong { display: block; font-size: 12px; margin-bottom: 3px; }
.as-feature em { font-size: 11px; color: var(--as-muted); font-style: normal; }

/* ── Score header ── */
.as-score-header {
  display: flex; gap: 24px; align-items: center;
  background: var(--as-surface); border: 1px solid var(--as-border);
  border-radius: 10px; padding: 20px 24px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.as-score-ring-wrap { position: relative; flex-shrink: 0; width: 100px; height: 100px; }
.as-score-ring { width: 100px; height: 100px; }
.as-score-num {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%);
  font-size: 28px; font-weight: 800; color: var(--as-text);
}
.as-score-pct {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, 10%);
  font-size: 11px; color: var(--as-muted);
}
.as-score-meta { flex: 1; min-width: 200px; }
.as-verdict { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.as-confidence { font-size: 12px; color: var(--as-muted); margin-bottom: 8px; }
.as-url-display { font-size: 12px; color: var(--as-muted); word-break: break-all; margin-bottom: 4px; }
.as-word-count  { font-size: 11px; color: var(--as-muted); font-family: monospace; }

/* ── Component bars ── */
.as-components {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px;
}
@media(max-width: 600px) { .as-components { grid-template-columns: 1fr; } }
.as-component {
  background: var(--as-surface); border: 1px solid var(--as-border);
  border-radius: 8px; padding: 12px 14px;
}
.as-component-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.as-component-lbl { font-size: 11px; font-weight: 600; color: var(--as-text); }
.as-component-pct { font-size: 12px; font-family: monospace; font-weight: 700; }
.as-bar { height: 4px; background: var(--as-border); border-radius: 3px; overflow: hidden; }
.as-bar-fill { height: 100%; border-radius: 3px; transition: width .6s ease; }
.as-component-sub { font-size: 10px; color: var(--as-muted); margin-top: 5px; }

/* ── Result tabs ── */
.as-result-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--as-border); margin-bottom: 16px;
  overflow-x: auto;
}
.as-result-tab {
  padding: 10px 16px; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--as-muted); border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all .15s;
}
.as-result-tab:hover { color: var(--as-text); }
.as-result-tab.active { color: var(--as-accent); border-bottom-color: var(--as-accent); }
.as-result-pane { display: none; }
.as-result-pane.active { display: block; }

/* ── Signal cards ── */
.as-signal-section { margin-bottom: 20px; }
.as-signal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--as-surface), #080b10);
  border: 1px solid var(--as-border); border-radius: 7px 7px 0 0;
}
.as-signal-header-left { display: flex; align-items: center; gap: 10px; }
.as-signal-icon { font-size: 16px; }
.as-signal-title { font-size: 13px; font-weight: 700; color: var(--as-text); }
.as-signal-subtitle { font-size: 11px; color: var(--as-muted); margin-top: 1px; }
.as-signal-score {
  font-size: 13px; font-weight: 700; font-family: monospace;
  padding: 3px 10px; border-radius: 20px;
  background: var(--as-dim); color: var(--as-accent);
}
.as-signal-score.good { background: rgba(16,185,129,.15); color: #10b981; }
.as-signal-score.warn { background: rgba(245,158,11,.15); color: #f59e0b; }
.as-signal-score.bad  { background: rgba(239,68,68,.15);  color: #ef4444; }
.as-signal-body {
  border: 1px solid var(--as-border); border-top: none; border-radius: 0 0 7px 7px;
  padding: 14px;
}
.as-signal-empty { font-size: 12px; color: var(--as-muted); font-style: italic; }

/* Grammar / stats detail items */
.as-grammar-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--as-border);
}
.as-grammar-item:last-child { border-bottom: none; }
.as-grammar-severity {
  font-size: 10px; padding: 2px 7px; border-radius: 10px; flex-shrink: 0; font-weight: 600;
}
.as-grammar-severity.high   { background: rgba(239,68,68,.15); color: #ef4444; }
.as-grammar-severity.medium { background: rgba(245,158,11,.15); color: #f59e0b; }
.as-grammar-severity.low    { background: rgba(16,185,129,.15);  color: #10b981; }
.as-grammar-body { flex: 1; }
.as-grammar-name { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.as-grammar-desc { font-size: 11px; color: var(--as-muted); line-height: 1.5; }

/* ── Word report table ── */
.as-word-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.as-word-table th {
  text-align: left; padding: 8px 12px; color: var(--as-muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--as-border); font-family: monospace; font-weight: 600;
}
.as-word-table td { padding: 9px 12px; border-bottom: 1px solid rgba(33,38,45,.5); vertical-align: top; }
.as-word-table tr:hover td { background: rgba(99,102,241,.03); }
.as-phrase-pill {
  display: inline-block; background: var(--as-dim); color: var(--as-accent);
  padding: 2px 8px; border-radius: 4px; font-family: monospace; font-size: 11px;
}
.as-weight-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.as-weight-3 { background: #ef4444; }
.as-weight-2 { background: #f59e0b; }
.as-weight-1 { background: #10b981; }
.as-context  { font-size: 11px; color: var(--as-muted); font-style: italic; margin-top: 3px; }
.as-context mark { background: rgba(239,68,68,.2); color: var(--as-bad); font-style: normal; border-radius: 2px; padding: 0 2px; }

/* ── Suggestions ── */
.as-suggestion {
  display: flex; gap: 14px; padding: 16px;
  background: var(--as-surface); border: 1px solid var(--as-border);
  border-radius: 8px; margin-bottom: 10px;
}
.as-suggestion:last-child { margin-bottom: 0; }
.as-suggestion-icon { font-size: 22px; flex-shrink: 0; }
.as-suggestion-body { flex: 1; }
.as-suggestion-title { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.as-suggestion-text  { font-size: 12px; color: var(--as-muted); margin-bottom: 8px; line-height: 1.6; }
.as-suggestion-action {
  font-size: 12px; padding: 8px 12px;
  background: #080b10; border: 1px solid var(--as-border);
  border-radius: 6px; line-height: 1.6; color: var(--as-text);
}
.as-suggestion.positive { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.04); }

/* ── API consensus ── */
.as-api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; }
.as-api-card {
  background: var(--as-surface); border: 1px solid var(--as-border);
  border-radius: 8px; padding: 14px; text-align: center;
}
.as-api-name  { font-size: 11px; color: var(--as-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.as-api-score { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.as-api-label { font-size: 12px; color: var(--as-muted); }
.as-api-no-results { font-size: 13px; color: var(--as-muted); text-align: center; padding: 30px; }

/* ── Sitemap results ── */
.as-sitemap-header {
  background: var(--as-surface); border: 1px solid var(--as-border);
  border-radius: 10px; padding: 20px 24px; margin-bottom: 16px;
}
.as-sitemap-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.as-site-stat {
  text-align: center; background: #080b10; border: 1px solid var(--as-border);
  border-radius: 8px; padding: 12px;
}
.as-site-stat-num { font-size: 24px; font-weight: 800; }
.as-site-stat-lbl { font-size: 10px; color: var(--as-muted); text-transform: uppercase; letter-spacing: .06em; }
.as-alert-banner {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  border-radius: 7px; font-size: 13px; color: #fca5a5;
}
.as-per-url-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 14px; }
.as-per-url-table th { text-align: left; padding: 8px 12px; color: var(--as-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--as-border); }
.as-per-url-table td { padding: 10px 12px; border-bottom: 1px solid rgba(33,38,45,.5); }
.as-per-url-table tr:hover td { background: rgba(99,102,241,.03); }
.as-score-badge {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; font-family: monospace;
}
.as-score-ai    { background: rgba(239,68,68,.15); color: #ef4444; }
.as-score-mixed { background: rgba(245,158,11,.15); color: #f59e0b; }
.as-score-human { background: rgba(16,185,129,.15); color: #10b981; }
.as-cross-phrase-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.as-cross-phrase-table th { text-align: left; padding: 8px 12px; color: var(--as-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--as-border); }
.as-cross-phrase-table td { padding: 8px 12px; border-bottom: 1px solid rgba(33,38,45,.5); }
.as-url-count-bar { height: 4px; background: var(--as-dim); border-radius: 2px; margin-top: 4px; }
.as-url-count-fill { height: 100%; background: var(--as-accent); border-radius: 2px; }

/* ── Utility ── */
.as-section-head {
  font-size: 12px; font-weight: 700; color: var(--as-muted); text-transform: uppercase;
  letter-spacing: .07em; font-family: monospace; margin: 20px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--as-border);
}
.as-error-box {
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  border-radius: 8px; padding: 16px 18px; font-size: 13px; color: #fca5a5;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .as-feature-grid { grid-template-columns: repeat(2,1fr); }
  .as-sitemap-stats { grid-template-columns: repeat(2,1fr); }
  .as-score-header { flex-direction: column; align-items: flex-start; }
  .as-components { grid-template-columns: 1fr; }
}

/* ── AI Sentinel v1.0.1 — Highlight view ─────────────────────────────── */
.as-hl-legend{display:flex;flex-wrap:wrap;gap:10px;padding:10px 14px;background:#080b10;border-bottom:1px solid #21262d;font-size:11px;}
.as-hl-leg{display:flex;align-items:center;gap:5px;color:#8b949e;}
.as-hl{border-radius:2px;padding:0 2px;cursor:help;font-style:inherit;}
.as-hl-high{background:rgba(239,68,68,.25);border-bottom:2px solid #ef4444;}
.as-hl-med{background:rgba(245,158,11,.2);border-bottom:2px solid #f59e0b;}
.as-hl-low{background:rgba(99,102,241,.15);border-bottom:1px dotted #6366f1;}
.as-hl-grammar{background:rgba(167,139,250,.2);border-bottom:2px solid #a78bfa;}
.as-hl-body{padding:16px;font-size:13px;line-height:1.9;color:#cdd9e5;white-space:pre-wrap;word-break:break-word;max-height:600px;overflow-y:auto;}
.as-tooltip{position:fixed;background:#1c2a3a;border:1px solid #6366f1;border-radius:6px;padding:6px 10px;font-size:11px;color:#e6edf3;z-index:9999;pointer-events:none;max-width:240px;line-height:1.5;}

/* ── Export bar ─────────────────────────────────────────────────────────── */
.as-export-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.as-export-btn{background:#6366f1;color:#fff;border:none;border-radius:6px;padding:7px 14px;font-size:12px;font-weight:600;cursor:pointer;transition:opacity .15s;}
.as-export-btn:hover{opacity:.85;}
.as-export-copy{background:#21262d;color:#cdd9e5;}
.as-export-copy:hover{background:#2d3f52;opacity:1;}
