/* NE prototype: plain, readable working screens. No external resources. */
:root {
  --text: #1f2933;
  --muted: #616e7c;
  --line: #d9e2ec;
  --bg: #f5f7fa;
  --card: #ffffff;
  --accent: #1f5f99;
  --ok: #1e7b4f;
  --warn: #9a5b00;
  --bad: #b42318;
  --info: #475467;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); }
header.top {
  display: flex; align-items: center; gap: 1.5rem;
  padding: .6rem 1.2rem; background: #102a43; color: #fff;
}
header.top a { color: #fff; text-decoration: none; }
header.top .brand { font-weight: 600; }
header.top nav { display: flex; gap: 1rem; flex: 1; }
header.top nav a.active { text-decoration: underline; }
header.top .user { font-size: .9rem; opacity: .9; display: flex; gap: .8rem; align-items: center; }
header.top form { margin: 0; }
header.top button { background: none; border: 1px solid #9fb3c8; color: #fff; border-radius: 4px; padding: .15rem .6rem; cursor: pointer; }
main { max-width: 1280px; margin: 0 auto; padding: 1.2rem; }
h1 { font-size: 1.4rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
details.section { background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin-bottom: .8rem; }
details.section > summary { cursor: pointer; padding: .7rem 1rem; font-weight: 600; list-style: none; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::before { content: "▸ "; color: var(--muted); }
details.section[open] > summary::before { content: "▾ "; }
details.section > summary .count { font-weight: 400; color: var(--muted); }
details.section > .body { padding: 0 1rem 1rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; }
tr.voided td { color: var(--muted); text-decoration: line-through; }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 10px; font-size: .8rem; border: 1px solid currentColor; white-space: nowrap; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.bad { color: var(--bad); }
.badge.info { color: var(--info); }
.flags { display: flex; flex-wrap: wrap; gap: .3rem; }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.filters label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.filters label.check { flex-direction: row; align-items: center; gap: .3rem; color: var(--text); }
input, select { font: inherit; padding: .3rem .4rem; border: 1px solid #bcccdc; border-radius: 4px; background: #fff; }
button.primary { background: var(--accent); color: #fff; border: 0; border-radius: 4px; padding: .4rem .9rem; font: inherit; cursor: pointer; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.legend { font-size: .85rem; color: var(--muted); margin: .2rem 0 1rem; }
.legend b { color: var(--text); font-weight: 600; }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: .8rem; }
.empty { padding: 1rem; color: var(--muted); }
.login { max-width: 360px; margin: 4rem auto; }
.login label { display: block; margin-bottom: .7rem; }
.login input { width: 100%; }
.error { color: var(--bad); }
footer { color: var(--muted); font-size: .8rem; padding: 1rem 1.2rem; text-align: center; }

/* Stage 7B: actions and forms */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--accent); border-radius: 4px; color: var(--accent); background: #fff; text-decoration: none; font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #eef4fb; }
.btn.small { padding: .1rem .5rem; font-size: .82rem; }
.btn.primary, button.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
button.primary.danger { background: var(--bad); border-color: var(--bad); }
button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: .3rem .8rem; font: inherit; cursor: pointer; }
td.row-actions { white-space: nowrap; text-align: right; }
td.row-actions .btn + .btn { margin-left: .3rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.inline-form label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.form-card { max-width: 860px; }
.subject { font-weight: 600; margin-top: 0; }
.form-grid { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: .7rem 1rem; align-items: start; margin: 1rem 0; }
.form-grid .field { display: contents; }
.form-grid .lbl { padding-top: .35rem; color: var(--muted); }
.form-grid .req { color: var(--bad); }
.form-grid .help { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.form-grid .error { color: var(--bad); font-size: .85rem; margin-top: .2rem; }
.form-grid .has-error input, .form-grid .has-error select { border-color: var(--bad); }
.moment { display: inline-flex; flex-wrap: wrap; gap: .5rem; }
.moment .part { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); gap: .1rem; }
.buttons { display: flex; gap: 1rem; align-items: center; }
.notice { border: 1px solid; border-radius: 6px; padding: .6rem .8rem; margin: .6rem 0; background: #fff; }
.notice.ok { color: var(--ok); }
.notice.warn { color: var(--warn); }
.notice.bad { color: var(--bad); }
.notice ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.messages { margin-bottom: .8rem; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .lbl { padding-top: 0; }
}
.btn.danger { border-color: var(--bad); color: var(--bad); }

/* One density scope for wizard steps 1–4 and its existing final-review action.
   Base typography and all unrelated action/card screens keep their own styles. */
.registration-page { min-width: 0; }
.registration-page > p:first-child { margin: 0 0 6px; }
.registration-page h1 { margin: 0 0 4px; }
.registration-page p { margin: 6px 0; }
.registration-page > h1 + p { margin: 0 0 8px; }
.registration-heading { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.registration-heading > p:first-child { margin: 0; }
.registration-title { min-width: 0; }
.registration-title p { margin: 0; }
.registration-page .btn, .registration-page button.primary,
.registration-page .buttons > a {
  min-height: 32px; display: inline-flex; align-items: center; justify-content: center;
  white-space: normal;
}
.registration-page .buttons { gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.registration-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:16px;align-items:start;margin:0}
.registration-steps{display:flex;gap:6px;list-style:none;padding:0;flex-wrap:wrap;margin:8px 0 10px}
.registration-steps li{padding:5px 10px;min-height:32px;border-radius:8px;background:#eef1f6;color:#536176}
.registration-steps [aria-current=step]{background:#dce9ff;color:#164998;font-weight:700}
.registration-layout>.card, .registration-page .form-card { border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; min-width: 0; }
.registration-page .form-card { max-width: none; }
.registration-summary { position: sticky; top: 12px; }
.registration-summary dl { margin: 8px 0; }
.registration-summary dt { color: var(--muted); font-size: .85rem; }
.registration-summary dd { margin: 0 0 6px; overflow-wrap: anywhere; }
.registration-page .form-grid { grid-template-columns: minmax(190px,36%) minmax(0,1fr); gap: 7px 12px; margin: 8px 0; }
.registration-page .form-grid .lbl { padding-top: 6px; }
.registration-page .ctl { min-width: 0; }
.registration-page .ctl > input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.registration-page .ctl > select, .registration-page .ctl > textarea { width: 100%; max-width: 100%; }
.registration-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.registration-page select { height: 34px; padding: 4px 8px; min-width: 0; max-width: 100%; }
.registration-page textarea { font: inherit; padding: 4px 8px; min-height: 72px; height: 76px; resize: vertical; }
.registration-page input[type=checkbox], .registration-page input[type=radio] { width: 16px; height: 16px; flex: 0 0 16px; }
.registration-fields .field { margin-bottom: 0; }
.registration-page .nullable-flag { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.registration-page [data-flag-unknown]:not([hidden]) { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.registration-page .flag-no { font: inherit; padding: 2px 8px; min-height: 30px; cursor: pointer; }
.registration-page .ctl > div[id] label { display: flex; align-items: center; gap: 6px; min-height: 30px; cursor: pointer; }
.registration-page .notice { padding: 6px 8px; margin: 6px 0; }
.registration-page .facts { grid-template-columns: minmax(190px,36%) minmax(0,1fr); gap: 3px 12px; }
.registration-page .facts dd { overflow-wrap: anywhere; }
.claim-history { display: grid; gap: 10px; margin: 16px 0; }
.claim-history article { border: 1px solid #dce2ec; border-radius: 12px; padding: 12px; }
.registration-page .claim-history { gap: 6px; margin: 8px 0; }
.registration-page .claim-history article { border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.work-choices [id$=services] { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.work-choices [id$=services]>div { border: 1px solid #dce2ec; border-radius: 8px; padding: 4px 8px; }
.work-choices label { cursor: pointer; }
.registration-section { border: 0; border-top: 1px solid #dce4ef; padding: 6px 0; margin: 8px 0; min-width: 0; }
.registration-section legend { font-weight: 700; font-size: 17px; padding: 0 10px 0 0; }
.region-picker { border: 1px solid #dce4ef; border-radius: 8px; padding: 6px; display: grid; gap: 6px; }
.registration-section .moment { max-width: 100%; }
@media(max-width:850px){.registration-layout{grid-template-columns:1fr}.registration-summary{position:static}.work-choices [id$=services]{grid-template-columns:1fr}}
@media(max-width:640px){.registration-page .form-grid,.registration-page .facts{grid-template-columns:1fr}.registration-page .form-grid .lbl{padding-top:0}.registration-page .facts{gap:2px}.registration-page .facts dd{margin-bottom:6px}.registration-heading{grid-template-columns:minmax(0,1fr) auto}.registration-heading>p:first-child{grid-column:1/-1}.registration-heading>.btn{max-width:40vw}}
#pyrus-preview{max-height:60vh;overflow:auto;margin:.8rem 0}#pyrus-preview th{position:sticky;top:0;background:white}#pyrus-help .btn{white-space:normal;margin:.25rem .25rem .25rem 0}#pyrus-help [hidden]{display:none}

/* Grouped work selection keeps the existing registration width and step count. */
.grouped-work-choices .work-group {border-top:1px solid #dbe4ee; padding:6px 0; margin:4px 0;}
.grouped-work-choices summary {cursor:pointer; padding:4px 0;}
.grouped-work-choices .work-grid {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 8px; margin-top:6px;}
.grouped-work-choices .work-grid label {display:flex; align-items:center; gap:6px; min-height:32px; padding:4px 6px; border:1px solid #dbe4ee; border-radius:6px; overflow-wrap:anywhere;}
.grouped-work-choices .work-grid input {flex:0 0 auto;}
@media(max-width:700px){.grouped-work-choices .work-grid{grid-template-columns:1fr;}}
