@font-face { font-family: 'IBM Plex Sans'; src: url('/ip-static/fonts/ibm-plex-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('/ip-static/fonts/ibm-plex-sans-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 100 700; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Instrument Serif'; src: url('/ip-static/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/ip-static/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root { --ink: #15191D; --paper: #F5F1E8; --card: #FBF9F4; --sand: #EDE8DD; --sand-2: #B8B3A8; --orange: #E0611A; --slate: #4A5058; --slate-2: #7A7F86; --red: #B42318; --ok: #2F6B3B; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.6 'IBM Plex Sans', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: 3px; }
h1, h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: 30px; }
h3 { font-size: 15px; font-weight: 600; margin: 22px 0 6px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--orange); margin: 0 0 14px; }
.muted { color: var(--slate); }
.small { font-size: 13px; }
.bar { background: var(--ink); color: var(--sand); }
.bar .in { max-width: 1120px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 3.5px; font-size: 13px; text-transform: uppercase; color: var(--sand); text-decoration: none; }
.logo i { width: 13px; height: 13px; background: var(--orange); display: inline-block; }
.bar .tag { font-size: 12px; color: var(--sand-2); letter-spacing: 1px; text-transform: uppercase; }
main.narrow { max-width: 560px; margin: 0 auto; padding: 64px 24px 80px; }
main.wide { max-width: 1120px; margin: 0 auto; padding: 40px 24px 80px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--sand-2); background: var(--card); color: var(--ink); border-radius: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
textarea { min-height: 120px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.code-input { font-family: 'IBM Plex Mono', monospace !important; font-size: 28px !important; letter-spacing: 10px; text-align: center; }
button, .btn { display: inline-block; font: 600 15px/1 'IBM Plex Sans', Arial, sans-serif; padding: 14px 22px; border: 0; background: var(--orange); color: var(--ink); cursor: pointer; text-decoration: none; border-radius: 0; }
button:hover, .btn:hover { background: #c95515; }
button:disabled { background: var(--sand); color: var(--slate-2); cursor: not-allowed; }
.btn.ghost, button.ghost { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn.ghost:hover, button.ghost:hover { background: var(--sand); }
button.danger { background: var(--red); color: #fff; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--slate); text-decoration: underline; font: inherit; cursor: pointer; }
.linkbtn:hover { background: none; color: var(--ink); }
.err { border-left: 3px solid var(--red); background: #fbecea; padding: 10px 14px; margin: 14px 0; font-size: 14px; }
.note { border-left: 3px solid var(--orange); background: var(--card); padding: 14px 18px; margin: 18px 0; font-size: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.rule { border: 0; border-top: 1px solid var(--sand-2); margin: 28px 0; }

/* MNDA page */
.terms-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .terms-wrap { grid-template-columns: 1fr; } }
.doc { background: var(--card); border: 1px solid var(--sand-2); padding: 28px 32px; max-height: 72vh; overflow: auto; font-size: 14.5px; }
.doc h2 { font-size: 28px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 2px 0; }
.ph { background: #fbe6d8; padding: 0 3px; }
.ph.filled { background: transparent; border-bottom: 1px dashed var(--orange); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 18px 0; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--orange); }
.phone { display: grid; grid-template-columns: 140px 1fr; gap: 8px; }

/* Viewer */
body.viewer { background: #0e1114; color: var(--sand); }
.vbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: var(--ink); border-bottom: 1px solid #2a3036; }
.vbar .ctrls { display: flex; align-items: center; gap: 8px; }
.vbar button { padding: 9px 14px; font-size: 14px; background: #2a3036; color: var(--sand); }
.vbar button:hover { background: #3a4249; }
.vbar .pg { font: 500 14px 'IBM Plex Mono', monospace; color: var(--sand-2); min-width: 80px; text-align: center; }
.draft-banner { background: var(--orange); color: var(--ink); text-align: center; font-size: 14px; font-weight: 600; padding: 8px 12px; }
.stage { display: flex; height: calc(100vh - 58px); }
.draft-on .stage { height: calc(100vh - 95px); }
.thumbs { width: 168px; overflow-y: auto; padding: 12px; border-right: 1px solid #2a3036; flex: none; }
.thumbs button { display: block; width: 100%; padding: 0; margin: 0 0 10px; background: none; border: 2px solid transparent; position: relative; }
.thumbs button.on { border-color: var(--orange); }
.thumbs img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #1b2025; }
.thumbs span { position: absolute; left: 4px; top: 2px; font: 500 11px 'IBM Plex Mono', monospace; color: var(--sand); text-shadow: 0 0 3px #000; }
.canvas { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px; min-width: 0; user-select: none; }
.canvas img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 0 0 1px #2a3036; background: #1b2025; -webkit-user-drag: none; }
@media (max-width: 760px) { .thumbs { display: none; } }
.viewer:fullscreen .thumbs { display: none; }

/* Admin */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
table.t th, table.t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--sand); vertical-align: top; }
table.t th { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--slate); font-weight: 600; background: var(--sand); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; background: var(--sand); }
.pill.agreed, .pill.viewed { background: #dcebdc; color: var(--ok); }
.pill.declined, .pill.revoked { background: #fbecea; color: var(--red); }
.pill.verified, .pill.link_opened { background: #fbe6d8; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: var(--sand); text-decoration: none; }
.nav a:hover { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--sand); padding: 16px 18px; }
.card h3 { margin-top: 0; }
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.heat div { padding: 8px; font-size: 12px; background: var(--card); border: 1px solid var(--sand); }
.heat b { display: block; font: 500 16px 'IBM Plex Mono', monospace; }
.urlbox { font: 13px 'IBM Plex Mono', monospace; background: var(--ink); color: var(--sand); padding: 12px; word-break: break-all; margin: 8px 0; }
.thumbstrip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.thumbstrip img { height: 90px; border: 1px solid var(--sand-2); }
form.inline { display: inline; }
iframe.preview { width: 100%; height: 760px; border: 1px solid var(--sand-2); background: #EDE8DD; }
.vlink { margin-left: auto; margin-right: 14px; color: var(--sand-2); font-size: 14px; white-space: nowrap; }
.vlink + .vcall { margin-left: 0; }
.vcall { margin-left: auto; margin-right: 12px; white-space: nowrap; }
.ccal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 12px 0 24px; }
.cdow { font-size: 12px; font-weight: 600; color: var(--slate-2); padding: 4px 6px; }
.cday { min-height: 92px; background: var(--card); border: 1px solid var(--sand-2); padding: 4px 6px; font-size: 12px; overflow: hidden; }
.cday.empty { background: transparent; border-color: transparent; }
.cday.today { border-color: var(--orange); }
.cnum { display: block; font-weight: 600; margin-bottom: 2px; }
.cev { display: block; padding: 2px 4px; margin: 2px 0; background: var(--sand-2); color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cev.inv { background: #fbe6d8; border-left: 3px solid var(--orange); }
.cev.off { text-decoration: line-through; opacity: 0.6; }
@media (max-width: 700px) { .cday { min-height: 60px; } .cev { white-space: normal; } }
.preview-banner { position: sticky; top: 0; z-index: 50; padding: 10px 18px; background: var(--orange); color: var(--ink); font-size: 14px; }
.preview-banner a { color: var(--ink); font-weight: 600; }
.steps { line-height: 2.2; }
.vbtn { padding: 9px 14px !important; font-size: 14px !important; }
.vtag { font: 500 12px 'IBM Plex Mono', monospace; color: var(--sand-2); }
.narrowform { max-width: 560px; }
input.short { width: 140px; }
input.grow { flex: 1; min-width: 220px; }
textarea.notes { min-height: 80px; font-family: inherit; font-size: 14px; margin-bottom: 8px; }
textarea.tall { min-height: 480px; }
h2.sec { font-size: 26px; margin-top: 36px; }
.mono { font-family: 'IBM Plex Mono', monospace; word-break: break-all; }
.inline-label { margin: 0; }
.deckcard { margin-top: 14px; }
.heat div[data-heat="10"], .heat div[data-heat="9"], .heat div[data-heat="8"] { background: #f3c4a5; }
.heat div[data-heat="7"], .heat div[data-heat="6"], .heat div[data-heat="5"] { background: #f8dcc8; }
.heat div[data-heat="4"], .heat div[data-heat="3"] { background: #fbe9dc; }
.card form textarea { width: 100%; }

/* Printing (and "Save as PDF") from the viewer produces a notice, not the deck. */
@media print {
  body.viewer > * { display: none !important; }
  body.viewer::before { content: "Printing is disabled for this confidential document. Contact Ferrite Systems if you need a copy."; display: block; padding: 2in 1in; font: 16pt 'IBM Plex Sans', Arial, sans-serif; color: #000; }
}

.logo svg.anvil { width: 34px; height: 18px; flex: none; display: block; }

/* Booking */
.typecard { display: block; text-decoration: none; margin: 14px 0; }
.typecard:hover { border-color: var(--orange); }
.book { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.8fr); gap: 32px; align-items: start; }
.book .book-form { grid-column: 1 / -1; max-width: 620px; }
@media (max-width: 960px) { .book { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head button { padding: 8px 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--slate-2); font-weight: 600; }
.cal .day { padding: 10px 0; background: transparent; color: var(--slate-2); font-weight: 500; }
.cal .day.has { background: var(--card); color: var(--ink); border: 1px solid var(--sand-2); }
.cal .day.has:hover { border-color: var(--orange); background: var(--card); }
.cal .day.on { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.cal .day:disabled { cursor: default; background: transparent; }
#tlist { display: grid; gap: 8px; max-height: 460px; overflow-y: auto; }
.slot { background: var(--card); border: 1px solid var(--orange); color: var(--ink); font-weight: 600; }
.slot:hover { background: var(--orange); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.narrowbox { max-width: 560px; }
.human { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 6px; padding: 14px 16px; border: 1px solid var(--sand-2); border-radius: 8px; background: var(--card); cursor: pointer; font-weight: 500; }
.human input { width: 20px; height: 20px; margin: 0; accent-color: var(--orange); }
.human .hnote { margin-left: auto; }
.human[data-state="busy"] .hstate::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--orange); border-right-color: transparent; border-radius: 50%; animation: hspin 0.8s linear infinite; vertical-align: -1px; }
.human[data-state="ok"] { border-color: var(--ok); }
.human[data-state="ok"] .hstate { color: var(--ok); }
@keyframes hspin { to { transform: rotate(360deg); } }

/* Booking: other attendees, requests waiting for approval */
.atts { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.atts legend { font-size: 13px; font-weight: 600; padding: 0; }
.atts legend span { font-weight: 400; }
.att-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 0 12px; align-items: end; margin-bottom: 4px; }
.att-row button { padding: 12px 16px; }
.atts #attadd { margin-top: 12px; }
.att-add { max-width: 720px; margin-top: 14px; }
@media (max-width: 640px) { .att-row { grid-template-columns: 1fr; padding-bottom: 14px; border-bottom: 1px solid var(--sand-2); margin-bottom: 6px; } .att-row button { justify-self: start; margin-top: 8px; } .att-add { border-bottom: 0; } }
.pill.pending { background: #fbe6d8; }
.pend { border-left: 3px solid var(--orange); margin: 12px 0; }
.pend p { margin: 0 0 8px; }
.decide { align-items: flex-start; margin: 8px 0; }
details.deny > summary { list-style: none; cursor: pointer; }
details.deny > summary::-webkit-details-marker { display: none; }
details.deny[open] > summary { margin-bottom: 8px; }
details.deny form { max-width: 520px; }
.cev.pend { background: var(--card); border: 1px dashed var(--orange); }
