/* PEDRO web — tema «Midnight Black» de la app, pensado primero para la pantalla del iPhone. */
:root {
  --bg: #07070d;
  --bg-deep: #1a1440;
  --card: #14141e;
  --card-hi: #1c1c29;
  --line: #2a2a3b;
  --text: #f2f2f7;
  --muted: #a3a3b8;
  --accent: #4d8dff;
  --accent-2: #e040fb;
  --ok: #34c759;
  --warn: #ff9f0a;
  --bad: #ff453a;
  --info: #8e8ea6;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(165deg, var(--bg) 0%, #0d0b1f 55%, var(--bg-deep) 140%);
  background-repeat: no-repeat;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 56px; }

a { color: var(--accent); }

.top { display: flex; align-items: center; gap: 12px; margin: 4px 0 22px; text-decoration: none; color: inherit; }
.logo { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 6px 18px rgba(77, 141, 255, .25); }
.brand { font-weight: 800; letter-spacing: .12em; font-size: 15px; }
.sub { color: var(--muted); font-size: 13px; }

h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; letter-spacing: -.01em; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 18px 0 6px; }
p { margin: 0 0 12px; }

.hero { margin-bottom: 18px; }
.hero p { color: var(--muted); }

.card {
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 0 0 14px;
}
.card > :last-child { margin-bottom: 0; }

.note { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; color: var(--muted); }

.btn {
  display: block;
  width: 100%;
  margin: 6px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #22222f;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent), #6a5cff 60%, var(--accent-2));
  box-shadow: 0 10px 28px rgba(77, 141, 255, .28);
  font-size: 17px;
}

.findings { list-style: none; margin: 0 0 6px; padding: 0; }
.finding { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; padding-top: 4px; }
.finding strong { display: block; font-size: 15px; }
.finding p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.dot {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #0b0b12;
  background: var(--info);
  margin-top: 1px;
}
.finding.ok .dot { background: var(--ok); }
.finding.warn .dot { background: var(--warn); }
.finding.bad .dot { background: var(--bad); color: #fff; }
.finding.info .dot { background: #3a3a4f; color: var(--text); }

.verdict { border-radius: 14px; padding: 14px; margin: 0 0 16px; border: 1px solid var(--line); }
.verdict strong { display: block; font-size: 18px; margin-bottom: 4px; }
.verdict p { margin: 0; color: var(--muted); font-size: 14px; }
.verdict.ok { background: rgba(52, 199, 89, .10); border-color: rgba(52, 199, 89, .45); }
.verdict.warn { background: rgba(255, 159, 10, .10); border-color: rgba(255, 159, 10, .45); }
.verdict.bad { background: rgba(255, 69, 58, .10); border-color: rgba(255, 69, 58, .45); }

.progress { position: relative; height: 30px; border-radius: 10px; background: #0e0e16; border: 1px solid var(--line); overflow: hidden; margin: 12px 0 4px; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .15s linear; }
.progress .label { position: relative; display: block; text-align: center; line-height: 28px; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }

textarea {
  width: 100%;
  min-height: 180px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e0e16;
  color: var(--text);
  font: 12px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.plain { margin: 0 0 12px; padding-left: 20px; }
.plain li { margin: 4px 0; }

.row-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.row-link:first-of-type { border-top: 0; padding-top: 4px; }
.row-link span { color: var(--accent); font-size: 20px; }

.steps { list-style: none; counter-reset: paso; margin: 0; padding: 0; }
.steps > li { counter-increment: paso; position: relative; padding: 0 0 18px 44px; }
.steps > li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.steps strong { display: block; margin: 3px 0 4px; }
.steps p { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.steps a { font-weight: 600; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.toc a { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-size: 14px; }

.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }

footer { margin-top: 26px; color: var(--muted); font-size: 13px; }
footer p { margin-bottom: 8px; }

.result { margin: 12px 0 4px; font-weight: 600; }

details { margin-top: 12px; }
summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 15px; padding: 6px 0; }

/* Solo para lectores de pantalla. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }
