/* PSQ profile tools — paper identity, 2026-10-05 */
:root {
  color-scheme: light;
  --paper: #f5f1e7;
  --surface: #fffcf5;
  --navy: #071e37;
  --blue: #2468ec;
  --sky: #c4dbff;
  --line: #071e3724;
  --bg0: var(--paper);
  --bg1: var(--surface);
  --cy: #174dae;
  --bl: var(--blue);
  --txt: var(--navy);
  --mut: #51637a;
  --glass: var(--surface);
  --glass2: #e9eef7;
  --bord: var(--line);
  --ok: #18734e;
  --err: #b22d3e;
}
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  display: block;
  background: var(--paper);
  background-image: radial-gradient(#071e3712 .55px, transparent .65px);
  background-size: 5px 5px;
  background-attachment: scroll;
  padding: 0;
  color: var(--navy);
  font-family: 'Tajawal', Tahoma, sans-serif;
  line-height: 1.7;
}
button, input, select { font-family: inherit; }
button, a, input, summary, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 4px;
}
svg { display: block; }
.site-topbar {
  min-height: 84px; max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 12px 28px; border-bottom: 1px solid var(--line);
}
.logo-bar { height: 54px; overflow: hidden; margin: 0; gap: 17px; color: var(--navy); }
.logo-img { height: 104px; width: 104px; object-fit: contain; flex: none; }
.brand-label { padding-inline-start: 17px; border-inline-start: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.back-link { display: inline-flex; gap: 9px; align-items: center; text-decoration: none; font-weight: 700; font-size: 13px; min-height: 44px; }
.back-link span { color: var(--blue); font-size: 20px; }
.wrap { max-width: 760px; margin: 30px auto 0; padding: 0 24px; }
header.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center;
  min-height: 250px; padding: 35px 33px; gap: 25px; margin-bottom: 0;
  border: 1px solid #bdd7f322; border-radius: 4px 4px 25px 4px;
  background: var(--navy); color: var(--surface); text-align: right;
  box-shadow: 6px 7px 0 #071e3710;
}
.hero::before { content: ''; position: absolute; inset: 10px; border: 1px solid #c4dbff20; border-radius: 2px 2px 18px 2px; pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 13% 80%, #305a8a77, transparent 55%), repeating-linear-gradient(135deg, transparent 0 65px, #c4dbff06 66px, transparent 67px 120px); }
.eyebrow { display: block; color: #b8cde4; font-size: 9px; font-weight: 700; letter-spacing: 2.8px; direction: ltr; text-align: right; }
header.hero h1 { font-size: 35px; line-height: 1.32; font-weight: 800; margin: 12px 0; background: none; color: var(--surface); letter-spacing: -.5px; }
.hero h1 em { color: var(--sky); font-style: normal; }
header.hero p { margin: 0; color: #c5d4e6; font-size: 14px; line-height: 1.9; max-width: 340px; }
.profile-art { position: relative; height: 145px; transform: rotate(-5deg); animation: paper-float 9s ease-in-out infinite; }
.profile-art .art-cover { position: absolute; inset: 8px 0 32px; background: #ebf0f6; border: 5px solid #fffcf5; box-shadow: 5px 7px 0 #020b163b; border-radius: 3px; overflow: hidden; }
.art-cover::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(145deg, #174c87 0 28px, #123352 29px 58px, #071e37 59px 90px); }
.art-cover svg { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; color: #c4dbff; }
.art-profile { position: absolute; bottom: 15px; right: 16px; display: flex; align-items: center; gap: 8px; color: var(--navy); background: #fffcf5; padding: 7px 13px; box-shadow: 3px 4px 0 #071e3730; font-size: 10px; font-weight: 800; }
.art-profile>span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #a4bedc; background: #e0eaf7; border-radius: 50%; }
.art-profile svg { width: 16px; height: 16px; }
.paper-tape { position: absolute; width: 66px; height: 20px; top: -1px; left: 28px; transform: rotate(4deg); background: #b9d9ffb8; }
.tool-caption { display: flex; align-items: center; gap: 12px; margin: 22px 0 11px; color: var(--mut); font-size: 12px; }
.tool-caption::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.login-switch { gap: 10px; margin-bottom: 22px; }
.login-mode {
  display: grid; grid-template-columns: 32px 1fr; gap: 0 10px; align-content: center;
  min-height: 81px; padding: 12px 15px; border-radius: 4px 4px 14px 4px;
  background: var(--surface); color: var(--mut); border: 1px solid var(--line);
  box-shadow: 2px 3px 0 #071e3707; transition: background .2s, border-color .2s, box-shadow .2s;
}
.mode-icon { grid-row: span 2; align-self: center; width: 30px; height: 30px; color: #6082a5; }
.login-mode strong { font-size: 16px; line-height: 1.5; margin: 0; }
.login-mode small { display: block; font-size: 11px; line-height: 1.6; }
.login-mode.active { background: var(--navy); border-color: var(--navy); color: #bdcfe1; box-shadow: 3px 4px 0 #9fbfe98c; }
.login-mode.active strong, .login-mode.active:hover strong { color: var(--surface); }
.login-mode.active .mode-icon { color: var(--sky); }
.login-mode:hover { border-color: var(--blue); }
.login-mode:not(.active):hover strong { color: var(--blue); }
.section-divider { display: none; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px 4px 22px 4px; padding: 28px 30px; margin-bottom: 20px;
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 5px 6px 0 #071e370a;
}
.form-heading { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.form-heading h2, .acc-title { font-size: 23px; font-weight: 800; color: var(--navy); margin: 0; }
.form-heading p { font-size: 13px; color: var(--mut); margin-top: 2px; }
label { margin: 0 0 7px; color: var(--navy); font-size: 14px; font-weight: 700; }
.row { margin-bottom: 14px; }
input, select.sel {
  background: #fffefb; color: var(--navy); border: 1px solid #9cacbf;
  border-radius: 6px; min-height: 49px; padding: 12px 14px;
  font-size: 15px; line-height: 1.6; transition: border-color .2s, box-shadow .2s;
}
input:focus, select.sel:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #2468ec14; }
input::placeholder { color: #778395; font-size: 13px; }
input#onpsso { padding-left: 50px; }
.eye { top: auto; bottom: 5px; left: 6px; transform: none; width: 40px; height: 40px; border-radius: 4px; color: var(--mut); }
.eye svg { width: 21px; height: 21px; }
.eye:hover { color: var(--blue); background: #e8effa; }
details { margin: 0 0 22px; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
summary { display: flex; justify-content: space-between; align-items: center; min-height: 33px; color: #174dae; font-size: 12px; font-weight: 700; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 20px Arial; margin-inline-start: 12px; }
details[open] summary::after { content: '−'; }
details .steps-help { padding: 12px 14px; margin-top: 5px; border-radius: 4px; background: #eef2f8; font-size: 13px; color: var(--mut); line-height: 2; overflow-wrap: anywhere; }
details .steps-help a { color: #174dae; }
details .steps-help code { background: #dce7f6; color: #123c6a; font: 11px ui-monospace, monospace; padding: 3px 5px; border-radius: 3px; }
.hint { font-size: 13px; color: var(--mut); margin: 0 0 16px; line-height: 1.9; }
.btn, .btn-ghost, .preview-refresh { min-height: 46px; border-radius: 5px; font-family: inherit; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--blue); border: 1px solid #174dae; color: white;
  box-shadow: 3px 4px 0 #174dae22; font-size: 17px; padding: 13px 16px;
  transition: background .2s, box-shadow .2s;
}
.btn:hover:not(:disabled) { background: #174dae; box-shadow: 3px 5px 0 #174dae30; }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #dae0e9; border-color: #c3cddd; color: #667a92; box-shadow: none; opacity: 1; }
.btn-ghost { background: #fffcf5; border: 1px solid #a4b5c8; font-size: 13px; margin-top: 0; padding: 11px 10px; color: var(--navy); }
.btn-ghost:hover { color: #174dae; background: #edf3fb; border-color: var(--blue); }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.preview-refresh { margin: 0 0 10px; width: auto; padding: 7px 12px; min-height: 38px; background: #edf3fb; border-color: #c5d4e7; color: #174dae; font-size: 12px; }
.preview-refresh:hover { border-color: var(--blue); color: var(--blue); }
.preview, #previewO .cover-preview-item { background: #e8e7e1; border-color: #aab8c8; border-radius: 4px 4px 14px 4px; }
#previewO .cover-preview-label { font-size: 13px; color: var(--navy); padding-bottom: 7px; }
#previewMsgO { color: var(--mut); font-size: 13px; }
#previewMsgO:empty { display: none; }
.own-pick { color: #174dae; background: #e8effa !important; border-color: #b2c7e3 !important; border-radius: 5px !important; }
.acc-title { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.acc-meta { gap: 10px; }
.acc-meta div { border: 1px solid var(--line); border-radius: 4px; background: #f3f0e8; padding: 11px 13px; font-size: 12px; }
.acc-meta strong { font-size: 15px; margin-top: 3px; color: var(--navy); }
.chk-row { color: var(--mut); }
select.sel option { background: var(--surface); color: var(--navy); }
select.sel option:checked { background: #dbe7ff; color: var(--navy); }
#msgO.ok, #msgO.err, #profileMsg.ok, #profileMsg.err, #msg.ok, #msg.err, #whoResult {
  border-radius: 4px 4px 14px 4px; padding: 14px 17px; font-size: 14px; line-height: 1.8; margin: 16px 0;
}
#msgO.ok, #profileMsg.ok, #msg.ok { background: #edf6ef; border: 1px solid #a4c8ae; color: #18623f; }
#msgO.err, #profileMsg.err, #msg.err { background: #fff0ed; border: 1px solid #ddb2ae; color: #a12b37; }
#whoResult { background: #edf3fb; border: 1px solid #b5cce8; color: #173c68; }
#curMsg { font-size: 13px; color: var(--mut); }
.step { padding: 12px 0; color: var(--mut); border-bottom: 1px solid var(--line); font-size: 14px; }
.step .ic { width: 29px; height: 29px; border-radius: 6px; background: #e8effa; }
.step.on { color: var(--navy); }.step.on .ic { background: #dbe7ff; }
.step.ok .ic { background: #e0f0e5; color: var(--ok); }.step.err .ic { background: #fae2df; color: var(--err); }
.step .d { max-width: 45%; overflow-wrap: anywhere; font-size: 11px; }
.spin { border-color: #b0c5ed; border-top-color: var(--blue); }
#coverGrid .btn-ghost { box-shadow: 2px 3px 0 #071e370b; }
.site-footer { max-width: 760px; margin: 30px auto 0; padding: 0 24px calc(25px + env(safe-area-inset-bottom)); color: var(--mut); font-size: 12px; text-align: right; }
.footer-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid var(--line); padding-top: 17px; }
.footer-links nav { display: flex; flex-wrap: wrap; gap: 3px 18px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 38px; text-decoration: none; font-weight: 700; color: var(--navy); }
.footer-links a:hover { color: var(--blue); }
.footer-signature { font-size: 10px; letter-spacing: 1.2px; direction: ltr; }
@keyframes paper-float { 0%,100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-4px); } }
@media (max-width: 600px) {
  .site-topbar { min-height: 73px; padding: 10px 20px; gap: 10px; }
  .logo-img { width: 94px; height: 94px; }.logo-bar { height: 49px; gap: 0; }
  .brand-label { display: none; }.back-link { font-size: 12px; }
  .wrap { margin-top: 20px; padding: 0 16px; }
  header.hero { padding: 25px 22px; min-height: 216px; grid-template-columns: 1fr; gap: 0; }
  .eyebrow { font-size: 8px; letter-spacing: 2px; }
  header.hero h1 { font-size: 30px; line-height: 1.35; max-width: calc(100% - 100px); margin: 13px 0 18px; }
  header.hero h1 em { display: block; }
  header.hero p { font-size: 13px; max-width: none; }
  .profile-art { position: absolute; width: 106px; height: 104px; left: 16px; top: 30px; }
  .profile-art .art-cover { border-width: 3px; inset: 12px 0 21px; }.art-cover svg { width: 31px; height: 31px; }
  .art-profile { bottom: 9px; right: 7px; padding: 4px 8px; font-size: 7px; gap: 4px; }
  .art-profile>span { width: 17px; height: 17px; }.art-profile svg { width: 12px; height: 12px; }
  .paper-tape { width: 37px; height: 13px; left: 14px; top: 5px; }
  .tool-caption { margin-top: 24px; }
  .login-switch { gap: 9px; margin-bottom: 22px; }
  .login-mode { min-height: 84px; padding: 11px 12px; grid-template-columns: 1fr; gap: 0; }
  .mode-icon { width: 21px; height: 21px; grid-row: auto; margin-bottom: 6px; }
  .login-mode strong { font-size: 14px; }.login-mode small { font-size: 10px; }
  .card { padding: 24px 20px; }
  .form-heading { margin-bottom: 17px; }.form-heading h2, .acc-title { font-size: 21px; }
  .form-heading p { font-size: 12px; }
  .account-actions { gap: 8px; }.btn-ghost { font-size: 12px; padding-inline: 5px; }
  .site-footer { padding-inline: 20px; margin-top: 24px; }
  .footer-links { display: block; }.footer-signature { display: block; margin-top: 10px; }
}
@media (max-width: 360px) {
  header.hero { padding-inline: 19px; }.hero .profile-art { width: 92px; left: 12px; }
  header.hero h1 { font-size: 27px; max-width: calc(100% - 83px); }
  .card { padding-inline: 17px; }.login-mode { padding-inline: 10px; }
  .login-mode strong { font-size: 13px; }.login-mode small { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
