/* PBRP City Engineer progress page. Uses the site's theme variables from style.css. */
body.progress { background: var(--bg); color: var(--text); min-height: 100vh; }
.pg-wrap { width: min(1000px, calc(100% - 32px)); margin: 0 auto; padding: 104px 0 60px; }
.nav-links a[aria-current="page"] { color: var(--accent-light); }

.pg-hero { text-align: center; padding: 18px 0 28px; }
.pg-kicker { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-light); margin: 0 0 6px; }
.pg-hero h1 { font-family: 'PBRPFont', serif; font-weight: 400; letter-spacing: 1px; font-size: clamp(48px, 8vw, 96px); color: var(--bright); line-height: .98; margin: 0 0 14px; }
.pg-intro { max-width: 640px; margin: 0 auto 18px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.pg-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pg-badge { padding: 5px 14px; border-radius: var(--r-pill); border: 1px solid var(--line2); font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .06em; color: var(--text); background: rgba(0, 0, 0, .25); }
.pg-badge b { color: var(--gold); font-weight: 600; }
.pg-badge-stage { border-color: var(--accent-border); background: var(--gold-dim); }
.pg-badge-stage::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 0 0 var(--accent-light); animation: pgpulse 2s infinite; vertical-align: 1px; }
@keyframes pgpulse { 0% { box-shadow: 0 0 0 0 rgba(224, 182, 111, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(224, 182, 111, 0); } }

.pg-overall { background: linear-gradient(180deg, var(--surface2), var(--surface)); border: 1px solid var(--accent-border); border-top: 3px solid var(--accent); border-radius: var(--r-md); padding: 24px 26px 26px; box-shadow: inset 0 0 0 1px var(--gold-dim); }
.pg-overall-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pg-overall h2 { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-light); }
.pg-big { font-family: 'PBRPFont', serif; font-size: clamp(44px, 7vw, 72px); line-height: 1; color: var(--bright); }
.pg-hint { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.pg-bar { position: relative; height: 10px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; }
.pg-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 1.1s cubic-bezier(.2, .7, .2, 1); }
.pg-bar-lg { height: 18px; }
.pg-bar-lg i { position: relative; }
.pg-bar-lg i::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 8px, transparent 8px 16px); background-size: 22px 22px; animation: pgstripe 1.4s linear infinite; }
@keyframes pgstripe { to { background-position: 22px 0; } }

.pg-phases { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0 0; padding: 0; }
.pg-phase { position: relative; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(0, 0, 0, .2); }
.pg-phase small { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pg-phase b { display: block; color: var(--bright); font-size: 15px; font-weight: 600; }
.pg-phase span { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.pg-phase.done { border-color: rgba(127, 176, 105, .45); }
.pg-phase.done small { color: #9ccb85; }
.pg-phase.current { border-color: var(--accent-light); background: var(--gold-dim); box-shadow: 0 0 0 1px var(--accent-dim); }
.pg-phase.current small { color: var(--accent-light); }
.pg-phase.next { opacity: .7; }

.pg-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 28px 0 14px; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-chipbtn { padding: 8px 14px; background: transparent; border: 1px solid var(--line2); border-radius: var(--r-pill); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.pg-chipbtn:hover { border-color: var(--accent-light); }
.pg-chipbtn.on { background: var(--accent); border-color: var(--accent); color: #1a1408; font-weight: 600; }
.pg-btn { padding: 8px 14px; background: transparent; color: var(--text); border: 1px solid var(--line2); border-radius: var(--r-sm); font: inherit; font-size: 13px; cursor: pointer; }
.pg-btn:hover { border-color: var(--accent-light); background: var(--gold-dim); }

.pg-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.pg-item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--r-md); margin-bottom: 10px; transition: border-color .2s, background .2s; }
.pg-item[data-status="Live"] { border-left-color: #7fb069; }
.pg-item[data-status="Testing"] { border-left-color: var(--accent-light); }
.pg-item[data-status="Balancing"] { border-left-color: var(--accent); }
.pg-item[data-status="Planned"] { border-left-color: var(--muted); }
.pg-item[open] { background: var(--surface2); border-color: var(--accent-border); }
.pg-item summary { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(120px, 1fr) 52px auto; gap: 16px; align-items: center; padding: 15px 16px; cursor: pointer; list-style: none; }
.pg-item summary::-webkit-details-marker { display: none; }
.pg-item summary:hover .pg-name { color: var(--accent-light); }
.pg-item summary:focus-visible { outline: 2px solid var(--accent-light); outline-offset: -2px; }
.pg-name { color: var(--bright); font-size: 17px; font-weight: 600; line-height: 1.3; }
.pg-name small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.pg-pct { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--gold-light); text-align: right; }
.pg-status { padding: 3px 11px; border-radius: var(--r-pill); font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: .06em; border: 1px solid var(--line2); white-space: nowrap; }
.pg-status[data-s="Live"] { color: #a9d894; border-color: rgba(127, 176, 105, .5); background: rgba(127, 176, 105, .1); }
.pg-status[data-s="Testing"] { color: var(--gold-light); border-color: var(--accent-border); background: var(--gold-dim); }
.pg-status[data-s="Balancing"] { color: #e7c9a0; border-color: rgba(196, 138, 69, .55); background: rgba(196, 138, 69, .12); }
.pg-status[data-s="Planned"] { color: var(--muted); }
.pg-body { padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.pg-body ul { margin: 12px 0 0 20px; }
.pg-body li { line-height: 1.7; font-size: 15px; margin-bottom: 2px; }
.pg-body li::marker { color: var(--accent); }

.pg-feedback { margin: 28px 0 0; padding: 14px 18px; text-align: center; border: 1px solid var(--accent-border); border-radius: var(--r-md); background: var(--gold-dim); color: var(--bright); font-size: 15px; }
.pg-disclaimer { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }

@media (max-width: 720px) {
  .pg-phases { grid-template-columns: 1fr 1fr; }
  .pg-item summary { grid-template-columns: minmax(0, 1fr) 46px; gap: 10px 12px; }
  .pg-item summary .pg-bar { grid-column: 1 / 2; grid-row: 2; }
  .pg-item summary .pg-pct { grid-column: 2; grid-row: 2; }
  .pg-item summary .pg-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .pg-overall { padding: 20px 16px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-bar i { transition: none; }
  .pg-bar-lg i::after, .pg-badge-stage::before { animation: none; }
}
