/* ============================================================
   SQF Cleaner — tool stylesheet
   dze.armatools.com/sqf-cleaner
   ============================================================ */
:root {
  --bg:          #0d0d0d;
  --bg-panel:    #111111;
  --bg-card:     #1c1c1c;
  --bg-card2:    #222222;
  --border:      #2a2a2a;
  --border-hi:   #3e5a28;
  --accent:      #4e8a2e;
  --accent-hi:   #62ae3a;
  --accent-dim:  #2e5018;
  --text:        #d0d0d0;
  --text-muted:  #5e5e5e;
  --text-hi:     #eaeaea;
  --danger:      #c0392b;
  --danger-hi:   #e74c3c;
  --success:     #27ae60;
  --success-hi:  #2ecc71;
  --radius:      6px;
  --shadow:      0 2px 12px rgba(0,0,0,.55);
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:        'Consolas', 'Courier New', monospace;
  --max-w:       min(960px, 96vw);
}

/* ============================================================
   LIGHT MODE OVERRIDES
   ============================================================ */
[data-theme="light"] {
  --bg:          #f5f5f4;
  --bg-panel:    #ececea;
  --bg-card:     #ffffff;
  --bg-card2:    #f0f0ee;
  --border:      #cccccc;
  --border-hi:   #5a9e30;
  --accent:      #3d7020;
  --accent-hi:   #2e5818;
  --accent-dim:  #cce4b0;
  --text:        #222222;
  --text-muted:  #666666;
  --text-hi:     #111111;
  --shadow:      0 2px 12px rgba(0,0,0,.10);
}

[data-theme="light"] code {
  background: #eef4e8;
  border-color: #b8d898;
  color: #2e6010;
}

[data-theme="light"] .tool-header {
  background: #e8f2de;
  border-bottom-color: #b8d4a0;
}

[data-theme="light"] .privacy-card {
  background: #e8f4de;
  border-color: #a0c880;
  color: #2e6010;
}
[data-theme="light"] .privacy-card strong { color: #1a4a08; }

[data-theme="light"] .file-list li { border-bottom-color: #e0e0de; }
[data-theme="light"] .file-list li:hover { background: #f0f4ec; }

[data-theme="light"] .ext-sqf { background: #d8f0c8; color: #2a6010; border-color: #98c870; }
[data-theme="light"] .ext-hpp { background: #c8e4f4; color: #1860a0; border-color: #80b8d8; }
[data-theme="light"] .ext-ext { background: #f4e8c8; color: #8a5c10; border-color: #c8a060; }

[data-theme="light"] .option-row:hover { background: #edf6e4; border-color: var(--accent-dim); }

[data-theme="light"] .option-tag { border-color: #90c060; }

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: var(--text-hi); }
code {
  font-family: var(--mono);
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: .875em;
  color: #98d66e;
}

/* ============================================================

/* ============================================================
   TOOL HEADER
   ============================================================ */
.tool-header {
  background: linear-gradient(160deg, #0e1a09 0%, #0d0d0d 60%);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
}
.tool-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tool-header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.tool-header-icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px var(--accent));
}
.tool-header-title h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-hi);
}
.tool-header-sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .15rem;
}
.tool-header-link {
  font-size: .85rem;
  font-weight: 600;
  color: #62ae3a;
  border: 1px solid #2e5018;
  border-radius: var(--radius);
  padding: .35rem .85rem;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  text-decoration: none;
}
.tool-header-link:hover {
  background: #2e5018;
  color: var(--text-hi);
  border-color: var(--accent);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.privacy-card {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: #111a09;
  border-color: #2a4010;
  font-size: .85rem;
  color: #9abf7a;
  line-height: 1.55;
}
.privacy-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: .05rem;
}
.privacy-card strong { color: #b8e090; }
.privacy-card em { color: var(--accent-hi); font-style: normal; font-weight: 600; }

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-hi);
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .5rem;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-hi);
  font-size: .78rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid var(--accent);
}
.section-desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.55;
}


/* ============================================================
   DOCS-SPECIFIC
   Shell above is shared with the other tool pages; everything
   below is for long-form documentation content.
   ============================================================ */
.card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-hi);
  margin: 1.5rem 0 .55rem;
}
.card h3:first-of-type { margin-top: 1rem; }
.card p { margin-bottom: .8rem; line-height: 1.65; font-size: .9rem; }
.card p:last-child { margin-bottom: 0; }

.doc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.doc-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: .9rem;
  line-height: 1.6;
}
.doc-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-hi);
}
.doc-list strong { color: var(--text-hi); }

.block-code {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.55;
  color: var(--text-hi);
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 1rem;
}
[data-theme="light"] .block-code {
  background: #f4f6f1;
  border-color: #d8ddd2;
  border-left-color: var(--accent);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  font-size: .875rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.callout-warning { background: #1a1400; border: 1px solid #4a3800; color: #c8a832; }
.callout-tip     { background: #0e1a09; border: 1px solid #2e5018; color: #a8d488; }
.callout-icon    { font-size: 1.3rem; flex-shrink: 0; margin-top: .05rem; }
.callout-body    { flex: 1; min-width: 0; }
.callout-body code { background: rgba(0,0,0,.25); }
[data-theme="light"] .callout-warning { background: #fff8e0; border-color: #e0c880; color: #7a5c00; }
[data-theme="light"] .callout-tip     { background: #eef6e6; border-color: #b8d898; color: #2e6010; }
[data-theme="light"] .callout-body code { background: #e8eee0; }

.kbd-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .45rem 1.25rem;
  align-items: center;
  font-size: .85rem;
}
.kbd-table > div:nth-child(odd) { white-space: nowrap; }
kbd {
  font-family: var(--mono);
  font-size: .75rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .1rem .35rem;
  color: var(--text-hi);
  white-space: nowrap;
}

.seo-content {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.65;
}
.seo-content h3 {
  font-size: .95rem;
  color: var(--text);
  margin: 1.1rem 0 .5rem;
}
.seo-content h3:first-child { margin-top: 0; }
.seo-content p { margin-bottom: .7rem; }
.seo-content ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }

@media (max-width: 620px) {
  .kbd-table { grid-template-columns: 1fr; gap: .2rem; }
  .kbd-table > div:nth-child(even) { margin-bottom: .5rem; color: var(--text-muted); }
}

/* Accuracy footnote: quieter than a callout, but still clearly set apart. */
.ed-note {
  border-left: 3px solid var(--border);
  background: var(--bg-card2);
  padding: .7rem .9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: .6rem 0 0;
}
.ed-note strong { color: var(--text); }
