/* Chartered Advisory — read-only document viewer.
   Loaded only by /forms/*. Nothing here touches the public site stylesheet. */

:root {
  --green: #0C7C8C;
  --green-d: #062A31;
  --wa: #1f8a4c;
  --ink: #16232a;
  --muted: #5b6b72;
  --paper: #f5f8f8;
  --line: #dfe8e9;
  --amber-bg: #fdf6e6;
  --amber-line: #efdcb4;
  --amber-ink: #7a5410;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
}

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

/* ---------------- Chrome ---------------- */

.fv-top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.fv-brand { font-weight: 700; letter-spacing: .01em; text-decoration: none; color: var(--green-d); }
.fv-back { margin-left: auto; font-size: .88rem; text-decoration: none; }
.fv-back:hover { text-decoration: underline; }

.fv-main { max-width: 820px; margin: 0 auto; padding: 30px 20px 70px; }

.fv-head { margin-bottom: 20px; }
.fv-kind {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--green); font-weight: 700; margin: 0 0 10px;
}
.fv-head h1 { font-size: 1.85rem; line-height: 1.22; margin: 0 0 12px; color: var(--green-d); }
.fv-lead { color: var(--muted); margin: 0; font-size: 1rem; }

.fv-caution {
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  border-left: 4px solid #d69b2a;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 20px 0;
}
.fv-caution p { margin: 0; font-size: .92rem; color: var(--amber-ink); }

/* ---------------- Actions ---------------- */

.fv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }

