/* The staff home after signing in, and the five section pages (Oct 30 2026).
   Same colours, fonts and icon style as the public front page. */

@font-face {
  font-family: 'Frank Ruhl';
  src: url('../fonts/frank-ruhl-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

.hm { color: var(--ink); background: #f6f9fc; min-height: 100vh; text-align: left; font-family: var(--body); }
.hm-wrap { width: min(1160px, calc(100% - 2.5rem)); margin-inline: auto; }
.hm-ic { width: 22px; height: 22px; flex: none; }
.hm-ic--lg { width: 30px; height: 30px; }
.hm-ic--sm { width: 17px; height: 17px; }
.hm-go { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- top bar */
.hm-top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.5) blur(10px); -webkit-backdrop-filter: saturate(1.5) blur(10px);
  border-bottom: 1px solid #e6edf5; }
.hm-top__in { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.hm-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; min-width: 0; }
.hm-brand img { width: 47px; height: 30px; flex: none; }
.hm-brand span { font-family: var(--display); font-weight: 750; font-size: 1.1rem; color: var(--navy-deep);
  letter-spacing: -.02em; line-height: 1.15; display: flex; flex-direction: column; min-width: 0; }
.hm-brand small { font-family: var(--body); font-weight: 600; font-size: .78rem; color: var(--muted);
  letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-out { font: 600 .9rem/1 var(--body); color: var(--navy); background: #fff; border: 1.5px solid #c7d5e6;
  border-radius: 10px; padding: .6rem 1rem; cursor: pointer; flex: none; }
.hm-out:hover { border-color: var(--navy); }
.hm-secnav { display: flex; gap: .25rem; flex-wrap: wrap; }
.hm-secnav a { color: #33475c; text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: .45rem .75rem; border-radius: 9px; }
.hm-secnav a:hover { background: #eef3f9; color: var(--navy); }
.hm-secnav a[aria-current="page"] { background: var(--c, var(--navy)); color: #fff; }

/* ---------------------------------------------------------------- hero */
.hm-hero { position: relative;
  background:
    radial-gradient(700px 340px at 90% 0%, rgba(27,145,158,.16), transparent 70%),
    radial-gradient(760px 380px at 0% 100%, rgba(239,182,53,.13), transparent 70%),
    linear-gradient(180deg, #eef4fb 0%, #f6f9fc 100%);
  padding: 2.6rem 0 2.2rem; }
.hm-school { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .78rem;
  letter-spacing: .11em; text-transform: uppercase; color: var(--teal-deep);
  background: #dff1f2; border-radius: 999px; padding: .38rem .85rem; margin: 0 0 .9rem; }
.hm-hello { font-family: var(--display); font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.08;
  color: var(--navy-deep); letter-spacing: -.025em; margin: 0 0 .35rem; font-weight: 780; }
.hm-sub { color: #3d5064; font-size: 1.08rem; margin: 0 0 1.4rem; }

.hm-search { position: relative; max-width: 44rem; }
.hm-search__ic { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: #6b7e92; pointer-events: none; }
.hm-search input { width: 100%; font: 500 1.05rem/1.3 var(--body); color: var(--ink);
  background: #fff; border: 1.5px solid #cfdbe8; border-radius: 14px; padding: 1rem 1rem 1rem 3.1rem;
  box-shadow: 0 6px 22px rgba(0,56,119,.08); outline: none; -webkit-appearance: none; appearance: none; }
.hm-search input:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0,56,119,.12); }
.hm-search__out { display: none; position: absolute; left: 0; right: 0; top: calc(100% + .4rem); z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  max-height: 60vh; overflow: auto; padding: .35rem; }
.hm-search__out.is-open { display: block; }
.hm-search__hit { display: block; text-decoration: none; padding: .7rem .85rem; border-radius: 10px; }
.hm-search__hit:hover, .hm-search__hit:focus { background: #eef4fb; outline: none; }
.hm-search__hit strong { display: block; color: var(--navy-deep); font-weight: 650; font-size: .98rem; }
.hm-search__hit strong em { font-style: normal; background: #fdf0c8; border-radius: 3px; }
.hm-search__hit span { display: block; color: var(--muted); font-size: .84rem; margin-top: .1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-search__none { color: var(--muted); padding: .8rem; margin: 0; font-size: .92rem; }

.hm-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.1rem; }
.hm-quick > span { color: var(--muted); font-weight: 600; font-size: .88rem; margin-right: .1rem; }
.hm-quick a { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
  font-weight: 650; font-size: .92rem; color: var(--c); background: #fff; border: 1.5px solid var(--w);
  border-radius: 999px; padding: .5rem .95rem; box-shadow: var(--shadow-sm); }
.hm-quick a:hover { border-color: var(--c); }

/* ---------------------------------------------------------------- the five tiles */
.hm-main { padding: 1.6rem 0 2.4rem; }
.hm-tiles { display: grid; gap: 1.1rem; grid-template-columns: repeat(6, 1fr); }
.hm-tiles > .hm-tile { grid-column: span 2; }
.hm-tiles--5 > .hm-tile:nth-child(n+4) { grid-column: span 3; }
.hm-tiles--4 > .hm-tile { grid-column: span 3; }
.hm-tiles--2 > .hm-tile { grid-column: span 3; }
.hm-tiles--1 > .hm-tile { grid-column: 1 / -1; }
.hm-tile { position: relative; display: flex; flex-direction: column; gap: .9rem; text-decoration: none;
  background: #fff; border: 1px solid #e1e9f2; border-radius: 20px; padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: 0 1px 2px rgba(13,27,42,.04), 0 14px 34px -14px rgba(13,27,42,.14);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; overflow: hidden; min-height: 12.5rem; }
.hm-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.hm-tile:hover { transform: translateY(-3px); border-color: var(--c);
  box-shadow: 0 2px 6px rgba(13,27,42,.06), 0 22px 44px -16px rgba(13,27,42,.22); }
.hm-tile__ic { width: 58px; height: 58px; border-radius: 16px; background: var(--w); color: var(--c);
  display: grid; place-items: center; flex: none; }
.hm-tile__body { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.hm-tile b { font-family: var(--display); font-size: 1.5rem; color: var(--navy-deep); letter-spacing: -.02em; line-height: 1.1; }
.hm-tile em { font-style: normal; color: #3d5064; font-size: .96rem; line-height: 1.5; }
.hm-tile__list { color: var(--muted); font-size: .84rem; line-height: 1.5; margin-top: .25rem; }
.hm-tile__go { position: absolute; right: 1.3rem; top: 1.55rem; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--c); background: var(--w); transition: transform .14s ease; }
.hm-tile:hover .hm-tile__go { transform: translateX(3px); }
.hm-none { padding: 2rem 0; }

/* ---------------------------------------------------------------- section pages */
.hm-band { background: linear-gradient(180deg, var(--w) 0%, #f6f9fc 100%); padding: 1.4rem 0 1.8rem; border-bottom: 1px solid #e6edf5; }
.hm-back { display: inline-block; color: var(--navy); font-weight: 650; text-decoration: none; font-size: .93rem;
  margin-bottom: 1rem; }
.hm-back:hover { text-decoration: underline; }
.hm-band__row { display: flex; align-items: center; gap: 1.1rem; }
.hm-band__ic { width: 64px; height: 64px; border-radius: 18px; background: #fff; color: var(--c);
  display: grid; place-items: center; flex: none; box-shadow: 0 6px 18px -8px rgba(13,27,42,.25); }
.hm-band h1 { font-family: var(--display); font-size: clamp(1.8rem, 3.2vw, 2.4rem); color: var(--navy-deep);
  letter-spacing: -.025em; margin: 0; line-height: 1.1; }
.hm-band p { margin: .3rem 0 0; color: #3d5064; font-size: 1.02rem; }
.hm-main--section { padding-top: 1.2rem; }
.hm-group { margin-top: 1.2rem; }
.hm-group h2 { font-family: var(--body); font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #5f7186; margin: 0 0 .75rem; }
.hm-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(19.5rem, 1fr)); }
.hm-card { position: relative; display: flex; align-items: flex-start; gap: 1rem; text-decoration: none;
  background: #fff; border: 1px solid #e1e9f2; border-radius: 16px; padding: 1.15rem 1.15rem 1.15rem 1.1rem;
  box-shadow: 0 1px 2px rgba(13,27,42,.04), 0 10px 26px -14px rgba(13,27,42,.14);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
a.hm-card:hover { transform: translateY(-2px); border-color: var(--c); }
.hm-card__ic { width: 46px; height: 46px; border-radius: 13px; background: var(--w); color: var(--c);
  display: grid; place-items: center; flex: none; }
.hm-card__body { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; }
.hm-card b { font-family: var(--display); font-size: 1.14rem; color: var(--navy-deep); letter-spacing: -.015em; line-height: 1.2; }
.hm-card__yi { font-family: 'Frank Ruhl', 'David', serif; font-size: 1.02rem; color: var(--c); font-weight: 700; text-align: right; }
.hm-card em { font-style: normal; color: #4a5d70; font-size: .9rem; line-height: 1.5; }
.hm-card__go { color: var(--c); align-self: center; flex: none; opacity: .75; }
.hm-card__acts { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.hm-mini { font: 650 .86rem/1 var(--body); color: var(--c); background: var(--w); border: 0; border-radius: 9px;
  padding: .55rem .9rem; text-decoration: none; cursor: pointer; }
.hm-mini:hover { filter: brightness(.96); }
.hm-units { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.hm-units a { display: block; text-decoration: none; background: #fff; border: 1px solid #e1e9f2; border-radius: 12px;
  padding: .8rem 1rem; }
.hm-units a:hover { border-color: var(--navy); }
.hm-units b { display: block; color: var(--navy-deep); font-weight: 650; font-size: .96rem; }
.hm-units span { color: var(--muted); font-size: .82rem; }
.hm .whoLine { margin: 0; padding: 0 0 2rem; }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 980px) {
  .hm-tiles { grid-template-columns: 1fr 1fr; }
  .hm-tiles > .hm-tile, .hm-tiles--5 > .hm-tile:nth-child(n+4), .hm-tiles--4 > .hm-tile,
  .hm-tiles--2 > .hm-tile { grid-column: auto; }
  .hm-tiles--5 > .hm-tile:last-child, .hm-tiles--3 > .hm-tile:last-child, .hm-tiles--1 > .hm-tile { grid-column: 1 / -1; }
  .hm-secnav { display: none; }
}
@media (max-width: 640px) {
  .hm-wrap { width: calc(100% - 2rem); }
  .hm-top__in { min-height: 3.5rem; }
  .hm-brand span { font-size: 1rem; }
  .hm-hero { padding: 1.6rem 0 1.4rem; }
  .hm-sub { font-size: 1rem; margin-bottom: 1.1rem; }
  .hm-search input { font-size: 1rem; padding: .9rem .9rem .9rem 2.9rem; }
  .hm-tiles { grid-template-columns: 1fr; gap: .8rem; }
  .hm-tiles > .hm-tile, .hm-tiles--5 > .hm-tile:last-child, .hm-tiles--3 > .hm-tile:last-child { grid-column: auto; }
  .hm-tile { flex-direction: row; align-items: center; min-height: 0; padding: 1.1rem 1rem 1.1rem 1.1rem; gap: 1rem; border-radius: 18px; }
  .hm-tile::before { inset: 0 auto 0 0; width: 5px; height: auto; }
  .hm-tile__ic { width: 50px; height: 50px; border-radius: 14px; }
  .hm-tile b { font-size: 1.25rem; }
  .hm-tile em { font-size: .9rem; }
  .hm-tile__list { display: none; }
  .hm-tile__go { position: static; width: 32px; height: 32px; }
  .hm-cards { grid-template-columns: 1fr; }
  .hm-band__ic { width: 52px; height: 52px; }
}

/* the Lessons & plans page: the two other Teach pieces, right at the top */
.teachrow { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 0 0 1.8rem; }
.teachrow__a { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line);
  border-left: 5px solid var(--navy); border-radius: 14px; padding: .95rem 1.1rem; box-shadow: var(--shadow-sm); }
.teachrow__a:hover { border-color: var(--navy); }
.teachrow__a b { display: block; font-family: var(--display); color: var(--navy-deep); font-size: 1.08rem; }
.teachrow__a b span { font-family: 'Frank Ruhl', 'David', serif; color: var(--gold-deep); margin-left: .35rem; }
.teachrow__a > span { color: var(--muted); font-size: .86rem; }

/* the home sits inside the sign-in area, which centres whatever it holds */
#gate.gate--compact { display: block; place-items: initial; }
#doors.hm { width: 100%; min-height: 0; }

/* Scan tests, on the staff home (Nov 3 2026) */
.hm-scan { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; padding: .85rem 1.4rem; min-height: 56px;
  border-radius: 14px; background: #003877; color: #fff; font-weight: 800; font-size: 1.15rem; text-decoration: none; box-shadow: 0 4px 14px rgba(0,56,119,.18); }
.hm-scan:hover { background: #00508f; }
.hm-scan small { font-weight: 600; opacity: .85; }
