/* Colly Portfolio web purchase-identity deletion pages (ADR draft, plan A).
   No scripts; CSP-friendly (style-src 'self'); logical properties for RTL.
   Tokens mirror frontend/src/styles.css (morning blue / deep sea). */
:root {
  color-scheme: light dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Nirmala UI", sans-serif;
  --bg: #f5f7fa;
  --card: #ffffff;
  --surface-subtle: #fbfcfe;
  --border: #e1e8f0;
  --border-strong: #c7d5e4;
  --text: #18212b;
  --muted: #687586;
  --label: #34404d;
  --primary: #3478c7;
  --primary-dark: #2867a9;
  --on-primary: #ffffff;
  --focus: color-mix(in srgb, var(--primary) 30%, transparent);
  --shadow-card: 0 2px 8px rgba(34, 48, 74, .035);
  --shadow-raised: 0 12px 36px rgba(23, 31, 56, .10), 0 2px 8px rgba(23, 31, 56, .05);
  --button-secondary: #f4f6f8;
  --button-secondary-hover: #e9edf1;
  --success-bg: #eaf7ef; --success-border: #c5e7d2; --success-text: #1d7a54;
  --warning-bg: #fff3d9; --warning-border: #f0dcaf; --warning-text: #9a6400;
  --danger-bg: #fff0f0; --danger-border: #efc1c7; --danger-text: #bd3f45; --danger: #c44c4c;
  --info-bg: #eaf4ff; --info-border: #b9d2fa; --info-text: #2b70a4;
  --neutral-bg: #f0f2f5; --neutral-border: #dce1e8; --neutral-text: #697482;
  --header: #20374f; --header-text: #f4f8ff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1722; --card: #182536; --surface-subtle: #142130;
    --border: #30445a; --border-strong: #486178;
    --text: #f1f5f9; --muted: #9aaabd; --label: #c6d2df;
    --primary: #6aaff5; --primary-dark: #8cc4ff; --on-primary: #0d2237;
    --focus: color-mix(in srgb, var(--primary) 44%, transparent);
    --shadow-card: 0 3px 12px rgba(1, 7, 15, .22);
    --shadow-raised: 0 24px 70px rgba(1, 7, 15, .45), 0 3px 16px rgba(1, 7, 15, .24);
    --button-secondary: #1c2b3d; --button-secondary-hover: #263b51;
    --success-bg: #173a31; --success-border: #2e6b58; --success-text: #74d5ad;
    --warning-bg: #44341b; --warning-border: #765c2c; --warning-text: #f2c46c;
    --danger-bg: #45252d; --danger-border: #7c3d4b; --danger-text: #ff9ea5; --danger: #ff9ea5;
    --info-bg: #1b344c; --info-border: #3b6b96; --info-text: #8fc8ff;
    --neutral-bg: #243140; --neutral-border: #3d5268; --neutral-text: #b6c2d0;
    --header: #0b1420; --header-text: #e8f0fa;
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--text); background: var(--bg); line-height: 1.65; }
a { color: var(--primary); text-underline-offset: .2em; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; inset-inline-start: 1rem; top: -5rem; padding: .5rem 1rem; background: var(--card); color: var(--text); border-radius: 8px; z-index: 2; }
.skip:focus { top: .75rem; }

/* Header: same deep navy band and tagline as the help site. */
.site-header { background: var(--header); color: var(--header-text); padding: 1.1rem max(1.25rem, calc((100% - 960px) / 2)); }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .08); padding: 3px; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand-sub { display: block; font-size: .82rem; opacity: .82; font-weight: 500; }

main { flex: 1; width: min(600px, 100%); margin: 0 auto; padding: 2rem 1.25rem 2.5rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-raised); padding: 1.75rem 1.75rem 1.5rem; }
h1 { font-size: clamp(1.45rem, 4.5vw, 1.8rem); line-height: 1.3; margin: .25rem 0 .6rem; overflow-wrap: anywhere; }
.lead { color: var(--label); margin: 0 0 1.25rem; }
h2 { font-size: 1rem; margin: 1.4rem 0 .6rem; color: var(--label); }
p { overflow-wrap: anywhere; }

