/* Permit Revisions wizard. Scoped with .pr-; uses the site tokens so light and dark both work. */
.pr-card [hidden], .pr-card[hidden] { display: none !important; }
.pr-narrow { max-width: 820px; margin-inline: auto; }
.pr-top { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.2rem; }
.pr-top .lead-p { max-width: 62ch; }
.pr-main { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.pr-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pr-card .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pr-progress { display: flex; gap: .4rem; margin-bottom: .6rem; }
.pr-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .3s; }
.pr-progress i.on { background: var(--accent); }
.pr-stepname { font-family: 'JetBrains Mono', monospace; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; }

.pr-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.2rem, 4vw, 2.2rem); }
.pr-h { font-family: 'Playfair Display', serif; font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin: 0 0 .3rem; }
.pr-sub { color: var(--ink-2); margin: 0 0 1.3rem; }
.pr-l { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--ink); padding: 0; }
.pr-hint { font-weight: 400; color: var(--ink-3); }
.pr-fs { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
.pr-gap { margin-top: 1rem; }
.pr-gap-lg { margin-top: 1.4rem; }
.pr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pr-input { width: 100%; padding: .8rem 1rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.pr-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
textarea.pr-input { resize: vertical; }

.pr-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.pr-opt { position: relative; display: block; cursor: pointer; }
.pr-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pr-opt span { display: block; padding: .85rem 1rem; border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg); font-weight: 600; transition: border-color .2s, background .2s, box-shadow .2s; height: 100%; }
.pr-opt small { display: block; font-weight: 400; color: var(--ink-3); margin-top: .15rem; font-size: .8rem; }
.pr-opt:hover span { border-color: var(--ink); }
.pr-opt input:checked + span { border-color: var(--ink); background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 1px var(--ink); }
.pr-opt input:checked + span small { color: inherit; opacity: .8; }
.pr-opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.pr-check { display: flex; gap: .65rem; align-items: flex-start; margin: .5rem 0; cursor: pointer; font-size: .92rem; }
.pr-check input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ink); flex: none; }
.pr-check a { text-decoration: underline; }

.pr-drop { display: block; text-align: center; padding: 2rem 1rem; border: 2px dashed var(--line-2); border-radius: 16px; background: var(--bg); cursor: pointer; transition: border-color .2s, background .2s; }
.pr-drop:hover, .pr-drop.over { border-color: var(--ink); background: var(--bg-alt); }
.pr-drop b { display: block; }
.pr-drop small { color: var(--ink-3); }
.pr-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pr-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pr-files { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .5rem; }
.pr-files li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem .9rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); font-size: .88rem; }
.pr-files li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-files li em { font-style: normal; color: var(--ink-3); margin-left: .4rem; }
.pr-files li.bad { border-color: #c0392b; }
.pr-files button { border: 0; background: none; color: var(--ink-2); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: .2rem .4rem; }
.pr-files button:hover { color: var(--ink); }

.pr-note { margin: .6rem 0; font-size: .88rem; color: var(--ink-2); }
.pr-note:empty { display: none; }
.pr-note p { margin: .3rem 0; padding: .6rem .9rem; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 10px 10px 0; }
.pr-err { color: #c0392b; font-size: .88rem; margin: .6rem 0 0; min-height: 0; }
.pr-err:empty { display: none; }
[data-theme="dark"] .pr-err { color: #ff8a7a; }

.pr-est { border: 1px solid var(--line-2); border-radius: 18px; padding: 1.2rem 1.3rem; background: var(--bg); margin-bottom: 1.4rem; }
.pr-est .lbl { font-family: 'JetBrains Mono', monospace; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pr-est .big { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.1; margin: .2rem 0; }
.pr-est .hrs { font-weight: 600; color: var(--ink-2); }
.pr-est ul { list-style: disc; margin: .8rem 0 0; padding-left: 1.2rem; color: var(--ink-2); font-size: .9rem; }
.pr-est.manual .big { font-size: clamp(1.3rem, 4vw, 1.7rem); }
.pr-sealnote { margin-top: .8rem; font-size: .85rem; color: var(--ink-2); }

.pr-captcha { margin: 1rem 0; }
.pr-nav { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.pr-nav .btn-ay { cursor: pointer; }
.pr-nav .btn-ay[disabled] { opacity: .6; pointer-events: none; }
.pr-foot { margin-top: 1.2rem; font-size: .8rem; color: var(--ink-3); line-height: 1.6; }
.pr-foot a { text-decoration: underline; }

.pr-done { text-align: center; }
.pr-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 1rem; }
.pr-done.fail .pr-tick { background: #c0392b; color: #fff; }
.pr-sum { text-align: left; white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line-2); border-radius: 14px; padding: 1rem; font-size: .8rem; max-height: 260px; overflow: auto; }
.pr-done .pr-sum:empty { display: none; }
.pr-doneact { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.2rem; }

@media (max-width: 600px) {
  .pr-row { grid-template-columns: 1fr; }
  .pr-opts { grid-template-columns: 1fr; }
  .pr-nav .btn-ay { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .pr-progress i, .pr-opt span, .pr-drop { transition: none; } }
