/* Farside AI customer download portal. Brand values: DESIGN.md "Branding";
   visual reference: docs/portal-mock.html. System fonts only. */

:root {
  --fs-ink: rgba(0, 0, 0, 0.678);
  --fs-ink-muted: rgba(0, 0, 0, 0.51);
  --fs-ink-faint: rgba(0, 0, 0, 0.278);
  --fs-line: rgba(0, 0, 0, 0.11);
  --fs-navy: #14345f;
  --fs-navy-dark: #0d2442;
  --fs-link: #0786bc;
  --fs-error: #a1262b;
  --fs-gradient: linear-gradient(135deg, rgba(0, 85, 250, 0.8) -70%, rgba(0, 255, 224, 0.722) 130%);
  --fs-radius-card: 0.625rem;
  --fs-radius-btn: 0.5rem;
  --fs-font: "Trebuchet MS", sans-serif;
  --fs-mono: "Lucida Console", "Courier New", monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--fs-font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fs-ink);
  background-color: #c7c7c7;
  background-image:
    linear-gradient(270deg, rgba(255, 255, 255, 0.859) 57%, rgba(255, 255, 255, 0.141) 100%),
    url("assets/farside-background.svg");
  background-size: auto, cover;
  background-position: center, left bottom;
  background-repeat: no-repeat;
}

a {
  color: var(--fs-link);
}

:focus-visible {
  outline: 3px solid var(--fs-link);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header band */

.top {
  background: var(--fs-gradient), #000;
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.top :focus-visible {
  outline-color: #fff;
}

.wordmark {
  display: block;
  height: 40px;
  width: auto;
}

.spacer {
  flex: 1 1 auto;
}

.lang {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.341);
  border-radius: var(--fs-radius-btn);
  padding: 0 4px;
}

.lang-btn {
  font: inherit;
  color: rgba(255, 255, 255, 0.8);
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  color: #fff;
  font-weight: 700;
}

/* Privacy pages: the language switch is a link, the current language plain text. */
a.lang-btn {
  text-decoration: none;
}

.lang-btn[aria-current="page"] {
  color: #fff;
  font-weight: 700;
}

.wordmark-link {
  display: block;
  border-radius: 4px;
}

.lang-sep {
  color: rgba(255, 255, 255, 0.6);
}

.user {
  font-size: 13px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}

.user-email {
  overflow-wrap: anywhere;
}

.link-btn {
  font: inherit;
  color: var(--fs-link);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

.top .link-btn {
  color: #fff;
}

/* Body */

.body {
  flex: 1 0 auto;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 8px;
}

.body:focus {
  outline: none;
}

.h1 {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin: 0 0 22px;
}

.demo-banner {
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px dashed var(--fs-navy);
  border-radius: var(--fs-radius-btn);
  color: var(--fs-navy);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.status {
  margin: 0 0 18px;
  color: var(--fs-ink-muted);
}

.card {
  background: #fff;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-radius-card);
  padding: 20px;
  margin-bottom: 18px;
}

.card-title {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 0;
}

.card-text {
  margin: 10px 0 0;
}

.landing {
  max-width: 520px;
  margin: 24px auto 18px;
  text-align: center;
  padding: 32px 24px;
}

.landing-mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
}

.landing .row {
  justify-content: center;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
}

.mt-6 {
  margin-top: 6px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-14 {
  margin-top: 14px;
}

.meta {
  color: var(--fs-ink-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.notes {
  margin: 10px 0 0;
  font-size: 14px;
}

.badge {
  font-size: 12px;
  border: 1px solid var(--fs-line);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--fs-ink-muted);
}

.badge-staged {
  border-color: var(--fs-navy);
  color: var(--fs-navy);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 6px 22px;
  border-radius: var(--fs-radius-btn);
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  background: var(--fs-navy);
  color: #fff;
  border: 1px solid var(--fs-navy);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: scale(1.025);
  background: var(--fs-navy-dark);
}

.btn-outline {
  background: transparent;
  color: var(--fs-navy);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(20, 52, 95, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--fs-ink);
  border-color: var(--fs-line);
  min-height: 34px;
  padding: 4px 14px;
  font-size: 13px;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(144, 144, 144, 0.12);
}

.btn:disabled,
.link-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn:hover:not(:disabled) {
    transform: none;
  }
}

/* Hash and check line */

.hash {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-radius-btn);
  background: rgba(144, 144, 144, 0.08);
}

.hash-label {
  font-size: 12px;
  color: var(--fs-ink-muted);
  margin-bottom: 4px;
}

.grow {
  flex: 1 1 auto;
  min-width: 0;
}

.mono {
  font-family: var(--fs-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.check {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--fs-ink-muted);
}

.inline-msg {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--fs-ink-muted);
}

.inline-msg:empty {
  display: none;
}

.inline-msg.is-error {
  color: var(--fs-error);
}

/* Earlier versions */

.older {
  margin-top: 16px;
  border-top: 1px solid var(--fs-line);
  padding-top: 12px;
}

.older-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--fs-ink-muted);
  margin: 0 0 6px;
}

.older-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.older-item {
  padding: 7px 0;
  font-size: 14px;
}

.older-item + .older-item {
  border-top: 1px solid var(--fs-line);
}

.older-ver {
  min-width: 64px;
}

.older-hash {
  margin: 6px 0 0;
}

/* Footer */

/* Privacy pages */

.legal {
  padding: 24px 28px;
}

.legal h2 {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: var(--fs-navy);
  margin: 26px 0 8px;
}

.legal h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--fs-navy);
  margin: 18px 0 6px;
}

.legal p,
.legal ul {
  margin: 0 0 10px;
}

.legal ul {
  padding-left: 22px;
}

.legal .meta {
  margin-top: -12px;
}

.foot {
  padding: 6px 24px 22px;
  font-size: 13px;
  color: var(--fs-ink-faint);
  text-align: center;
}

.foot a {
  color: inherit;
}

@media (max-width: 480px) {
  .top {
    padding: 14px 16px;
  }

  .wordmark {
    height: 32px;
  }

  .user {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
    text-align: left;
  }

  .body {
    padding: 20px 16px 8px;
  }

  .card {
    padding: 16px;
  }

  .h1 {
    font-size: 26px;
  }

  .btn {
    width: 100%;
  }

  .btn-ghost {
    width: auto;
  }

  .foot {
    padding: 6px 16px 20px;
  }

  .legal {
    padding: 16px;
  }
}

/* Print (the privacy pages in particular): keep the header band so the white
   "AI" of the wordmark stays legible, drop the page background and controls. */
@media print {
  body {
    display: block;
    min-height: 0;
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .top {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .lang,
  .user,
  .demo-banner {
    display: none !important;
  }

  .body {
    max-width: none;
    padding: 12pt 0 0;
  }

  .card,
  .legal {
    border: 0;
    padding: 0;
  }

  .legal h2,
  .legal h3 {
    break-after: avoid;
  }

  .legal p,
  .legal li {
    orphans: 3;
    widows: 3;
  }

  .foot {
    color: #000;
    padding: 12pt 0 0;
  }
}
