/* NNS Apps landing site. Brand colours match the public website. */
:root { --navy-900: #0b1347; --navy-800: #14206b; --blue-600: #2a3a9e; --red-600: #c8202a; --bg: #f3f5fb; --card: #fff; --border: #d5dae8; --text: #141826; --muted: #4a5068; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.5; color: var(--text); background: var(--bg); }
body { margin: 0; }
a { color: var(--blue-600); }
:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
main.wrap { padding-top: 2rem; padding-bottom: 3rem; }
.narrow { max-width: 30rem; }
.top { background: var(--navy-900); color: #fff; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand span { color: #ff8d94; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; }
.top nav a, .top .linklike { color: #fff; }
.top .who { opacity: 0.8; font-size: 0.9rem; }
.top form { margin: 0; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 0.75rem; color: var(--navy-900); }
h2 { font-size: 1.15rem; margin: 0 0 0.3rem; color: var(--navy-900); }
h2 a { color: inherit; }
.muted, small, .meta { color: var(--muted); }
small, .meta { font-size: 0.88rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; }
.apps { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.apps p { margin: 0 0 0.6rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 1rem 0; }
.inline-form label { font-weight: 600; }
input, select { font: inherit; padding: 0.45rem 0.6rem; border: 1px solid #8a91a8; border-radius: 6px; background: #fff; color: inherit; }
.inline-form input { flex: 1; min-width: 14rem; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 0.75rem 0; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: #fafbfe; }
tr:last-child td { border-bottom: 0; }
tr.off td:first-child strong { text-decoration: line-through; color: var(--muted); }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline-flex; gap: 0.4rem; }
button, .button { font: inherit; font-weight: 600; cursor: pointer; display: inline-block; text-decoration: none; padding: 0.5rem 1rem; border-radius: 6px; border: 1px solid #8a91a8; background: #fff; color: var(--navy-900); }
button:hover, .button:hover { background: #e8ecfb; }
.primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.primary:hover { background: var(--navy-900); }
.small { padding: 0.2rem 0.6rem; font-size: 0.875rem; }
.danger { color: #a3161f; border-color: #a3161f; }
.linklike { background: none; border: 0; padding: 0; font-weight: 400; text-decoration: underline; }
.linklike:hover { background: none; }
.flash { border-radius: 8px; padding: 0.7rem 1rem; margin: 0 0 1rem; border: 1px solid transparent; }
.flash.ok { background: #e3f4ea; color: #17663a; border-color: #9fd3b4; }
.flash.error { background: #fbe6e7; color: #7d1118; border-color: #eaa5a9; }

.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: 0.5rem; }
.head h1 { margin: 0; }
th small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.table-wrap { overflow-x: auto; }

/* Manage access: one card per person, their applications in a grid below the name. */
.inline-form .hint { flex-basis: 100%; margin: 0; font-size: 0.88rem; }
h2.section { margin-top: 1.5rem; }
h2 small { font-weight: 400; }
.people, .found { list-style: none; margin: 0.75rem 0; padding: 0; display: grid; gap: 0.75rem; }
.found { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.found li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; overflow-wrap: anywhere; }
.found form { margin: 0; flex: none; }
.person { padding: 1rem 1.25rem; }
.person.off strong { text-decoration: line-through; color: var(--muted); }
.who-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; margin-bottom: 0.75rem; overflow-wrap: anywhere; }
.roles { display: grid; gap: 0.75rem 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.roles label { display: flex; flex-direction: column; gap: 0.1rem; font-weight: 600; font-size: 0.95rem; border-left: 3px solid var(--border); padding-left: 0.6rem; }
.roles label.has { border-left-color: #2e8b57; }
.roles label small { font-weight: 400; overflow-wrap: anywhere; }
.roles select { margin-top: 0.3rem; width: 100%; }
.person .actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.9rem; }
details.card { margin: 1.25rem 0 1rem; }
details.card summary { cursor: pointer; font-weight: 600; }
details.card .inline-form { margin: 0.75rem 0 0; }
.ask { margin: 1rem 0; border-left: 4px solid var(--blue-600); }
.ask p { margin: 0 0 0.75rem; }
