/* Compact shell for the private portal; the portal owns its content and access. */
:root {
  color-scheme: light;
  --navy: #092b38;
  --navy-deep: #061e29;
  --gold: #d2ae6c;
  --paper: #f7f5f0;
  --ink: #163541;
  --muted: #586b72;
  --line: #dddcd6;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; }
body {
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.6 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.portal-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 280px;
}
.portal-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 10px 24px;
  background: var(--navy);
  color: var(--paper);
  border-bottom: 1px solid #d2ae6c55;
}
.portal-brand { display: inline-flex; align-items: center; }
.portal-brand img { display: block; width: 84px; height: 50px; object-fit: contain; }
.portal-heading { min-width: 0; padding-left: 20px; border-left: 1px solid #ffffff30; }
.portal-heading h1 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.portal-heading p { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: #e5c487; }
.portal-actions { display: flex; align-items: center; gap: 22px; }
.portal-home { font-size: 14px; text-underline-offset: 5px; }
.portal-home:hover { color: var(--gold); }
.portal-login, .portal-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--gold);
  border-radius: 3px;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.portal-login:hover { background: #e5c487; border-color: #e5c487; }
.portal-main { display: grid; position: relative; min-width: 0; min-height: 0; overflow: auto; }
.portal-main:focus { outline: none; }
.portal-wait { width: min(560px, calc(100% - 40px)); margin: auto; padding: 40px 0; text-align: center; }
.portal-emblem {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border: 1px solid #a17b3755;
  border-radius: 50%;
  color: #8e682d;
}
.portal-emblem svg { width: 34px; height: 34px; }
.portal-eyebrow { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.portal-wait h2 { margin: 0 0 18px; font: 400 clamp(32px, 5vw, 44px)/1.15 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; }
.portal-intro { margin: 0 auto 24px; max-width: 410px; }
.portal-status { margin: 0 auto 12px; font-size: 14px; font-weight: 600; }
.portal-status::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 9px 1px 0; border-radius: 50%; background: #8e682d; }
.portal-help { margin: 0 auto; max-width: 400px; font-size: 14px; color: var(--muted); }
.portal-recovery { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.portal-recovery :focus-visible { outline-color: var(--navy); }
.portal-retry { margin: 0; border-color: var(--navy); background: transparent; color: var(--navy); }
.portal-retry:hover { background: var(--navy); color: var(--paper); }
.portal-no-js { padding: 16px; margin: 24px auto 0; border: 1px solid var(--line); font-size: 14px; }
.portal-frame { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; background: #fff; }
.portal-shell[data-portal-state='ready'] .portal-main { overflow: hidden; }
.portal-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portal-skip { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 12px 18px; background: var(--paper); color: var(--navy); transform: translateY(-180%); }
.portal-skip:focus { transform: translateY(0); }

@media (max-width: 680px) {
  .portal-header { grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; padding: 10px 16px 12px; }
  .portal-brand img { width: 64px; height: 38px; }
  .portal-heading { padding-left: 14px; }
  .portal-heading h1 { font-size: 16px; }
  .portal-heading p { font-size: 14px; }
  .portal-actions { grid-column: 1 / -1; justify-content: space-between; gap: 16px; }
  .portal-login { padding: 10px 16px; }
  .portal-home { min-height: 44px; display: inline-flex; align-items: center; }
  .portal-wait { width: calc(100% - 36px); padding: 28px 0; }
  .portal-emblem { width: 52px; height: 52px; margin-bottom: 18px; }
  .portal-intro { font-size: 16px; }
}
