/* FarAway shared visual system. Behavior belongs to the existing role modules. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/v1/access-manrope.woff2') format('woff2');
}
:root {
  --fa-primary: #062347;
  --fa-primary-hover: #123b68;
  --fa-accent: #28cfe5;
  --fa-link: #127fa9;
  --fa-surface: #fff;
  --fa-background: #f5f7fb;
  --fa-text: #142f50;
  --fa-muted: #63758a;
  --fa-line: #dbe3ed;
  --fa-font: 'Manrope', sans-serif;
  --fa-radius: 14px;
  --fa-radius-small: 8px;
  --fa-shadow: 0 10px 28px rgba(6,35,71,.08);
  --fa-space-1: 4px;
  --fa-space-2: 8px;
  --fa-space-3: 12px;
  --fa-space-4: 16px;
  --fa-space-6: 24px;
  --fa-space-8: 32px;
  --fa-duration: 180ms;
  --fa-ease: ease;
  --fa-confirmed-bg: #eef6fc;
  --fa-confirmed: #185e98;
  --fa-waiting-bg: #edf0f4;
  --fa-waiting: #59687b;
  --fa-pending-bg: #fff5d6;
  --fa-pending: #886516;
  --fa-brand-width: clamp(280px, 34vw, 520px);
  /* Compatibility aliases keep all existing components on one palette. */
  --navy: var(--fa-primary);
  --navy-deep: var(--fa-primary);
  --teal: var(--fa-link);
  --teal-dark: var(--fa-primary-hover);
  --aqua: #e7f6fb;
  --paper: var(--fa-background);
  --surface: var(--fa-surface);
  --ink: var(--fa-text);
  --muted: var(--fa-muted);
  --line: var(--fa-line);
  --warn-bg: var(--fa-pending-bg);
  --warn-line: #dec471;
  --shadow: var(--fa-shadow);
  font-family: var(--fa-font);
}
html, body { background: var(--fa-background); color: var(--fa-text); }
.v1-shell {
  display: grid;
  grid-template-columns: var(--fa-brand-width) minmax(0,1fr);
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
  font-family: var(--fa-font);
}
.fa-brand-panel {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  height: 100dvh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(24px,3.4vw,52px);
  color: #fff;
  background: linear-gradient(120deg,rgba(6,35,71,.96) 6%,rgba(6,35,71,.80) 45%,rgba(6,35,71,.18) 100%),
    url('/v1/brand-travel-window.webp') center 48% / cover no-repeat,
    var(--fa-primary);
}
.fa-brand-panel::after {
  content: '';
  position: absolute;
  left: 12%;
  right: -12%;
  bottom: 17%;
  height: 20%;
  border-bottom: 1px dashed rgba(40,207,229,.65);
  border-radius: 0 0 70% 50%;
  transform: rotate(-15deg);
  pointer-events: none;
}
.v1-shell .v1-header {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--fa-space-4);
  padding: 0;
  background: transparent;
}
.v1-brand img { width: clamp(154px,16vw,230px); max-height: none; height: auto; }
.v1-brand-copy { display: none; }
.v1-header-meta { color: #e2f1fa; }
.v1-status { font-size: .7rem; color: #e2f1fa; }
.v1-status::before { background: var(--fa-accent); }
.fa-brand-copy { position: relative; z-index: 1; margin-top: clamp(40px,7vh,80px); }
.fa-brand-copy h1 {
  margin: 0;
  font: 800 clamp(24px,2.35vw,36px)/1.15 var(--fa-font);
  letter-spacing: -.025em;
  color: #fff;
}
.fa-brand-copy h1 span { color: var(--fa-accent); }
.fa-brand-services {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  align-items: start;
  gap: var(--fa-space-2);
  margin: auto -16px 60px;
}
.fa-brand-services > div { display: grid; justify-items: center; gap: var(--fa-space-3); text-align: center; }
.fa-brand-services svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fa-brand-services span { font-size: clamp(9px,.75vw,12px); line-height: 1.45; color: #f3f8fe; }
.fa-brand-motto { position: relative; z-index: 1; margin: 0; color: #c7dbe9; font-size: 10px; letter-spacing: .26em; line-height: 1.8; }
.fa-brand-motto::after { content: ''; display: block; width: 48px; height: 2px; margin-top: 12px; background: var(--fa-accent); }
.fa-brand-route { position: absolute; z-index: 1; inset: 0 0 auto; display: block; width: 100%; height: auto; aspect-ratio: 52 / 19; pointer-events: none; }
.fa-brand-route path { fill: none; stroke: var(--fa-accent); stroke-width: 1; stroke-dasharray: 3 6; opacity: .65; }
.fa-brand-route .fa-route-plane { fill: var(--fa-accent); stroke: none; opacity: 1; }
.v1-shell > main.v1-main {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: calc(100% - 48px);
  max-width: none;
  margin: var(--fa-space-6);
  padding: clamp(20px,2.2vw,34px);
  align-self: start;
  display: block;
  border-radius: var(--fa-radius);
  background: var(--fa-surface);
  box-shadow: var(--fa-shadow);
}
.v1-shell > main.v1-main::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 180px;
  height: 92px;
  opacity: .3;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 92'%3E%3Cpath d='M-15-12C62 2 130 15 186 98' fill='none' stroke='%2328cfe5' stroke-width='1.2' stroke-dasharray='3 6'/%3E%3Cpath transform='translate(117 29) rotate(130)' d='M0-10 2-3 9 2v2L2 1v6l3 3v2L0 10-3 12v-2l1-3V1l-7 3V2l7-5Z' fill='%23127fa9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.v1-shell > .v1-footer {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  padding: 0 24px 20px;
  color: var(--fa-muted);
  font-size: 11px;
}
body.v1-access-active .v1-shell { display: grid; grid-template-columns: var(--fa-brand-width) minmax(0,1fr); width: 100%; max-width: 1360px; margin-inline: auto; }
body.v1-access-active .v1-shell > main.v1-main {
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  align-self: stretch;
}
body.v1-access-active .v1-shell .v1-header { display: flex; }
body.v1-access-active .v1-shell > .v1-footer { display: none; }
.v1-shell :is(h1,h2,h3,h4,h5,h6,button,input,select,textarea,label) { font-family: var(--fa-font); }
.v1-shell :where(p,span,small,strong,em,div,section,article,nav,header,footer,a,aside,ul,li,td,th) { font-family: var(--fa-font); }
.v1-shell :is(button,a,input,select,textarea) {
  transition: background-color var(--fa-duration) var(--fa-ease),color var(--fa-duration) var(--fa-ease),
    border-color var(--fa-duration) var(--fa-ease),box-shadow var(--fa-duration) var(--fa-ease);
}
.v1-shell :is(button,a,input,select,textarea):focus-visible { outline: 3px solid var(--fa-primary-hover); outline-offset: 3px; }
.v1-shell button:disabled { cursor: not-allowed; }
.v1-shell input:not([type="checkbox"],[type="radio"],[type="file"],[type="range"],[type="hidden"],[type="color"],[type="submit"],[type="button"]) {
  --fa-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363758a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 3 5 5-12 12-6 1 1-6Z'/%3E%3Cpath d='m14 5 5 5'/%3E%3C/svg%3E");
  min-height: 46px;
  min-width: 0;
  padding-left: 42px;
  border-radius: var(--fa-radius-small);
  background-color: var(--fa-surface);
  background-image: var(--fa-input-icon);
  background-size: 18px 18px;
  background-position: 13px center;
  background-repeat: no-repeat;
  color: var(--fa-text);
}
.v1-shell input[type="email"] { --fa-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363758a' stroke-width='1.7'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 6 9 7 9-7'/%3E%3C/svg%3E") !important; }
.v1-shell input[type="password"] { --fa-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363758a' stroke-width='1.7'%3E%3Crect x='5' y='10' width='14' height='11' rx='2'/%3E%3Cpath d='M8 10V6a4 4 0 0 1 8 0v4M12 14v3'/%3E%3C/svg%3E") !important; }
.v1-shell input:is([type="date"],[type="datetime-local"],[type="time"]) { --fa-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363758a' stroke-width='1.7'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 2v6M17 2v6M3 10h18'/%3E%3C/svg%3E") !important; }
.v1-shell input[type="search"] { --fa-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363758a' stroke-width='1.7'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E") !important; }
.v1-shell input[type="tel"] { --fa-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363758a' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M4 3h4l2 5-3 2a15 15 0 0 0 7 7l2-3 5 2v4C12 24 0 12 4 3Z'/%3E%3C/svg%3E") !important; }
.v1-shell #fa-emergency-form input { padding-left: 42px; }
.v1-shell :is(.v1-input-wrap,.v1-password-wrap) input { background-image: none; }
.v1-shell .v1-access-screen input:focus-visible { outline: none; box-shadow: none; }
.v1-access-keyboard-focus .v1-shell .v1-access-screen input:focus-visible { outline: 3px solid var(--fa-primary-hover); outline-offset: 3px; }
.v1-shell .v1-card { border-radius: var(--fa-radius); box-shadow: var(--fa-shadow); }
@media (min-width: 901px) {
  body.v1-access-active .v1-shell:has(.v1-login-screen) { --fa-brand-width: 55.5%; }
  .v1-shell:has(.agency-app) { --fa-brand-width: max(220px,21.5%); }
  .v1-shell:has(.agency-app) .fa-brand-panel { padding: clamp(20px,2.2vw,34px); }
  .v1-shell:has(.agency-app) .v1-brand img { max-width: 100%; }
  .v1-shell:has(.agency-app) .fa-brand-services { margin-inline: calc(-1 * clamp(20px,2.2vw,34px)); }
}
@media (max-width: 900px) {
  .v1-shell, body.v1-access-active .v1-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr auto; }
  .fa-brand-panel {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    height: auto;
    min-height: 76px;
    padding: 16px 20px;
    background: var(--fa-primary);
  }
  .v1-shell .v1-header { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .v1-brand img { width: 148px; height: 44px; object-fit: contain; }
  .v1-header-meta { font-size: 11px; }
  .fa-brand-copy,.fa-brand-services,.fa-brand-motto,.fa-brand-route,.fa-brand-panel::after { display: none; }
  .v1-shell > main.v1-main {
    grid-column: 1;
    grid-row: 2;
    width: calc(100% - 24px);
    margin: 12px;
    padding: 16px;
    min-height: 0;
  }
  .v1-shell > main.v1-main::after { display: none; }
  body.v1-access-active .v1-shell > main.v1-main { grid-column: 1; grid-row: 2; min-height: calc(100dvh - 76px); }
  .v1-shell > .v1-footer { grid-column: 1; grid-row: 3; flex-wrap: wrap; gap: 8px; padding: 8px 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .v1-shell *, .v1-shell *::before, .v1-shell *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Partner-only app canvas reset: the agency gets its own sidebar and content shell. */
.v1-shell:has(.agency-app) {
  display: block;
  min-height: 100dvh;
  background: #f5f6fa;
}
.v1-shell:has(.agency-app) .fa-brand-panel,
.v1-shell:has(.agency-app) > .v1-footer { display: none !important; }
.v1-shell:has(.agency-app) > main.v1-main {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: #f5f6fa;
  box-shadow: none;
}
.v1-shell:has(.agency-app) > main.v1-main::after { display: none; }

/* Same greeting/date hierarchy, without changing module controls or backgrounds. */
.partner-layout-preview .partner-greeting h1.fa-banner-greeting,
.fa-field .ff-hero h1.fa-banner-greeting,
.hub-page .hub-header h1.fa-banner-greeting,
.fa-v2 .fa-hero h1.fa-banner-greeting {
  margin: 0;
  color: #fff;
  font: 700 clamp(1.5rem, 4vw, 2rem)/1.2 'Manrope', sans-serif;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.partner-layout-preview .partner-greeting .partner-header-date.fa-banner-date,
.fa-field .ff-hero p.fa-banner-date,
.hub-page .hub-header p.fa-banner-date,
.fa-v2 .fa-hero p.fa-banner-date {
  margin: 8px 0 0;
  color: #d1e2e4;
  font: 400 .875rem/1.5 'DM Sans', sans-serif;
  text-transform: none;
  overflow-wrap: anywhere;
}
.fa-banner-name-missing { display: block; margin-top: 4px; font-size: .875rem; }
.fa-banner-date + :is(.ff-kicker, .fa-eyebrow) { margin-top: 14px; }
.fa-v2 .fa-hero .fa-hero-trip-title { margin: 12px 0 0; color: #fff; font: 700 1.25rem/1.3 'Manrope', sans-serif; }
.fa-v2 .fa-hero .fa-trip-welcome { color: #d1e2e4; }
.fa-v2 .fa-hero .fa-countdown strong { font-size: 1.25rem; }