/* Sovera investor portal. Colours are the brand tokens (sovera-branding-kit web/tokens/sovera-tokens.css).
   All text is set in Eurostile. Eurostile is a licensed commercial face and is not bundled: a viewer with it installed
   sees it; everyone else gets Exo 2 (bundled, SIL Open Font License, exo-2-OFL.txt), the brand kit's documented
   fallback. Add licensed Eurostile web fonts here (@font-face "Eurostile") to serve it to every viewer. */
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 400; font-display: swap; src: url("exo-2-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-style: italic; font-weight: 400; font-display: swap; src: url("exo-2-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 600; font-display: swap; src: url("exo-2-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 700; font-display: swap; src: url("exo-2-latin-700-normal.woff2") format("woff2"); }
:root {
  --sovera-background-navy: #08101e;
  --sovera-panel-navy: #0c1b2e;
  --sovera-deep-blue: #06172e;
  --sovera-white: #ffffff;
  --sovera-text-soft: #e6ecf2;
  --sovera-muted-slate: #7a8a9a;
  --sovera-accent-blue: #3fa9f5;
  --sovera-accent-blue-soft: #5bb4e8;
  --sovera-accent-amber: #f0b23c;
  --sovera-accent-gold: #f5a623;

  --rule: rgba(63, 169, 245, 0.22);
  --rule-soft: rgba(230, 236, 242, 0.08);
  --display: "Eurostile", "Eurostile LT Std", "Eurostile Next", "Exo 2", Arial, sans-serif;
  --body: var(--display);
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sovera-background-navy);
  color: var(--sovera-text-soft);
  font: 16px/1.6 var(--body);
}
body.no-scroll { overflow: hidden; }
a { color: var(--sovera-accent-blue-soft); }
a:hover { color: var(--sovera-white); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--sovera-accent-blue); outline-offset: 2px; }
.muted { color: var(--sovera-muted-slate); }

/* ---------- header and tabs ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 16, 30, 0.96);
  border-bottom: 1px solid var(--rule);
}
.top-inner {
  height: var(--header-h);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.brand img { height: 25px; width: auto; display: block; }
.brand span {
  font: 600 12px/1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sovera-muted-slate);
  padding-left: 14px;
  border-left: 1px solid var(--rule);
}
.tabs { display: flex; gap: 4px; height: 100%; }
.tabs a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--sovera-muted-slate);
  text-decoration: none;
  font: 600 14px/1 var(--display);
  letter-spacing: 0.04em;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs a:hover { color: var(--sovera-text-soft); }
.tabs a[aria-current="page"] { color: var(--sovera-white); border-bottom-color: var(--sovera-accent-blue); }
.who { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--sovera-muted-slate); white-space: nowrap; }
.who form { margin: 0; }
.link-button {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--sovera-text-soft);
  font: inherit;
  padding: 6px 12px;
  cursor: pointer;
}
.link-button:hover { border-color: var(--sovera-accent-blue); }

/* ---------- page ---------- */
.page { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.page[hidden], .viz[hidden] { display: none; }
h1, h2, h3 { font-family: var(--display); color: var(--sovera-white); line-height: 1.2; }
h1 { font-size: clamp(26px, 3.2vw, 36px); margin: 0 0 8px; padding-bottom: 14px; position: relative; }
h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 2px; background: var(--sovera-accent-amber); }
.page-title { margin-bottom: 8px; }
.label {
  font: 600 12px/1.2 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sovera-accent-blue);
  margin: 0 0 12px;
}
.label.amber { color: var(--sovera-accent-amber); }
.meta { color: var(--sovera-muted-slate); font-size: 14px; margin: 12px 0 24px; }
.pill {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid var(--sovera-accent-amber);
  border-radius: 999px;
  color: var(--sovera-accent-amber);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.back { text-decoration: none; font-size: 14px; }
.empty { padding: 48px 0; }
.empty h2 { font-size: 22px; margin: 0 0 8px; }
.empty p { color: var(--sovera-muted-slate); margin: 0; }

/* ---------- prose (rendered Markdown) ---------- */
.prose { max-width: none; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose h4, .prose h5 { font-size: 15px; margin: 24px 0 6px; color: var(--sovera-text-soft); }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--sovera-white); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }
.prose blockquote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 2px solid var(--sovera-accent-amber); color: var(--sovera-white); }
.prose code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sovera-panel-navy); padding: 1px 5px; border-radius: 4px; }
.prose figure { margin: 24px 0; }
.prose figure img, .prose p img { border-radius: 10px; border: 1px solid var(--rule-soft); }
.prose figcaption { font-size: 13px; color: var(--sovera-muted-slate); margin-top: 8px; }
.prose.small { font-size: 14px; color: var(--sovera-text-soft); }
.prose.small p { margin-bottom: 10px; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--rule); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule-soft); }
th { font-family: var(--display); font-weight: 600; color: var(--sovera-white); background: var(--sovera-panel-navy); }
td.num, th.num { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- quarterly ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.split.single { grid-template-columns: minmax(0, 1fr); }
.archive { position: sticky; top: calc(var(--header-h) + 32px); border-left: 1px solid var(--rule); padding-left: 24px; }
.archive ol { list-style: none; margin: 0; padding: 0; }
.archive li a { display: block; padding: 10px 0; text-decoration: none; border-bottom: 1px solid var(--rule-soft); }
.archive .a-title { display: block; color: var(--sovera-text-soft); font-weight: 600; font-size: 14px; }
.archive .a-date { display: block; color: var(--sovera-muted-slate); font-size: 12px; }
.archive li.current .a-title { color: var(--sovera-accent-blue); }
.files { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.files a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-decoration: none;
  color: var(--sovera-text-soft);
  background: var(--sovera-panel-navy);
  font-size: 14px;
  max-width: 100%;
}
.files a:hover { border-color: var(--sovera-accent-blue); }
.ftype { font: 700 10px/1 var(--display); letter-spacing: 0.08em; color: var(--sovera-accent-amber); border: 1px solid currentColor; border-radius: 4px; padding: 4px 5px; }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsize { color: var(--sovera-muted-slate); font-size: 12px; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0 0 32px; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--sovera-panel-navy); }
.stat { padding: 16px 12px; text-align: center; border-left: 1px solid var(--rule); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 700 24px/1.2 var(--display); color: var(--sovera-white); font-variant-numeric: tabular-nums; }
.stat.hi b { color: var(--sovera-accent-amber); }
.stat span { display: block; margin-top: 4px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sovera-muted-slate); }
.prose blockquote p:last-child em { font-style: normal; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sovera-muted-slate); }

