/* =========================================================
   ALPHA 17 · MINISTRY STAFF PORTAL
   Production visual layer. Existing application contracts live in
   portal.css; this file deliberately overrides presentation only.
========================================================= */

:root{
  color-scheme:light;
  --bg:#daddd7;
  --panel:#f4f2eb;
  --gold:#806d3e;
  --muted:#667069;
  --line:#bdc2bb;
  --green:#20352b;
  --a17-chrome-950:#0c1210;
  --a17-chrome-900:#111916;
  --a17-chrome-850:#16211d;
  --a17-chrome-800:#1d2a25;
  --a17-chrome-700:#2a3a33;
  --a17-canvas:#daddd7;
  --a17-canvas-deep:#cfd3cc;
  --a17-surface:#f4f2eb;
  --a17-surface-bright:#faf8f1;
  --a17-surface-muted:#e8e8e1;
  --a17-document:#f7f3e8;
  --a17-ink:#222823;
  --a17-ink-soft:#465049;
  --a17-muted:#5f6962;
  --a17-rule:#bdc2bb;
  --a17-rule-strong:#8e978f;
  --a17-rule-dark:rgba(225,231,224,.14);
  --a17-authority:#806d3e;
  --a17-authority-light:#b4a477;
  --a17-restricted:#713b37;
  --a17-restricted-soft:#eadbd7;
  --a17-success:#41624f;
  --a17-success-soft:#dce7df;
  --a17-blue-grey:#52656a;
  --a17-font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR","Noto Sans JP",Arial,sans-serif;
  --a17-font-document:Georgia,"Noto Serif KR","Noto Serif JP","Times New Roman",serif;
  --a17-font-data:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --a17-shadow-panel:0 1px 2px rgba(16,24,20,.12);
  --a17-shadow-raised:0 8px 24px rgba(16,24,20,.12);
}

html{
  min-width:320px;
  min-height:100%;
  background:var(--a17-chrome-950);
  color-scheme:light;
  -webkit-text-size-adjust:100%;
}

