/* SAIKYO AML v4 — public report sections */
.aml-sec { border-top: 1px solid rgba(255,255,255,.05); }
.aml-sec > summary { list-style: none; cursor: pointer; padding: 14px 20px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: rgba(203,213,225,.72); text-transform: uppercase; letter-spacing: .07em; }
.aml-sec > summary::-webkit-details-marker { display: none; }
.aml-sec > summary::after { content: '+'; font-size: 16px; color: rgba(148,163,184,.5); }
.aml-sec[open] > summary::after { content: '−'; }
.aml-sec > summary:hover { background: rgba(255,255,255,.02); }
.aml-sec-count { margin-left: auto; margin-right: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(148,163,184,.55); background: rgba(255,255,255,.05); padding: 2px 8px; border-radius: 5px; white-space: nowrap; }
.aml-sec-body { padding: 4px 20px 18px; }
.aml-sec-body h5 { margin: 18px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: rgba(148,163,184,.55); }

.aml-signal { border: 1px solid rgba(255,255,255,.06); border-left-width: 3px; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: rgba(255,255,255,.015); }
.aml-signal.crit { border-left-color: #f87171; }
.aml-signal.warn { border-left-color: #d97706; }
.aml-signal.info { border-left-color: rgba(148,163,184,.45); }
.aml-signal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.aml-signal-title { font-size: 13.5px; font-weight: 700; color: #e2e8f0; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.aml-points { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: #f87171; white-space: nowrap; }

.aml-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.aml-tag { display: inline-block; max-width: 100%; padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.05); color: rgba(203,213,225,.7); border: 1px solid rgba(255,255,255,.06); overflow-wrap: anywhere; }
.aml-tag.direct { background: rgba(239,68,68,.08); color: #fca5a5; border-color: rgba(239,68,68,.15); }
.aml-tag.indirect { background: rgba(217,119,6,.08); color: #fbbf24; border-color: rgba(217,119,6,.15); }
.aml-tag.crit { background: rgba(239,68,68,.10); color: #f87171; border-color: rgba(239,68,68,.18); }
.aml-tag.warn { background: rgba(217,119,6,.10); color: #d97706; border-color: rgba(217,119,6,.18); }
.aml-tag.info, .aml-tag.ok { background: rgba(34,197,94,.07); color: #86efac; border-color: rgba(34,197,94,.14); }

.aml-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 5px 0; font-size: 12.5px; line-height: 1.55; border-top: 1px solid rgba(255,255,255,.03); }
.aml-kv span { color: rgba(148,163,184,.55); }
.aml-kv b { color: rgba(226,232,240,.88); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.aml-kv a { color: #7dd3fc; text-decoration: none; overflow-wrap: anywhere; }

.aml-mono, .aml-mono-link { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; overflow-wrap: anywhere; }
.aml-mono-link { color: #7dd3fc; text-decoration: none; }
.aml-mono-link:hover { text-decoration: underline; }

.aml-muted { color: rgba(148,163,184,.6); font-size: 12.5px; line-height: 1.6; margin: 0 0 12px; }
.aml-ok { color: #86efac; font-size: 12.5px; line-height: 1.6; margin: 0 0 10px; }
.aml-warn-note { color: #fbbf24; font-size: 12.5px; line-height: 1.6; margin: 10px 0 0; }
.aml-disclaimer { color: rgba(148,163,184,.5); font-size: 11.5px; line-height: 1.6; margin: 0 0 12px; }
.aml-list { margin: 0; padding-left: 18px; color: rgba(203,213,225,.72); font-size: 12.5px; line-height: 1.7; }
.aml-subject { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(148,163,184,.5) !important; margin-top: 8px !important; overflow-wrap: anywhere; }
.aml-cache-note { padding: 8px 20px; font-size: 11.5px; color: rgba(250,204,21,.7); background: rgba(234,179,8,.05); }

.aml-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; }
.aml-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.aml-table th { text-align: left; padding: 8px 10px; color: rgba(148,163,184,.55); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.aml-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.03); color: rgba(226,232,240,.82); vertical-align: top; overflow-wrap: anywhere; }
.aml-table tr.crit td:first-child { box-shadow: inset 2px 0 0 #f87171; }
.aml-table td.neg { color: #f87171; font-family: 'JetBrains Mono', monospace; }
.aml-table td.pos { color: #4ade80; font-family: 'JetBrains Mono', monospace; }
.aml-table tr.total td { font-weight: 700; color: #fff; border-top: 1px solid rgba(255,255,255,.1); }

.aml-dispute-btn { margin-top: 4px; padding: 10px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: rgba(203,213,225,.8); font-size: 12px; font-weight: 600; cursor: pointer; }
.aml-dispute-btn:hover { background: rgba(255,255,255,.04); }
.aml-dispute-input { display: block; width: 100%; margin-top: 8px; padding: 11px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.10); background: #08090b; color: #e2e8f0; font-size: 16px; box-sizing: border-box; }

/* ===== Mobile ===== */
/* The report is dense by design; on a narrow screen every grid collapses to a single
   column and every table becomes a list of labelled cards, so nothing is clipped and
   nothing needs horizontal scrolling. */
@media (max-width: 760px) {
  .aml-sec > summary { padding: 13px 14px; font-size: 11.5px; letter-spacing: .05em; }
  .aml-sec-body { padding: 4px 14px 16px; }
  .aml-sec-body h5 { margin: 16px 0 6px; }

  .aml-signal { padding: 11px 12px; border-radius: 9px; }
  .aml-signal-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .aml-signal-title { font-size: 13px; }

  .aml-kv { grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 7px 0; }
  .aml-kv span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

  .aml-table-wrap { overflow-x: visible; margin: 12px 0; }
  .aml-table, .aml-table tbody, .aml-table tr, .aml-table td { display: block; width: 100%; }
  .aml-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .aml-table tr { border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: rgba(255,255,255,.015); }
  .aml-table tr.crit { border-left: 3px solid #f87171; }
  .aml-table td { border-bottom: 1px solid rgba(255,255,255,.03); padding: 6px 0; }
  .aml-table tr td:last-child { border-bottom: none; }
  .aml-table td::before { content: attr(data-l); display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: rgba(148,163,184,.5); margin-bottom: 2px; }
  .aml-table td:empty { display: none; }
  .aml-table tr.crit td:first-child { box-shadow: none; }
  .aml-table tr.total { background: rgba(255,255,255,.04); }

  .aml-dispute-btn { width: 100%; }
}

/* ===== Page-level mobile fixes (input card, verdict header, score ring) ===== */
@media (max-width: 760px) {
  .aml-hero { padding: 32px 0 0; }
  .aml-hero h1 { font-size: 24px; }
  .aml-hero .lead { font-size: 14px; margin-bottom: 22px; }
  .aml-card { padding: 16px; border-radius: 12px; }
  .aml-input-row { flex-direction: column; align-items: stretch; }
  .aml-input { width: 100%; font-size: 16px; }   /* 16px prevents iOS zoom on focus */
  .aml-btn { width: 100%; }

  .aml-r-top { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .aml-r-net { overflow-wrap: anywhere; }
  .aml-r-score { flex-direction: column; align-items: flex-start; text-align: left; gap: 14px; padding: 20px 14px; }
  .aml-ring, .aml-ring svg { width: 84px; height: 84px; }
  .aml-ring-num { font-size: 24px; }
  .aml-r-verdict { width: 100%; }
  .aml-r-section { padding: 16px 14px; }
  .aml-summary { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .aml-mod { align-items: flex-start; gap: 10px; }
  .aml-cache-note { padding: 8px 14px; }
}

@media (max-width: 400px) {
  .aml-sec > summary { padding: 12px 12px; }
  .aml-sec-body { padding: 4px 12px 14px; }
  .aml-r-score { padding: 18px 12px; }
  .aml-r-section { padding: 14px 12px; }
}

.aml-level b.medium { color: #f59e0b; }
.aml-level b.severe { color: #991b1b; }
.aml-reasons { margin: 8px 0 10px; padding-left: 20px; color: rgba(226,232,240,.88); font-size: 13px; line-height: 1.55; }
.aml-reasons li { margin: 2px 0; }
.aml-owner { margin: 4px 0 8px; color: rgba(226,232,240,.86); font-size: 13px; }
.aml-data-note { margin-top: 6px; }


.aml-flow { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: rgba(255,255,255,.015); }
.aml-flow-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; color: rgba(226,232,240,.9); font-size: 12.5px; }
.aml-flow-head span { color: rgba(148,163,184,.6); font-size: 11px; }
.aml-flow-row { margin: 7px 0; }
.aml-flow-label { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: rgba(203,213,225,.78); }
.aml-flow-label b { color: rgba(226,232,240,.9); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.aml-flow-track { height: 6px; margin-top: 4px; overflow: hidden; border-radius: 99px; background: rgba(148,163,184,.13); }
.aml-flow-bar { display: block; height: 100%; border-radius: inherit; min-width: 2px; }
.aml-flow-bar.risky { background: linear-gradient(90deg, #ef4444, #f97316); }
.aml-flow-bar.exchange { background: #a1a1a6; }
.aml-flow-bar.unknown { background: #64748b; }
.aml-flow-bar.neutral { background: #6e6e73; }
.aml-flow-details { margin-top: 10px; }
.aml-flow-details summary { cursor: pointer; color: rgba(148,163,184,.75); font-size: 11.5px; }
.aml-flow-paths { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aml-flow-chip { display: inline-block; max-width: 100%; padding: 5px 7px; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; color: rgba(203,213,225,.78); background: rgba(255,255,255,.025); font-family: 'JetBrains Mono', monospace; font-size: 10px; overflow-wrap: anywhere; }
.aml-report-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 2px; padding: 10px 12px; border: 1px solid rgba(124,58,237,.22); border-radius: 9px; background: rgba(124,58,237,.06); color: rgba(203,213,225,.78); font-size: 11px; }
.aml-report-links a { color: #f5f5f7; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.aml-report-links a:hover { text-decoration: underline; }
.aml-report-links b { color: #fff; font-family: 'JetBrains Mono', monospace; }
@media (max-width: 760px) { .aml-flow { padding: 11px 12px; } .aml-flow-chip { font-size: 9.5px; } }
