/* ExcelProtect - styles */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --text: #1a1f2c;
  --muted: #5a6275;
  --border: #e1e5ec;
  --brand: #1f7a4d;
  --brand-dark: #15603b;
  --brand-soft: #e8f4ee;
  --accent: #0b6bcb;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --warn: #8a6d00;
  --warn-soft: #fff7d9;
  --success: #14633f;
  --success-soft: #e3f5ec;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20,20,40,0.05), 0 4px 12px rgba(20,20,40,0.04);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand);
}
.site-header nav a {
  margin-left: 18px;
  color: var(--text);
  font-size: 0.95rem;
}

/* Hero */
.hero {
  padding: 40px 0 16px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 22px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed #c8d0dc;
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 44px 20px;
  max-width: 640px;
  margin: 0 auto;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.dropzone.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: scale(1.01);
}
.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.dropzone-inner svg { color: var(--brand); }
.dropzone-title { font-weight: 600; font-size: 1.1rem; margin: 6px 0 0; }
.dropzone-sub { color: var(--muted); margin: 0; }

.linkbtn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

/* Progress */
.progress {
  margin: 20px auto 0;
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: fadeIn 180ms ease-out;
}
.progress[hidden] { display: none; }

.spinner {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  animation: spin 700ms linear infinite;
}

.progress-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.progress-phase {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}
.progress-track {
  height: 6px;
  background: var(--brand-soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 180ms ease-out;
}
/* Indeterminate state: when [data-indeterminate] is on the parent, animate a sliding bar */
.progress[data-indeterminate] .progress-bar {
  width: 35% !important;
  animation: indeterminate 1.1s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(286%); } /* (100/35)*100 - 100 to clear the track */
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.5s; }
  .progress[data-indeterminate] .progress-bar { animation: none; width: 100% !important; opacity: 0.6; }
  .progress { animation: none; }
}

/* Status */
.status {
  margin: 18px auto 0;
  max-width: 640px;
  min-height: 1.3em;
  font-size: 0.97rem;
  padding: 0 10px;
}
.status-error   { color: var(--danger);  background: var(--danger-soft);  padding: 12px 14px; border-radius: 8px; }
.status-success { color: var(--success); background: var(--success-soft); padding: 12px 14px; border-radius: 8px; }
.status-info    { color: var(--warn);    background: var(--warn-soft);    padding: 12px 14px; border-radius: 8px; }
.status-working { color: var(--muted); font-style: italic; }

/* Trust pills */
.trust-row {
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.trust-pill {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Sections */
.section {
  padding: 36px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin: 0 0 18px;
  letter-spacing: -0.005em;
}
.section h3 { font-size: 1.1rem; margin: 0 0 6px; }
.section p { color: #2a3142; }

code {
  background: #eef1f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* How-it-works steps */
.how-steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.how-steps li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

/* Two-col what/doesn't */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.check-list, .x-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.check-list li, .x-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.check-list li:last-child, .x-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 14px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.x-list li::before {
  content: "\d7";
  position: absolute;
  left: 4px; top: 6px;
  color: var(--danger);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* FAQ */
#faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
#faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
}
#faq details[open] summary::after { content: "\2013"; }
#faq details p {
  margin: 10px 0 0;
  color: #2a3142;
}

/* Ad slots */
.ad-slot {
  margin: 24px auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Until an ad unit is dropped in, the slot is "empty" (only HTML comments inside).
   Collapse both its size and its margins so it doesn't leave a phantom gap. */
.ad-slot:empty {
  min-height: 0;
  margin: 0;
  display: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav a {
  margin-left: 14px;
  color: var(--muted);
}

/* Legal pages */
.legal {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 20px;
}
.legal h1 { font-size: 1.8rem; margin-bottom: 8px; }
.legal h2 { font-size: 1.2rem; margin-top: 28px; }
.legal p, .legal li { color: #2a3142; }

@media (max-width: 500px) {
  .site-header .container { height: 56px; }
  .site-header nav a { margin-left: 12px; font-size: 0.9rem; }
  .hero { padding: 36px 0 16px; }
}
