:root { --bg:#10141f; --ink:#e8ecf7; --muted:#9aa5c0; --accent:#7fb3ff; --card:#171e31; --line:#2b3554; }
* { box-sizing: border-box; }
body { margin:0; background: radial-gradient(1200px 700px at 50% -10%, #1b2338, var(--bg));
  color: var(--ink); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; min-height:100vh; }
.wrap { max-width: 760px; margin: 0 auto; padding: 36px 18px 60px; }
.brand { color: var(--accent); font-weight:700; letter-spacing:.06em; }
h1 { margin: 6px 0 20px; } h2 { margin: 0 0 6px; font-size: 18px; }
.card { background: var(--card); border:1px solid var(--line); border-radius:16px;
  padding: 24px; margin-bottom: 18px; }
.hidden { display:none !important; }
.muted { color: var(--muted); font-size: 14px; line-height:1.5; }
.email { font-weight: 700; font-size: 17px; }
.row { display:flex; justify-content: space-between; align-items:center; gap: 12px; }

.tabs { display:flex; gap:8px; margin-bottom:16px; }
.tab { background:none; border:1px solid var(--line); color:var(--muted); padding:8px 18px;
  border-radius:999px; cursor:pointer; font-size:14px; }
.tab.active { color:var(--ink); border-color: var(--accent); }
.tab-ico { vertical-align: -2px; margin-right: 4px; }

input[type=email] { width:100%; padding: 12px; font-size:16px; margin: 10px 0;
  background:#0d1120; color:var(--ink); border:1.5px solid var(--line); border-radius:10px; }
button.primary { background: var(--accent); color:#0d1120; font-weight:700; border:0;
  border-radius:10px; padding: 12px 20px; font-size: 15px; cursor:pointer; width:100%; }
button.ghost { background:none; border:1px solid var(--line); color:var(--muted);
  border-radius:10px; padding:8px 16px; cursor:pointer; }
.msg { font-size: 14px; color: var(--accent); line-height: 1.5; overflow-wrap: anywhere; }
.msg.err { color: #ff8fa0; }

.banner { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 14px;
  background: #3a2b12; border: 1px solid #7a5a1e; color: #ffd48a; }

.upload { display:inline-block; border:1.5px dashed var(--line); color:var(--accent);
  padding: 10px 18px; border-radius: 10px; cursor: pointer; margin: 10px 0; font-size:14px; }
.upload input { display:none; }

.drop { display:block; border:1.5px dashed var(--line); border-radius:14px; padding:22px;
  text-align:center; cursor:pointer; transition:border-color .15s, background .15s; margin:10px 0; }
.drop:hover, .drop.hot { border-color:var(--accent); background:rgba(127,179,255,.06); }
.drop input { display:none; }
.drop-emoji { font-size:30px; }
.drop-title { font-size:1.15rem; font-weight:700; margin:.35rem 0; }

.photos { display:grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: 12px; margin-top: 14px; }
.photo { position:relative; border:1.5px solid var(--line); border-radius: 12px;
  overflow:hidden; background:#0d1120; }
.photo img { width:100%; aspect-ratio: 4/3; object-fit: cover; display:block; }
.photo.retired img { filter: grayscale(1) brightness(.5); }
.photo .info { padding: 7px 9px; font-size: 11.5px; color: var(--muted); }
.photo .tagline { display:flex; justify-content:space-between; align-items:center; }
.photo .retired-tag { color:#ffd48a; font-weight:700; }
.photo .del { background:none; border:0; color:#ff8fa0; cursor:pointer; font-size: 12px; padding:0; }

/* account hub: section letters, key/value grid, stub cards, history list, consent */
.sec { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px;
  border-radius:6px; background:#22304f; color:var(--accent); font-size:12px; font-weight:700;
  margin-right:8px; vertical-align:2px; }

.kv { display:grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 14px; }
.kv .k { color: var(--muted); font-size: 13px; align-self:center; }
.kv .v { font-size: 14px; font-weight:600; align-self:center; overflow-wrap:anywhere; }
.kv .v.placeholder { color: var(--muted); font-weight:400; font-style: italic; }
@media (max-width:480px){ .kv { grid-template-columns: 1fr; gap: 4px 0; } .kv .k { margin-top: 8px; } }
.kv input[disabled] { grid-column: span 1; width:100%; padding:10px; font-size:14px;
  background:#0d1120; color:var(--muted); border:1.5px solid var(--line); border-radius:8px; }

.card.stub { opacity: .88; }
.stub-list { margin: 12px 0 0; padding-left: 18px; }
.stub-list li { margin-bottom: 6px; }
.soon { display:inline-block; color: var(--muted); font-size: 11.5px; font-weight:600;
  border:1px solid var(--line); border-radius:999px; padding: 2px 9px; margin-left:8px;
  vertical-align: middle; text-transform: uppercase; letter-spacing:.04em; }
.stub-note { margin-top: 14px; }

.hist { margin-top: 14px; display:flex; flex-direction:column; gap:6px; }
.hist-row { display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding: 9px 12px; background:#0d1120; border:1px solid var(--line); border-radius:8px;
  font-size: 13px; }
.hist-when { color: var(--muted); flex: 1 1 auto; }
.hist-client { font-weight:600; flex: 1 1 auto; text-align:center; }
.hist-device { color: var(--muted); flex: 1 1 auto; font-size: 12px; text-align:center; }
.hist-status { flex: 0 0 auto; font-weight:700; font-size:11.5px; text-transform:uppercase;
  letter-spacing:.03em; }
.hist-status.pass { color:#7fe0a0; }
.hist-status.fail { color:#ff8fa0; }
.hist-badge { flex: 0 0 auto; background:#3a2b12; border:1px solid #7a5a1e; color:#ffd48a;
  font-size:11px; font-weight:700; border-radius:999px; padding:2px 8px; white-space:nowrap; }
/* Risk engine: "stepped-up check" badge. Elevated = amber, High = red. `title` lists the reasons. */
.hist-risk { cursor: help; }
.hist-risk.elevated { background:#3a2b12; border-color:#a06a1e; color:#ffcf87; }
.hist-risk.high { background:#3a1518; border-color:#8a2530; color:#ff9aa8; }
.hist-notme { flex: 0 0 auto; font-size:12px; padding:5px 10px; white-space:nowrap; }
.hist-notme:disabled { opacity:.75; cursor:default; color:#7fe0a0; border-color: var(--line); }

.banner.soft { background:#1b2338; border-color: var(--line); color: var(--muted); }

/* Break-in ("Be a Baddie") attempts against this account — clearly-labelled, distinct
   from the owner's own login rows so a blocked stranger is never read as a self-flub. */
.breakin-hist { margin-top: 10px; }
.breakin-list-title { font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  font-weight: 700; margin: 4px 2px 8px; }
.breakin-row { border-left: 3px solid #7a5a1e; padding-left: 10px; background: rgba(122,90,30,.06);
  border-radius: 8px; flex-wrap: wrap; }
.breakin-row.breached { border-left-color: var(--bad); background: rgba(255,143,160,.08); }
.breakin-badge { background:#3a2b12; border:1px solid #7a5a1e; color:#ffd48a; }
.hist-breakin-note { flex: 1 1 100%; font-size: 12.5px; line-height: 1.4; margin-top: 2px; }

.travel-row { margin: 4px 0 14px; display:flex; align-items:center; justify-content:space-between;
  gap: 12px; flex-wrap: wrap; }
.travel-row:empty { margin: 0; }
.travel-active { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.travel-active span { color: var(--ink); font-size: 14px; }
.travel-btn { flex: 0 0 auto; white-space: nowrap; font-size: 13px; }
@media (max-width:520px){ .travel-row, .travel-active { flex-direction:column; align-items:flex-start; }
  .travel-btn { width:100%; } }

.consent-row { display:flex; align-items:flex-start; gap:10px; font-size:14px;
  line-height:1.5; color: var(--ink); cursor:pointer; }
.consent-row input { margin-top: 4px; width:auto; }

.msg.soon { color: var(--muted); }

.control-row { display:flex; justify-content:space-between; align-items:center; gap:16px;
  margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.control-row .muted { margin:4px 0 0; font-size:13.5px; line-height:1.5; }
.control-title { font-weight:600; color: var(--ink); font-size:15px; }
.control-row button.ghost { flex:0 0 auto; white-space:nowrap; }
@media (max-width:520px){ .control-row { flex-direction:column; align-items:flex-start; } }

.remember-row { display:flex; align-items:center; gap:8px; font-size:14px;
  color: var(--muted); cursor:pointer; margin:2px 0 2px; }
.remember-row input { width:auto; margin:0; }

/* ===== Mobile responsive additions (phone <=480px; additive only — desktop
   and tablet are untouched; see docs/RESPONSIVE_SPEC.md) ==================== */

/* Reclaim a little padding on the smallest phones so cards/grids have more
   room to work with (tablet/desktop spacing is untouched). */
@media (max-width: 480px) {
  .wrap { padding: 24px 14px 48px; }
  .card { padding: 18px; }
}

/* Any .row (signed-in header, close-account confirm, lifecycle extend,
   practice summary) wraps instead of forcing sideways scroll, and no flex
   child (a long email address, a wide button label) can refuse to shrink. */
@media (max-width: 480px) {
  .row { flex-wrap: wrap; row-gap: 10px; }
  .row > * { min-width: 0; }
  .email { overflow-wrap: anywhere; word-break: break-word; }
}

/* Sign in / Register tabs fill the width, equally split, for an easy tap. */
@media (max-width: 480px) {
  .tab { flex: 1 1 0; }
}

/* Photo pool grid: a steady 2-column layout beats auto-fill collapsing to a
   single column on the narrowest phones. The >=44px delete-button hit area
   itself already comes from responsive.css's coarse-pointer rule (.del is a
   real <button>); here we just give it room to breathe. */
@media (max-width: 480px) {
  .photos { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .photo .tagline { flex-wrap: wrap; gap: 6px; }
  .photo .del { padding: 6px 10px; }
}

/* Login/security history: when / client / status get their own line instead
   of squeezing three columns into one narrow row; long client names wrap. */
@media (max-width: 480px) {
  .hist-row { flex-wrap: wrap; row-gap: 4px; }
  .hist-when, .hist-client, .hist-device {
    flex: 1 1 100%; text-align: left; overflow-wrap: anywhere; word-break: break-word;
  }
  .hist-status { flex: 0 0 auto; }
  .hist-badge { flex: 0 0 auto; }
  .hist-notme { flex: 1 1 100%; }
}

/* Close-account confirm + "sign out everywhere": stack input above the
   button (both full width) instead of squeezing them into one row. */
@media (max-width: 480px) {
  .row-confirm { flex-direction: column; align-items: stretch; }
  .row-confirm input, .row-confirm button { width: 100%; }
  .control-row button.ghost { width: 100%; }
}

/* Upload control is a <label>/<a> styled as a button, so it sits outside the
   global button/coarse-pointer rule in responsive.css — give it its own
   guaranteed >=44px, full-width, centered hit area on phones. */
@media (max-width: 480px) {
  .upload {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 44px; text-align: center;
  }
}

/* backup-email recovery + vaulted photo stats (2026-07-06) */
.recover-entry { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.linklike { background:none; border:0; color: var(--accent); font: inherit; cursor:pointer;
  text-decoration: underline; padding: 4px 0; text-align:left; }
#form-recover { margin-top: 10px; }
#form-recover code { background:#0d1120; padding:1px 5px; border-radius:5px; font-size:12px; }
.recovery-card { border-left: 3px solid var(--accent); }
.recovery-opt { border-top:1px solid var(--line); margin-top:14px; padding-top:14px; }
.recovery-opt:first-of-type { border-top:0; margin-top:8px; padding-top:0; }
.recovery-opt b { color: var(--ink); }
.recovery-opt textarea { width:100%; background:#0d1120; color:var(--ink); border:1px solid var(--line);
  border-radius:10px; padding:10px; font: inherit; resize: vertical; margin:6px 0; }
.row-confirm { gap:8px; } .row-confirm input { flex:1 1 auto; min-width:0; }
.photo-stats { margin: 12px 0 6px; }
.stat-row { font-size: 15px; } .stat-num { font-weight:800; color: var(--ink); font-size:20px; }
.retire-breakdown { list-style:none; padding:0; margin:8px 0 0; font-size:13px; }
.retire-breakdown li { padding:2px 0; }
.vault-note { background: rgba(127,179,255,.06); border:1px solid var(--line); border-radius:10px;
  padding:12px 14px; margin-top:12px; }