.fv-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72em 1.35em;
  border-radius: 999px;
  font-weight: 650; font-size: .92rem;
  text-decoration: none;
  border: 1px solid var(--green);
  background: var(--green); color: #fff;
  transition: background .15s, border-color .15s, transform .15s;
}
.fv-btn:hover { background: #0a6675; border-color: #0a6675; }
.fv-btn:active { transform: translateY(1px); }

.fv-btn-meta {
  font-weight: 500; font-size: .8rem; opacity: .8; margin-left: .5em;
  white-space: nowrap;
}
.fv-btn-wa { background: var(--wa); border-color: var(--wa); }
.fv-btn-wa:hover { background: #176c3b; border-color: #176c3b; }

.fv-btn-quiet { background: #fff; color: var(--green-d); border-color: var(--line); }
.fv-btn-quiet:hover { background: #eef4f4; border-color: #c8d6d8; }

.fv-actions-note { font-size: .82rem; color: var(--muted); margin: 0 0 24px; }

/* ----------------------------------------------------------------
   The document, shown as issued.

   Word originals arrive as converted markup (headings, tables, lists,
   highlighting) and PDF originals as page images. Both are styled to
   read like the paper rather than like a web page.
   ---------------------------------------------------------------- */

.fv-doc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 32px;
  box-shadow: 0 20px 44px -38px rgba(6, 42, 49, .5);
}

/* Converted Word originals ------------------------------------- */

.fv-doc-html { font-family: "Times New Roman", Georgia, serif; font-size: 1rem; line-height: 1.6; color: #1a1a1a; }
.fv-doc-html p { margin: 0 0 11px; }
.fv-doc-html strong { font-weight: 700; color: #000; }
.fv-doc-html em { background: none; padding: 0; color: inherit; font-style: italic; }

.fv-doc-html h1, .fv-doc-html h2, .fv-doc-html h3 {
  font-family: "Times New Roman", Georgia, serif;
  color: #000; text-transform: none; letter-spacing: 0;
  margin: 22px 0 9px; line-height: 1.3;
}
.fv-doc-html h1 { font-size: 1.28rem; text-align: center; }
.fv-doc-html h2 { font-size: 1.1rem; }
.fv-doc-html h3 { font-size: 1rem; }

.fv-doc-html ol, .fv-doc-html ul { margin: 0 0 13px; padding-left: 26px; }
.fv-doc-html li { margin-bottom: 7px; }

.fv-doc-html table {
  border-collapse: collapse; width: 100%; margin: 16px 0; font-size: .95rem;
}
.fv-doc-html td, .fv-doc-html th {
  border: 1px solid #9aa8ab; padding: 8px 11px; vertical-align: top; text-align: left;
}
.fv-doc-html th { background: #eef3f3; font-weight: 700; }
.fv-doc-html table p:last-child { margin-bottom: 0; }

/* Placeholder fields carried over from the original's highlighting. */
.fv-doc-html mark {
  background: #fff3a8; color: #1a1a1a;
  padding: 0 2px; border-radius: 2px;
  box-shadow: inset 0 -1px 0 #e0c94a;
}

/* Rendered PDF originals ---------------------------------------- */

.fv-doc-pages { padding: 16px; background: #eef2f2; }
.fv-page {
  display: block; width: 100%; height: auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: 6px; margin-bottom: 16px;
  box-shadow: 0 12px 30px -24px rgba(6, 42, 49, .6);
  -webkit-user-drag: none; user-select: none;
}
.fv-page:last-child { margin-bottom: 0; }

/* Legacy helpers, kept for any hand-built document ---------------- */

.fv-doc .doc-head {
  text-align: center; font-weight: 800; letter-spacing: .09em;
  font-size: 1.05rem; margin: 0 0 6px; color: var(--green-d);
}
.fv-doc .doc-sub {
  text-align: center; color: var(--muted); font-size: .88rem;
  margin: 0 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}

.fv-doc h2 {
  font-size: .96rem; margin: 26px 0 10px; color: var(--green-d);
  text-transform: uppercase; letter-spacing: .05em;
}
.fv-doc p { margin: 0 0 12px; font-size: .93rem; }
.fv-doc em { color: var(--muted); font-style: normal; background: #f0f5f5; padding: 1px 5px; border-radius: 4px; }

.doc-note { font-size: .84rem !important; color: var(--muted); font-style: italic; }
.doc-sign { margin-top: 22px !important; text-align: right; font-size: .86rem !important; color: var(--muted); }

/* Blank-line placeholders, so the form reads like a form. */
.rule {
  display: inline-block; min-width: 150px;
  border-bottom: 1px solid #b9c7c9;
  vertical-align: baseline; height: 1.05em;
}
.rule-lg { min-width: 100%; display: block; margin-top: 4px; }

.doc-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: .9rem; }
.doc-table caption {
  text-align: left; font-weight: 700; padding: 0 0 7px;
  color: var(--green-d); font-size: .88rem;
}
.doc-table th, .doc-table td {
  border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top;
}
.doc-table th { background: #f3f8f8; font-weight: 600; width: 42%; color: var(--green-d); }
.doc-table td { min-height: 34px; }
.doc-table td:empty::after { content: ""; display: block; min-height: 20px; }

.doc-table-partner { margin-bottom: 22px; }

.doc-list { padding-left: 22px; margin: 0 0 14px; font-size: .93rem; }
.doc-list li { margin-bottom: 9px; }

.doc-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 22px 0 0;
}
.doc-block p { margin: 0; font-size: .89rem; }

/* ---------------- Footer CTA ---------------- */

.fv-foot {
  margin-top: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
}
.fv-foot h2 { margin: 0 0 8px; font-size: 1.2rem; color: var(--green-d); }
.fv-foot p { margin: 0; color: var(--muted); font-size: .93rem; }

.fv-disclaimer { font-size: .78rem; color: var(--muted); margin: 22px 0 0; }

.fv-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 32px; text-align: center;
}
.fv-card h1 { font-size: 1.5rem; color: var(--green-d); }

/* ---------------- Responsive ---------------- */

.fv-legend {
  display: flex; align-items: flex-start; gap: 9px;
  background: #fffdf2; border: 1px solid #efe3b4;
  border-radius: 10px; padding: 11px 13px; margin: 0 0 16px;
  font-size: .85rem; color: #6b5714;
}
.fv-legend i {
  flex: 0 0 auto; display: inline-block; width: 26px; height: 15px;
  background: #fff3a8; border: 1px solid #e0c94a; border-radius: 3px; margin-top: 2px;
}

@media (max-width: 620px) {
  .fv-doc-html { font-size: .95rem; }
  .fv-doc-html table { font-size: .86rem; }
  .fv-doc-html td, .fv-doc-html th { padding: 7px 8px; }
  .fv-doc-pages { padding: 10px; }

  .fv-main { padding: 22px 14px 56px; }
  .fv-head h1 { font-size: 1.45rem; }
  .fv-doc { padding: 22px 16px; border-radius: 12px; }
  .fv-foot { padding: 20px 18px; }
  .fv-btn { width: 100%; }
  .doc-table th, .doc-table td { display: block; width: 100%; border-bottom: 0; }
  .doc-table tr { display: block; border: 1px solid var(--line); margin-bottom: -1px; }
  .doc-table th { border: 0; }
  .doc-table td { border: 0; border-top: 1px dashed var(--line); }
  .rule { min-width: 110px; }
}

/* ----------------------------------------------------------------
   Print: the documents are downloadable, so printing is allowed.
   Only the site chrome and the action buttons are dropped.
   ---------------------------------------------------------------- */

@media print {
  .fv-top, .fv-actions, .fv-actions-note, .fv-foot, .fv-back { display: none !important; }
  body { background: #fff; }
  .fv-main { padding: 0; max-width: none; }
  .fv-doc { border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .fv-doc-pages { background: none; padding: 0; }
  .fv-page { border: 0; box-shadow: none; page-break-after: always; }
  .fv-caution, .fv-legend { border-left-width: 3px; }
  .fv-doc-html mark { background: #fff3a8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
