/* ==========================================================================
   Alpha Momin - free tools
   Styles for the /tools hub and each in-browser utility. Loaded only on tool
   pages, on top of main.css. Uses the shared design tokens; teal is reserved
   for the "secure / private" signal, per the brand rules. All icons are drawn
   in CSS (no data: URIs) so the strict img-src 'self' policy is untouched.
   ========================================================================== */

/* Screen-reader-only helper (kept local so tool pages never depend on another
   page's stylesheet block). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container.narrow {
  --container: 760px;
}

/* Tool hero is the standard hero without the node-mesh canvas. */
.tool-hero {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.breadcrumb {
  color: var(--mist);
  margin-bottom: 1.1rem;
}

.breadcrumb a {
  color: var(--mist);
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  color: var(--paper);
  border-bottom-color: var(--teal);
}

.breadcrumb span[aria-current] {
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Trust banner: the "your files never leave your device" signal
   -------------------------------------------------------------------------- */
.trust-banner {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: rgba(0, 229, 212, 0.06);
  border: 1px solid rgba(0, 229, 212, 0.28);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  color: var(--mist);
  font-size: 0.98rem;
  margin-bottom: 2rem;
}

.trust-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  flex: none;
  margin-top: 0.45rem;
  box-shadow: 0 0 0 4px rgba(0, 229, 212, 0.15), 0 0 14px rgba(0, 229, 212, 0.5);
}

/* --------------------------------------------------------------------------
   Tool shell + dropzone
   -------------------------------------------------------------------------- */
.tool-shell {
  background: var(--ink);
  border: var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: clamp(1.8rem, 5vw, 3rem) 1.25rem;
  border: 2px dashed rgba(185, 169, 201, 0.6);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--teal);
  background: rgba(0, 229, 212, 0.05);
}

.dropzone:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(185, 169, 201, 0.35);
  position: relative;
  margin-bottom: 0.5rem;
}

.dropzone-icon::before,
.dropzone-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--teal);
  border-radius: 2px;
}

.dropzone-icon::before {
  width: 18px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.dropzone-icon::after {
  width: 2px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.dropzone-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.dropzone-sub {
  color: var(--mist);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   File list
   -------------------------------------------------------------------------- */
.file-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.file-list:empty {
  margin-top: 0;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(185, 169, 201, 0.05);
  border: var(--border-soft);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
}

.file-item.is-error {
  border-color: rgba(255, 10, 84, 0.5);
  background: rgba(255, 10, 84, 0.06);
}

.file-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--teal);
  flex: none;
  min-width: 1.6rem;
}

.file-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.file-name {
  display: block;
  color: var(--paper);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-sub {
  display: block;
  color: var(--mist);
  font-size: 0.82rem;
}

.file-item.is-error .file-sub {
  color: var(--magenta);
}

.file-actions {
  display: flex;
  gap: 0.3rem;
  flex: none;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--mist);
  border: 1px solid rgba(185, 169, 201, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover:not([disabled]) {
  color: var(--paper);
  border-color: var(--paper);
}

.icon-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-btn.remove:hover {
  color: var(--magenta);
  border-color: var(--magenta);
}

/* --------------------------------------------------------------------------
   Actions, status, result
   -------------------------------------------------------------------------- */
.tool-hint {
  color: var(--mist);
  margin-top: 1rem;
}

.tool-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.tool-status {
  margin-top: 1rem;
  color: var(--mist);
  min-height: 1.4rem;
}

.tool-status.is-error {
  color: var(--magenta);
}

.tool-status.is-working {
  color: var(--teal);
}

.result-panel {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.result-title {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */
.step-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(3, 1fr);
}

.step-card {
  background: var(--ink);
  border: var(--border-soft);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.step-num {
  color: var(--teal);
  display: block;
  margin-bottom: 0.7rem;
}

.step-card h3 {
  margin-bottom: 0.4rem;
}

/* --------------------------------------------------------------------------
   FAQ (native disclosure)
   -------------------------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-item {
  border: var(--border-soft);
  border-radius: var(--radius);
  background: var(--ink);
  padding: 0.4rem 1.1rem;
}

.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--paper);
  padding: 0.7rem 0;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--teal);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  padding-bottom: 0.9rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Tools hub cards
   -------------------------------------------------------------------------- */
.tool-card-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.tool-card {
  display: block;
  background: var(--ink);
  border: var(--border-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

a.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 229, 212, 0.4);
}

.tool-card-tag {
  color: var(--teal);
  display: inline-block;
  margin-bottom: 0.7rem;
}

.tool-card h3 {
  margin-bottom: 0.4rem;
}

.tool-card-go {
  color: var(--magenta);
  display: inline-block;
  margin-top: 0.9rem;
}

.tool-card-soon {
  opacity: 0.6;
}

.tool-card-soon .tool-card-tag {
  color: var(--mist);
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.tool-cta-inner {
  text-align: center;
}

.tool-cta-inner .btn-row {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .step-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dropzone,
  .tool-card,
  .icon-btn {
    transition: none;
  }
  a.tool-card:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Email Spoof Test
   -------------------------------------------------------------------------- */
.spoof-form {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}

.spoof-form input[type="text"] {
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(185, 169, 201, 0.4);
  background: rgba(10, 5, 16, 0.6);
  color: var(--paper);
  font: inherit;
}

.spoof-form input[type="text"]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.spoof-status {
  text-align: center;
  color: var(--mist);
  min-height: 1.4em;
}

.spoof-verdict {
  border-radius: calc(var(--radius) * 1.2);
  border: 2px solid;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
}

.spoof-verdict-fail {
  border-color: var(--magenta);
  background: rgba(255, 10, 84, 0.09);
}

.spoof-verdict-warn {
  border-color: #E8B24A;
  background: rgba(232, 178, 74, 0.09);
}

.spoof-verdict-pass {
  border-color: var(--teal);
  background: rgba(0, 229, 212, 0.08);
}

.spoof-rows {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: grid;
  gap: 0.8rem;
}

.spoof-row {
  border: var(--border-soft);
  border-left: 3px solid var(--mist);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}

.spoof-row.spoof-pass { border-left-color: var(--teal); }
.spoof-row.spoof-warn { border-left-color: #E8B24A; }
.spoof-row.spoof-fail { border-left-color: var(--magenta); }

.spoof-row-head {
  margin-bottom: 0.35rem;
}

.spoof-badge {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.spoof-pass .spoof-badge { color: var(--teal); }
.spoof-warn .spoof-badge { color: #E8B24A; }
.spoof-fail .spoof-badge { color: var(--magenta); }

.spoof-record {
  font-size: 0.76rem;
  color: var(--mist);
  margin-top: 0.5rem;
  word-break: break-all;
  line-height: 1.5;
}