/* Step indicator: 1 sign in → 2 verify → 3 confirm → done. */
.steps { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 1.25rem; counter-reset: step; }
.steps li { flex: 1; min-width: 0; counter-increment: step; font-size: .78rem; color: var(--muted); }
.steps li::before { content: ""; display: block; height: 4px; border-radius: 99px; background: var(--border); margin-block-end: .4rem; }
.steps li[aria-current="step"], .steps li.done { color: var(--label); font-weight: 600; }
.steps li[aria-current="step"]::before { background: var(--primary); }
.steps li.done::before { background: color-mix(in srgb, var(--primary) 45%, var(--border)); }

/* Fact groups: what is deleted / kept / unaffected. */
.facts { display: grid; gap: .65rem; margin: 0 0 1.25rem; }
.fact { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; align-items: start; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-subtle); }
.fact .mark { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .95rem; grid-row: span 2; }
.fact strong { font-size: .95rem; }
.fact span { color: var(--muted); font-size: .9rem; }
.fact.delete .mark { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.fact.keep .mark { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.fact.safe .mark { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }

/* Notices. */
.notice { padding: .8rem 1rem; border-radius: 12px; border: 1px solid; font-size: .92rem; margin: 0 0 1.1rem; }
.notice.info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.notice.warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.notice.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }

/* Provider sign-in buttons (final build must use each provider's official button assets). */
.providers { display: grid; gap: .65rem; margin: .4rem 0 1rem; }
.providers form { margin: 0; }
.provider { width: 100%; display: flex; align-items: center; justify-content: center; gap: .7rem; min-height: 48px; padding: .7rem 1rem; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-card); }
.provider:hover { background: var(--button-secondary); }
.provider svg { width: 20px; height: 20px; flex: none; }

/* Verified identity chip on the confirmation page. */
.identity { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: 12px; background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); margin: 0 0 1.1rem; }
.identity svg { width: 22px; height: 22px; flex: none; }
.identity b { color: var(--text); font-weight: 600; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 1.1rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 600; font-size: .92rem; }

.consent { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1rem; border: 1px solid var(--danger-border); border-radius: 12px; background: var(--danger-bg); margin: 0 0 1.2rem; font-size: .93rem; }
.consent input { width: 20px; height: 20px; margin-block-start: .2rem; accent-color: var(--danger); flex: none; }

/* Actions: primary/danger on the end side, matching the app's form actions. */
.actions { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: flex-end; align-items: center; margin-block-start: .5rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .65rem 1.1rem; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: var(--button-secondary); color: var(--label); border-color: var(--border); }
.button.secondary:hover { background: var(--button-secondary-hover); }
.button.danger { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .button.danger { color: #2a0f14; } }
.fine { color: var(--muted); font-size: .85rem; margin: 1.1rem 0 0; }

/* Result states. */
.result { text-align: center; padding-block: .5rem 0; }
.result .badge { width: 64px; height: 64px; margin: .25rem auto 1rem; border-radius: 20px; display: grid; place-items: center; }
.result .badge svg { width: 32px; height: 32px; }
.badge.success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.badge.neutral { background: var(--neutral-bg); color: var(--neutral-text); border: 1px solid var(--neutral-border); }
.badge.warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.result .actions { justify-content: center; }
.result .lead { max-width: 30em; margin-inline: auto; }

.site-footer { border-block-start: 1px solid var(--border); color: var(--muted); font-size: .88rem; padding: 1.1rem max(1.25rem, calc((100% - 960px) / 2)); display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.language-switch { display: inline-flex; gap: .45rem; align-items: baseline; text-decoration: none; color: var(--label); }
.language-switch span { color: var(--muted); }
.language-switch bdi { font-weight: 650; }

/* Language picker: the bare entry URL, one choice per language, no other prose. */
main.picker { width: min(760px, 100%); }
.language-picker { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 236px)); justify-content: center; gap: .75rem; }
.language-picker a { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: 1rem 1.15rem; border-radius: 14px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-card); color: var(--text); text-decoration: none; }
.language-picker a:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.language-name { font-weight: 700; font-size: 1.05rem; }
.language-topic { color: var(--muted); font-size: .9rem; }

@media (max-width: 520px) { .language-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } .language-picker a { padding: .85rem .9rem; } }
@media (max-width: 480px) {
  main { padding: 1.1rem .85rem 2rem; }
  .card { padding: 1.25rem 1.1rem 1.1rem; border-radius: 16px; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions .button { width: 100%; }
  .steps li { font-size: 0; } /* keep the progress bars, hide labels on phones */
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
