/* Autoflow stylesheet, assembled from Autopair's on 21/10/26: the shared tokens and
   primitives, the sign-in screens, then the fs- and af- blocks that came across whole. */
/* ============================================================================
   CFlo Autopair, visual system

   The Certified Partner Portal's language, carried over whole: paper on a warm canvas,
   deep green for the bar and the one action that matters, uppercase kickers, hairline
   rules. Light only. A field app is read in daylight on a phone in somebody's yard.
   ========================================================================== */

:root {
  color-scheme: light;
  --green:       #2CB34A;
  --green-deep:  #008E49;
  --green-ink:   #0E5C2C;
  --green-soft:  #E7F3EC;
  --ink:         #0A0A0A;
  --ink-2:       #2A2A2A;
  --ink-3:       #5A5A5A;
  --ink-4:       #8A8A8A;
  --rule-soft:   #C9C9C9;
  --rule-hair:   #E4E4E4;
  --tint:        #F4F2EE;
  --paper:       #FFFFFF;
  --canvas:      #EEEDEA;
  --amber:       #8A6D3B;  --amber-bg: #FCF8EE;
  --red:         #9A3412;  --red-bg:   #FDECEA;
  --blue:        #3A5B86;  --blue-bg:  #EAF1FB;
  --shadow:      0 1px 2px rgba(0,0,0,.05);
  --shadow-lift: 0 10px 30px rgba(10,40,22,.10);
  --font: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --mono: ui-monospace, Menlo, monospace;

  /* Aliases the 3D viewer stylesheet (visuals.css) was written against. */
  --base: var(--canvas); --panel: var(--paper); --panel-hi: var(--tint);
  --hairline: var(--rule-hair); --hairline-2: var(--rule-soft);
  --accent: var(--green-deep); --accent-tint: var(--green-soft);
  --red-tint: var(--red-bg); --amber-tint: var(--amber-bg); --blue-tint: var(--blue-bg);
  --r: 10px; --r-sm: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }
