/* FourKites Trust Center — public portal
   8020 design system: Navy #010b1b ground, Dark Blue #0156f8 accent.
   Fonts: Supreme (headings) / Switzer (body) / DM Mono (eyebrow) when available,
   graceful fallback to Inter / system + DM Mono (Google). */

:root {
  --navy:        #010b1b;   /* primary dark ground */
  --navy-2:      #061426;   /* raised dark surface */
  --navy-3:      #0d1e33;   /* card border on dark */
  --blue:        #0156f8;   /* Dark Blue accent */
  --blue-hover:  #0146cc;
  --green:       #28c15d;   /* UI-accent green (granted) */
  --amber:       #f59e0b;   /* pending */
  --red:         #e5484d;   /* security-team path */
  --red-soft:    rgba(229,72,77,.12);
  --blue-soft:   rgba(1,86,248,.10);
  --green-soft:  rgba(40,193,93,.12);

  --paper:       #ffffff;   /* light content ground */
  --surface:     #f5f7fb;   /* light subtle surface */
  --border:      #e2e8f0;
  --ink:         #010b1b;   /* body text on light */
  --ink-soft:    #55617a;   /* secondary text */
  --ink-faint:   #8a93a8;

  --radius:      0px;
  --radius-lg:   0px;
  --maxw:        1120px;
  --shadow:      0 1px 2px rgba(1,11,27,.04), 0 8px 24px rgba(1,11,27,.06);

  --font-head: "Supreme", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Switzer", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { margin:0; padding:0; box-sizing:border-box; }

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

body {
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--surface);
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
}

.container { max-width:var(--maxw); margin:0 auto; padding:0 24px; }

a { color:var(--blue); }

.skip-link {
  position:absolute; left:-9999px; top:0; z-index:2000;
  background:var(--blue); color:#fff; padding:10px 16px; border-radius:0 0 var(--radius) 0;
  font-weight:600; text-decoration:none;
}
.skip-link:focus { left:0; }

:focus-visible { outline:3px solid var(--blue); outline-offset:2px; border-radius:0; }

