/* fm-doc.css — the paperwork diagrams.
 *
 * Its own namespaced file, same merge-safety reason as fm-checklist.css and
 * fm-define.css: app.css is twenty thousand lines and its end is where every
 * parallel stream appends.
 *
 * The sheet is meant to read as a DOCUMENT, not as app UI — a plain border,
 * a centred title rule, boxed fields. It is deliberately a sketch. Making it
 * look like a real certificate would be both a copyright problem and a
 * temptation to try to use it.
 */

.fm-doc { max-width: 900px; margin: 0 auto; }

.fm-doc-hero { padding: 4px 0 24px; border-bottom: 2px solid var(--fm-navy); margin-bottom: 22px; }
.fm-doc-title { font-size: 30px; font-weight: 900; color: var(--fm-navy); margin: 0 0 8px; letter-spacing: -.7px; }
.fm-doc-sub { font-size: 15.5px; line-height: 1.6; color: var(--fm-muted); margin: 0; max-width: 58ch; }
.fm-doc-note { font-size: 12.5px; line-height: 1.5; color: var(--fm-text-soft); margin: 12px 0 0; max-width: 66ch; font-style: italic; }

.fm-doc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.fm-doc-tab { font-size: 14px; font-weight: 700; padding: 9px 16px; border-radius: var(--fm-radius-pill); border: 1.5px solid var(--fm-border); background: #fff; color: var(--fm-muted-strong); cursor: pointer; }
.fm-doc-tab:hover { border-color: var(--fm-navy); color: var(--fm-navy); }
.fm-doc-tab.is-on { background: var(--fm-navy); border-color: var(--fm-navy); color: #fff; }

.fm-doc-head { margin-bottom: 22px; }
.fm-doc-name { font-size: 21px; font-weight: 800; color: var(--fm-navy); margin: 0; letter-spacing: -.3px; }
.fm-doc-tag { font-size: 14px; color: var(--fm-muted); margin: 3px 0 0; }
.fm-doc-what { font-size: 15px; line-height: 1.6; color: var(--fm-text); margin: 14px 0 0; max-width: 64ch; }
.fm-doc-why { font-size: 14.5px; line-height: 1.6; color: var(--fm-muted); margin: 11px 0 0; max-width: 64ch; }
.fm-doc-whylabel { display: block; font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--fm-muted-strong); margin-bottom: 2px; }
.fm-doc-callout { font-size: 14.5px; line-height: 1.6; margin: 14px 0 0; padding: 13px 15px; border-radius: var(--fm-radius-sm); background: color-mix(in srgb, var(--fm-red) 6%, #fff); border: 1px solid color-mix(in srgb, var(--fm-red) 26%, transparent); color: var(--fm-text); max-width: 64ch; }

.fm-doc-variants { margin: 0 0 22px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius); overflow: hidden; }
.fm-doc-varh { padding: 11px 15px; background: var(--fm-bg); font-size: 12.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--fm-navy); }
.fm-doc-var { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 10px; align-items: center; padding: 11px 15px; border-top: 1px solid var(--fm-border); }
.fm-doc-varname { font-size: 14px; font-weight: 700; color: var(--fm-text); }
.fm-doc-varuse { font-size: 13.5px; color: var(--fm-muted); }
.fm-doc-vartag { font-size: 11px; font-weight: 800; letter-spacing: .3px; padding: 3px 9px; border-radius: var(--fm-radius-pill); white-space: nowrap; }
.fm-doc-var.is-safe .fm-doc-vartag { background: color-mix(in srgb, var(--fm-green) 12%, #fff); color: var(--fm-green); border: 1px solid color-mix(in srgb, var(--fm-green) 32%, transparent); }
.fm-doc-var.is-risky .fm-doc-vartag { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

.fm-doc-sheet { border: 1.5px solid var(--fm-border-strong); border-radius: 6px; background: var(--fm-surface); padding: 18px; }
.fm-doc-sheettitle { text-align: center; font-size: 13px; font-weight: 900; letter-spacing: 1px; color: var(--fm-navy); padding-bottom: 12px; border-bottom: 2px solid var(--fm-border-strong); margin-bottom: 14px; }
.fm-doc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 10px; }
.fm-doc-field { position: relative; border: 1px solid var(--fm-border); border-radius: 4px; background: #fff; padding: 9px 12px; }
.fm-doc-field.is-wide { grid-column: 1 / -1; }
.fm-doc-flabel { font-size: 9.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--fm-muted); }
.fm-doc-fvalue { font-size: 13.5px; font-weight: 600; color: var(--fm-text); margin-top: 3px; }
.fm-doc-hot { position: absolute; right: -10px; top: -10px; width: 25px; height: 25px; border-radius: 50%; background: var(--fm-red); color: #fff; border: 2px solid #fff; font-size: 12px; font-weight: 800; line-height: 1; display: grid; place-items: center; padding: 0; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.fm-doc-hot:hover { transform: scale(1.12); }
.fm-doc-hot[aria-expanded="true"] { background: var(--fm-navy); }

.fm-doc-honesty { font-size: 13px; line-height: 1.55; margin: 14px 0 0; padding: 11px 13px; border-radius: var(--fm-radius-sm); background: #fffbeb; border: 1px solid #fde68a; color: #92400e; max-width: 66ch; }

.fm-doc-out { margin-top: 18px; }
.fm-doc-card { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--fm-radius); background: #fff; border: 1px solid var(--fm-border); border-left: 4px solid var(--fm-navy); }
.fm-doc-cardn { flex: none; width: 27px; height: 27px; border-radius: 50%; background: var(--fm-navy); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.fm-doc-cardbody { min-width: 0; }
.fm-doc-cardtitle { font-size: 17px; font-weight: 800; color: var(--fm-navy); margin: 0 0 7px; letter-spacing: -.2px; }
.fm-doc-cardwhat { font-size: 14.5px; line-height: 1.6; color: var(--fm-text); margin: 0; max-width: 62ch; }
.fm-doc-cardwhy { font-size: 14px; line-height: 1.6; color: var(--fm-muted); margin: 9px 0 0; max-width: 62ch; }
.fm-doc-gotcha { font-size: 14px; line-height: 1.55; margin: 11px 0 0; padding-top: 10px; border-top: 1px dashed var(--fm-border); color: var(--fm-text); max-width: 62ch; }
.fm-doc-gotchalabel { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--fm-red); margin-bottom: 3px; }

.fm-doc-src { margin: 16px 0 0; font-size: 13px; }
.fm-doc-src a { color: var(--fm-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.fm-doc-foot { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--fm-border); }
.fm-doc-foot p { font-size: 13px; line-height: 1.6; color: var(--fm-muted); margin: 0 0 10px; max-width: 66ch; }
.fm-doc-back { color: var(--fm-navy); font-weight: 700; text-decoration: none; }
.fm-doc-back:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .fm-doc-title { font-size: 24px; }
  .fm-doc-row { grid-template-columns: 1fr; }
  .fm-doc-var { grid-template-columns: 1fr; gap: 4px; }
  .fm-doc-vartag { justify-self: start; }
  .fm-doc-sheet { padding: 14px 12px; }
  .fm-doc-hot { right: -8px; top: -8px; }
}
