:root {
  --paper: #f2f6f7;
  --paper-raised: #ffffff;
  --ink: #10262d;
  --ink-soft: #49626a;
  --line: #c9d6da;
  --line-strong: #9eb2b8;
  --signal: #087b83;
  --signal-deep: #075c63;
  --signal-pale: #d8eef0;
  --current: #bd741f;
  --current-pale: #f7e9d8;
  --danger: #a33c38;
  --shadow: 0 20px 70px rgba(16, 38, 45, 0.09);
  --display: "Arial Narrow", "Aptos Display", "Segoe UI", sans-serif;
  --body: "Segoe UI", "Aptos", system-ui, sans-serif;
  --utility: "Cascadia Mono", "Consolas", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(8, 123, 131, 0.035) 1px, transparent 1px)
      0 0 / 34px 34px,
    linear-gradient(rgba(8, 123, 131, 0.035) 1px, transparent 1px)
      0 0 / 34px 34px,
    var(--paper);
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 0.35rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--current);
  outline-offset: 3px;
}

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 246, 247, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner,
#app,
.site-footer {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.portal-mark {
  display: flex;
  align-items: stretch;
  gap: 0.8rem;
}

.portal-mark__line {
  width: 5px;
  min-height: 40px;
  background: var(--signal);
}

.portal-mark strong,
.portal-mark small {
  display: block;
}

.portal-mark strong {
  font-family: var(--display);
  font-size: 1rem;
  font-stretch: condensed;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.portal-mark small {
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.logout-button,
.transaction-choice {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 0.35rem;
  background: var(--paper-raised);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease,
    transform 160ms ease;
}

.logout-button {
  padding: 0.6rem 1rem;
  font-size: 0.84rem;
  font-weight: 650;
}

.logout-button:hover,
.transaction-choice:hover {
  border-color: var(--signal);
  background: var(--signal-pale);
}

.logout-button:active,
.transaction-choice:active {
  transform: translateY(1px);
}

.logout-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

#app {
  min-height: calc(100vh - 174px);
  padding-block: clamp(2.25rem, 7vw, 5.5rem);
}

.state-panel {
  max-width: 680px;
  margin: min(10vh, 6rem) auto;
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px solid var(--line);
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.state-panel h1 {
  margin: 0.35rem 0 0.8rem;
  font-family: var(--display);
  font-size: clamp(2.3rem, 7vw, 4.4rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.state-panel p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.eyebrow {
  margin: 0;
  color: var(--signal-deep);
  font-family: var(--utility);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loading-mark {
  display: block;
  width: 46px;
  height: 6px;
  margin-bottom: 1.5rem;
  background: var(--signal);
  animation: loading-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes loading-pulse {
  from {
    width: 46px;
    opacity: 0.5;
  }
  to {
    width: 104px;
    opacity: 1;
  }
}

.dossier {
  position: relative;
}

.dossier::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background:
    linear-gradient(to bottom,
      var(--signal) 0 22%,
      var(--current) 22% 37%,
      var(--line) 37% 100%);
}

.dossier-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: end;
  padding: 0 0 2.5rem 2.2rem;
  border-bottom: 1px solid var(--line-strong);
}

.dossier-title {
  min-width: 0;
}

.dossier-title h1 {
  max-width: 850px;
  margin: 0.45rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 6.6rem);
  font-stretch: condensed;
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.9;
  overflow-wrap: anywhere;
}

.status-seal {
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  padding: 1.1rem;
  border: 1px solid var(--signal);
  border-radius: 50%;
  background: var(--signal-pale);
  color: var(--signal-deep);
  text-align: center;
}

.status-seal span {
  font-family: var(--utility);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-seal strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.93rem;
  line-height: 1.25;
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-left: 2.2rem;
  border-bottom: 1px solid var(--line);
}

.date-cell {
  padding: 1.1rem 0;
}

.date-cell + .date-cell {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}

.date-cell span,
.trust-cell span {
  display: block;
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.date-cell strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1rem;
}

.dossier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(2.5rem, 6vw, 5rem) 0 0 2.2rem;
}

.next-card {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--current);
  background: var(--current-pale);
}

.next-card::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 2rem;
  height: 2rem;
  background:
    linear-gradient(225deg, var(--paper) 0 48%, var(--current) 49% 52%,
      transparent 53%);
}

.next-card h2 {
  margin: 0.7rem 0 1.8rem;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.next-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(189, 116, 31, 0.42);
}

.next-meta span {
  display: block;
  color: #77501f;
  font-family: var(--utility);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-meta strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.92rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.4rem;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.section-heading span {
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline {
  margin: 3.5rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline-panel {
  margin-top: 2.75rem;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  min-height: 72px;
  padding-bottom: 1.2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  bottom: -0.2rem;
  left: 0.39rem;
  width: 1px;
  background: var(--line-strong);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 0.82rem;
  height: 0.82rem;
  margin-top: 0.22rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
}

.timeline-item[data-state="complete"] .timeline-dot {
  border-color: var(--signal);
  background: var(--signal);
}

.timeline-item[data-state="current"] .timeline-dot {
  border-color: var(--current);
  background: var(--current-pale);
  box-shadow: 0 0 0 4px var(--current-pale);
}

.timeline-copy strong,
.timeline-copy span {
  display: block;
}

.timeline-copy strong {
  font-size: 0.98rem;
}

.timeline-copy span,
.timeline-date {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.timeline-date {
  margin: 0;
  font-family: var(--utility);
  text-align: right;
}

.people-panel {
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

.person + .person {
  margin-top: 1.3rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}

.person strong,
.person span,
.person a {
  display: block;
}

.person strong {
  font-size: 1rem;
}

.person span {
  margin: 0.15rem 0 0.65rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.person a {
  width: fit-content;
  min-height: 44px;
  padding-block: 0.65rem;
  color: var(--signal-deep);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.trust-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr 2fr;
  margin-top: 0.5rem;
  border-block: 1px solid var(--line-strong);
}

.trust-cell {
  min-width: 0;
  padding: 1.1rem;
}

.trust-cell + .trust-cell {
  border-left: 1px solid var(--line);
}

.trust-cell strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.trust-live {
  color: var(--signal-deep);
}

.trust-stale {
  color: var(--current);
}

.transaction-picker {
  max-width: 760px;
  margin: 0 auto;
}

.transaction-picker h1 {
  margin: 0.4rem 0 0.8rem;
  font-family: var(--display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.transaction-picker > p:not(.eyebrow) {
  margin: 0 0 2rem;
  color: var(--ink-soft);
}

.transaction-list {
  display: grid;
  gap: 0.8rem;
}

.transaction-choice {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  text-align: left;
}

.transaction-choice strong,
.transaction-choice span {
  overflow-wrap: anywhere;
}

.transaction-choice span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.site-footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.76rem;
}

@media (max-width: 760px) {
  .dossier-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .status-seal {
    width: auto;
    aspect-ratio: auto;
    display: block;
    border-radius: 0;
    text-align: left;
  }

  .dossier-grid {
    grid-template-columns: 1fr;
  }

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

  .trust-cell:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .trust-cell:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .header-inner,
  #app,
  .site-footer {
    width: min(100% - 1.5rem, 1120px);
  }

  .header-inner {
    min-height: 72px;
  }

  .portal-mark small {
    display: none;
  }

  #app {
    min-height: calc(100vh - 154px);
    padding-block: 1.6rem 2.5rem;
  }

  .state-panel {
    margin: 1.5rem auto;
    padding: 1.5rem;
  }

  .dossier::before {
    width: 5px;
  }

  .dossier-header,
  .dossier-grid {
    padding-left: 1.25rem;
  }

  .dossier-header {
    padding-bottom: 1.7rem;
  }

  .dossier-title h1 {
    font-size: clamp(2.65rem, 14vw, 4.3rem);
  }

  .date-strip {
    margin-left: 1.25rem;
  }

  .date-cell + .date-cell {
    padding-left: 0.85rem;
  }

  .dossier-grid {
    gap: 2.5rem;
    padding-top: 2.2rem;
  }

  .next-meta,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .next-meta {
    gap: 1rem;
  }

  .trust-cell + .trust-cell,
  .trust-cell:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .timeline-item {
    grid-template-columns: 1rem minmax(0, 1fr);
  }

  .timeline-date {
    grid-column: 2;
    text-align: left;
  }

  .transaction-choice {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

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