/* AML — separate page styles */
.page > header.hdr {
  background: transparent;
}

.aml-topSpacer {
  height: 36px;
  width: 100%;
}

.page > header.hdr .hdr__logo {
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.aml-wrap {
  padding-top: max(50px, env(safe-area-inset-top, 0px));
  padding-bottom: clamp(56px, 7vw, 96px);
}

.aml-head {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.aml-ref {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.aml-title {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
  max-width: 22ch;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.aml-lead {
  margin: 14px 0 0;
  max-width: 60ch;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

/* form */
.aml-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}

.aml-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.aml-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px 14px;
}

.aml-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 6px 0;
  color: var(--fg);
  min-width: 220px;
}

.aml-input::placeholder {
  color: #808080;
}

.aml-go {
  flex: 0 0 auto;
  width: 54px;
  height: 42px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.aml-go:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.aml-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* result */
.aml-result {
  border: 1px solid var(--line);
  padding: 18px 16px;
  background: #fff;
  max-width: none;
  width: 100%;
}

.aml-result__k {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.aml-result__v {
  font-size: 14px;
}

.aml-result__json {
  margin-top: 16px;
}

.aml-statusRow {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 6px;
}

.aml-result__meta {
  display: none;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  padding-top: 2px;
}

.aml-result__k2 {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.aml-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  max-height: 320px;
  overflow: auto;
}

.aml-copybar {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.aml-copy {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.aml-copy:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.aml-reportFrame {
  width: 100%;
  height: 620px;
  border: 1px solid var(--line);
  margin-top: 16px;
  background: #fff;
  border-radius: 6px;
}

/* report rendered on-page (no iframe) */
.aml-reportHost {
  width: 100%;
  margin-top: 0;
}

.aml-reportWrap {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 16px;
}

.aml-reportHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
  background: transparent;
}

.aml-reportLogo {
  filter: none;
}

.aml-reportHeader__title {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-size: 14px;
}

.aml-reportHero {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: transparent;
  padding: 12px;
  margin-bottom: 12px;
}

.aml-reportHero__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.aml-reportHero__addr {
  font-size: 16px;
  font-weight: 700;
  word-break: break-all;
  margin-bottom: 4px;
}

.aml-reportHero__net {
  font-size: 12px;
  color: var(--text-muted);
}

.aml-reportPre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  max-height: 420px;
  overflow: auto;
}

@media (max-width: 520px) {
  .aml-reportFrame {
    height: 520px;
  }
}

@media (max-width: 520px) {
  .aml-row {
    flex-direction: row;
    padding: 12px;
  }

  .aml-input {
    min-width: 0;
  }
}

/* -------------------------
   Login + history (Phase 4)
   ------------------------- */
.aml-loginView {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px 16px;
  margin-bottom: 12px;
}

.aml-loginTitle {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.aml-loginForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aml-loginBtn {
  width: 100%;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.aml-loginBtn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.aml-loginError {
  color: #dc2626;
  font-size: 13px;
  line-height: 1.4;
}

.aml-history {
  margin: 18px 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px 14px;
}

.aml-historyTitle {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}

.aml-historyList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aml-historyRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 1px dashed rgba(10, 10, 10, 0.18);
}

.history-riskWrap {
  flex: 0 0 auto;
}

.history-network {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 12px;
}

.history-wallet {
  flex: 1 1 220px;
  word-break: break-all;
}

.history-checkedAt {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.history-downloadPdf {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.history-downloadPdf:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.history-downloadPdf.is-loading {
  opacity: 0.75;
}

/* risk pills (shared classes) */
.wallet-risk {
  border: 1px solid var(--risk-pill-color, var(--accent));
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 210px;
  text-align: center;
  color: var(--risk-pill-color, var(--accent));
  font-weight: 700;
  line-height: 1.2;
  background: rgba(190, 24, 93, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wallet-risk--none,
.wallet-risk--low {
  --risk-pill-color: #16a34a;
  border-color: #16a34a;
  color: #166534;
  background: rgba(34, 197, 94, 0.16);
}

.wallet-risk--medium {
  --risk-pill-color: #ea580c;
  border-color: #ea580c;
  color: #9a3412;
  background: rgba(249, 115, 22, 0.18);
}

.wallet-risk--high {
  --risk-pill-color: #dc2626;
  border-color: #dc2626;
  color: #991b1b;
  background: rgba(220, 38, 38, 0.14);
}

.wallet-risk--severe {
  --risk-pill-color: #dc2626;
  border-color: #dc2626;
  color: #fff;
  background: #dc2626;
}

.wallet-risk--undefined {
  --risk-pill-color: #64748b;
  border-color: #64748b;
  color: #475569;
  background: rgba(100, 116, 139, 0.14);
}

