/* Northlight Fixture. Phone first, large tap targets, high contrast for sunlight. */

@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('/fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('/fonts/source-serif-4-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --navy: #0A1F33;
  --navy-2: #13304d;
  --gold: #C9A227;
  --gold-dark: #9c7c14;
  --aqua: #5FD3C4;
  --aqua-dark: #1f7f73;
  --paper: #FAFBFC;
  --white: #ffffff;
  --ink: #0A1F33;
  --muted: #4d5d6d;
  --line: #d9e0e7;
  --red: #b3261e;
  --red-bg: #fdecea;
  --amber-bg: #fff6dc;
  --green: #1d7a4a;
  --green-bg: #e5f5ec;
  --radius: 12px;
  --tap: 52px;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.45;
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 19px; }
p { margin: 0 0 12px; }
a { color: var(--navy); }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---- Header / footer ---------------------------------------------------- */
.topbar { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.wordmark { color: var(--white); text-decoration: none; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.wordmark .nl { font-weight: 700; letter-spacing: 0.14em; font-size: 15px; }
.wordmark .fx { font-family: var(--serif); color: var(--gold); font-size: 19px; font-weight: 700; }
.wordmark img { height: 26px; align-self: center; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 14px; color: #c7d3df; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar button.link { color: var(--white); white-space: nowrap; font-size: 15px; }
@media (max-width: 420px) { .topbar .who { display: none; } }
.acting { background: var(--gold); color: var(--navy); font-size: 14px; font-weight: 600; }
.acting .topbar-inner { min-height: 0; padding: 6px 16px; }

.nav { background: var(--navy-2); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 2px; padding: 0 8px; }
.nav a { color: #dce5ee; text-decoration: none; padding: 12px 12px; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; min-height: 46px; display: flex; align-items: center; gap: 6px; }
.nav a.active { color: var(--white); border-bottom-color: var(--gold); font-weight: 600; }
.nav .count { background: var(--gold); color: var(--navy); border-radius: 10px; padding: 0 7px; font-size: 13px; font-weight: 700; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px 16px 40px; }
main.narrow { max-width: 640px; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.footer a { color: var(--muted); }

.org-title { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 4px 0 2px; }
.org-logo { max-height: 56px; max-width: 220px; display: block; margin-bottom: 6px; }

/* ---- Buttons & forms ---------------------------------------------------- */
button, .btn {
  font: inherit; font-weight: 600; font-size: 17px; border-radius: 10px; border: 2px solid var(--navy);
  background: var(--white); color: var(--navy); min-height: var(--tap); padding: 10px 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center;
  touch-action: manipulation;
}
button:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-primary:active { background: var(--gold-dark); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger.solid { background: var(--red); color: var(--white); }
.btn-small { min-height: 40px; padding: 6px 12px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-huge { width: 100%; min-height: 76px; font-size: 22px; border-radius: 14px; }
button.link { background: none; border: none; min-height: 0; padding: 4px; text-decoration: underline; font-weight: 500; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.btn-row > * { flex: 1 1 140px; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
label .hint { font-weight: 400; color: var(--muted); font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); min-height: var(--tap);
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--aqua); outline-offset: 1px; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 500; margin: 10px 0; min-height: var(--tap); padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); }
.check input { width: 26px; height: 26px; flex: none; accent-color: var(--navy); }
.check.emergency { border-color: var(--red); background: var(--red-bg); }
.form-error { color: var(--red); font-weight: 600; margin: 10px 0; }
.form-ok { color: var(--green); font-weight: 600; margin: 10px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice-grid label { margin: 0; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 60px; padding: 8px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); font-weight: 600; }
.choice-grid input:checked + span { border-color: var(--navy); background: var(--navy); color: var(--white); }
.choice-grid input:focus-visible + span { outline: 3px solid var(--aqua); }

/* ---- Cards, lists, badges ------------------------------------------------ */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.card.urgent { border: 2px solid var(--red); }
.card.emergency { border: 2px solid var(--red); background: var(--red-bg); }
.card a.cover { color: inherit; text-decoration: none; display: block; }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card-title { font-weight: 700; font-size: 18px; margin: 0 0 4px; }
.meta { color: var(--muted); font-size: 15px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 12px 0; }
.list li:last-child { border-bottom: none; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e8edf2; color: var(--navy); white-space: nowrap; }
.badge.red { background: var(--red); color: var(--white); }
.badge.amber { background: var(--amber-bg); color: #7a5a00; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.aqua { background: #dff6f2; color: var(--aqua-dark); }
.badge.gold { background: var(--gold); color: var(--navy); }
.badge.outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.banner { border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; font-weight: 600; }
.banner.red { background: var(--red-bg); border: 2px solid var(--red); color: #6e1510; }
.banner.amber { background: var(--amber-bg); border: 2px solid #e5c55a; }
.banner.info { background: #e8f6f4; border: 2px solid var(--aqua); }
.banner a { color: inherit; font-weight: 700; }

.counters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .counters { grid-template-columns: repeat(4, 1fr); } }
.counter { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.counter .n { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.counter .l { color: var(--muted); font-size: 14px; }

.photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.photos a { display: block; }
.photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #eef1f4; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 3px solid var(--line); padding: 4px 0 14px 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--navy); }
.timeline li.v-internal::before { background: var(--muted); }
.timeline li.v-vendor::before { background: var(--aqua-dark); }
.timeline li.v-tenant::before { background: var(--gold); }
.timeline .when { color: var(--muted); font-size: 14px; }

.tabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.tabs button { min-height: 42px; font-size: 15px; padding: 6px 14px; }
.tabs button.on { background: var(--navy); color: var(--white); }

.reveal { border: 2px dashed var(--line); border-radius: 10px; padding: 12px; background: #f4f6f8; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.feed { max-height: 420px; overflow-y: auto; }
.feed li { padding: 8px 0; font-size: 15px; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.live-dot.on { background: #16a34a; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 10px; z-index: 50; font-weight: 600; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.error { background: var(--red); }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(10,31,51,.55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--white); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 16px 24px; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 16px; } }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--white); }
table.data th, table.data td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.auth-box { max-width: 440px; margin: 24px auto; }
.divider { text-align: center; color: var(--muted); margin: 22px 0; font-size: 15px; }
.legal { max-width: 760px; }
.placeholder-warning { background: var(--amber-bg); border: 2px solid #e5c55a; border-radius: var(--radius); padding: 14px; font-weight: 700; }

/* ---- Print (send list) ------------------------------------------------- */
@media print {
  .topbar, .nav, .footer, .no-print { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  main { padding: 0; max-width: none; }
  .card { border: 1px solid #999; break-inside: avoid; }
}

a[href^="tel:"] { white-space: nowrap; }

/* ---- Public request form and status page -------------------------------- */
body.public main { padding-top: 24px; }
.public-brand { margin-bottom: 16px; }
.public-brand .org-title { font-size: 28px; }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yesno label { margin: 0; }
.yesno input { position: absolute; opacity: 0; pointer-events: none; }
.yesno span { display: flex; align-items: center; justify-content: center; min-height: 56px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); font-weight: 600; }
.yesno input:checked + span { border-color: var(--navy); background: var(--navy); color: var(--white); }
.yesno input:focus-visible + span { outline: 3px solid var(--aqua); }
.fieldset-label { font-weight: 600; margin: 16px 0 8px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: 14px; color: var(--muted); margin-top: 12px; }
.dev-bypass { border: 2px dashed #b36b00; background: var(--amber-bg); color: #6b4000; border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: 14px; margin-top: 14px; }
.recap dt { color: var(--muted); }

/* ---- QR stickers --------------------------------------------------------- */
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sticker { border: 2px dashed var(--line); border-radius: 14px; padding: 20px 16px; text-align: center; background: var(--white); break-inside: avoid; }
.sticker-org { font-size: 14px; color: var(--muted); font-weight: 600; }
.sticker-name { font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 4px 0 10px; }
.sticker img { width: 200px; height: 200px; }
.sticker-cta { font-size: 20px; font-weight: 700; margin-top: 8px; }
.sticker-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
@media print {
  .stickers { grid-template-columns: repeat(2, 1fr); gap: 0.3in; }
  .sticker { border: 1px dashed #999; padding: 0.25in; }
  .sticker img { width: 2.2in; height: 2.2in; }
}