/* ---------- team ---------- */
.team-intro { margin-bottom: 48px; }
.lede { font-size: 18px; line-height: 1.55; color: var(--sovera-white); margin: 20px 0 12px; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.pillar { padding: 18px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--sovera-panel-navy); }
.pillar ul { margin: 0; padding-left: 18px; font-size: 14px; }
.pillar li { margin-bottom: 6px; }
.tagline {
  margin: 28px 0 0;
  padding: 16px 20px;
  border-left: 2px solid var(--sovera-accent-amber);
  background: var(--sovera-deep-blue);
  color: var(--sovera-white);
  font: 600 17px/1.45 var(--display);
}
.members { margin: 0 0 28px; color: var(--sovera-accent-amber); }
.group { margin-bottom: 56px; }
.group-head { padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.group-head h2 { margin: 0; font-size: 22px; }
.group-head p { margin: 4px 0 0; color: var(--sovera-muted-slate); font-size: 14px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 20px; }
.person {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--sovera-panel-navy);
  align-content: start;
}
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; background: var(--sovera-deep-blue); }
.avatar.mono {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  color: var(--sovera-accent-blue);
  font: 600 28px/1 var(--display);
  letter-spacing: 0.04em;
}
.person h3 { margin: 0; font-size: 19px; }
.role { margin: 3px 0 2px; color: var(--sovera-accent-amber); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.previously { margin: 0 0 12px; color: var(--sovera-muted-slate); font-size: 13px; font-style: italic; }
.ext { font-size: 13px; }
.team-closing { margin-top: 24px; }
.section-title { font-size: clamp(22px, 2.6vw, 28px); margin: 0; padding-bottom: 12px; position: relative; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 2px; background: var(--sovera-accent-amber); }
.prose.wide { max-width: none; }
.team-closing td:first-child { font-weight: 600; color: var(--sovera-white); }

/* ---------- pictures: justified gallery ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--sovera-text-soft);
  text-decoration: none;
  font-size: 13px;
}
.chips a span { color: var(--sovera-muted-slate); font-size: 12px; }
.chips a:hover { border-color: var(--sovera-accent-blue); }
.chips a[aria-current="true"] { border-color: var(--sovera-accent-blue); color: var(--sovera-white); background: var(--sovera-deep-blue); }
.gallery { --row: 240px; display: flex; flex-wrap: wrap; gap: 8px; }
.gallery::after { content: ""; flex-grow: 1000000; } /* the last row keeps its natural size instead of stretching */
.tile {
  --r: 1.5;
  position: relative;
  display: block;
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * var(--row));
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--sovera-deep-blue);
}
.tile img { display: block; width: 100%; aspect-ratio: var(--r); object-fit: cover; transition: opacity 0.15s; }
.tile:hover img { opacity: 0.85; }
.tile:focus-visible { outline-offset: 0; }
.tile-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--sovera-white);
  background: rgba(8, 16, 30, 0.82);
  opacity: 0;
  transition: opacity 0.15s;
}
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; }
@media (hover: none) { .tile-cap { display: none; } }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 8, 16, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1400px, 100%); display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lightbox img { max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { margin-top: 12px; font-size: 14px; color: var(--sovera-text-soft); text-align: center; }
.lightbox button {
  background: none;
  border: 1px solid var(--rule);
  color: var(--sovera-white);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.lightbox button:hover { border-color: var(--sovera-accent-blue); }
.lb-close { position: absolute; top: 16px; right: 16px; }

/* ---------- editors: add and delete photos ---------- */
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
button.primary {
  font: 600 14px/1 var(--display);
  letter-spacing: 0.04em;
  color: var(--sovera-background-navy);
  background: var(--sovera-accent-blue);
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
}
button.primary:hover { background: var(--sovera-accent-blue-soft); }
button:disabled { opacity: 0.5; cursor: wait; }
.addphotos {
  width: min(520px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--sovera-panel-navy);
  color: var(--sovera-text-soft);
}
.addphotos::backdrop { background: rgba(4, 8, 16, 0.8); }
.addphotos h2 { margin: 0 0 18px; font-size: 20px; }
.addphotos form { display: grid; gap: 14px; }
.addphotos label { display: grid; gap: 6px; font-size: 13px; }
.addphotos input, .addphotos select {
  font: inherit;
  font-size: 15px;
  color: var(--sovera-white);
  background: var(--sovera-background-navy);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 9px 11px;
}
.ap-new { display: grid; gap: 14px; }
.ap-new[hidden] { display: none; }
.ap-msg { margin: 0; min-height: 1.4em; font-size: 13px; color: var(--sovera-accent-amber); }
.ap-actions { display: flex; justify-content: flex-end; gap: 10px; }
.lightbox .lb-delete {
  position: absolute;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  border-radius: 8px;
  padding: 9px 14px;
  font: 600 13px/1 var(--display);
  color: var(--sovera-white);
  border-color: rgba(240, 178, 60, 0.6);
}
.lightbox .lb-delete:hover { border-color: var(--sovera-accent-amber); }
.lightbox .lb-delete[hidden] { display: none; }

/* ---------- visualizer ---------- */
.viz { flex: 1; display: flex; }
.viz iframe { flex: 1; width: 100%; min-height: calc(100vh - var(--header-h) - 44px); border: 0; display: block; background: var(--sovera-background-navy); }
body[data-tab="visualizer"] .foot { padding-top: 10px; padding-bottom: 10px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  padding: 16px max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter)));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--sovera-muted-slate);
}
.conf-mark { color: var(--sovera-accent-amber); letter-spacing: 0.14em; text-transform: uppercase; font: 600 11px/1.4 var(--display); }

