/* Open Housing Canada "Open Module" brand — canvas / ink / module blue / timber,
   matching openhousingcanada.ca */
:root {
  --teal-950: #15171c;        /* ink-900 — headings */
  --teal-900: #1633c9;        /* deep blue — hovers */
  --teal: #1F4DFF;            /* OHC module blue — primary */
  --green: #9c6c36;           /* timber-600 accent */
  --green-bright: #b9874c;    /* timber-500 */
  --blue: #C8742B;            /* timber accent (logo ochre) */
  --blue-mid: #5a78f2;
  --sky: #93a8fb;

  --ink: #15171c;
  --ink-soft: #393c43;
  --muted: #52565e;
  --line: #e5e0d3;
  --line-2: #d8d2c2;
  --bg: #f6f3ec;              /* OHC canvas */
  --tint-2: #efeadf;          /* canvas tint */
  --card: #ffffff;
  --danger: #a63d3d;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --shadow: 0 8px 28px rgba(21,23,28,.07);
  --shadow-lg: 0 24px 64px rgba(21,23,28,.14);
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }

/* OHC wordmark lockup */
.logo .ohc-word { display: flex; flex-direction: column; line-height: 1; }
.logo .ohc-word b { font-family: var(--font-display); font-size: 15px; color: var(--ink); font-weight: 650; line-height: 1.15; }
.logo .ohc-word small { border: none; padding: 4px 0 0; margin: 0; max-width: none; line-height: 1;
  font-size: 8px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* Cross-app platform switcher */
details.apps-menu { position: relative; margin-left: auto; }
details.apps-menu summary { list-style: none; cursor: pointer; user-select: none;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 14px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
details.apps-menu summary::-webkit-details-marker { display: none; }
details.apps-menu summary::after { content: " ▾"; color: var(--muted); }
details.apps-menu[open] summary { background: var(--tint-2); }
details.apps-menu .apps-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 8px; min-width: 240px; display: flex; flex-direction: column; }
details.apps-menu .apps-pop a { display: block; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
details.apps-menu .apps-pop a:hover { background: var(--tint-2); }
details.apps-menu .apps-pop .sec { font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); padding: 8px 12px 3px; }

footer.ohc-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 0 34px; }

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}
a { color: var(--teal); }

header.app {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
header.app .logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
header.app .logo img { height: 32px; display: block; }
header.app .logo small {
  color: var(--muted); font-size: 12px; letter-spacing: .4px; border-left: 1px solid var(--line-2);
  padding-left: 14px; line-height: 1.3; max-width: 180px;
}
header.app nav { display: flex; gap: 4px; flex: 1; }
header.app nav a {
  color: var(--ink-soft); text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 15px; font-weight: 600;
}
header.app nav a.active { color: var(--teal); background: var(--tint-2); }
header.app nav a:hover { background: var(--tint-2); }
header.app button {
  background: none; border: 1px solid var(--line-2); color: var(--ink-soft); border-radius: 8px;
  padding: 7px 14px; cursor: pointer; font-size: 13.5px; font-family: inherit; font-weight: 600;
}
header.app button:hover { border-color: var(--teal); color: var(--teal); }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
h1 { font-size: 27px; margin: 0 0 4px; color: var(--teal-900); letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,45,48,.05); }
.tile .n { font-size: 30px; font-weight: 700; color: var(--teal); line-height: 1.1; }
.tile .l { font-size: 13px; color: var(--muted); margin-top: 2px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill {
  border: 1px solid var(--line-2); background: var(--card); border-radius: 999px;
  padding: 6px 14px; font-size: 13.5px; cursor: pointer; color: var(--ink); font-family: inherit;
}
.pill.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.pill .ct { opacity: .65; margin-left: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,45,48,.05); }
.card h2 { font-size: 14.5px; margin: 0 0 12px; color: var(--teal); text-transform: uppercase; letter-spacing: .8px; }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 14px; border-bottom: 2px solid var(--line); background: var(--bg); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover { background: var(--tint-2); }

.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #e8ecee; color: var(--muted); white-space: nowrap; }
.chip.s-contacts { background: #e3f0fa; color: #005ba6; }
.chip.s-introduced { background: #e9f4fb; color: #0073CF; }
.chip.s-meeting_scheduled { background: #e0f3fa; color: #007bb0; }
.chip.s-onboarding { background: #dff3ee; color: #00745f; }
.chip.s-active { background: var(--teal); color: #fff; }
.chip.s-on_hold { background: #f3dede; color: var(--danger); }

.star { color: var(--green-bright); font-size: 15px; }
.hsnote { color: var(--green); font-weight: 700; font-size: 12.5px; }

.progress { background: var(--tint-2); border-radius: 999px; height: 8px; width: 110px; display: inline-block; vertical-align: middle; }
.progress i { display: block; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--green-bright)); }
.progress-label { font-size: 12.5px; color: var(--muted); margin-left: 8px; }

button.btn, a.btn {
  background: var(--teal); color: #fff; border: none; border-radius: 8px; padding: 10px 18px;
  font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block;
}
button.btn:hover, a.btn:hover { background: var(--teal-900); }
button.btn.ghost, a.btn.ghost { background: #fff; color: var(--teal); border: 1px solid var(--teal); }
button.btn.sm { padding: 6px 12px; font-size: 13px; }
button.link { background: none; border: none; color: var(--teal); cursor: pointer; font-size: 13px; padding: 2px 4px; font-family: inherit; }
button.link.danger { color: var(--danger); }

input, select, textarea {
  font-family: inherit; font-size: 14.5px; padding: 8px 10px; border: 1px solid var(--line-2);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sky); outline-offset: 0; border-color: var(--blue-mid); }
textarea { resize: vertical; min-height: 70px; }
label.f { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.frow { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.frow > div { flex: 1; min-width: 140px; }

.grid2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

ul.checklist { list-style: none; padding: 0; margin: 0; }
ul.checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
ul.checklist li:last-child { border-bottom: none; }
ul.checklist input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); cursor: pointer; }
ul.checklist .done { color: var(--muted); text-decoration: line-through; }
ul.checklist .when { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }

.logitem { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.logitem:last-child { border-bottom: none; }
.logitem .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 260px; }
.spacer { flex: 1; }

/* profile scores */
.scoregrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.scoregrid .srow { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.scoregrid .srow .sl { color: var(--muted); flex: 1; }
.scoregrid .srow .sb { background: var(--tint-2); border-radius: 999px; height: 6px; width: 70px; }
.scoregrid .srow .sb i { display: block; height: 6px; border-radius: 999px; background: var(--blue-mid); }
.scoregrid .srow .sv { font-weight: 700; width: 26px; text-align: right; }
.bigscore { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.bigscore .v { font-size: 34px; font-weight: 900; color: var(--teal); }
.bigscore .d { font-size: 13px; color: var(--muted); }

/* login / join */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--teal) 0%, var(--teal-950) 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 40px 38px; width: 400px; max-width: 92vw; box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 22px; }
.login-card .err { color: var(--danger); font-size: 13.5px; min-height: 18px; margin-top: 8px; }
.login-card img.wordmark { height: 40px; margin-bottom: 18px; display: block; }

.back { font-size: 14px; text-decoration: none; color: var(--muted); display: inline-block; margin-bottom: 10px; }
.back:hover { color: var(--teal); }
.muted { color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* dashboard quick-tick columns */
th.tick, td.tick { text-align: center; white-space: nowrap; }
td.tick input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; vertical-align: middle; }