body{
  min-height:100svh;
  margin:0;
  overflow-x:hidden;
  overflow-wrap:anywhere;
  background:var(--a17-canvas);
  color:var(--a17-ink);
  font-family:var(--a17-font-ui);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

button,
input,
select,
textarea{
  font:inherit;
}

button,
.btn,
.choice,
.desk-item,
.object,
.utility-button,
.locale-select,
.field,
.privacy-link{
  min-height:44px;
}

button{
  -webkit-tap-highlight-color:transparent;
}

button:disabled,
[aria-disabled="true"]{
  cursor:not-allowed;
}

[hidden],
.hidden-file{
  display:none !important;
}

img,
svg{
  max-width:100%;
}

a{
  color:#354f43;
  text-underline-offset:3px;
}

a:hover{
  color:#172b22;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.choice:focus-visible,
.desk-item:focus-visible,
.object:focus-visible,
.utility-button:focus-visible,
.locale-select:focus-visible,
.field:focus-visible,
.privacy-link:focus-visible,
.skip-link:focus-visible{
  outline:3px solid #9b8144;
  outline-offset:3px;
}

#app:focus,
#app h1[tabindex="-1"]:focus,
#offlineNotice:focus{
  outline:none;
}

/* =========================================================
   PERSISTENT ADMINISTRATIVE SHELL
========================================================= */

.portal-shell{
  width:100%;
  min-height:100svh;
  display:grid;
  grid-template-columns:248px minmax(0,1fr);
  background:var(--a17-canvas);
}

.network-rail{
  position:sticky;
  z-index:35;
  top:0;
  min-width:0;
  height:100svh;
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  border-right:1px solid rgba(0,0,0,.38);
  background:var(--a17-chrome-900);
  color:#edf0eb;
  scrollbar-width:thin;
  scrollbar-color:#45534c var(--a17-chrome-900);
}

.ministry-brand{
  min-height:84px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 17px;
  border-bottom:1px solid var(--a17-rule-dark);
  background:var(--a17-chrome-950);
}

.ministry-mark{
  position:relative;
  width:42px;
  height:42px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border:1px solid rgba(180,164,119,.76);
  border-radius:50%;
  color:#c0b184;
}

.ministry-mark::before{
  content:"";
  position:absolute;
  inset:5px;
  border:1px solid rgba(180,164,119,.24);
  border-radius:50%;
}

.ministry-mark::after{
  display:none;
}

.ministry-mark span{
  position:relative;
  z-index:1;
  font-family:var(--a17-font-document);
  font-size:20px;
  font-weight:700;
}

.ministry-brand p,
.ministry-brand strong,
.ministry-brand small{
  display:block;
}

.ministry-brand p{
  margin:0 0 1px;
  color:#a3ada7;
  font-family:var(--a17-font-data);
  font-size:12px;
  letter-spacing:.04em;
}

.ministry-brand strong{
  color:#f0f2ee;
  font-size:14px;
  font-weight:650;
}

.ministry-brand small{
  margin-top:1px;
  color:#86928b;
  font-size:12px;
}

.employee-access{
  margin:16px 14px 10px;
  border:1px solid var(--a17-rule-dark);
  background:#151f1b;
}

.employee-heading{
  min-height:78px;
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  align-items:center;
  gap:11px;
  padding:12px;
  border-bottom:1px solid var(--a17-rule-dark);
}

.employee-monogram{
  width:40px;
  height:48px;
  display:grid;
  place-items:center;
  border:1px solid rgba(218,222,213,.2);
  background:var(--a17-chrome-800);
  color:#d7ddd6;
  font-family:var(--a17-font-document);
  font-size:14px;
  font-weight:700;
}

.employee-heading strong,
.employee-heading small,
.verified-state{
  display:block;
}

.verified-state{
  position:relative;
  padding-left:12px;
  color:#9fb8a6;
  font-size:12px;
  font-weight:700;
}

.verified-state::before{
  content:"";
  position:absolute;
  top:.55em;
  left:0;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#7e9b87;
}

html[data-employee-session="locked"] .verified-state::before{
  background:#8f7770;
}

.employee-heading strong{
  margin-top:2px;
  overflow:hidden;
  color:#edf0eb;
  font-size:13px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.employee-heading small{
  overflow:hidden;
  color:#929e97;
  font-family:var(--a17-font-data);
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.archive-registry-credential{
  margin-top:2px;
  color:#b8ad87 !important;
}

.employee-access dl{
  margin:0;
  padding:8px 12px 10px;
}

.employee-access dl div{
  min-height:29px;
  display:grid;
  grid-template-columns:74px minmax(0,1fr);
  align-items:center;
  gap:8px;
  border-bottom:1px solid rgba(225,231,224,.08);
}

.employee-access dl div:last-child{
  border-bottom:0;
}

.employee-access dt{
  color:#859189;
  font-size:12px;
}

.employee-access dd{
  margin:0;
  overflow:hidden;
  color:#cbd2cc;
  font-size:12px;
  font-weight:600;
  text-align:right;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.clearance-token{
  min-width:24px;
  min-height:24px;
  display:inline-grid;
  place-items:center;
  border:1px solid rgba(180,164,119,.6);
  color:#c9bc91;
  font-family:var(--a17-font-data);
  font-weight:700;
}

.primary-navigation,
.service-navigation{
  display:grid;
  gap:2px;
  padding:8px 10px;
}

.primary-navigation > p,
.service-navigation > p{
  margin:4px 8px 6px;
  color:#76837b;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.nav-item,
.service-navigation button,
.rail-footer button{
  position:relative;
  width:100%;
  min-width:0;
  min-height:52px;
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  align-items:center;
  gap:11px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:0;
  background:transparent;
  color:#b7c0ba;
  text-align:left;
  cursor:pointer;
}

.nav-item:hover,
.service-navigation button:hover,
.rail-footer button:hover{
  border-color:rgba(225,231,224,.12);
  background:#19231f;
  color:#edf0eb;
}

.nav-item.is-current,
.service-navigation button.is-current,
.rail-footer button.is-current{
  border-color:rgba(180,164,119,.26);
  background:#1d2924;
  color:#f0f2ee;
}

.nav-item.is-current::before,
.service-navigation button.is-current::before,
.rail-footer button.is-current::before{
  content:"";
  position:absolute;
  inset:7px auto 7px -1px;
  width:3px;
  background:#a49260;
}

.nav-item:disabled,
.service-navigation button:disabled,
.rail-footer button:disabled{
  opacity:.46;
  background:transparent;
}

.nav-item svg,
.service-navigation svg,
.rail-footer svg,
.global-search svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.45;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.nav-item span,
.nav-item strong,
.nav-item small{
  min-width:0;
  display:block;
}

.nav-item strong{
  overflow:hidden;
  font-size:13px;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.nav-item small{
  margin-top:1px;
  overflow:hidden;
  color:#87938c;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.service-navigation{
  margin-top:3px;
  padding-top:10px;
  border-top:1px solid var(--a17-rule-dark);
}

.service-navigation button,
.rail-footer button{
  min-height:44px;
  font-size:12px;
}

.rail-footer{
  margin-top:auto;
  padding:8px 10px 13px;
  border-top:1px solid var(--a17-rule-dark);
}

.network-node{
  display:grid;
  grid-template-columns:12px minmax(0,1fr);
  align-items:center;
  gap:3px;
  margin:8px 9px 0;
  padding-top:9px;
  border-top:1px solid var(--a17-rule-dark);
}

.network-node > i{
  width:6px;
  height:6px;
  align-self:start;
  margin-top:6px;
  border-radius:50%;
  background:#7e9b87;
}

html[data-network="offline"] .network-node > i{
  background:#9d6e65;
}

.network-node strong,
.network-node small{
  display:block;
}

.network-node strong{
  color:#b2bcb5;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:600;
}

.network-node small{
  color:#7e8b83;
  font-size:12px;
}

.workspace{
  min-width:0;
  min-height:100svh;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto minmax(0,1fr) auto;
  background:var(--a17-canvas);
}

.command-bar{
  position:sticky;
  z-index:30;
  top:0;
  min-width:0;
  min-height:68px;
  display:grid;
  grid-template-columns:minmax(170px,1fr) minmax(220px,380px) auto auto;
  align-items:center;
  gap:14px;
  padding:9px 18px;
  border-bottom:1px solid rgba(0,0,0,.45);
  background:var(--a17-chrome-900);
  color:#e7ebe6;
}

.breadcrumb{
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
  overflow:hidden;
  color:#919d96;
  font-size:12px;
  white-space:nowrap;
}

.breadcrumb span,
.breadcrumb strong{
  overflow:hidden;
  text-overflow:ellipsis;
}

.breadcrumb strong{
  color:#dce2dc;
  font-weight:600;
}

.breadcrumb i{
  color:#56635c;
  font-style:normal;
}

.global-search{
  min-width:0;
  min-height:44px;
  display:grid;
  grid-template-columns:18px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:0 12px;
  border:1px solid rgba(226,231,223,.18);
  border-radius:0;
  background:#18221e;
  color:#a9b3ad;
  text-align:left;
  cursor:pointer;
}

.global-search:hover{
  border-color:rgba(180,164,119,.56);
  color:#e2e7e1;
}

.global-search span{
  overflow:hidden;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.command-utilities{
  display:flex;
  align-items:center;
  gap:11px;
}

.london-time{
  min-width:148px;
  padding-right:12px;
  border-right:1px solid var(--a17-rule-dark);
  text-align:right;
}

.london-time span,
.london-time strong{
  display:block;
  white-space:nowrap;
}

.london-time span{
  color:#8d9a92;
  font-size:12px;
}

.london-time strong{
  margin-top:1px;
  color:#e0e5df;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:600;
}

.profile-control{
  width:44px;
  min-width:44px;
  height:44px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid rgba(226,231,223,.2);
  border-radius:0;
  background:#1b2722;
  color:#d8dfd8;
  font-family:var(--a17-font-document);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}

.profile-control:hover{
  border-color:rgba(180,164,119,.58);
}

.profile-control:disabled{
  opacity:.48;
}

.app-utility{
  position:static;
  z-index:auto;
  min-width:0;
  max-width:none;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  pointer-events:auto;
}

.locale-control{
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:#dbe1db;
  pointer-events:auto;
}

.locale-label{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
}

.locale-select{
  min-width:118px;
  min-height:44px;
  margin:0;
  padding:7px 30px 7px 9px;
  border:1px solid rgba(226,231,223,.4);
  border-radius:0;
  background:#18221e;
  color:#d9dfda;
  color-scheme:dark;
  box-shadow:none;
  font-family:var(--a17-font-ui);
  font-size:12px;
  cursor:pointer;
}

.utility-button{
  min-height:44px;
  margin:0;
  padding:7px 11px;
  border:1px solid rgba(180,164,119,.55);
  border-radius:0;
  background:#20352b;
  color:#f0f3ee;
  box-shadow:none;
  font-size:12px;
  cursor:pointer;
  pointer-events:auto;
}

.utility-button:hover{
  background:#294237;
}

.utility-button:disabled{
  opacity:.58;
}

.release-badge{
  margin:0;
  color:#7f8b84;
  font-family:var(--a17-font-data);
  font-size:12px;
  line-height:1.4;
  letter-spacing:.02em;
  white-space:nowrap;
  pointer-events:auto;
}

.network-status{
  position:fixed;
  z-index:80;
  top:max(80px,calc(env(safe-area-inset-top) + 68px));
  right:max(14px,env(safe-area-inset-right));
  width:min(420px,calc(100vw - 28px));
  margin:0;
  padding:12px 14px;
  border:1px solid #8b7b56;
  background:var(--a17-surface-bright);
  color:var(--a17-ink);
  box-shadow:var(--a17-shadow-raised);
  line-height:1.5;
  pointer-events:auto;
}

body > .app-utility{
  position:fixed;
  z-index:70;
  right:max(12px,env(safe-area-inset-right));
  bottom:max(12px,env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:7px;
}

body > .app-utility .release-badge{
  padding:5px 8px;
  border:1px solid var(--a17-rule-dark);
  background:var(--a17-chrome-900);
  color:#a8b2ac;
}

.classification-bar{
  min-height:42px;
  display:grid;
  grid-template-columns:minmax(290px,auto) minmax(280px,1fr) auto;
  align-items:center;
  gap:20px;
  padding:6px 22px;
  border-bottom:1px solid #aeb4ad;
  background:#e9e8e1;
  color:#515a54;
  font-size:12px;
}

.classification-bar > div{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  overflow:hidden;
  white-space:nowrap;
}

.classification-bar > div:nth-child(2){
  justify-content:center;
}

.classification-bar strong{
  overflow:hidden;
  color:#333b36;
  font-size:12px;
  font-weight:600;
  text-overflow:ellipsis;
}

#shellClassification{
  padding:3px 7px;
  border:1px solid #9b6b65;
  color:var(--a17-restricted);
  font-family:var(--a17-font-data);
  font-weight:700;
  white-space:nowrap;
}

.alpha17-release{
  color:#59625c;
  font-family:var(--a17-font-data);
  font-size:12px;
  letter-spacing:.04em;
  white-space:nowrap;
}

.workspace-footer{
  min-height:35px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:7px 20px;
  border-top:1px solid #aeb4ad;
  background:#d3d6d0;
  color:#555e58;
  font-family:var(--a17-font-data);
  font-size:12px;
}

/* =========================================================
   APPLICATION CANVAS AND GENERIC RECORD SCREENS
========================================================= */

#app{
  width:100%;
  min-width:0;
  min-height:0;
  display:grid;
  align-content:start;
  place-items:start center;
  padding:clamp(20px,3vw,34px);
  background:var(--a17-canvas);
  color:var(--a17-ink);
}

.panel,
.dashboard-panel,
.dialogue-panel,
.office-screen,
.office-scene{
  width:min(960px,100%);
  min-width:0;
  margin:0 auto;
  padding:clamp(24px,3vw,38px);
  border:1px solid var(--a17-rule);
  background:var(--a17-surface);
  color:var(--a17-ink);
  box-shadow:var(--a17-shadow-panel);
}

.dashboard-panel,
.office-screen,
.office-scene,
.government-panel{
  width:min(1380px,100%);
}

.network-panel,
.dialogue-panel,
.privacy-panel{
  width:min(1060px,100%);
}

.seal{
  margin:0 0 7px;
  color:#59635c;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:700;
  letter-spacing:.07em;
  text-align:left;
  text-transform:uppercase;
}

h1,
h2,
h3{
  text-wrap:balance;
}

h1{
  margin:0 0 8px;
  color:#1c241f;
  font-family:var(--a17-font-ui);
  font-size:clamp(27px,3vw,36px);
  font-weight:650;
  line-height:1.16;
  letter-spacing:-.025em;
  text-align:left;
}

h2{
  margin:0 0 22px;
  color:#59635c;
  font-family:var(--a17-font-ui);
  font-size:clamp(17px,2vw,21px);
  font-weight:500;
  line-height:1.35;
  letter-spacing:0;
  text-align:left;
}

h3{
  color:#2d3630;
  font-size:16px;
  line-height:1.35;
}

p,
li,
dd{
  line-height:1.65;
}

.muted{
  color:var(--a17-muted) !important;
}

.notice{
  margin:24px 0;
  padding:17px 19px;
  border:1px solid #c2c6bf;
  border-left:3px solid #7b897f;
  background:var(--a17-surface-muted);
  color:#39433d;
  line-height:1.65;
}

.notice > :first-child{
  margin-top:0;
}

.notice > :last-child{
  margin-bottom:0;
}

.notice.warning,
.destructive-panel .notice{
  border-color:#c4a29e;
  border-left-color:var(--a17-restricted);
  background:#f1e6e3;
}

.terminal,
.evidence-document{
  max-width:100%;
  margin:20px 0;
  padding:16px 18px;
  overflow:auto;
  border:1px solid #aeb8b1;
  background:#e6ebe7;
  color:#263a30;
  font-family:var(--a17-font-data);
  font-size:12px;
  line-height:1.7;
  white-space:pre-wrap;
  box-shadow:none;
}

.center{
  text-align:center;
}

.center .btn{
  margin-right:4px;
  margin-left:4px;
}

.btn{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:24px;
  padding:10px 16px;
  border:1px solid #273c32;
  border-radius:1px;
  background:#20352b;
  color:#f0f3ee;
  box-shadow:none;
  font-family:var(--a17-font-ui);
  font-size:13px;
  font-weight:650;
  line-height:1.35;
  letter-spacing:.01em;
  text-decoration:none;
  cursor:pointer;
}

.btn:hover{
  border-color:#314c3e;
  background:#294237;
  color:#fff;
}

.btn.secondary{
  border-color:#8c958e;
  background:var(--a17-surface-bright);
  color:#354039;
}

.btn.secondary:hover{
  border-color:#59645d;
  background:#fffdf7;
  color:#1e2b24;
}

.btn.danger{
  border-color:#8a4f4a;
  background:#713b37;
  color:#fff8f6;
}

.btn.danger:hover{
  background:#61312e;
}

.btn.compact{
  min-height:44px;
  margin-top:10px;
  padding:8px 12px;
  font-size:12px;
}

label{
  display:block;
  margin:18px 0 7px;
  color:#38443d;
  font-weight:650;
  letter-spacing:0;
}

.field{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  border:1px solid #78827b;
  border-radius:1px;
  background:#fffdf8;
  color:var(--a17-ink);
  box-shadow:inset 0 1px 1px rgba(16,24,20,.05);
  font-family:var(--a17-font-ui);
}

.field::placeholder{
  color:#6d766f;
}

.field:hover{
  border-color:#707b74;
}

.field:focus{
  border-color:#6e633f;
}

.area{
  min-height:132px;
  resize:vertical;
}

.intake-fieldset{
  min-width:0;
  margin:28px 0 0;
  padding:18px;
  border:1px solid var(--a17-rule);
  background:#efeee8;
}

.intake-fieldset legend{
  padding:0 8px;
  color:#445048;
  font-weight:700;
  letter-spacing:0;
}

.consent-line,
.consent-check{
  min-height:44px;
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  align-items:start;
  gap:10px;
  color:#38443d;
  line-height:1.55;
}

.consent-line input,
.consent-check input{
  width:20px;
  height:20px;
  margin:2px 0 0;
  accent-color:#526c5d;
}

.choice{
  width:100%;
  display:block;
  margin:10px 0;
  padding:13px 15px;
  border:1px solid var(--a17-rule);
  border-radius:1px;
  background:var(--a17-surface-bright);
  color:var(--a17-ink);
  box-shadow:none;
  text-align:left;
  cursor:pointer;
}

.choice:hover{
  border-color:#7f8b83;
  background:#eeeee8;
}

/* =========================================================
   DASHBOARD · ACTUAL OFFICE SERVICE
========================================================= */

.office-scene{
  min-height:0;
  position:relative;
  overflow:visible;
  border:0;
  background:transparent;
  box-shadow:none;
}

.office-window{
  display:none;
}

.office-topbar{
  min-height:96px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin:0 0 20px;
  padding:0 0 18px;
  border-bottom:1px solid var(--a17-rule-strong);
}

.office-topbar .seal{
  margin-bottom:3px;
}

.office-topbar h1{
  margin:0;
  font-size:clamp(28px,3vw,36px);
}

.office-topbar h2{
  max-width:760px;
  margin:5px 0 0;
  color:#59635c;
  font-size:14px;
  font-weight:500;
}

.office-status{
  min-width:260px;
  max-width:390px;
  padding:12px 14px;
  border:1px solid var(--a17-rule);
  background:var(--a17-surface-muted);
  color:#59635c;
  font-family:var(--a17-font-data);
  font-size:12px;
  line-height:1.58;
  text-align:right;
}

.office-status b{
  color:#25342c;
  font-size:13px;
}

.sovereign-status,
.canonical-registry-status{
  display:inline-block;
  margin-top:3px;
  color:#6a5d37;
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
}

.canonical-registry-status{
  color:#426453;
}

.shared-world-status,
.life-briefing{
  margin:0 0 16px;
  padding:18px;
  border:1px solid var(--a17-rule);
  background:var(--a17-surface);
  color:var(--a17-ink);
  box-shadow:var(--a17-shadow-panel);
}

.shared-world-heading,
.life-briefing-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.shared-world-heading h3,
.life-briefing-heading h2{
  margin:3px 0 0;
  color:#26302a;
  font-family:var(--a17-font-ui);
  font-size:18px;
  font-weight:650;
  letter-spacing:0;
  text-align:left;
}

.shared-world-kicker,
.shared-world-event-meta,
.life-briefing-meta{
  margin:0;
  color:#59635c;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:650;
  letter-spacing:.05em;
}

.shared-world-badge,
.life-briefing-source{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border:1px solid #8f9992;
  background:#e8eae5;
  color:#4d5c54;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:650;
  letter-spacing:.02em;
  white-space:nowrap;
}

.shared-world-badge.status-normal{
  border-color:#779182;
  background:var(--a17-success-soft);
  color:#315440;
}

.shared-world-badge.status-heightened,
.shared-world-badge.status-restricted{
  border-color:#a18c5d;
  background:#ede7d7;
  color:#635328;
}

.shared-world-badge.status-emergency{
  border-color:#a3716c;
  background:var(--a17-restricted-soft);
  color:#672e2a;
}

.shared-world-events{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
  margin-top:15px;
}

.shared-world-event{
  padding:13px 14px;
  border:1px solid #d0d3cd;
  border-left:3px solid #8a958d;
  background:#edede7;
}

.shared-world-event.severity-priority,
.shared-world-event.severity-emergency{
  border-left-color:#8b4c47;
}

.shared-world-event h3{
  margin:7px 0;
  color:#29332d;
  font-size:16px;
}

.shared-world-event p{
  margin-bottom:0;
  color:#4f5953;
  line-height:1.55;
}

.shared-world-personal-date{
  margin-bottom:0;
  font-size:12px;
}

.life-briefing-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:15px;
}

.life-briefing-task{
  min-height:160px;
  padding:14px;
  border:1px solid #cfd2cc;
  border-top:3px solid #8d8262;
  background:#eeeee8;
}

.life-briefing-task h3{
  margin:6px 0 9px;
  color:#28322c;
  font-size:16px;
  line-height:1.35;
}

.life-briefing-task p{
  margin-bottom:0;
  color:#515b55;
  line-height:1.55;
}

.desk-scene{
  min-height:0;
  position:relative;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:0;
  overflow:visible;
  border:0;
  background:transparent;
}

.service-directory-heading{
  grid-column:1 / -1;
  min-width:0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin:8px 0 2px;
  padding:0 0 12px;
  border-bottom:1px solid var(--a17-rule-strong);
}

.service-directory-heading > div,
.service-directory-heading > p{
  min-width:0;
}

.service-directory-heading > div > p{
  margin:0 0 3px;
  color:#59635c;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:700;
  letter-spacing:.05em;
}

.service-directory-heading h2{
  margin:0;
  color:#26312b;
  font-size:19px;
  font-weight:650;
}

.service-directory-heading > p{
  max-width:520px;
  margin:0;
  color:#59635c;
  font-size:12px;
  text-align:right;
}

.desk-scene::before{
  display:none;
}

.object{
  position:relative;
  inset:auto;
  z-index:auto;
  width:100%;
  min-width:0;
  min-height:92px;
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  grid-template-rows:auto auto;
  align-content:center;
  align-items:center;
  gap:3px 12px;
  padding:14px;
  border:1px solid var(--a17-rule);
  border-radius:0;
  background:var(--a17-surface);
  color:var(--a17-ink);
  box-shadow:var(--a17-shadow-panel);
  opacity:1;
  text-align:left;
  cursor:pointer;
  transition:border-color .14s ease,background-color .14s ease;
}

.object:hover{
  border-color:#7b877f;
  background:#ecece6;
  transform:none;
  filter:none;
}

.object > span:not(.object-art){
  min-width:0;
  align-self:end;
  overflow:hidden;
  color:#28332d;
  font-size:13px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.object small{
  min-width:0;
  align-self:start;
  overflow:hidden;
  color:#5d6760;
  font-size:12px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.desk-scene .object-art{
  position:relative;
  grid-column:1;
  grid-row:1 / span 2;
  width:42px;
  height:50px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #9da59f;
  border-radius:0;
  background:#e3e5df;
  color:#4e5c54;
  box-shadow:none;
  font-family:var(--a17-font-data);
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  transform:none;
}

.desk-scene .object-art::before{
  content:attr(data-mark) !important;
}

.desk-scene .object-art::after{
  display:none !important;
}

.object.assignment{
  border-left:3px solid var(--a17-authority);
}

.object.owl-mail{
  border-left:3px solid #5b6e73;
}

.object.employee-id,
.object.magical-records{
  border-left:3px solid #62786a;
}

.cabinet.locked{
  opacity:.58;
}

.cabinet.unlocked{
  border-color:#86978c;
  box-shadow:var(--a17-shadow-panel);
}

.office-terminal{
  margin-top:16px;
}

/* =========================================================
   REGISTER LISTS, CARDS AND ANALYSIS
========================================================= */

.portal-grid,
.network-grid,
.government-constitution,
.government-summary,
.candidate-grid,
.sovereign-controls,
.operations-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:12px;
  margin:22px 0;
}

.portal-card,
.government-office,
.candidate-card,
.government-decree,
.operations-metric{
  min-width:0;
  padding:17px;
  border:1px solid var(--a17-rule);
  background:var(--a17-surface-bright);
  color:var(--a17-ink);
  box-shadow:none;
}

.portal-card{
  min-height:132px;
}

.portal-card h3,
.government-office h3,
.candidate-card h3,
.government-decree h3,
.sovereign-console h3,
.operations-metric h3{
  margin-top:0;
  color:#2b3730;
  font-size:16px;
  letter-spacing:0;
}

.portal-card p,
.portal-card small,
.government-office small,
.operations-metric p,
.operations-metric strong{
  color:#566159;
  line-height:1.6;
}

.case-list{
  display:grid;
  gap:8px;
  margin:22px 0;
  border-top:1px solid var(--a17-rule);
}

.case-entry{
  width:100%;
  min-width:0;
  min-height:76px;
  display:grid;
  grid-template-columns:minmax(120px,.72fr) minmax(220px,2fr) minmax(120px,.7fr);
  align-items:center;
  gap:10px 16px;
  padding:12px 15px;
  border:0;
  border-bottom:1px solid var(--a17-rule);
  border-radius:0;
  background:var(--a17-surface-bright);
  color:var(--a17-ink);
  box-shadow:none;
  text-align:left;
  cursor:pointer;
}

.case-entry b{
  color:#36473e;
  font-family:var(--a17-font-data);
  font-size:12px;
  letter-spacing:.02em;
}

.case-entry span{
  color:#26312b;
  font-size:14px;
  font-weight:650;
}

.case-entry small{
  color:#66716a;
  font-size:12px;
}

.case-entry.available:hover{
  border-color:var(--a17-rule);
  background:#e9eae4;
}

.case-entry.locked{
  opacity:.55;
  background:#e5e6e1;
}

.analysis-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:22px 0;
}

.analysis-record{
  min-width:0;
  display:grid;
  align-content:start;
  gap:8px;
  padding:17px;
  border:1px solid var(--a17-rule);
  background:var(--a17-surface-bright);
}

.analysis-record h3{
  margin:0 0 5px;
  color:#2c3831;
  letter-spacing:0;
}

.analysis-fact{
  min-height:68px;
  display:grid;
  gap:4px;
  padding:11px 13px;
  border:1px solid #c3c8c1;
  border-radius:0;
  background:#eeeee8;
  color:#303a34;
  box-shadow:none;
  text-align:left;
  cursor:pointer;
}

.analysis-fact b{
  color:#4e5c54;
  font-size:12px;
  letter-spacing:.02em;
}

.analysis-fact.selected,
.analysis-fact:hover{
  border-color:#687d70;
  background:#e0e7e1;
  box-shadow:inset 3px 0 #617b6b;
}

.operations-metric{
  display:grid;
  gap:10px;
}

.operations-metric h3,
.operations-metric p{
  margin:0;
}

.operations-metric meter{
  width:100%;
  min-height:18px;
  accent-color:#536f5e;
}

/* =========================================================
   OFFICIAL DOCUMENTS AND PERSONNEL IDENTIFICATION
========================================================= */

.ministry-document{
  max-width:100%;
  margin:22px 0;
  padding:clamp(20px,3vw,30px);
  border:1px solid #b9ae95;
  background:var(--a17-document);
  color:#2c2e29;
  box-shadow:0 2px 6px rgba(39,37,30,.12);
}

.doc-seal{
  margin-bottom:17px;
  padding-bottom:10px;
  border-bottom:2px solid #82453f;
  color:#713b37;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-align:left;
}

.doc-header h2{
  margin:0;
  color:#292c27;
  font-family:var(--a17-font-document);
  font-size:clamp(22px,3vw,29px);
  font-weight:700;
  text-align:left;
}

.doc-header p{
  margin:5px 0 0;
  color:#686454;
  text-align:left;
}

.doc-meta{
  margin:17px 0;
  padding:10px 0;
  border-top:1px solid #aaa28d;
  border-bottom:1px solid #aaa28d;
}

.doc-meta p{
  display:grid;
  grid-template-columns:minmax(130px,180px) minmax(0,1fr);
  gap:12px;
  margin:5px 0;
  color:#373932;
}

.doc-body{
  padding:17px;
  border:1px solid #cbc2ad;
  background:#f2ecdd;
  color:#2b2e29;
  font-family:var(--a17-font-document);
  font-size:14px;
  line-height:1.78;
  white-space:pre-wrap;
}

.doc-footer{
  margin-top:17px;
  color:#686454;
  font-family:var(--a17-font-data);
  font-size:12px;
  letter-spacing:.04em;
  text-align:left;
}

.id-card{
  max-width:760px;
  margin:26px auto;
  overflow:hidden;
  border:1px solid #8f9991;
  background:var(--a17-surface-bright);
  box-shadow:var(--a17-shadow-panel);
}

.id-header{
  padding:12px 15px;
  border-bottom:1px solid rgba(225,231,224,.16);
  background:var(--a17-chrome-800);
  color:#e0e5df;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  text-align:left;
}

.id-body{
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  gap:22px;
  align-items:stretch;
  padding:22px;
}

.id-photo{
  width:150px;
  min-height:188px;
  display:grid;
  place-items:center;
  padding:14px;
  border:1px solid #aeb5af;
  background:#e1e4df;
  color:#59655e;
  font-family:var(--a17-font-data);
  font-size:12px;
  line-height:1.6;
  letter-spacing:.04em;
  text-align:center;
}

.id-info{
  min-width:0;
}

.id-info p{
  min-height:39px;
  display:grid;
  grid-template-columns:140px minmax(0,1fr);
  align-items:center;
  gap:12px;
  margin:0;
  padding:8px 0;
  border-bottom:1px solid #d4d7d1;
}

.id-info b{
  color:#5b665f;
  font-size:12px;
}

.id-info span{
  color:#28332d;
  font-weight:650;
}

.id-footer{
  padding:11px 14px;
  border-top:1px solid var(--a17-rule);
  background:#ecece6;
  color:#5d6760;
  font-family:var(--a17-font-data);
  font-size:12px;
  letter-spacing:.04em;
  text-align:left;
}

/* =========================================================
   DIALOGUE AND LEGACY OFFICE WORKSPACES
========================================================= */

.dialogue-layout{
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  gap:18px;
  align-items:stretch;
}

.npc-portrait{
  padding:16px;
  border:1px solid var(--a17-rule);
  background:#e8e9e4;
  color:var(--a17-ink);
  text-align:left;
}

.portrait-frame{
  height:235px;
  display:grid;
  place-items:center;
  border:1px solid #aeb5af;
  background:#dfe2dd;
  box-shadow:none;
}

.portrait-frame span{
  color:#56645c;
  font-family:var(--a17-font-document);
  font-size:56px;
  letter-spacing:.02em;
}

.npc-portrait h2{
  margin:14px 0 4px;
  color:#27332c;
}

.npc-portrait p{
  margin-bottom:0;
  color:#5d6861;
}

.dialogue-box{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.dialogue-box h1{
  text-align:left;
}

.npc-dialogue{
  border-left:3px solid #7a6c45;
}

.npc-dialogue p{
  font-size:16px;
}

#dialogueBtn:disabled{
  opacity:.48;
}

.office-screen{
  min-height:0;
}

.office-header{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:22px;
  padding-bottom:18px;
  border-bottom:1px solid var(--a17-rule-strong);
}

.office-header h1,
.office-header h2{
  text-align:left;
}

.office-room{
  min-height:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:10px;
  padding:0;
  overflow:visible;
  border:0;
  background:transparent;
}

.office-room::before{
  display:none;
}

.desk-item{
  position:relative;
  inset:auto;
  z-index:auto;
  width:100%;
  min-height:96px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:4px;
  padding:14px;
  border:1px solid var(--a17-rule);
  background:var(--a17-surface-bright);
  color:var(--a17-ink);
  box-shadow:var(--a17-shadow-panel);
  text-align:left;
}

.desk-item:hover{
  border-color:#7d8981;
  background:#ecece6;
  transform:none;
  filter:none;
}

.desk-item span{
  color:#2e3a33;
  font-weight:650;
}

.desk-item small{
  color:#616c65;
}

/* =========================================================
   NETWORK, GOVERNMENT AND CONTROLLED ACTIONS
========================================================= */

.network-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:8px;
  margin-top:20px;
}

.network-actions .btn{
  margin:0;
}

.network-message{
  margin:17px 0;
  padding:13px 15px;
  border:1px solid var(--a17-rule);
  background:#e7e9e4;
  color:#39443d;
  line-height:1.55;
  text-align:left;
}

.network-message.success{
  border-color:#829a8c;
  background:var(--a17-success-soft);
  color:#31523f;
}

.network-message.error{
  border-color:#ad7b76;
  background:var(--a17-restricted-soft);
  color:#662e2a;
}

.record-safety{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
  margin:24px 0 8px;
  padding:17px;
  border:1px solid var(--a17-rule);
  background:#e9eae5;
}

.record-safety > div{
  min-width:0;
  padding:3px 7px;
}

.record-safety h3{
  margin:0 0 7px;
  color:#2f3b34;
  letter-spacing:0;
}

.record-safety p{
  margin:5px 0;
  line-height:1.55;
}

.record-safety-links{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:10px;
}

.privacy-link{
  color:#3d594b;
  font-weight:650;
  letter-spacing:0;
}

.privacy-link:hover{
  color:#20382c;
}

.deletion-message{
  min-height:24px;
  margin-top:12px;
  color:#713b37;
}

.government-panel{
  padding:clamp(24px,3vw,38px);
}

.government-office{
  position:relative;
  min-height:200px;
  overflow:hidden;
}

.government-office::after{
  display:none;
}

.sovereign-office{
  border-color:#a69870;
  background:#f0ecdf;
}

.minister-office{
  border-color:#8fa097;
}

.government-kicker{
  color:#5f6b63;
  font-family:var(--a17-font-data);
  font-size:12px;
  font-weight:650;
  letter-spacing:.05em;
}

.government-election,
.government-decrees,
.sovereign-console{
  margin:28px 0;
  padding:20px;
  border:1px solid var(--a17-rule);
  background:#ecece6;
}

.government-election-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  padding-bottom:15px;
  border-bottom:1px solid var(--a17-rule);
}

.government-election-heading h2,
.government-decrees h2,
.sovereign-console h2{
  margin:4px 0;
  color:#29352e;
  text-align:left;
}

.election-dates{
  display:grid;
  gap:6px;
  color:#5d6861;
  font-size:13px;
}

.candidate-card.selected{
  border-color:#6c8777;
  box-shadow:inset 3px 0 #587362;
}

.candidate-votes{
  color:#3d604c;
  font-family:var(--a17-font-data);
}

.ballot-secrecy{
  padding:11px 14px;
  border-left:3px solid #5d7968;
  background:#e2e9e3;
  color:#345241;
}

.sovereign-console{
  border-color:#aa9b70;
  background:#efecdf;
}

.sovereign-controls .portal-card{
  min-height:auto;
}

.sovereign-controls .btn{
  width:100%;
}

.government-privacy{
  border-left:4px solid #657d70;
}

/* =========================================================
   PRIVACY, OFFLINE AND SUPPORTING PAGES
========================================================= */

.privacy-section{
  padding:19px 0;
  border-top:1px solid var(--a17-rule);
  color:#3d4741;
  line-height:1.7;
}

.privacy-section h2{
  margin:0 0 10px;
  color:#2b3630;
  font-size:20px;
  font-weight:650;
  text-align:left;
}

.privacy-section ul{
  margin:9px 0;
  padding-left:24px;
}

.noscript-notice{
  position:fixed;
  z-index:100;
  inset:auto 12px max(12px,env(safe-area-inset-bottom));
  margin:0;
  padding:13px;
  border:1px solid #9f5f5f;
  background:#f1e2df;
  color:#582925;
  text-align:center;
}

#offlineNotice{
  min-height:100svh;
  display:grid;
  place-items:center;
  padding:clamp(18px,4vw,42px);
  background:var(--a17-canvas);
}

.offline-panel{
  width:min(760px,100%);
}

.offline-panel .btn,
.privacy-panel .btn{
  text-decoration:none;
}

/* =========================================================
   RESPONSIVE SHELL
========================================================= */

@media(max-width:1180px){
  .command-bar{
    grid-template-columns:minmax(200px,1fr) auto auto;
  }

  .breadcrumb{
    display:none;
  }

  .release-badge{
    display:none;
  }

  .classification-bar{
    grid-template-columns:minmax(270px,1fr) auto;
  }

  .classification-bar > div:nth-child(2){
    grid-column:1 / -1;
    grid-row:2;
    justify-content:flex-start;
  }

  .alpha17-release{
    grid-column:2;
    grid-row:1;
  }

  .desk-scene{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:930px){
  .portal-shell{
    display:block;
  }

  .network-rail{
    position:relative;
    width:100%;
    height:auto;
    min-height:0;
    display:grid;
    grid-template-columns:minmax(210px,.8fr) minmax(0,1.5fr);
    overflow:visible;
    border-right:0;
    border-bottom:1px solid #000;
  }

  .ministry-brand{
    min-height:76px;
  }

  .employee-access{
    display:none;
  }

  .primary-navigation{
    grid-template-columns:repeat(4,minmax(0,1fr));
    align-items:stretch;
    padding:10px;
  }

  .primary-navigation > p,
  .nav-item small,
  .nav-item::before{
    display:none;
  }

  .nav-item{
    min-height:54px;
    grid-template-columns:18px minmax(0,1fr);
    gap:7px;
    padding:7px 8px;
  }

  .nav-item strong{
    font-size:12px;
  }

  .service-navigation{
    grid-column:1 / -1;
    display:flex;
    gap:4px;
    overflow-x:auto;
    margin-top:0;
    padding:7px 10px;
    border-top:1px solid var(--a17-rule-dark);
    scrollbar-width:thin;
  }

  .service-navigation > p{
    display:none;
  }

  .service-navigation button{
    width:auto;
    min-width:158px;
    flex:0 0 auto;
    border:1px solid var(--a17-rule-dark);
  }

  .rail-footer{
    display:none;
  }

  .workspace{
    min-height:calc(100svh - 76px);
  }

  .command-bar{
    grid-template-columns:minmax(220px,1fr) auto auto;
  }

  .life-briefing-grid{
    grid-template-columns:1fr;
  }

  .life-briefing-task{
    min-height:0;
  }
}

@media(max-width:760px){
  .network-rail{
    grid-template-columns:1fr;
  }

  .ministry-brand{
    min-height:68px;
    padding:11px 14px;
  }

  .ministry-mark{
    width:38px;
    height:38px;
  }

  .primary-navigation{
    overflow-x:auto;
    grid-template-columns:repeat(4,minmax(124px,1fr));
    padding:7px 8px 9px;
    border-top:1px solid var(--a17-rule-dark);
    scrollbar-width:thin;
  }

  .command-bar{
    position:relative;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    padding:9px 12px;
  }

  .global-search{
    grid-column:1;
  }

  .command-utilities{
    grid-column:2;
  }

  .app-utility{
    grid-column:1 / -1;
    justify-content:space-between;
    padding-top:8px;
    border-top:1px solid var(--a17-rule-dark);
  }

  .locale-control{
    flex:1;
  }

  .locale-select{
    width:100%;
  }

  .london-time{
    min-width:112px;
    padding-right:0;
    border-right:0;
  }

  .profile-control{
    display:none;
  }

  .classification-bar{
    min-height:58px;
    display:flex;
    flex-wrap:wrap;
    gap:5px 12px;
    padding:7px 12px;
  }

  .classification-bar > div:nth-child(2){
    width:100%;
    justify-content:flex-start;
  }

  .alpha17-release{
    margin-left:auto;
  }

  .workspace-footer{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
    padding:8px 14px;
  }

  .office-topbar{
    align-items:flex-start;
    flex-direction:column;
    gap:14px;
  }

  .office-status{
    width:100%;
    max-width:none;
    text-align:left;
  }

  .shared-world-heading,
  .life-briefing-heading,
  .government-election-heading,
  .office-header{
    flex-direction:column;
  }

  .desk-scene,
  .analysis-grid{
    grid-template-columns:1fr;
  }

  .service-directory-heading{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }

  .service-directory-heading > p{
    max-width:none;
    text-align:left;
  }

  .case-entry{
    grid-template-columns:minmax(100px,.6fr) minmax(0,1.4fr);
  }

  .case-entry small{
    grid-column:1 / -1;
  }

  .dialogue-layout{
    grid-template-columns:1fr;
  }

  .portrait-frame{
    height:180px;
  }
}

@media(max-width:600px){
  body{
    font-size:14px;
  }

  html[data-employee-session="locked"] .primary-navigation,
  html[data-employee-session="locked"] .service-navigation,
  html[data-employee-session="locked"] .global-search,
  html[data-employee-session="locked"] .classification-bar{
    display:none;
  }

  .ministry-brand p,
  .ministry-brand small{
    display:none;
  }

  .service-navigation button{
    min-width:150px;
  }

  .command-bar{
    grid-template-columns:1fr;
  }

  .global-search,
  .command-utilities,
  .app-utility{
    grid-column:1;
  }

  .command-utilities{
    justify-content:space-between;
  }

  .london-time{
    min-width:0;
    text-align:left;
  }

  .london-time span{
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .app-utility{
    align-items:stretch;
    flex-wrap:wrap;
  }

  .locale-control{
    min-width:160px;
  }

  .utility-button{
    flex:1;
  }

  .network-status{
    top:auto;
    right:max(10px,env(safe-area-inset-right));
    bottom:max(10px,env(safe-area-inset-bottom));
    left:max(10px,env(safe-area-inset-left));
    width:auto;
  }

  body > .app-utility{
    right:max(10px,env(safe-area-inset-right));
    bottom:max(10px,env(safe-area-inset-bottom));
    left:max(10px,env(safe-area-inset-left));
    align-items:stretch;
  }

  body > .app-utility .utility-button,
  body > .app-utility .release-badge{
    width:100%;
    text-align:center;
  }

  .classification-bar > div:first-child strong,
  .alpha17-release{
    display:none;
  }

  #app{
    padding:
      max(16px,env(safe-area-inset-top))
      max(12px,env(safe-area-inset-right))
      max(28px,env(safe-area-inset-bottom))
      max(12px,env(safe-area-inset-left));
  }

  .panel,
  .dashboard-panel,
  .dialogue-panel,
  .office-screen,
  .office-scene,
  .government-panel{
    width:100%;
    min-width:0;
    padding:20px 15px;
  }

  h1{
    font-size:clamp(25px,8vw,32px);
  }

  h2{
    font-size:clamp(17px,5vw,21px);
  }

  .notice,
  .shared-world-status,
  .life-briefing{
    padding:15px;
  }

  .center .btn,
  .center > .privacy-link,
  .network-actions .btn{
    width:100%;
    margin-right:0;
    margin-left:0;
  }

  .network-actions{
    align-items:stretch;
    flex-direction:column;
  }

  .portal-grid,
  .network-grid,
  .government-constitution,
  .government-summary,
  .candidate-grid,
  .sovereign-controls,
  .operations-metrics,
  .record-safety{
    grid-template-columns:1fr;
  }

  .case-entry{
    grid-template-columns:1fr;
    gap:4px;
  }

  .case-entry small{
    grid-column:1;
  }

  .doc-meta p,
  .id-info p{
    grid-template-columns:1fr;
    gap:3px;
  }

  .id-body{
    grid-template-columns:1fr;
  }

  .id-photo{
    width:100%;
    min-height:130px;
  }

  .ministry-document{
    padding:19px 15px;
  }

  .doc-body{
    padding:14px;
  }

  .record-safety-links{
    align-items:stretch;
  }

  .record-safety-links .btn{
    width:100%;
  }
}

/* =========================================================
   ACCESSIBILITY MODES
========================================================= */

@media(prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    scroll-behavior:auto !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}

@media(forced-colors:active){
  .network-rail,
  .command-bar,
  .classification-bar,
  .panel,
  .office-screen,
  .office-scene,
  .notice,
  .terminal,
  .btn,
  .choice,
  .desk-item,
  .object,
  .portal-card,
  .case-entry,
  .ministry-document,
  .field,
  .locale-select,
  .utility-button{
    border:1px solid CanvasText;
  }

  .nav-item.is-current,
  .service-navigation button.is-current,
  .rail-footer button.is-current,
  .analysis-fact.selected,
  .candidate-card.selected{
    outline:2px solid Highlight;
    outline-offset:-2px;
  }

  .verified-state::before,
  .network-node > i{
    background:CanvasText;
  }
}