/* ---------- login ---------- */
.login-page { align-items: center; justify-content: center; padding: 24px 16px; }
.login {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--sovera-panel-navy);
}
.login-logo { display: block; height: auto; margin-bottom: 28px; }
.login h1 { font-size: 24px; margin-bottom: 24px; }
.login-lede { color: var(--sovera-muted-slate); font-size: 14px; margin: 16px 0 20px; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 6px; font-size: 13px; color: var(--sovera-text-soft); }
.login-form input {
  font: inherit;
  color: var(--sovera-white);
  background: var(--sovera-background-navy);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
}
.login-form input:focus { border-color: var(--sovera-accent-blue); outline: none; }
.login-form button {
  margin-top: 6px;
  font: 600 15px/1 var(--display);
  letter-spacing: 0.04em;
  color: var(--sovera-background-navy);
  background: var(--sovera-accent-blue);
  border: 0;
  border-radius: 8px;
  padding: 13px;
  cursor: pointer;
}
.login-form button:hover { background: var(--sovera-accent-blue-soft); }
.login-error { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--sovera-accent-amber); border-radius: 8px; color: var(--sovera-white); font-size: 14px; }
.login-help { font-size: 12px; color: var(--sovera-muted-slate); margin: 20px 0 16px; }
.login .conf-mark { margin: 24px 0 0; }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .top-inner { height: auto; flex-wrap: wrap; gap: 0 16px; padding-top: 10px; }
  .brand span { display: none; }
  .tabs { order: 3; width: 100%; height: 44px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - 14px); width: calc(100% + 2 * var(--gutter)); }
  .tabs::-webkit-scrollbar { display: none; }
  .who span { display: none; }
  .tabs a { padding: 0 12px; font-size: 13px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .archive { position: static; border-left: 0; border-top: 1px solid var(--rule); padding: 20px 0 0; }
  .page { padding-top: 28px; }
  .viz iframe { min-height: calc(100vh - 140px); }
}
@media (max-width: 600px) {
  /* Phones: a square-tile grid, three across; the viewer shows each photo whole. */
  .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin: 0 calc(-1 * var(--gutter)); }
  .gallery::after { content: none; }
  .tile { border-radius: 0; }
  .tile img { aspect-ratio: 1; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 420px) {
  .person { grid-template-columns: 64px minmax(0, 1fr); padding: 16px; gap: 14px; }
  .avatar { width: 64px; height: 64px; }
  .avatar.mono { font-size: 20px; }
  .login { padding: 28px 20px; }
  .lightbox { padding: 12px 4px; gap: 4px; }
  .lightbox button { width: 36px; height: 36px; font-size: 22px; }
}
