/* Consumer-grade plain-language software cards & 1-click device-recognizing downloader for /testing/ */

.app-explainer-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  margin: 1rem 0 2rem;
}

.app-explainer {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.4rem 1.5rem;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: var(--r);
}

.app-explainer.is-amber {
  border-top-color: #f59e0b;
}

.app-explainer-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.app-explainer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 11px;
  background: var(--bg2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.app-explainer-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1.12rem;
  line-height: 1.25;
}

.app-explainer-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text3);
}

.app-explainer-lede {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.58;
  color: var(--text2);
}

.app-plain-list {
  margin: 0;
  padding-inline-start: 1.15rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.52;
  color: var(--text2);
}

.app-plain-list strong {
  color: var(--text);
}

.app-explainer-foot {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

/* Direct Device-Recognizing Download Hub Card */
.smart-installer {
  margin: 1rem 0 1.75rem;
  padding: 1.5rem 1.6rem;
  border-top: 3px solid var(--primary);
}

.smart-installer[data-active-app="curupira"] {
  border-top-color: #f59e0b;
}

.smart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 1rem;
}

.smart-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.device-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-hi);
  background: var(--ind-d);
  color: var(--ind3);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.smart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-block-end: 1.1rem;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.pill-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text3);
  margin-inline-end: 0.2rem;
}

.pill-btn {
  min-block-size: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.pill-btn:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

.pill-btn[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.pill-btn.is-detected {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pill-btn.is-detected::before {
  content: "";
  inline-size: 7px;
  block-size: 7px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28);
  flex-shrink: 0;
}

.smart-installer[data-active-app="curupira"] .pill-btn[data-app-choice="curupira"][aria-pressed="true"] {
  border-color: #d97706;
  background: #d97706;
  color: #0b1120;
}

.smart-summary {
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  margin-block-end: 1rem;
}

.smart-summary[data-state="warn"] {
  border-color: rgba(245, 158, 11, 0.55);
}

.smart-pkg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-block-end: 0.45rem;
}

.smart-pkg-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.smart-pkg-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.smart-pkg-file {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--bg1);
  border: 1px solid var(--border);
  color: var(--ind3);
}

.smart-pkg-meta {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.smart-pkg-trust {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
}

.smart-pkg-trust[data-trust="failed"] {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

/* Zero-Terminal In-Browser WebCrypto SHA-256 Drop-Zone Verifier */
.sha-dropzone {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1.5px dashed var(--border-hi);
  background: var(--bg2);
  cursor: pointer;
  margin-block-end: 0.85rem;
  transition: border-color 140ms ease, background 140ms ease;
}

.sha-dropzone:hover,
.sha-dropzone:focus-visible,
.sha-dropzone.is-dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  outline: none;
}

.sha-drop-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.sha-drop-sub {
  font-size: 0.76rem;
  color: var(--text3);
}

.sha-verify-result {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.95rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg2);
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.sha-verify-result[data-verdict="match"] {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.12);
}

.sha-verify-result[data-verdict="mismatch"] {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.14);
}

.download-feedback {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.45;
}

.smart-summary p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text2);
  max-inline-size: none;
}

/* 3-Step Visual Install Strip */
.install-steps-strip {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
}

.install-steps-strip li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text2);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 999px;
  background: var(--ind-d);
  border: 1px solid var(--border-hi);
  color: var(--ind3);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.smart-installer[data-active-app="curupira"] .step-num {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber);
}

.smart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-block-end: 0.85rem;
}

.smart-installer[data-active-app="curupira"] .smart-primary-btn {
  background: #d97706;
  border-color: #d97706;
  color: #0b1120;
}

.smart-installer[data-active-app="curupira"] .smart-primary-btn:hover {
  background: #f59e0b;
  border-color: #f59e0b;
}

.token-unlock-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  border: 1px dashed var(--border-hi);
  background: var(--bg2);
  margin-block-end: 0.85rem;
}

.token-unlock-bar[hidden] {
  display: none;
}

.token-input {
  flex: 1 1 260px;
  min-block-size: 38px;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg1);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.token-status {
  width: 100%;
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text3);
}

.sha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text3);
  margin-block-end: 1rem;
}

.sha-row code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
  color: var(--text2);
}

.tech-drawer {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.05rem;
  background: var(--bg2);
}

.tech-drawer summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  list-style-position: inside;
  min-block-size: 32px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tech-drawer[open] summary {
  margin-block-end: 0.9rem;
}

.term-card.is-highlighted {
  box-shadow: 0 0 0 2px var(--primary);
}

.term-card.term-amber.is-highlighted {
  box-shadow: 0 0 0 2px #f59e0b;
}