.muted { color: var(--ink-3); }
.sub { color: var(--ink-3); font-size: 12.5px; }
.strong { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.grow { flex: 1; }
.right { text-align: right; }
.big { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
/* Notices are chips, never banners: a pill that takes the width of its words, with no
   stripe down the side. A card carries no accent colour of its own. */
.err, .ok-note, .warn-note, .info-note { display: inline-block; max-width: 100%; border-radius: 20px; padding: 6px 12px; font-size: 12px; font-weight: 600; line-height: 1.45; margin: 0 0 14px; }
.err { background: var(--red-bg); color: var(--red); }
.ok-note { background: var(--green-soft); color: var(--green-ink); }
.warn-note { background: var(--amber-bg); color: var(--amber); }
.info-note { background: var(--tint); color: var(--ink-3); }

/* ------------------------------------------------------------------ header */
/* One band for every page, in the gate's language: the deep green to night gradient of the
   sign in panel with its fine grid, the brand left, the person right, the places in a tray. */
header.top { position: relative; color: #fff; background: radial-gradient(circle at 18% 12%, rgba(44,179,74,.55), rgba(44,179,74,0) 42%), linear-gradient(160deg, #0a5c33 0%, #0b3d2a 55%, #08121a 100%); }
header.top::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px); mix-blend-mode: overlay; }
header.top .bar { position: relative; z-index: 1; }
header.top .bar { max-width: 1360px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 18px 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
header.top .logo { height: 30px; cursor: pointer; display: block; }
header.top .tag { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: 5px 11px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.navlink { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; padding: 8px 13px; font: 700 11px var(--font); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s; display: inline-flex; align-items: center; gap: 6px; }
.navlink:hover { background: rgba(255,255,255,.26); }
.navlink.on { background: #fff; color: var(--green-deep); border-color: #fff; }
/* The places sit together in one tray; the active one is lit. */
.nav-main { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); }
.nav-main .navlink { background: none; border: 0; padding: 7px 12px; border-radius: 6px; }
.nav-main .navlink:hover { background: rgba(255,255,255,.16); }
.nav-main .navlink.on { background: #fff; color: var(--green-deep); }
/* The person: one button, one menu under it. */
.who-menu { position: relative; margin-left: 6px; }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: rgba(255,255,255,.92); font: inherit; font-size: 12px; letter-spacing: .04em; cursor: pointer; text-align: left; transition: background .15s; }
.who:hover, .who-menu.open .who { background: rgba(255,255,255,.2); }
.who .avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.who .nm { font-weight: 700; line-height: 1.15; }
.who .rl { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; line-height: 1.2; }
.who > svg { opacity: .8; transition: transform .15s; }
.who-menu.open .who > svg { transform: rotate(180deg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; z-index: 60; background: #fff; color: var(--ink); border-radius: 12px; padding: 6px; box-shadow: 0 14px 40px rgba(11,61,36,.22), 0 0 0 1px rgba(11,61,36,.08); }
.menu-who { padding: 8px 12px 10px; border-bottom: 1px solid var(--rule-hair); margin-bottom: 4px; }
.menu-who .nm { font-weight: 700; font-size: 13px; }
.menu-who .rl { font-size: 11px; color: var(--ink-3); margin-top: 2px; word-break: break-all; }
.menu-item { display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.menu-item small { grid-column: 2; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.menu-item svg { color: var(--green); }
.menu-item:hover { background: var(--tint); }
.menu-out { margin-top: 4px; border-top: 1px solid var(--rule-hair); border-radius: 0 0 8px 8px; padding-top: 12px; }
.menu-out svg { color: var(--ink-3); }
@media (max-width: 640px) {
  /* Two rows: the brand and the person on the first, the places as a full width tray on the second. */
  .nav { display: contents; }
  .who-menu { order: 1; margin-left: auto; }
  .nav-main { order: 2; width: 100%; justify-content: space-around; }
  .nav-main .navlink { flex: 1; justify-content: center; padding: 8px 6px; }
  .who .who-txt { display: none; } .who { padding-right: 8px; }
  header.top .logo { height: 26px; }
  header.top .bar { gap: 8px 10px; padding-bottom: 10px; }
}

/* ------------------------------------------------------------------ page */
.wrap { max-width: 1360px; margin: 0 auto; padding: 22px 18px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 4px 0 18px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
.page-head .crumb { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.page-head .btn-row { margin-left: auto; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.topback { display: none; }
@media (max-width: 640px) { .wrap { padding: 16px 12px 50px; } .page-head h1 { font-size: 20px; } .page-head .btn-row { margin-left: 0; width: 100%; } }

.card { background: var(--paper); border: 1px solid var(--rule-hair); border-radius: 12px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
/* A card's head: the heading, a word or two beside it, and any action or bar at the right,
   on one line with room under it, so nothing touches the tabs or the table that follow. */
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 14px; }
.card-head h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.card-head > .btn, .card-head > .bp, .card-head > .hint, .card-head > .b { margin-left: auto; }
.card-head > .bp { min-width: 160px; }
.card-head > .btn ~ .btn { margin-left: 0; }
.card.tight { padding: 12px 16px; }
.card.retry-card { text-align: center; padding: 34px; }
a.card, .card.clickable { text-decoration: none; color: inherit; display: block; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; cursor: pointer; }
a.card:hover, .card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--rule-soft); }
.secnum { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule-hair); padding-bottom: 12px; margin-bottom: 16px; }
.secnum .n { font-size: 13px; font-weight: 700; color: var(--ink-4); }
.secnum h2 { font-size: 16px; font-weight: 700; margin: 0; flex: 1; }
.sec-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; }
.sec-h h2 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: grid; gap: 12px 18px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .row.c2, .row.c3 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding-top: 3px; }
.kv dd { margin: 0; }
.empty { background: var(--paper); border: 1px dashed var(--rule-soft); border-radius: 12px; padding: 26px 20px; text-align: center; color: var(--ink-4); font-size: 13.5px; line-height: 1.6; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; border-bottom: 2px solid var(--rule-hair); }
.tabbtn { background: none; border: 0; padding: 10px 15px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; color: var(--ink-3); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabbtn.active { color: var(--green-deep); border-bottom-color: var(--green-deep); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.subtabbtn { background: var(--tint); border: 1px solid var(--rule-hair); border-radius: 20px; padding: 7px 15px; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--ink-3); cursor: pointer; }
.subtabbtn.active { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--green-deep); color: #fff; border: 1px solid var(--green-deep); border-radius: 6px; padding: 10px 16px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; line-height: 1.2; }
.btn:hover { background: var(--green); border-color: var(--green); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--rule-soft); }
.btn.ghost:hover { border-color: var(--green-deep); color: var(--green-deep); background: #fff; }
.btn.sm { padding: 7px 11px; font-size: 11px; }
.btn.icon-only { padding: 8px; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.subtle-del { color: var(--ink-4); border-color: transparent; background: transparent; }
.btn.subtle-del:hover { color: var(--red); border-color: var(--red-bg); background: var(--red-bg); }
.btn svg { flex: none; }
button.link { background: none; border: 0; padding: 0; color: var(--green-deep); font-weight: 700; cursor: pointer; font-size: inherit; }

/* ------------------------------------------------------------------ badges */
.b, .pill { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; line-height: 1.5; }
.b-grey { background: #EEF0F2; color: var(--ink-3); }
.b-green { background: var(--green-soft); color: var(--green-ink); }
.b-solid { background: var(--green-deep); color: #fff; }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }

/* ------------------------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--rule-hair); font-size: 13.5px; vertical-align: middle; }
table.tbl th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
table.tbl tbody tr:hover { background: #FAFAF8; }
table.tbl tr.clickable { cursor: pointer; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dt-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dt-search { flex: 1; min-width: 200px; }
.dt-count { font-size: 12px; color: var(--ink-4); }
.dt-spacer { flex: 1; }
.dt-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-filterbtn { background: var(--tint); border: 1px solid var(--rule-hair); border-radius: 20px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.dt-filterbtn.on { background: var(--green-deep); color: #fff; border-color: var(--green-deep); }
.dt-arrow { opacity: .5; font-size: 10px; margin-left: 4px; }
.dt-clear { font-size: 12px; }

/* ------------------------------------------------------------------ forms */
label.f, .fld { display: block; margin: 0 0 14px; }
label.f > span, .fld > label, .lbl { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 6px; }
label.f > span .req { color: var(--red); margin-left: 2px; }
input, select, textarea { width: 100%; font-size: 15px; color: var(--ink); border: 1px solid var(--rule-soft); border-radius: 6px; padding: 11px 12px; background: #fff; -webkit-appearance: none; appearance: none; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--green-deep); padding: 0; -webkit-appearance: auto; appearance: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(44,179,74,.15); }
input.code { letter-spacing: .4em; text-align: center; font-size: 22px; font-weight: 700; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 84px; resize: vertical; }
.fset { padding: 14px 0; border-top: 1px solid var(--rule-hair); }
.fset:first-child { border-top: 0; padding-top: 0; }
.fset .lg { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.fset .lg .sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.check input { width: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-wrap .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-4); }
.note { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.secret { font-family: var(--mono); font-size: 12px; background: var(--tint); padding: 8px 10px; border-radius: 5px; text-align: center; letter-spacing: .06em; word-break: break-all; }
.steps { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin: 0 0 14px; padding-left: 18px; }
.qr { display: block; margin: 8px auto 12px; width: 190px; height: 190px; border: 1px solid var(--rule-soft); border-radius: 6px; padding: 8px; background: #fff; }

/* ------------------------------------------------------------------ modal, toast, boot */
/* Above everything, the 3D viewer (z 90) included: a dialog that opens behind the model
   is a Remove button nobody can press. */
.modal-back { position: fixed; inset: 0; background: rgba(10,10,10,.55); display: flex; align-items: center; justify-content: center; z-index: 120; padding: 20px; }
.modal { background: #fff; width: 560px; max-width: 96vw; max-height: 90vh; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { width: 900px; }
.modal-head { background: var(--green-deep); color: #fff; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.modal-head .x { background: none; border: 0; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 4px; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--rule-hair); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; background: var(--tint); }
@media (max-width: 640px) { .modal-back { padding: 0; align-items: flex-end; } .modal { width: 100%; max-width: 100%; max-height: 94vh; border-radius: 14px 14px 0 0; } }
#toast-root { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 130; width: max-content; max-width: 92vw; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 7px; font-size: 13px; box-shadow: 0 12px 38px rgba(0,0,0,.3); }
.toast.ok { background: var(--green-deep); } .toast.err { background: var(--red); } .toast.warn { background: var(--amber); }
.boot { display: grid; place-items: center; padding: 40px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--rule-hair); border-top-color: var(--green-deep); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner-inline { display: inline-block; width: 13px; height: 13px; border-width: 2px; vertical-align: -2px; border-top-color: currentColor; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg,#eee 25%,#f6f6f6 37%,#eee 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 12px; height: 96px; }
@keyframes sk { 0% { background-position: 100% 0 } 100% { background-position: -100% 0 } }

/* ------------------------------------------------------------------ fold card (ui.js) */
.fold-card .fold-tog { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.fold-card .fold-tally { color: var(--ink-3); font-size: 12px; }
.fold-card .fold-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.fold-card .fold-body { margin-top: 14px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 48px; gap: 10px; align-items: center; font-size: 12.5px; margin: 6px 0; }
.bar-track { height: 8px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green-deep); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }

/* ------------------------------------------------------------------ sign in (the portal's split card, verbatim) */
body.auth-page { display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth { display: grid; grid-template-columns: 1fr 1fr; width: 840px; max-width: 96vw; min-height: 500px; background: #fff; border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.16); overflow: hidden; border: .5px solid var(--rule-soft); }
.brand { position: relative; background: var(--green-deep); color: #fff; padding: 34px 34px 26px; display: flex; flex-direction: column; overflow: hidden; }
.brand > img:not(.b-seal) { height: 42px; width: auto; align-self: flex-start; position: relative; z-index: 1; }
.b-mid { margin: auto 0; position: relative; z-index: 1; padding: 26px 0; }
.b-kick { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #fff; font-weight: 700; margin: 0 0 12px; }
.brand h2 { font-size: 34px; line-height: 1.12; font-weight: 800; margin: 0; letter-spacing: -.02em; color: #fff; }
.b-foot { position: relative; z-index: 1; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.92); }
.b-seal { position: absolute; right: 32px; top: 26px; width: 104px; height: auto; z-index: 2; filter: drop-shadow(0 10px 24px rgba(0,0,0,.34)); }
.deco { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.13); pointer-events: none; }
.d1 { width: 360px; height: 360px; right: -140px; bottom: -160px; }
.d2 { width: 240px; height: 240px; right: -70px; bottom: -90px; border-color: rgba(255,255,255,.20); }
.d3 { width: 130px; height: 130px; right: 2px; bottom: -22px; border-color: rgba(44,179,74,.65); background: rgba(44,179,74,.16); }
.panel { padding: 42px 38px 32px; display: flex; flex-direction: column; justify-content: center; }
.panel h1 { font-size: 21px; letter-spacing: -.01em; color: var(--ink); font-weight: 700; margin: 0 0 6px; }
.panel p.sub { color: var(--ink-3); font-size: 12.5px; margin: 0 0 22px; }
.panel .note2 { margin: 18px 0 0; font-size: 11.5px; color: var(--ink-3); }
.panel .note2 a, .panel .note2 button.link { color: var(--green-deep); font-weight: 700; text-decoration: none; }
.panel label { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 14px 0 6px; }
.panel input { font-size: 16px; padding: 12px 13px; }
.panel button.go { width: 100%; margin-top: 22px; background: var(--green-deep); color: #fff; border: 0; border-radius: 6px; padding: 13px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.panel button.go:hover { background: var(--green); }
.panel button.go:disabled { opacity: .7; cursor: default; }
.box { background: #fff; width: 400px; max-width: 94vw; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.12); overflow: hidden; border: .5px solid var(--rule-soft); margin: 0 auto; }
.box .hd { padding: 32px 34px 24px; border-bottom: 3px solid var(--green-deep); text-align: center; }
.box .hd img { height: 44px; display: block; margin: 0 auto; }
.box .bd { padding: 28px 34px 30px; }
.box h1 { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--green-deep); font-weight: 700; margin: 0 0 4px; text-align: center; }
.box p.sub { color: var(--ink-3); font-size: 12.5px; margin: 0 0 22px; text-align: center; }
.box .foot { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-4); text-align: center; padding: 14px; border-top: 1px solid var(--rule-hair); text-transform: uppercase; }
@media (max-width: 840px) {
  body.auth-page { padding: 14px; align-items: flex-start; }
  .auth { grid-template-columns: 1fr; width: 430px; min-height: 0; margin-top: 4vh; }
  .brand { padding: 22px 26px 20px; }
  .brand > img:not(.b-seal) { height: 36px; }
  .b-mid { margin: 0; padding: 14px 0 0; }
  .brand h2, .b-foot { display: none; }
  .b-seal { width: 56px; right: 18px; bottom: auto; top: 16px; }
  .b-kick { margin: 0; }
  .d1, .d2 { display: none; }
  .d3 { right: -30px; bottom: -56px; }
  .panel { padding: 26px 26px 24px; }
}

/* ------------------------------------------------------------------ scan */
.scan-stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 70vh; }
.scan-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 14% 12%; border: 2px solid rgba(255,255,255,.85); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.scan-hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }

@media print { header.top, .btn, .nav { display: none !important; } body { background: #fff; } .card { border: 0; box-shadow: none; } }

/* Author display rules on buttons and cards beat the browser default for [hidden]; this wins. */
[hidden] { display: none !important; }
/* ---- the sign-in brand panel, with the gate's language: the dark canvas, the fine grid, the
   cyan tagline and the three purposes, under the green of the portal */
.brand { background: linear-gradient(160deg, #0a5c33 0%, #0b3d2a 55%, #08121a 100%); }
.b-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(93,241,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(93,241,255,.07) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(180deg, transparent 20%, #000 100%); }
.b-tap { margin-top: 10px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; color: #5df1ff; }
.b-know { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.b-know li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255,255,255,.88); }
.b-know li svg { color: #5df1ff; flex: none; }
.b-know li:last-child svg { color: #7de29a; }
.deco { border-color: rgba(93,241,255,.12); }
@media (max-width: 720px) { .b-tap, .b-know { display: none; } }

/* ---- the sign-in panel: CloudLink top right, its signals radiating from the corner */
.b-seal.b-cloud { width: 150px; height: auto; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.92); filter: drop-shadow(0 10px 24px rgba(0,0,0,.3)); }
.b-seal.b-cloud img { display: block; width: 100%; height: auto; }
.b-signals { position: absolute; right: -10px; bottom: -10px; width: 260px; height: 260px; pointer-events: none; z-index: 0; }
.b-signals path { fill: none; stroke: #5df1ff; stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(93,241,255,.45)); animation: b-signal 3.2s ease-in-out infinite; }
.b-signals path:nth-child(2) { animation-delay: .3s; } .b-signals path:nth-child(3) { animation-delay: .6s; } .b-signals path:nth-child(4) { animation-delay: .9s; } .b-signals path:nth-child(5) { animation-delay: 1.2s; }
@keyframes b-signal { 0%, 100% { stroke-opacity: .35; } 50% { stroke-opacity: 1; } }
@media (max-width: 720px) { .b-seal.b-cloud { width: 96px; padding: 5px 8px; } .b-signals { width: 160px; height: 160px; } }
/* ---- the sign-in panel's green, made luminous: a glow in the corner over a dark canvas */
.brand { background: radial-gradient(circle at 18% 12%, rgba(44,179,74,.75), rgba(44,179,74,0) 42%), radial-gradient(circle at 85% 80%, rgba(93,241,255,.18), rgba(93,241,255,0) 40%), linear-gradient(160deg, #0a4a33 0%, #082c2c 45%, #06121a 100%); }
.b-grid { background-image: linear-gradient(rgba(93,241,255,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(93,241,255,.10) 1px, transparent 1px); mask-image: linear-gradient(180deg, transparent 10%, #000 100%); }
.brand::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px); mix-blend-mode: overlay; }
.b-kick { color: #5df1ff; }
.b-know li svg { filter: drop-shadow(0 0 6px rgba(93,241,255,.6)); }
.b-foot { color: rgba(93,241,255,.8); }
/* ---- the sign-in button, in the panel's luminous green */
.auth .panel .btn:not(.ghost) { background: linear-gradient(135deg, #2CB34A 0%, #12a06b 55%, #0b8f8a 100%); border: 0; border-radius: 12px; letter-spacing: .1em; box-shadow: 0 10px 26px rgba(44,179,74,.35), inset 0 0 0 1px rgba(93,241,255,.35); transition: transform .12s ease, box-shadow .12s ease; }
.auth .panel .btn:not(.ghost):hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(44,179,74,.45), inset 0 0 0 1px rgba(93,241,255,.55); }
.auth .panel input:focus { border-color: #12a06b; box-shadow: 0 0 0 3px rgba(93,241,255,.18); }
.auth .panel a { color: #0b8f6a; }
.auth .panel .go { background: linear-gradient(135deg, #2CB34A 0%, #12a06b 55%, #0b8f8a 100%); border: 0; border-radius: 12px; letter-spacing: .12em; color: #fff; box-shadow: 0 10px 26px rgba(44,179,74,.35), inset 0 0 0 1px rgba(93,241,255,.35); transition: transform .12s ease, box-shadow .12s ease; }
.auth .panel .go:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(44,179,74,.45), inset 0 0 0 1px rgba(93,241,255,.55); }
.b-seal.b-cloud { background: none; padding: 0; width: 140px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }

/* the signal fan and its satellite */
.b-signals { right: -6px; bottom: -6px; width: 300px; height: 300px; }
.b-signals path { stroke-width: 7; }
.b-sat rect { fill: #5df1ff; opacity: .95; }
.b-sat rect:nth-child(2), .b-sat rect:nth-child(3) { fill: #2CB34A; }
.b-sat .stem, .b-sat .dish { fill: none; stroke: #5df1ff; stroke-width: 3; stroke-linecap: round; filter: none; animation: none; opacity: 1; }
.b-sat .dish { stroke-width: 3.5; }
@media (max-width: 720px) { .b-signals { width: 180px; height: 180px; } }
.b-signals { width: 150px; height: 150px; right: 4px; bottom: 4px; }
/* The Knowledge centre's Flowsheets module (20/10/26): fs- prefix */
.fs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fs-row { cursor: pointer; }
.fs-sec { border-top: 1px solid var(--rule-hair); }
.fs-sec > summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.fs-rule { padding: 8px 0 12px 16px; }
.fs-rule-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; flex-wrap: wrap; }
.fs-basis { color: var(--ink-2); font-size: 11.5px; }
.fs-rule-btns { margin-left: auto; display: flex; gap: 10px; }
.fs-formula { display: inline-block; margin: 6px 0 2px; padding: 4px 8px; background: var(--well, rgba(0,0,0,.04)); border-radius: 6px; font-size: 12.5px; overflow-x: auto; max-width: 100%; }
.fs-vars { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--ink-2); margin: 4px 0; }
.fs-line { margin: 4px 0 0; font-size: 13px; }
.fs-guide { color: var(--ink-2); }
.fs-add { padding: 10px 0 2px; }
.fs-case { display: grid; gap: 14px; }
.fs-files { display: grid; gap: 6px; }
.fs-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule-hair); border-radius: 8px; font-size: 13.5px; color: inherit; text-decoration: none; }
.fs-file .sub { margin-left: auto; }
.fs-eq .tbl-wrap { overflow-x: auto; max-height: 40vh; overflow-y: auto; }
.fs-form { display: grid; gap: 10px; }
@media (max-width: 640px) { .fs-head { flex-direction: column; align-items: flex-start; } }

/* Autoflow, the flowsheet designer (20/10/26): af- prefix. The canvas is a wind tunnel stage
   (Manish: "futuristic look"): dark, the streams as glowing CFD streamlines, whatever the app theme. */
.af-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 12px; }
.af-form .fld { min-width: 120px; }
.af-form label.f, .af-form .fld { margin-bottom: 0; }
.af-form .check { align-self: flex-end; padding-bottom: 11px; white-space: nowrap; }

.af-warn { display: flex; gap: 8px; align-items: flex-start; background: rgba(217,119,6,.08); color: #b45309; border-radius: 8px; padding: 8px 10px; margin: 4px 0; font-size: 13px; }
.af-removed { display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px; border: 1px dashed color-mix(in srgb, currentColor 35%, transparent); border-radius: 999px; font-size: 12.5px; opacity: .85; margin: 4px 8px 4px 0; width: fit-content; }
.af-fracrow { display: flex; gap: 14px; align-items: center; grid-column: 1 / -1; }
.af-node { cursor: grab; outline: none; } .af-node:active { cursor: grabbing; }
.af-node:focus .af-hit { stroke-width: 2.4; }
.af-main .af-sheet { flex: 1; min-width: 0; }
.af-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 2px; padding: 8px 6px; border-radius: 12px; background: rgba(127,127,127,.12); width: 170px; flex: 0 0 170px; align-self: flex-start; }
.af-palitem { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border: 1px solid transparent; border-radius: 10px; background: none; color: inherit; cursor: pointer; font-size: 9.5px; letter-spacing: .2px; }
.af-palitem:hover { border-color: color-mix(in srgb, currentColor 30%, transparent); background: rgba(127,127,127,.12); }
.af-palico { width: 44px; height: 30px; }
.af-palico path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.af-rsz { fill: currentColor; opacity: .3; cursor: nwse-resize; }
.af-rsz:hover { opacity: .8; }
@media print { .af-palette { display: none; } .af-ovr .af-hit { stroke-dasharray: none; } .af-focusbtn { display: none; } }
.af-sheet { position: relative; }
.af-tools { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; gap: 6px; align-items: center; }
.af-tools .af-focusbtn { position: static; }
@media print { .af-tools { display: none !important; } }
.af-focus .af-form, .af-focus .af-psd, .af-focus .af-list, .af-focus .af-sandscard, .af-focus .af-notescard, .af-focus .af-prec, .af-focus .af-rail .af-railcard { display: none; }
.af-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule-hair); margin-bottom: 16px; }
.afw .af-tabs { border-color: rgba(255,255,255,.14); }
.af-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; color: inherit; cursor: pointer; font-size: 13.5px; opacity: .72; letter-spacing: .2px; }
.af-tab.on { border-bottom-color: currentColor; opacity: 1; font-weight: 600; }
/* The PG sign-off document (21/10/26): a form on screen, a clean document in print. */
.af-pg { position: fixed; inset: 0; z-index: 90; overflow: auto; background: rgba(0,0,0,.55); padding: 28px 14px; }
.af-pgdoc { max-width: 900px; margin: 0 auto; background: var(--paper); border: 1px solid var(--rule-hair); border-radius: 14px; padding: 26px 30px; display: grid; gap: 14px; }
.afw .af-pgdoc { background: #2e3136; border-color: rgba(255,255,255,.14); color: #edf1f4; }
.af-pghead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.af-pghead h2 { margin: 0; }
.af-pggrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.af-pggrid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.af-pgkick { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; opacity: .72; margin-top: 6px; }
.af-pgtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.af-pgtable th, .af-pgtable td { border: 1px solid rgba(127,127,127,.35); padding: 4px 6px; text-align: left; }
.af-pgtable input { width: 100%; background: none; border: 0; color: inherit; font: inherit; }
.af-pgcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.af-pg textarea { width: 100%; min-height: 160px; background: none; color: inherit; border: 1px solid rgba(127,127,127,.3); border-radius: 8px; padding: 8px; font: inherit; line-height: 1.5; }
.af-pgfile { display: flex; gap: 10px; align-items: center; }
.af-pgacts { align-items: end; }
.af-pgstatus { min-width: 150px; }
@media print {
  body.af-pgprint > *:not(.af-pg) { display: none !important; }
  body.af-pgprint .af-pg { position: static; background: #fff; padding: 0; overflow: visible; }
  body.af-pgprint .af-pgdoc { background: #fff !important; color: #000 !important; border: 0; border-radius: 0; max-width: none; padding: 0; }
  body.af-pgprint .af-pgtable th, body.af-pgprint .af-pgtable td { border-color: #000; }
  body.af-pgprint .af-pgacts, body.af-pgprint .af-pgfile input, body.af-pgprint .af-pgtable button, body.af-pgprint .pj-link { display: none !important; }
}
@media print {
  .af-tabs { display: none !important; }
  .af-tabcard .af-pane[hidden]:not(.af-sandscard):not(.af-notescard) { display: block !important; }
}
.af-prec-chip { font-size: 10.5px; letter-spacing: .4px; text-transform: uppercase; opacity: .7; padding: 2px 8px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 999px; align-self: center; }
.af-totals { display: flex; gap: 18px; font-size: 13.5px; font-weight: 600; margin: 8px 0; flex-wrap: wrap; }
.af-main { display: flex; gap: 12px; align-items: flex-start; }
.af-aside { min-width: 0; }
.af-canvas { overflow-x: auto; border-radius: 14px; background: radial-gradient(1300px 460px at 30% -12%, #8a8e93 0%, #63676c 46%, #46494e 100%); box-shadow: inset 0 0 70px rgba(0, 0, 0, .3), inset 0 0 40px rgba(163, 230, 53, .05); }   /* the wind tunnel's grey, the reference image (20/10/26) */
.af-svg { min-width: 900px; width: 100%; height: auto; display: block; }
.af-canvas:empty { min-height: 240px; }
.af-node rect { fill: rgba(40, 43, 47, .92); stroke: #cdd4da; stroke-width: 1.1; }
.af-node { cursor: pointer; }
.af-node:hover rect, .af-node:focus rect { stroke: #a3e635; stroke-width: 1.8; filter: url(#af-glow); outline: none; }
.af-ovr rect { stroke: #fbbf24; stroke-dasharray: 5 3; }
.af-chip { font-size: 10px; fill: #fbbf24; font-weight: 700; text-transform: uppercase; }
.af-nlabel { font-size: 10.5px; fill: #9aa3ab; text-transform: uppercase; letter-spacing: .08em; }
.af-nmodel { font-size: 13px; font-weight: 700; fill: #f0fdfa; }
.af-nduty { font-size: 11px; fill: #aab4bc; }
.af-edge { fill: none; stroke: url(#af-flow); stroke-width: 1.8; color: #a3e635; stroke-dasharray: 10 7; animation: af-run 1.6s linear infinite; }
.af-water { stroke: url(#af-aqua); color: #22d3ee; stroke-dasharray: 5 7; animation-duration: 1.1s; }
.af-slurry { stroke: url(#af-slur); color: #fbbf24; stroke-dasharray: 8 6; animation-duration: 1.5s; }
.af-slabel { fill: #fcd34d; }
.af-light .af-slabel { fill: #92400e; }
.af-zoom { transition: transform .16s ease; transform-box: fill-box; transform-origin: center; }
.af-node:hover .af-zoom, .af-node:focus .af-zoom { transform: scale(1.07); }
@media (prefers-reduced-motion: reduce) { .af-zoom { transition: none; } }
.af-elabel { font-size: 11px; fill: #d6f5e8; text-anchor: middle; paint-order: stroke; stroke: rgba(88, 92, 97, .9); stroke-width: 3px; }
.af-wlabel { fill: #7de3f4; }
.af-prod path { fill: rgba(34, 211, 166, .08); stroke: #34d399; stroke-width: 1.5; }
.af-plabel { font-size: 11.5px; font-weight: 600; fill: #e7fff6; }
.af-pqty { font-size: 11px; fill: #8fd8c2; }
.af-side { border: 1px solid var(--rule-hair); border-radius: 12px; padding: 12px 14px; min-height: 120px; }
.af-list { margin-top: 14px; display: grid; gap: 12px; }
.af-cites { margin-top: 10px; }
@keyframes af-run { to { stroke-dashoffset: -17; } }
@media (prefers-reduced-motion: reduce) { .af-edge { animation: none; } }
@media (max-width: 900px) { .af-main { flex-direction: column; } .af-palette { flex-direction: row; flex-wrap: wrap; width: 100%; flex: 0 0 auto; max-height: none; } }
@media print {
  .navbar, .af-form, .af-side, .pagebar, .af-rail, .af-warns, .af-totals, .af-aside, .af-notescard, .af-sandscard { display: none !important; }
  .af-body, .af-colmain, .af-main, .af-list { display: block; }
  .af-canvas { background: #fff; box-shadow: none; overflow: visible; }
  .af-svg { min-width: 0; width: 100%; }
  .af-sheet { break-after: page; }
  .af-edge, .af-water { animation: none; stroke: #333; }
  .af-slurry { stroke: #666; }
  .af-slabel { fill: #333; }
  .af-node rect { fill: #fff; stroke: #333; }
  .af-nlabel, .af-nduty { fill: #555; } .af-nmodel, .af-elabel, .af-plabel { fill: #000; stroke: none; }
  .af-prod path { fill: none; stroke: #333; }
  .af-list .card, .afw .af-list .card { background: #fff; border: 0; color: #000; break-inside: avoid; margin: 0 0 14px; padding: 0; }
  .af-list .card h2, .afw .af-list .card h2 { color: #000; font-size: 12pt; }
  .af-list table, .afw .af-list td, .afw .af-list th, .af-list td, .af-list th { color: #000; font-size: 9.5pt; }
  .af-list td, .af-list th, .afw .af-list .tbl td, .afw .af-list .tbl th { border-color: #bbb; padding: 3px 8px; }
  .af-list .tbl th, .afw .af-list .tbl th { color: #000; }
  .af-balret td, .afw .af-balret td { color: #000; }
  .af-balsum td { border-top: 1.5px solid #000; }
  .bt-flag { color: #000; }
}

/* Autoflow's white sheet, the switchable second stage (20/10/26) */
.af-light { background: #fff; box-shadow: inset 0 0 0 1px var(--rule-hair); }
.af-light .af-node rect { fill: #fff; stroke: #0f766e; }
.af-light .af-node:hover rect, .af-light .af-node:focus rect { stroke: #008E49; }
.af-light .af-nlabel { fill: #0f766e; }
.af-light .af-nmodel { fill: #111; }
.af-light .af-nduty { fill: #556; }
.af-light .af-edge { filter: none; }
.af-light .af-elabel { fill: #223; stroke: rgba(255,255,255,.85); }
.af-light .af-wlabel { fill: #0369a1; }
.af-light .af-prod path { fill: rgba(0,142,73,.05); stroke: #0f766e; filter: none; }
.af-light .af-plabel { fill: #111; }
.af-light .af-pqty { fill: #556; }
.af-light .af-chip { fill: #b45309; }

/* Autoflow side panel rows stack; the printed sheet is CFlo plain (20/10/26) */
.af-side .ck-row { display: block; border-top: 1px solid var(--rule-hair); padding: 8px 0; }
.af-side .ck-row-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 2px; }
.af-side .ck-row-v { display: block; overflow-wrap: break-word; }
.af-printhead { display: none; }
@media print {
  .af-printhead { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 22px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; border-bottom: 1.5px solid #000; padding: 8px 10px; }
  .af-ph-row { display: flex; gap: 8px; font-size: 9.5pt; color: #000; align-items: baseline; }
  .af-ph-k { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .06em; color: #333; min-width: 120px; flex: none; }
  .af-ph-wide { grid-column: 1 / -1; }
  body { background: #fff; }
}

/* Autoflow glyphs and the CFlo title block (20/10/26) */
.af-ico path { fill: none; stroke: #d4dade; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.af-light .af-ico path { stroke: #0f766e; }
.af-light .af-ico { filter: none; }
.af-hit { fill: transparent; stroke: none; }
.af-node:hover .af-ico path, .af-node:focus .af-ico path { stroke: #d9f99d; }
.af-light .af-node:hover .af-ico path, .af-light .af-node:focus .af-ico path { stroke: #008E49; }
.af-ovr .af-hit { stroke: #fbbf24; stroke-dasharray: 5 3; stroke-width: 1.2; }
.af-sheet { display: grid; }
.af-titleblock { display: none; }
@media print {
  .af-sheet { border: 1.5px solid #000; }
  .af-canvas { border-radius: 0; }
  .af-titleblock { display: grid; grid-template-columns: 1fr 1fr; border-top: 1.5px solid #000; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
  .af-tb-note { padding: 8px 10px; font-size: 9.5pt; border-right: 1.5px solid #000; }
  .af-tb-id { padding: 8px 10px; display: grid; gap: 2px; font-size: 10pt; }
  .af-tb-logo { height: 24px; width: auto; justify-self: start; margin-bottom: 2px; }
  .af-tb-id b { font-size: 12pt; }
  .af-ico path { stroke: #000; } .af-ico { filter: none; }
  .af-hit { stroke: none; }
}

/* Autoflow in its own window (20/10/26): the wind tunnel end to end */
.afw { position: fixed; inset: 0; z-index: 60; overflow: auto; padding: 18px 22px 40px;
  background: radial-gradient(1500px 520px at 25% -10%, #7e8287 0%, #585c61 45%, #3a3d41 100%); color: #eef1f3; }
.afw-bar { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.afw-brand { font-size: 15px; letter-spacing: .2em; color: #5eead4; }
.afw-sub { font-size: 12.5px; color: #94c8d8; }
.afw-links { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.afw-links .btn.ghost { padding: 4px 9px; opacity: .55; border-color: transparent; }
.afw-links .btn.ghost:hover { opacity: 1; }
.afw .pj-link { color: #67e8f9; }
.afw .fld .lbl, .afw label.f > span, .afw .ck-kicker { color: #94c8d8; }
.afw input, .afw select { background: rgba(42, 45, 49, .85); border: 1px solid rgba(94, 234, 212, .35); color: #f0fdfa; border-radius: 8px; }
.afw .check { color: #d6f5e8; }
.afw .btn.ghost { border-color: rgba(94, 234, 212, .4); color: #a7f3d0; background: transparent; }
.afw .af-canvas { box-shadow: inset 0 0 0 1px rgba(94, 234, 212, .18), inset 0 0 60px rgba(34, 211, 166, .07); }
.afw .af-side { border-color: rgba(94, 234, 212, .25); background: rgba(44, 47, 51, .82); color: #d6f5e8; }
.afw .af-side .ck-row { border-color: rgba(94, 234, 212, .15); }
.afw .af-side .ck-row-k { color: #67e8f9; }
.afw .card { background: rgba(44, 47, 51, .82); border: 1px solid rgba(94, 234, 212, .18); color: #d6f5e8; }
.afw .card h2, .afw .ck-row-v, .afw td, .afw th { color: #e7fff6; }
.afw .tbl th { color: #67e8f9; }
.afw .tbl td, .afw .tbl th { border-color: rgba(94, 234, 212, .12); }
.afw .af-warn { background: rgba(251, 191, 36, .12); color: #fcd34d; }
.afw .af-totals { color: #e7fff6; }
.afw .sub, .afw .ck-row-k { color: #94c8d8; }
@media print { .afw { position: static; background: #fff; color: #000; } .afw-bar { display: none; } .af-menubar { display: none !important; } }

/* Autoflow's sieve analysis and past flowsheets (20/10/26) */
.af-psd { margin: 4px 0 12px; width: fit-content; max-width: 100%; }   /* the head's button keeps to the last sieve cell */
.af-psd-head { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 6px; }
.af-psd-grid { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; }
.af-psd-cell { display: grid; gap: 2px; font-size: 11px; color: var(--ink-2); }
.af-psd-cell input { width: 64px; padding: 5px 6px; }
.af-psdcurve { margin-top: 8px; max-width: 420px; }
.af-psdsvg { width: 100%; height: auto; display: block; }
.af-psdgrid { stroke: var(--rule-hair); stroke-width: .6; }
.af-psdtick { font-size: 8px; fill: var(--ink-2); }
.af-psdline { fill: none; stroke: #008E49; stroke-width: 1.8; }
.af-psddot { fill: #008E49; }
.afw .af-psd-head, .afw .af-psd-cell { color: #67e8f9; }
.afw .af-psdgrid { stroke: rgba(94, 234, 212, .18); }
.afw .af-psdtick { fill: #94c8d8; }
.afw .af-psdline { stroke: #a3e635; filter: drop-shadow(0 0 3px rgba(163, 230, 53, .6)); }
.afw .af-psddot { fill: #fde047; }
.af-prec { margin-top: 12px; border: 1px solid var(--rule-hair); border-radius: 12px; padding: 12px 14px; }
.afw .af-prec { border-color: rgba(94, 234, 212, .25); background: rgba(44, 47, 51, .82); }
/* The Notes card reads calm and plain (Manish, 20/10/26): stacked rows, left aligned, no shouting. */
.af-notescard .ck-row { display: block; border-top: 1px solid var(--rule-hair); padding: 9px 0; }
.af-notescard .ck-row:first-of-type { border-top: 0; }
.af-notescard .ck-row-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 2px; }
.af-notescard .ck-row-v { display: block; text-align: left; font-weight: 400; line-height: 1.55; max-width: 72ch; white-space: normal; overflow-wrap: break-word; }
.afw .af-notescard .ck-row { border-color: rgba(94, 234, 212, .12); }
.afw .af-notescard .ck-row-k { color: #94c8d8; }
.afw .af-notescard .ck-row-v { color: #e7fff6; }
/* The past-sheet viewer tab (21/10/26): one sheet, arrows to flick. */
.af-viewerpage { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; overflow: hidden; }
.af-viewerpage .afw-bar { margin-bottom: 0; align-items: center; }
.af-viewer-who { color: #94c8d8; font-size: 13px; }
.af-viewer-count { font-size: 12.5px; color: #94c8d8; min-width: 44px; text-align: center; }
.af-viewer-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; border-radius: 10px; }
.af-prec-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0; }
.af-prec-head h2 { margin: 0; font-size: 15px; }
.af-prec-chev { opacity: .6; font-size: 15px; }
.af-precrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; border-top: 1px solid var(--rule-hair); padding: 8px 2px; }
.af-precrow:first-child { border-top: 0; margin-top: 6px; }
.af-prec-open { display: grid; gap: 1px; text-align: left; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; min-width: 0; }
.af-prec-open:hover b { text-decoration: underline; }
.af-prec-det { font-size: 12px; opacity: .6; background: none; border: 0; cursor: pointer; padding: 2px 0; }
.af-prec-det:hover { opacity: 1; }
.afw .af-precrow { border-color: rgba(94, 234, 212, .15); }
@media print { .af-psd, .af-prec { display: none; } }

/* Autoflow's own window: the CFlo mark with the Autoflow tag, and the whole-window light theme (20/10/26) */
.afw-logo { height: 26px; display: block; }
.afw-tag { background: rgba(94, 234, 212, .14); border: 1px solid rgba(94, 234, 212, .45); color: #5eead4; border-radius: 4px; padding: 5px 11px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.afw-bar { align-items: center; }
.afw.afw-light { background: #f4f6f5; color: var(--ink, #111); }
.afw-light .afw-tag { background: rgba(0, 142, 73, .08); border-color: rgba(0, 142, 73, .5); color: #008E49; }
.afw-light .afw-sub { color: var(--ink-2); }
.afw-light .afw-links .pj-link, .afw-light .pj-link { color: #0f766e; }
.afw-light .fld .lbl { color: var(--ink-2); }
.afw-light input, .afw-light select { background: #fff; border: 1px solid var(--rule-hair); color: var(--ink, #111); }
.afw-light .check { color: inherit; }
.afw-light .btn.ghost { border-color: var(--rule-hair); color: inherit; }
.afw-light .af-canvas { box-shadow: inset 0 0 0 1px var(--rule-hair); }
.afw-light .af-side, .afw-light .af-prec { border-color: var(--rule-hair); background: #fff; color: inherit; }
.afw-light .af-side .ck-row { border-color: var(--rule-hair); }
.afw-light .af-side .ck-row-k, .afw-light .sub, .afw-light .ck-row-k { color: var(--ink-2); }
.afw-light .card { background: #fff; border-color: var(--rule-hair); color: inherit; }
.afw-light .card h2, .afw-light .ck-row-v, .afw-light td, .afw-light th { color: inherit; }
.afw-light .tbl th { color: var(--ink-2); }
.afw-light .tbl td, .afw-light .tbl th { border-color: var(--rule-hair); }
.afw-light .af-warn { background: rgba(217, 119, 6, .08); color: #b45309; }
.afw-light .af-totals { color: inherit; }
.afw-light .af-precrow { border-color: var(--rule-hair); }
.afw-light .af-psd-head, .afw-light .af-psd-cell { color: var(--ink-2); }
.afw-light .af-psdgrid { stroke: var(--rule-hair); }
.afw-light .af-psdtick { fill: var(--ink-2); }
.afw-light .af-psdline { stroke: #008E49; filter: none; }
.afw-light .af-psddot { fill: #008E49; }

/* The past flowsheets pane (20/10/26): the screen divides, the drawing beside the proposal, never over it */

/* The dark window's tables keep their words visible: the light hover never bleaches a row (20/10/26) */
.afw table.tbl tbody tr:hover { background: rgba(163, 230, 53, .07); }
.afw .tbl tr.tbl-group td { background: rgba(255, 255, 255, .04); }

/* Autoflow page grid and the extras rail (20/10/26): one working column, one side panel */
.af-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.af-menubar { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 12px; background: rgba(127,127,127,.1); margin: 0 0 12px; position: relative; z-index: 40; }
.af-menus { display: flex; gap: 2px; flex-wrap: wrap; }
.af-menuwrap { position: relative; }
.af-menubtn { background: none; border: 1px solid transparent; border-radius: 8px; color: inherit; padding: 6px 12px; cursor: pointer; font-size: 13px; letter-spacing: .2px; }
.af-menubtn:hover, .af-menubtn.on { background: rgba(127,127,127,.18); }
.af-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; min-width: 360px; max-width: min(94vw, 1060px); padding: 16px; border-radius: 14px; background: var(--paper); border: 1px solid var(--rule-hair); box-shadow: 0 18px 50px rgba(0,0,0,.4); display: grid; gap: 10px; }
.afw .af-menu { background: #33373c; border-color: rgba(255,255,255,.14); color: #eceff2; }
.afw-light .af-menu { background: #fff; border-color: rgba(0,0,0,.12); color: #1c2024; }
.af-mright { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.af-seg { display: inline-flex; border: 1px solid rgba(127,127,127,.4); border-radius: 10px; overflow: hidden; }
.af-segbtn { background: none; border: 0; color: inherit; padding: 7px 16px; cursor: pointer; font-size: 13px; opacity: .65; }
.af-segbtn.on { background: rgba(127,127,127,.25); opacity: 1; font-weight: 600; }
.af-mright select { max-width: 150px; }
.af-act { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(127,127,127,.4); border-radius: 10px; background: none; color: inherit; padding: 7px 16px; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.af-act:hover { background: rgba(127,127,127,.15); }
.af-act:disabled { opacity: .45; cursor: default; pointer-events: none; }
.af-act svg { flex: none; }
.af-act.af-primary { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.af-act.af-primary:hover { background: var(--green); border-color: var(--green); }
.af-port { fill: currentColor; opacity: .35; cursor: crosshair; }
.af-port:hover { opacity: .9; }
.af-port-hint { opacity: .9; animation: afpulse 1.6s ease-in-out infinite; }
@keyframes afpulse { 0%, 100% { r: 6; } 50% { r: 9; } }
.af-ghost { pointer-events: none; stroke-dasharray: 5 5; }
.af-dlink { cursor: pointer; }
.af-linkrow { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: center; padding-bottom: 6px; border-bottom: 1px solid rgba(127,127,127,.25); margin-bottom: 4px; }
.af-linkchip { background: none; border: 1px solid transparent; border-radius: 7px; color: inherit; cursor: pointer; font-size: 10px; padding: 3px 6px; letter-spacing: .2px; opacity: .65; }
.af-linkchip.on { border-color: color-mix(in srgb, currentColor 40%, transparent); opacity: 1; }
.af-pgsum { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.af-pgpage .af-pgdoc { max-width: 1240px; margin: 14px auto; }
.af-pgsleek { gap: 10px; padding: 18px 22px; font-size: 12.5px; }
.af-pgsleek .af-pggrid { gap: 6px 10px; }
.af-pggrid6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.af-pgsleek textarea { min-height: 96px; font-size: 12px; }
.af-pgsleek .f span { font-size: 10px; }
.af-pgx { width: 26px; }
@media print {
  body:has(.af-pgpage) .afw-bar { display: none !important; }
  .af-pgpage { background: #fff !important; }
  .af-pgpage .af-pgdoc { background: #fff !important; color: #000 !important; border: 0; max-width: none; margin: 0; }
  .af-pgpage .af-pgtable th, .af-pgpage .af-pgtable td { border-color: #000; }
  .af-pgpage .af-pgx, .af-pgpage .af-pgfile input, .af-pgpage .pj-link { display: none !important; }
}
.af-menurow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.af-main .af-aside { flex: 0 0 300px; }
.af-focus .af-menubar { opacity: .9; }
.af-colmain { min-width: 0; }
.af-rail { display: grid; gap: 12px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; align-content: start; }   /* the whole panel stays reachable (20/10/26) */
.af-rail .card.af-railcard { margin: 0; padding: 14px 16px; display: grid; gap: 10px; }
.af-rail label.f { margin-bottom: 0; }
.af-railacts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.af-railfoot { display: flex; justify-content: space-between; align-items: center; padding: 0 2px; }
.af-railfoot .pj-link { font-size: 12px; opacity: .5; text-decoration: none; }
.af-railfoot .pj-link:hover { opacity: 1; text-decoration: underline; }
.af-gocard { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.af-gocard label.f:nth-of-type(-n+2) { grid-column: 1 / -1; }
.af-gocard label.f input { width: 100%; }
.af-sands { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.af-bals { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.af-bals .ck-kicker { margin-bottom: 4px; }
.af-sand-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.af-sandsvg { width: 100%; max-width: 380px; display: block; margin-bottom: 6px; }
.af-envband { fill: rgba(0, 142, 73, .12); stroke: rgba(0, 142, 73, .45); stroke-width: 1; stroke-dasharray: 3 3; }
.afw .af-envband { fill: rgba(163, 230, 53, .1); stroke: rgba(163, 230, 53, .5); }
.af-offspec { color: #ef4444 !important; font-weight: 700; }
.afw .af-offspec { color: #f87171 !important; }
.af-psd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.af-fit { padding: 3px 10px; font-size: 11.5px; }
.af-joberr { color: #f87171; font-size: 13px; }
.af-picked { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.af-jobchip { font-size: 13px; }
@media (max-width: 1000px) { .af-body { grid-template-columns: 1fr; } .af-main { flex-wrap: wrap; } .af-main .af-aside { flex: 1 1 100%; } }
.af-balsum td { font-weight: 700; border-top: 1.5px solid currentColor; }
.af-balret td { color: #2563eb; }
.afw .af-balret td { color: #7de3f4; }

/* Autoflow's own additions (21/10/26) */
:root { --well: rgba(0,0,0,.04); }
.fs-sec .kn-n { font-size: 11.5px; color: var(--ink-3); font-weight: 600; background: var(--tint); border-radius: 10px; padding: 2px 8px; }

header.top .logo { display: flex; align-items: center; gap: 9px; }
header.top .logo img { height: 100%; width: auto; display: block; }
header.top .logo .tag { font-size: 11px; letter-spacing: .16em; font-weight: 700; color: var(--green-ink); border: 1px solid var(--green-soft); border-radius: 8px; padding: 3px 8px; text-transform: uppercase; }
