/* Necteo look and feel, carried over from the Rails app's stylesheets. */
@font-face { font-family: "Gibson"; font-weight: 300; font-display: swap;
  src: url("../fonts/gibson-light.2bdb5e7b04fa.woff2") format("woff2"), url("../fonts/gibson-light.e6f14e6d3fde.woff") format("woff"); }
@font-face { font-family: "Gibson"; font-weight: 400; font-display: swap;
  src: url("../fonts/gibson-regular.f714acac7c30.woff2") format("woff2"), url("../fonts/gibson-regular.b1b32e42675a.woff") format("woff"); }
@font-face { font-family: "Gibson"; font-weight: 600; font-display: swap;
  src: url("../fonts/gibson-semibold.452aba56e180.woff2") format("woff2"), url("../fonts/gibson-semibold.cc290464882e.woff") format("woff"); }

:root {
  --primary: #00adab;
  --primary-dark: #009492;
  --primary-darker: #007a79;
  --link: #008a88;
  --gray: #3d474c;
  --gray2: #4f5b60;
  --gray3: #646d71;
  --gray4: #d4dcdd;
  --gray5: #e8eced;
  --error: #e45066;
  --success: #12c946;
  --rounding: 3px;
  --max-width: 62.5em;
  --line: 1px solid var(--gray5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: flex; flex-direction: column;
  background: var(--gray5); color: var(--gray);
  font: 300 16px/1.5 "Gibson", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-weight: 300; letter-spacing: .025em; line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: 2.2em; }
h2 { font-size: 1.6em; margin-top: 1.5em; }
h3 { font-size: 1.2em; }
strong, b { font-weight: 600; }
a { color: var(--link); text-decoration: none; transition: .3s all; }
a:hover { color: var(--primary-darker); }
.muted { color: var(--gray3); }
.wrap { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* --- Top navigation -------------------------------------------------------- */
.topnav { background: var(--primary); color: white; flex: none; }
.topnav .wrap { display: flex; align-items: stretch; justify-content: space-between; min-height: 60px; flex-wrap: wrap; }
.topnav ul { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; }
.topnav li { display: flex; }
.topnav a { color: white; }
.logo { display: flex; align-items: center; margin-right: 1em; }
.logo img { width: 30px; height: 30px; transition: .3s all; }
.logo:hover img { transform: rotate(360deg); }
.topnav .navlink { display: flex; align-items: center; padding: 0 1.25em; opacity: .6; }
.topnav .navlink:hover { background: var(--primary-darker); opacity: 1; }
.topnav .navlink[aria-current] { background: var(--primary-dark); opacity: 1; }
.wordmark { display: flex; align-items: center; font-weight: 600; font-size: 1.5em; letter-spacing: .025em; }
.login-btn { align-self: center; border: 1px solid white; border-radius: 20px; padding: .45em 1.8em; }
.login-btn:hover { background: rgba(255, 255, 255, .2); color: white; }

.account { position: relative; display: flex; align-items: center; }
.account summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6em; padding: .5em 0 .5em 1em; }
.account summary::-webkit-details-marker { display: none; }
.account summary::after { content: ""; width: .45em; height: .45em; border-right: 2px solid white; border-bottom: 2px solid white; transform: rotate(45deg) translateY(-2px); }
.account ul { position: absolute; right: 0; top: 100%; z-index: 20; display: block; min-width: 12em; background: var(--gray2); border-radius: 0 0 var(--rounding) var(--rounding); box-shadow: 0 6px 18px rgba(61, 71, 76, .4); }
.account li { display: block; }
.account li a, .account li button { display: block; width: 100%; padding: .8em 1.25em; color: white; text-align: left; }
.account li a:hover, .account li button:hover { background: var(--gray); color: white; }
.account form { margin: 0; }
.account li button { background: none; border: none; font: inherit; height: auto; line-height: inherit; text-transform: none; cursor: pointer; border-radius: 0; }
.account li button:hover { transform: none; border: none; }

/* --- Page shell ------------------------------------------------------------- */
.content { flex: 1 0 auto; padding: 2em 0; }
.main { background: white; padding: 1.125em; border-radius: var(--rounding); min-width: 0; }
.main.full { padding: 3em; }
.narrow .main.full { max-width: 30em; margin: 0 auto; }
.narrow .main.full button[type=submit] { width: 100%; }
.split { display: grid; grid-template-columns: 13em minmax(0, 1fr); }
.split .main { border-radius: 0 var(--rounding) var(--rounding) 0; }

footer { background: var(--gray); color: white; flex: none; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
footer p { margin: 0; opacity: .6; }

/* --- Sidebar ---------------------------------------------------------------- */
.sidebar { background: var(--gray); padding: 1.125em 0; border-radius: var(--rounding) 0 0 var(--rounding); }
.sidebar .button { display: block; margin: 0 1.125em; }
.sidebar .label { display: block; font-size: .875em; letter-spacing: 2px; text-transform: uppercase; color: var(--gray4); opacity: .4; padding: 2.2em 1.75rem .4em; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: block; line-height: 2.1875em; padding: .1rem 1.75rem 0; margin-top: 1px; color: #9aa5a9; border-left: 4px solid var(--gray); }
.sidebar li a:hover { background: var(--gray2); border-left-color: var(--gray2); color: white; }
.sidebar li a[aria-current] { background: var(--gray2); border-left-color: var(--primary); color: white; }

/* --- Buttons and forms ------------------------------------------------------ */
button, .button {
  display: inline-block; height: 50px; line-height: 50px; padding: 0 1.25rem; margin: 0;
  font: inherit; line-height: 50px; text-align: center; text-transform: capitalize; cursor: pointer;
  background: var(--primary); color: white; border: 1px solid var(--primary); border-radius: var(--rounding);
  transition: .3s all;
}
button:hover, .button:hover { background: var(--primary-darker); border-color: var(--primary-darker); color: white; transform: translateY(-2px); }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--gray); outline-offset: 2px; }
button.secondary, .button.secondary { background: transparent; color: var(--gray2); border-color: var(--gray4); }
button.secondary:hover, .button.secondary:hover { background: var(--gray5); color: var(--gray); }
button.gray { background: var(--gray); border-color: var(--gray); }
button.small { height: 34px; line-height: 34px; padding: 0 .8rem; font-size: .9em; }
button.danger { background: transparent; color: var(--error); border-color: var(--error); }
button.danger:hover { background: var(--error); color: white; }
button.flag { background: none; border: none; height: auto; line-height: 1; padding: .2em; font-size: 1.15em; color: var(--gray4); }
button.flag:hover { color: var(--gray3); transform: none; }
button.flag.on { color: var(--error); }

input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  font: inherit; color: var(--gray); background: white; max-width: 100%;
  height: 50px; padding: 0 .75rem; border: 1px solid var(--gray4); border-radius: var(--rounding); transition: .3s all;
}
textarea { height: auto; padding: .75rem; line-height: 1.5; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):hover, select:hover, textarea:hover,
input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, select:focus, textarea:focus { background: #f6f8f8; border-color: #c3cdcf; }
label { color: var(--gray2); }

.stack { max-width: 36rem; }
.stack > div, .stack > p { margin: 0 0 1.25rem; }
.stack label { display: block; margin-bottom: .3rem; }
.stack div > div label { display: block; margin: 0; }
.stack input:not([type=checkbox]):not([type=radio]):not([type=file]), .stack select, .stack textarea { width: 100%; }
.helptext { color: var(--gray3); font-size: .9em; }
.errorlist { color: var(--error); list-style: none; padding: 0; margin: 0 0 .3rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
form.inline select { height: 34px; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.title-row h1, .title-row h2 { margin: 0; }
.title-row + .title-row, .facts + .title-row, p + .title-row, .table-wrap + .title-row { margin-top: 2.5em; }

.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.messages li { padding: .8rem 1rem; border-radius: var(--rounding); background: #e2f6f5; border-left: 4px solid var(--primary); margin-bottom: .5rem; overflow-wrap: anywhere; }
.messages li.error { background: #fbe7ea; border-left-color: var(--error); }

/* --- Tables ----------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: .75em 0; }
table { width: 100%; border-collapse: collapse; }
th { font-weight: 600; font-size: .75em; text-transform: uppercase; letter-spacing: 1px; text-align: left; color: var(--gray); border-bottom: 2px solid var(--gray); padding: .375rem .625rem .25rem; white-space: nowrap; }
td { padding: 1rem .625rem; border-bottom: var(--line); vertical-align: middle; }
td.id { white-space: nowrap; }
/* Client IDs use a face where I, l, 1 and O, 0 are clearly different. */
.client-id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: .95em; letter-spacing: 0; text-transform: none; white-space: nowrap; }
span.line { display: block; }

.search { position: relative; display: flex; gap: .75rem; align-items: center; }
.search input { flex: 1; min-width: 0; }
.search-results { font-weight: 600; margin: 1em 0 0; }
.pager { display: flex; gap: 1.5rem; justify-content: center; align-items: center; margin-top: 1.5rem; }
.empty { width: min(100%, 30em); text-align: center; margin: 4% auto; }
.empty .glyph { font-size: 3.5em; color: var(--gray4); line-height: 1; padding: .5em; }

.danger-zone { margin-top: 3rem; padding: 1rem 1.25rem 1.25rem; border: 1px solid var(--error); border-radius: 4px; }
.danger-zone h2 { color: var(--error); margin-top: 0; }
.danger-zone h3 { margin-bottom: .25rem; }
.prefix-lock { margin-top: 1rem; }
.prefix-row { display: flex; align-items: center; gap: .5rem; }
.danger-zone .prefix-row input.client-id { width: 9em; flex: none; font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 1.1em; text-transform: uppercase; }
.prefix-lock.is-locked .prefix-row input.client-id, .prefix-lock.is-locked .prefix-row input.client-id:hover, .prefix-lock.is-locked .prefix-row input.client-id:focus { background: var(--gray5); border-color: var(--gray5); color: var(--gray2); cursor: default; }
button.padlock, button.padlock:hover { background: transparent; border-color: transparent; padding: .3rem .7rem; color: var(--gray3); transform: none; line-height: 0; }
button.padlock:hover { color: var(--gray); }
.prefix-lock:not(.is-locked) button.padlock { color: #c0334a; }
.padlock svg { fill: currentColor; display: block; }
.prefix-lock.is-locked .icon-unlocked, .prefix-lock:not(.is-locked) .icon-locked { display: none; }
[hidden] { display: none !important; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: flex; flex-direction: column; gap: .5rem; width: min(26rem, calc(100vw - 2rem)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--rounding); background: var(--gray); color: white; border-left: 4px solid var(--primary); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); opacity: 0; transform: translateY(.5rem); transition: opacity .25s, transform .25s; overflow-wrap: anywhere; }
.toast.is-shown { opacity: 1; transform: none; }
.toast.error { border-left-color: var(--error); }
.toast p { margin: 0; flex: 1; }
.toast button, .toast button:hover { background: transparent; border-color: transparent; color: white; padding: 0 .25rem; font-size: 1.2em; line-height: 1.2; transform: none; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.hint { font-size: .85em; color: var(--gray3); margin: .5rem 0 0; }
button.danger, button.danger:hover { background: #c0334a; border-color: #c0334a; color: #fff; }
button.danger:hover { filter: brightness(.9); }
.former-ids { font-size: .85em; color: var(--gray3); margin: .25rem 0 0; }

/* Repeatable groups on the client form (emails, phones, addresses, education). */
.client-form fieldset.group { margin: 0 0 1.25rem; }
.client-form fieldset.group legend { margin-bottom: .4rem; color: inherit; }
.group-entries:empty { display: none; }
.group-entry { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; }
.group-entry .remove-entry { order: -1; }
.entry-fields { flex: 1; min-width: 0; display: grid; gap: .5rem; }
.group-emails .entry-fields { grid-template-columns: 8.5rem 1fr; }
.group-phones .entry-fields { grid-template-columns: 8.5rem 1fr 5.5rem; }
.group-addresses .entry-fields { grid-template-columns: 1fr 4.5rem 7rem; }
.group-addresses .entry-label, .group-addresses .entry-street1, .group-addresses .entry-street2 { grid-column: 1 / -1; }
.group-addresses .entry-label select { width: 8.5rem; }
.group-addresses .entry-state input { text-transform: uppercase; }
.group-education .entry-fields { grid-template-columns: 1fr 1fr; }
.group-military .entry-fields { grid-template-columns: 1fr 1fr; }
.group-military .entry-job, .group-military .entry-discharge_type { grid-column: 1 / -1; }
.group-military .entry-check { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; }
.group-military .entry-check label { margin: 0; }
.entry-caption { display: block; font-size: .8em; color: var(--gray3); margin-bottom: .15rem; }
.group-contacts .entry-fields { grid-template-columns: repeat(6, 1fr); }
.group-contacts .entry-relationship { grid-column: 1 / -1; }
.group-contacts .entry-relationship select { width: 13rem; max-width: 100%; }
.group-contacts .entry-first_name, .group-contacts .entry-last_name,
.group-contacts .entry-phone, .group-contacts .entry-other_phone { grid-column: span 3; }
.group-contacts .entry-email, .group-contacts .entry-street1, .group-contacts .entry-street2 { grid-column: 1 / -1; }
.group-contacts .entry-city { grid-column: span 3; }
.group-contacts .entry-state { grid-column: span 1; }
.group-contacts .entry-zipcode { grid-column: span 2; }
.group-contacts .entry-state input { text-transform: uppercase; }
.group-contacts .group-entry + .group-entry { border-top: var(--line); padding-top: .6rem; }
.contact-person { display: block; }
.contact-person + .contact-person { margin-top: .6rem; }
.entry-field .errorlist { margin-bottom: .2rem; font-size: .9em; }
@media (max-width: 30rem) {
  .group-emails .entry-fields, .group-phones .entry-fields, .group-education .entry-fields,
  .group-military .entry-fields { grid-template-columns: 1fr; }
  .group-contacts .entry-fields > * { grid-column: 1 / -1 !important; }
}
/* The minus button: a checkbox under a round icon, so it works without JavaScript too. */
.remove-entry { position: relative; flex: none; margin-top: 13px; cursor: pointer; }
.remove-entry input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.remove-icon, .add-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: white; font-weight: 600; line-height: 1; }
.remove-icon { background: #c0334a; }
.remove-entry input:focus-visible + .remove-icon { outline: 2px solid var(--gray); outline-offset: 2px; }
.group-entry:has(.remove-entry input:checked) .entry-fields { opacity: .4; text-decoration: line-through; }
button.add-entry, button.add-entry:hover { display: inline-flex; align-items: center; gap: .5rem; background: transparent; border-color: transparent; color: var(--primary-darker); padding: .2rem 0; height: auto; line-height: 1.4; transform: none; }
button.add-entry:hover { text-decoration: underline; }
.add-icon { background: var(--primary); }
.detail-label { font-size: .75em; text-transform: uppercase; letter-spacing: .05em; color: var(--gray3); margin-left: .35rem; }

/* --- Details ---------------------------------------------------------------- */
.last-update { text-transform: uppercase; font-size: .75em; letter-spacing: .05em; color: var(--gray3); margin: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 1.5rem 0; }
.facts dt { font-weight: 600; font-size: .75em; text-transform: uppercase; letter-spacing: 1px; padding-top: .3em; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tag { display: inline-block; padding: .1rem .7rem; margin: 0 .3rem .3rem 0; background: var(--gray5); border-radius: 1rem; font-size: .9em; }
.note { border-bottom: var(--line); padding: 1rem 0; }
.note p { margin: .25rem 0; }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: .8rem 0; border-bottom: var(--line); display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: .6rem; }
.topnav .avatar { margin: 0; width: 2.4rem; height: 2.4rem; border-radius: var(--rounding); }
.avatar.large { width: 6rem; height: 6rem; margin: .5rem 0 1.5rem; display: block; }
.matches { border: 1px solid var(--primary); border-left-width: 4px; border-radius: var(--rounding); padding: 1.25rem; margin-bottom: 2rem; background: #f3fbfb; }
.matches h2 { margin-top: 0; }
.matches ul { padding-left: 1.2rem; }
.matches li { margin-bottom: .6rem; }
.matches button { height: auto; min-height: 50px; line-height: 1.3; padding: .8rem 1.25rem; text-transform: none; }

/* --- Landing page ----------------------------------------------------------- */
.landing .content { padding: 0; }
.hero { background: var(--primary); color: white; text-align: center; padding: 14% 0; }
.hero h1 { font-weight: 600; font-size: clamp(2em, 5vw, 3em); margin: 0 0 .25em; }
.hero h2 { font-size: clamp(1.3em, 3.2vw, 2.2em); margin: 0 auto 1.5em; max-width: 26em; }
.hero .learn { color: white; text-transform: uppercase; letter-spacing: .1em; padding-bottom: .25em; border-bottom: 2px solid white; opacity: .7; }
.hero .learn:hover { opacity: 1; }
.band { padding: 6% 0; background: white; }
.band.alt { background: var(--gray5); }
.band > .wrap > h2 { text-align: center; max-width: 30em; margin: 0 auto 2em; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 3em; align-items: center; padding: 2.5em 0; }
.feature h3 { font-weight: 600; font-size: 1.4em; }
.feature img { width: 100%; height: auto; max-width: 400px; background: var(--gray); display: block; border-radius: var(--rounding); }
.feature.flip .text { order: 2; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 3em; align-items: center; }
.people img { max-width: 100%; width: 370px; height: auto; }
.people ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9em 1.5em; }
.cta { text-align: center; }

/* --- Small screens ---------------------------------------------------------- */
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .sidebar { border-radius: var(--rounding) var(--rounding) 0 0; }
  .split .main { border-radius: 0 0 var(--rounding) var(--rounding); }
  .main.full { padding: 1.5em 1.125em; }
  .feature, .people { grid-template-columns: 1fr; gap: 1.5em; }
  .feature.flip .text { order: 0; }
  .topnav .navlink { padding: 0 .8em; }
  .account .name { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .topnav, footer, .sidebar { display: none; } body { background: white; } }
.flush { margin-top: 0; }
.landing-messages { padding-top: 1rem; }
.stack .check { display: flex; align-items: center; gap: .5rem; }
.stack .check label { margin: 0; }

/* --- Referrals, static pages ------------------------------------------------- */
.sidebar .count { float: right; font-weight: 600; font-size: .8em; line-height: 20px; min-width: 25px; text-align: center; margin-top: 8px; padding: 1px 4px 0; color: var(--gray4); background: var(--gray3); border-radius: var(--rounding); }
footer ul { display: flex; flex-wrap: wrap; align-items: center; gap: .25em 1.75em; list-style: none; margin: 0; padding: .75em 0; opacity: .9; }
footer ul a { color: white; opacity: .6; }
footer ul a:hover { color: white; opacity: 1; }
footer ul li:last-child { opacity: .6; }
.back { margin: 0 0 1em; padding-bottom: .5em; border-bottom: var(--line); font-size: .875rem; text-transform: uppercase; }
hr { border: none; border-top: var(--line); margin: 1.5rem 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3em; align-items: start; }
.tag.urgent { background: var(--error); color: white; font-size: .75em; margin-left: .4em; }
.decision { margin-bottom: 1rem; }
.choice { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; cursor: pointer; }
.choice input { margin-top: .35rem; }
.reveal { margin-top: 1rem; }
.reveal summary { cursor: pointer; color: var(--link); display: inline-block; padding: .25rem 0; }
.reveal[open] summary { margin-bottom: .75rem; font-weight: 600; color: var(--gray); }
fieldset { border: none; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
legend { padding: 0; margin-bottom: .3rem; color: var(--gray2); }
.referral-form fieldset > div { columns: 2 14em; column-gap: 2em; }
.referral-form fieldset > div > div { break-inside: avoid; padding: .15rem 0; }
.referral-form fieldset label { display: block; }
.stack .check.top { align-items: flex-start; }
.stack .check.top input { margin-top: .35rem; flex: none; }
.member { display: grid; grid-template-columns: 150px 1fr; gap: 2em; align-items: center; padding: 1.5em 0; }
.member img { border-radius: 50%; width: 150px; height: 150px; object-fit: cover; }
.member h3 { font-weight: 600; margin: 0 0 .25em; }
.member .role { font-size: 1.1em; margin: 0 0 .5em; }
.lede { font-size: 1.15em; }
.hp { position: absolute; left: -5000px; }
.legal-page h1 { margin-bottom: .75em; }
.legal-page h5 { font-size: 1em; font-weight: 300; margin: 0 0 1em; }
.legal-page h4 { font-weight: 600; font-size: 1.1em; margin: 1.5em 0 .5em; }
.legal-page ol.legal { padding-left: 1.5em; }
.legal-page ol.legal > li { font-weight: 600; font-size: 1.15em; padding-top: 1.25em; }
.legal-page ol.legal ol { padding-left: 1.5em; }
.legal-page ol.legal ol li { font-weight: 300; font-size: .87em; padding-top: .5em; }
.legal-page ol.legal ol ol li { font-size: 1em; }
.legal-page ol.legal ul { list-style: disc; padding-left: 1.5em; }
.legal-page ol.legal ul li { font-size: 1em; }
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .member { grid-template-columns: 1fr; gap: 1em; }
  footer .wrap { flex-wrap: wrap; }
}
button.small { white-space: nowrap; }

/* --- Networks ---------------------------------------------------------------- */
.card { border: var(--line); border-radius: var(--rounding); padding: 1.25rem; margin: 0 0 1rem; }
.card h3 { font-weight: 600; margin: 0; }
.card p { margin: .5rem 0; }
.org-list { list-style: none; padding: 0; margin: .75rem 0; }
.org-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem 0; border-top: var(--line); }
.invite-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.invite-row select { min-width: 0; flex: 1 1 12em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Metrics ------------------------------------------------------------------ */
.metrics-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.metrics-controls h1 { margin: 0 auto 0 0; }
.metrics-controls label { display: block; font-size: .875em; margin-bottom: .2rem; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: var(--line); margin-bottom: 1rem; }
.tabs a { font-weight: 400; padding: 1rem 2rem .7rem; color: var(--gray); opacity: .45; border-bottom: 4px solid transparent; }
.tabs a:hover { opacity: 1; border-bottom-color: var(--gray3); }
.tabs a[aria-current] { opacity: 1; border-bottom-color: var(--gray); }
.metric-section { padding: 1.25rem 0; border-bottom: var(--line); }
.metric-section:last-child { border-bottom: none; }
.metric-section h2 { margin-top: 0; font-size: 1.3em; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: 1.25rem 1.5rem; }
.tiles li { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.tiles strong { font-weight: 600; font-size: 2.6em; line-height: 1.1; color: var(--gray); overflow-wrap: anywhere; }
.tiles strong.words { font-size: 1.35em; line-height: 1.25; padding-bottom: .35em; }
.tiles span { color: var(--gray3); }
/* One hue; names and values stay in text color. #009492 passes the 3:1 contrast check on white. */
.bars { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: minmax(8em, max-content) minmax(0, 1fr) max-content; gap: .6rem 1rem; align-items: center; max-width: 46rem; }
.bars li { display: contents; }
.bars .bar { width: 100%; display: block; }
.bars .bar rect { fill: #009492; }
.bars .bar-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 760px) { .bars { grid-template-columns: minmax(0, 1fr) max-content; } .bars .bar-label { grid-column: 1 / -1; margin-bottom: -.4rem; } }
.entry-state input::placeholder { text-transform: none; }
.group-military .entry-clearance_active { grid-column: auto; }

/* Service picker (see app.js): search box, dropdown of checkboxes, chips. */
.picker { position: relative; max-width: 36rem; }
.picker-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 .5rem; }
.picker-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .25rem .15rem .75rem; background: var(--gray5); border-radius: 1rem; font-size: .9em; }
button.picker-remove, button.picker-remove:hover { height: auto; line-height: 1; padding: .1rem .4rem; background: transparent; border-color: transparent; color: var(--gray2); font-size: 1.15em; border-radius: 50%; transform: none; }
button.picker-remove:hover { background: var(--gray4); color: var(--gray); }
.stack .picker input.picker-search, .picker input.picker-search { width: 100%; }
.picker-panel { position: absolute; left: 0; right: 0; z-index: 20; margin-top: .25rem; max-height: 16rem; overflow-y: auto; background: white; border: 1px solid var(--gray4); border-radius: var(--rounding); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); padding: .25rem 0; }
.picker-panel.is-empty { display: none; }
.picker-panel > div { padding: 0; }
.picker-panel label { display: flex !important; align-items: center; gap: .6rem; margin: 0 !important; padding: .45rem .75rem; cursor: pointer; }
.picker-panel label:hover, .picker-panel label:has(input:focus-visible) { background: #f0f8f8; }
.picker-panel input:focus-visible { outline-offset: 1px; }
.picker-empty { margin: .4rem 0 0; font-size: .9em; color: var(--gray3); }
