:root {
  --navy: #101D26;
  --paper: #F3F1EC;
  --rust: #B4532A;
  --ink: #1d2730;
  --muted: #5f6b73;
  --line: #ddd8cd;
  --white: #ffffff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.topbar {
  background: var(--navy);
  color: var(--white);
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}

.brand { color: var(--white); text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.brand-scalea { font-family: var(--serif); font-size: 22px; }
.brand-insight { font-size: 12px; letter-spacing: 0.22em; color: #c9cfd3; }

.topbar-right { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.customer-name { font-family: var(--serif); font-size: 16px; }

.lang { display: flex; border: 1px solid #3a4852; border-radius: 6px; overflow: hidden; }
.lang-btn {
  background: transparent; color: #c9cfd3; border: 0; padding: 4px 10px; font: inherit; cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: #2a3944; color: var(--white); }

.signout, .link-button {
  color: #c9cfd3; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; padding: 0;
}
.signout:hover, .link-button:hover { color: var(--white); text-decoration: underline; }

main { flex: 1 1 auto; display: flex; min-height: 0; }

.state { margin: auto; padding: 24px; text-align: center; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 460px;
  width: calc(100% - 32px);
  padding: 40px 36px;
  text-align: left;
}

h1 { font-family: var(--serif); font-weight: normal; font-size: 30px; margin: 0 0 6px; color: var(--navy); }
.tagline { color: var(--muted); margin-top: 0; margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin-top: 24px; }

.button {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  border-radius: 6px;
  padding: 10px 20px;
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  margin-top: 8px;
}
.button:hover { background: #1f3140; }
.button.secondary { background: var(--white); color: var(--navy); }
.button.secondary:hover { background: var(--paper); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

.customer-list { list-style: none; padding: 0; margin: 20px 0 0; }
.customer-list li + li { margin-top: 8px; }
.customer-list button {
  width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 16px; font: inherit; font-family: var(--serif); font-size: 17px; color: var(--navy); cursor: pointer;
}
.customer-list button:hover { border-color: var(--rust); }

.report-wrap { position: relative; flex: 1 1 auto; display: flex; }
.report-container { flex: 1 1 auto; border: 0; display: flex; }
.report-container > iframe { flex: 1 1 auto; }
.report-container iframe { border: 0; }
.report-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted);
  pointer-events: none;
}
.mock-report {
  margin: 24px; flex: 1; border: 2px dashed var(--line); border-radius: 10px; display: flex; align-items: center;
  justify-content: center; color: var(--muted); font-family: var(--serif); font-size: 20px; background: var(--white);
}

:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

@media (max-width: 640px) {
  .topbar { padding: 0 12px; }
  .topbar-right { gap: 10px; }
  .customer-name { display: none; }
}