/* ---------- HEADER ---------- */
.site-header { background:var(--navy); color:#fff; position:sticky; top:0; z-index:500; border-bottom:1px solid rgba(255,255,255,.08); }
.header-inner { display:flex; align-items:center; justify-content:space-between; height:64px; }
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; color:#fff; }
.brand-mark { width:34px; height:34px; border-radius:var(--radius); background:var(--blue); display:flex; align-items:center; justify-content:center; color:#fff; }
.brand-mark svg { width:18px; height:18px; }
.brand-text strong { font-family:var(--font-head); font-size:15px; font-weight:700; display:block; letter-spacing:-.01em; }
.brand-text small { font-family:var(--font-mono); font-size:11px; color:rgba(255,255,255,.55); letter-spacing:.02em; }
.site-nav { display:flex; gap:4px; }
.site-nav a { font-size:14px; font-weight:500; color:rgba(255,255,255,.72); text-decoration:none; padding:8px 14px; border-radius:var(--radius); transition:color .15s, background .15s; }
.site-nav a:hover { color:#fff; background:rgba(255,255,255,.08); }
@media (max-width:640px){ .site-nav{ display:none; } }

/* ---------- HERO ---------- */
.hero { background:var(--navy); color:#fff; padding:56px 0 60px; }
.eyebrow { font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.16em; font-size:12px; color:var(--blue); margin-bottom:16px; }
.hero h1 { font-family:var(--font-head); font-size:clamp(28px,4vw,42px); font-weight:700; line-height:1.1; letter-spacing:-.02em; margin-bottom:16px; }
.hero-lede { font-size:16px; color:rgba(255,255,255,.68); max-width:620px; line-height:1.65; }
.hero-grid { display:grid; grid-template-columns:1.5fr 1fr; gap:40px; align-items:start; }
@media (max-width:820px){ .hero-grid { grid-template-columns:1fr; gap:28px; } }
.hero-search { position:relative; margin-top:22px; max-width:480px; }
.hero-search svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:rgba(255,255,255,.5); pointer-events:none; }
.hero-search input { width:100%; box-sizing:border-box; padding:12px 14px 12px 40px; border-radius:var(--radius); border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); color:#fff; font-family:var(--font-body); font-size:14px; }
.hero-search input::placeholder { color:rgba(255,255,255,.5); }
.hero-search input:focus { outline:none; border-color:var(--blue); background:rgba(255,255,255,.1); }
.hero-certs { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.cert-badge { display:flex; flex-direction:column; gap:2px; padding:14px 16px; border:1px solid rgba(255,255,255,.14); border-radius:var(--radius); background:rgba(255,255,255,.04); }
.cert-badge .cert-name { font-family:var(--font-head); font-weight:700; font-size:15px; color:#fff; }
.cert-badge .cert-sub { font-size:11.5px; color:rgba(255,255,255,.6); }
.cert-wide { grid-column:1 / -1; }

/* ---------- TRUSTED BY STRIP ---------- */
.trusted { background:var(--navy); border-top:1px solid rgba(255,255,255,.08); padding:26px 0; }
.trusted-inner { display:flex; align-items:center; gap:36px; }
.trusted-eyebrow {
  flex:0 0 auto; max-width:180px;
  font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.14em;
  font-size:11px; line-height:1.5; color:rgba(255,255,255,.55);
}
.trusted-logos {
  flex:1 1 auto; list-style:none; display:flex; align-items:center; gap:44px;
  flex-wrap:wrap; justify-content:space-between;
}
.trusted-logos li { display:flex; align-items:center; }
.trusted-logos img {
  height:30px; width:auto; max-width:130px;
  /* whiten any source logo, then dim to a uniform light tint */
  filter:brightness(0) invert(1);
  opacity:.75;
  transition:opacity .15s;
}
.trusted-logos img:hover { opacity:1; }
@media (max-width:820px){
  .trusted-inner { flex-direction:column; align-items:flex-start; gap:18px; }
  .trusted-eyebrow { max-width:none; }
  /* horizontal scroll on narrow screens */
  .trusted-logos { flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; gap:32px; width:100%; padding-bottom:6px; -webkit-overflow-scrolling:touch; }
  .trusted-logos li { flex:0 0 auto; }
}

/* ---------- MAIN ---------- */
.main { padding:44px 0 72px; }

.legend { display:flex; gap:22px; flex-wrap:wrap; margin-bottom:22px; }
.legend-item { display:inline-flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-soft); }
.dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.dot-nda { background:var(--blue); }
.dot-approval { background:var(--red); }
.dot-public { background:var(--green); }

.section-heading { font-family:var(--font-head); font-size:22px; font-weight:700; letter-spacing:-.01em; margin-bottom:20px; }

/* config-driven document sections */
.sections { display:grid; gap:20px; }
.sections-loading { color:var(--ink-faint); font-size:14px; padding:20px 0; }

.doc-section { background:none; border:none; border-radius:0; padding:0; box-shadow:none; }
.doc-section + .doc-section { margin-top:14px; padding-top:16px; border-top:1px solid var(--border); }
.tc-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; }
@media (max-width:900px){ .tc-grid { grid-template-columns:1fr; } }
.tc-col { display:flex; flex-direction:column; gap:20px; }
.panel-head-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.panel-head-row .panel-heading { margin-bottom:0; }
.panel-count { font-family:var(--font-mono); font-size:11.5px; color:var(--green); font-weight:500; white-space:nowrap; }
.doc-rows { display:flex; flex-direction:column; }
/* Security controls accordion */
.controls-list { display:flex; flex-direction:column; gap:8px; }
.ctrl { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.ctrl-head { width:100%; display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--paper); border:none; cursor:pointer; font-family:var(--font-body); text-align:left; }
.ctrl-head:hover { background:var(--surface); }
.ctrl-check { width:18px; height:18px; color:var(--green); flex-shrink:0; }
.ctrl-name { flex:1; font-size:14px; font-weight:600; color:var(--ink); }
.ctrl-count { font-family:var(--font-mono); font-size:12px; color:var(--ink-faint); }
.ctrl-chevron { width:16px; height:16px; color:var(--ink-faint); transition:transform .18s ease; flex-shrink:0; }
.ctrl.open .ctrl-chevron { transform:rotate(90deg); }
.ctrl-items { list-style:none; margin:0; max-height:0; overflow:hidden; transition:max-height .22s ease; padding:0 14px 0 44px; }
.ctrl.open .ctrl-items { max-height:420px; padding-top:2px; padding-bottom:12px; }
.ctrl-items li { font-size:13px; color:var(--ink-soft); padding:6px 0; border-top:1px solid var(--border); }
.ctrl-items li:first-child { border-top:none; }
.doc-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.doc-section-head h3 { font-family:var(--font-head); font-size:16px; font-weight:700; }
.gate-tag { font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.04em; padding:4px 10px; border-radius:0; text-transform:uppercase; white-space:nowrap; }
.gate-nda { background:var(--blue-soft); color:var(--blue); }
.gate-approval { background:var(--red-soft); color:var(--red); }
.doc-section-desc { font-size:13px; color:var(--ink-soft); margin-bottom:14px; }

.doc-row { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.doc-row:last-child { margin-bottom:0; }
.doc-row .doc-icon { width:16px; height:16px; color:var(--ink-soft); flex-shrink:0; }
.doc-row .doc-name { flex:1; min-width:0; font-size:14px; font-weight:500; }
.doc-action { font-size:12.5px; font-weight:600; padding:7px 15px; border-radius:0; border:none; cursor:pointer; font-family:inherit; white-space:nowrap; transition:background .15s, color .15s; }
.doc-action.nda { color:#fff; background:var(--blue); }
.doc-action.nda:hover { background:var(--blue-hover); }
/* Approval button styled the same as Request access (Theresa v3): blue, for
   visual consistency. The gate tag still distinguishes the flow. */
.doc-action.approval { color:#fff; background:var(--blue); }
.doc-action.approval:hover { background:var(--blue-hover); }
.gate-public { background:var(--green-soft); color:var(--green); }
.doc-action.view { color:var(--green); background:var(--green-soft); text-decoration:none; display:inline-block; }
.doc-action.view:hover { background:rgba(40,193,93,.2); }
/* Grouped documents (name-only rows) + one request button per gate */
.doc-group { margin-bottom:18px; }
.doc-group-label { font-family:var(--font-head); font-size:15px; font-weight:700; letter-spacing:-.005em; color:var(--ink); margin:0 0 10px; }
.doc-section[data-gate] .doc-action { display:inline-flex; align-items:center; padding:10px 20px; border-radius:var(--radius); margin-top:4px; }

/* two-column lower panels */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:24px; }
@media (max-width:760px){ .two-col{ grid-template-columns:1fr; } }
.panel { background:var(--paper); border:1px solid var(--border); border-radius:var(--radius-lg); padding:22px 24px; box-shadow:var(--shadow); }
.panel-heading { font-family:var(--font-head); font-size:16px; font-weight:700; margin-bottom:8px; }
.panel-note { font-size:13px; color:var(--ink-soft); margin-bottom:14px; }

.subproc-logos { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
@media (max-width:520px){ .subproc-logos { grid-template-columns:1fr; } }
.subproc-tile { display:flex; align-items:center; gap:12px; padding:11px 13px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); min-width:0; }
.subproc-logo { width:40px; height:40px; border-radius:0; background:var(--paper); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; }
.subproc-logo img { width:24px; height:24px; object-fit:contain; }
.subproc-initials { display:none; align-items:center; justify-content:center; width:100%; height:100%; font-family:var(--font-mono); font-size:12px; font-weight:500; color:var(--ink-soft); }
.subproc-tile-meta { display:flex; flex-direction:column; min-width:0; }
.subproc-name { font-size:14px; font-weight:600; color:var(--ink); line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.subproc-desc { font-size:12px; color:var(--ink-soft); line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.subproc-full { display:inline-flex; align-items:center; gap:8px; margin-top:14px; padding:0; background:none; border:none; cursor:pointer; font-family:var(--font-body); font-size:13px; font-weight:600; color:var(--blue); }
.subproc-full:hover { color:var(--blue-hover); }
.subproc-full svg { width:13px; height:13px; }

.update-list { list-style:none; display:grid; gap:2px; margin-bottom:16px; }
.update-list li { display:flex; gap:14px; padding:10px 0; border-bottom:1px solid var(--border); font-size:13.5px; line-height:1.5; }
.update-list li:last-child { border-bottom:none; }
.update-date { flex:0 0 72px; color:var(--ink-faint); font-family:var(--font-mono); font-size:12px; padding-top:1px; }

.subscribe-label { display:block; font-size:13px; font-weight:600; margin-bottom:8px; }
.subscribe-row { display:flex; gap:8px; }
.subscribe-row input { flex:1; min-width:0; }
@media (max-width:420px){ .subscribe-row{ flex-direction:column; } }

/* ---------- FORM CONTROLS ---------- */
input[type="text"], input[type="email"], select {
  width:100%; padding:10px 13px; border-radius:var(--radius); border:1px solid var(--border);
  font-size:14px; font-family:inherit; color:var(--ink); background:var(--paper);
  transition:border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px var(--blue-soft); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color:var(--red); }
select { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2355617a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 13px center; padding-right:34px; }

.btn { font-family:inherit; font-size:14px; font-weight:600; padding:10px 20px; border-radius:var(--radius); border:1px solid transparent; cursor:pointer; transition:background .15s, opacity .15s, border-color .15s; }
.btn-accent { background:var(--blue); color:#fff; }
.btn-accent:hover { background:var(--blue-hover); }
.btn-accent:disabled { opacity:.4; cursor:not-allowed; }
.btn-ghost { background:var(--paper); color:var(--ink); border-color:var(--border); }
.btn-ghost:hover { background:var(--surface); }

.form-msg { font-size:13px; margin-top:8px; min-height:1em; }
.form-error { color:var(--red); }
.form-msg.ok { color:var(--green); }

/* ---------- MODAL ---------- */
.modal-overlay { position:fixed; inset:0; z-index:1000; background:rgba(1,11,27,.6); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-overlay[hidden] { display:none; }
.modal { background:var(--paper); border-radius:var(--radius-lg); width:540px; max-width:100%; max-height:92vh; overflow-y:auto; box-shadow:0 24px 64px rgba(1,11,27,.3); animation:modalIn .2s ease-out; }
@keyframes modalIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
.modal-header { display:flex; align-items:flex-start; justify-content:space-between; padding:24px 26px 0; }
.modal-title { font-family:var(--font-head); font-size:20px; font-weight:700; }
.modal-close { width:34px; height:34px; border-radius:var(--radius); border:1px solid var(--border); background:var(--paper); cursor:pointer; font-size:20px; line-height:1; color:var(--ink-soft); flex-shrink:0; }
.modal-close:hover { background:var(--surface); }
.modal-sub { padding:8px 26px 0; font-size:13px; color:var(--ink-soft); }
.modal-body { padding:18px 26px 8px; }

.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:440px){ .field-grid{ grid-template-columns:1fr; } }
.fg { margin-bottom:13px; }
.fg label { display:block; font-size:13px; font-weight:500; margin-bottom:5px; }

.res-sec { margin-top:6px; padding:14px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--border); }
.res-heading { font-size:13px; font-weight:700; margin-bottom:8px; }
.req-docs { display:grid; gap:6px; }
.req-doc { display:flex; align-items:center; gap:9px; font-size:13.5px; }
.req-doc input { width:15px; height:15px; accent-color:var(--blue); flex-shrink:0; }

.nda-sec { margin-top:16px; padding:14px; border-radius:var(--radius); background:var(--blue-soft); border:1px solid rgba(1,86,248,.18); }
.nda-heading { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:var(--blue); margin-bottom:9px; }
.nda-heading svg { width:14px; height:14px; }
.nda-scroll { max-height:150px; overflow-y:auto; padding:12px 14px; background:var(--paper); border:1px solid var(--border); border-radius:var(--radius); font-size:12px; color:var(--ink-soft); line-height:1.65; margin-bottom:11px; white-space:pre-wrap; }
.nda-scroll strong { color:var(--ink); }
.nda-accept { display:flex; align-items:flex-start; gap:9px; font-size:12.5px; cursor:pointer; line-height:1.5; }
.nda-accept input { width:16px; height:16px; margin-top:1px; accent-color:var(--blue); flex-shrink:0; }

.approval-note { margin-top:16px; padding:14px; border-radius:var(--radius); background:var(--red-soft); border:1px solid rgba(229,72,77,.2); display:flex; gap:10px; font-size:12.5px; color:var(--ink-soft); line-height:1.55; }
.approval-note[hidden] { display:none; }
.approval-note svg { width:18px; height:18px; color:var(--red); flex-shrink:0; margin-top:1px; }

.modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:16px 0 24px; }

/* ---------- RESULT STATE ---------- */
.result-state { text-align:center; padding:34px 30px 40px; }
.result-icon { width:56px; height:56px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; margin-bottom:16px; }
.result-icon svg { width:28px; height:28px; }
.result-icon.granted { background:var(--green-soft); color:var(--green); }
.result-icon.pending { background:rgba(245,158,11,.14); color:var(--amber); }
.result-icon.error { background:var(--red-soft); color:var(--red); }
#result-message { font-size:14px; color:var(--ink-soft); line-height:1.6; max-width:400px; margin:0 auto; }
.result-ref { font-family:var(--font-mono); font-size:12px; color:var(--ink-faint); margin-top:12px; }
.result-done { margin-top:22px; }

/* ---------- FOOTER ---------- */
.site-footer { background:var(--navy); color:rgba(255,255,255,.6); padding:28px 0; text-align:center; }
.site-footer a { color:rgba(255,255,255,.8); }
.site-footer p { font-size:12.5px; }
.footer-fine { margin-top:8px; color:rgba(255,255,255,.4); font-size:11.5px; }

/* ---------- Admin console ---------- */
.admin-who { font-size:12px; color:var(--ink-faint); font-family:var(--font-mono); }
.admin-card { background:var(--paper); border:1px solid var(--border); border-radius:var(--radius-lg); padding:18px 20px; box-shadow:var(--shadow); margin-bottom:16px; }
.admin-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; font-size:15px; }
.admin-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px 20px; margin-bottom:12px; }
@media (max-width:560px){ .admin-grid{ grid-template-columns:1fr; } }
.admin-cell { display:flex; flex-direction:column; gap:1px; min-width:0; }
.req-label { font-family:var(--font-mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); }
.admin-cell span:last-child { font-size:13px; color:var(--ink); word-break:break-word; }
.admin-docs { margin-bottom:12px; }
.admin-docs ul { list-style:none; margin:4px 0 0; padding:0; }
.admin-docs li { font-size:13px; color:var(--ink); padding:3px 0; }
.req-meta { font-size:12px; color:var(--ink-soft); margin-bottom:10px; }
.req-actions { display:flex; gap:10px; }
.req-actions .doc-action { padding:9px 18px; }

/* ---------- Embed mode (iframe under the corp Trust Center page) ----------
   Per Theresa (v3, 2026-09-15): auto-resize (grow to fit, no inner scrollbar);
   REMOVE the top nav; the anchor links become a "Browse:" row to the LEFT of the
   search. Also drop the hero band (title + certs) and the customer-logo strip.
   Our footer stays hidden; the corp page provides it. Transparent body blends
   into the host section. */
.embed body, html.embed body { background:transparent; }
.embed .site-header,
.embed .site-footer,
.embed .skip-link,
.embed .trusted { display:none !important; }

/* Top row: "Browse:" jump links (left) + search (right), in place of the hero. */
.embed .hero { background:transparent; color:var(--ink); padding:16px 0 4px; }
.embed .hero-certs,
.embed .hero .eyebrow,
.embed .hero h1,
.embed .hero-lede { display:none !important; }
.embed .hero-grid { display:block; }
.embed .hero-lead { display:flex; align-items:center; gap:28px; flex-wrap:wrap; }
.embed .hero-jump { display:flex; align-items:center; flex-wrap:wrap; gap:6px 16px; font-size:14px; flex:none; }
.embed .hero-jump-label { font-weight:700; color:var(--ink); white-space:nowrap; }
.embed .hero-jump a { color:var(--ink-soft); text-decoration:none; font-weight:500; white-space:nowrap; }
.embed .hero-jump a:hover { color:var(--blue); }
.embed .hero-search { flex:1 1 320px; max-width:none; margin:0; }
.embed .hero-search input { background:var(--paper); border-color:var(--border); color:var(--ink); }
.embed .hero-search input::placeholder { color:var(--ink-faint); }
.embed .hero-search svg { color:var(--ink-faint); }

.embed .main { padding-top:8px; }
.embed .container { max-width:1440px; }

/* "Browse:" jump links are embed-only; the standalone site uses the top nav. */
.hero-jump { display:none; }

/* Padding above the Updates box (Theresa v3). */
#updates { margin-top:28px; }

/* Privacy notice under the subscribe form (Theresa v3). */
.privacy-note { margin-top:14px; font-size:12px; line-height:1.55; color:var(--ink-faint); max-width:640px; }
.privacy-note a { color:var(--blue); }
