/* admin.itsmias.com: the portals' dusk palette, with the fonts served from here. */
/* Minecraft's default font, subset from github.com/tryashtar/minecraft-ttf v1.6. It has 12 pixels per em: sizes in steps of 12px (.75rem, 1.5rem, 2.25rem) stay sharp. */
@font-face { font-family: "Mojangles"; font-weight: 400; font-display: swap; src: url(fonts/mojangles-ext.woff2) format("woff2"); unicode-range: U+0100-02FF, U+0370-052F, U+1D00-1FFF, U+2000-20CF; }
@font-face { font-family: "Mojangles"; font-weight: 400; font-display: swap; src: url(fonts/mojangles-latin.woff2) format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+20AC, U+2122; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400 700; font-display: swap; src: url(fonts/schibsted-grotesk-v7-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400 700; font-display: swap; src: url(fonts/schibsted-grotesk-v7-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f4f2fa; --card: #ffffff; --field: #f8f6fc; --text: #1c1631; --muted: #665f80; --line: #e3ddf0;
  --accent: #c2410c; --accent-hover: #9a3412; --accent-ink: #ffffff; --link: #b13b0b;
  --ok: #15803d; --err: #c62828;
  --shadow: 0 1px 2px rgb(28 22 49 / .05), 0 10px 30px -18px rgb(28 22 49 / .25);
  --display: "Mojangles", "Schibsted Grotesk", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15112a; --card: #1f1938; --field: #19142f; --text: #f1ecff; --muted: #a69dc8; --line: #322a54;
    --accent: #ff8a3d; --accent-hover: #ffa262; --accent-ink: #1e1206; --link: #ffb07a;
    --ok: #4ade80; --err: #ff7a7a;
    --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 14px 34px -20px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 "Schibsted Grotesk", system-ui, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; margin: 2.25rem 0 .75rem; }
.display { font-family: var(--display); font-size: 1.5rem; font-weight: 400; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: .85rem; }
.fine { font-size: .8rem; color: var(--muted); margin: 1.25rem 0 0; }

/* ---- top bar: sits on the horizon line ---- */
.topbar { position: relative; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 24px; min-height: 60px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand-name { font-weight: 700; font-size: 1rem; }

.switcher { position: relative; min-width: 0; }
.switcher summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; font-weight: 600; user-select: none; max-width: 300px; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover, .switcher[open] summary { background: var(--field); }
.switcher-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { flex: none; color: var(--muted); transition: transform .15s; }
.switcher[open] .chevron { transform: rotate(180deg); }
.mini-icon { width: 24px; height: 24px; border-radius: 7px; flex: none; }
.menu .mini-icon { width: 32px; height: 32px; border-radius: 9px; }
.mini-icon.placeholder { display: grid; place-items: center; background: #4d2f86; color: #fff; font-size: .75rem; font-weight: 700; }
.menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 380px; max-width: calc(100vw - 32px); list-style: none; margin: 0; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgb(10 6 30 / .45); }
.menu a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.menu a:hover, .menu a[aria-current] { background: var(--field); }
.menu-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.menu-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

nav { display: flex; gap: 20px; align-items: center; }
nav form { margin: 0; }
nav a, button.link { color: var(--muted); text-decoration: none; font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; padding: 0; }
nav a:hover, button.link:hover { color: var(--text); }
nav a[aria-current] { color: var(--text); }

/* ---- page frame ---- */
main { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 36px 16px 72px; }
main.wide { max-width: 1120px; }
main.center { display: grid; place-items: center; padding-top: 48px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 10px; padding: 11px 20px; font: 650 15px "Schibsted Grotesk", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--field); }
.btn.discord { width: 100%; background: #5865f2; color: #fff; }
.btn.discord:hover { background: #4752c4; }

/* Minecraft accounts: square, pixel-crisp heads next to the name */
.mc { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }

.head { image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 3px; flex: none; background: var(--field);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .12); }
.mc-list { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mc-list .mc { font-weight: 500; }
.link-cta { display: inline-flex; align-items: center; gap: 10px; }

.role { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role, var(--muted)) 45%, transparent);
  background: color-mix(in srgb, var(--role, var(--muted)) 14%, var(--card));
  color: color-mix(in srgb, var(--role, var(--muted)) 72%, var(--text)); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.role.inline { padding: 1px 8px; font-size: .78rem; }
.swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--role, var(--muted)); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- login / no access ---- */
.login { max-width: 400px; width: 100%; padding: 0; overflow: hidden; text-align: center; }
.login-body { padding: 34px 30px 30px; }
.login h1 { font-size: 1.75rem; letter-spacing: -.01em; margin-bottom: .4rem; }
.login .btn { margin-top: 1.5rem; }
.login .muted { max-width: 30ch; margin: 0 auto; }

/* ---- admin ---- */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px var(--line); margin-bottom: 28px; overflow-x: auto; overflow-y: hidden; }
.tabs a { display: flex; align-items: center; gap: 9px; padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-weight: 500; font-size: .85rem; color: var(--muted); }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-head h1 { font-size: 2.25rem; }

.team { padding: 0; margin-bottom: 16px; overflow: hidden; }
.team-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.team-head .muted { margin-left: auto; }
.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; background: var(--field); white-space: nowrap; }
tbody tr:hover td { background: color-mix(in srgb, var(--field) 70%, transparent); }
tr:last-child td { border-bottom: 0; }
td a { overflow-wrap: break-word; }
.team table th:first-child { width: 26%; }
.member { display: flex; gap: 12px; align-items: flex-start; }
.member img { border-radius: 50%; flex: none; }
.member strong { font-weight: 650; }
.member .muted { line-height: 1.4; }
.pending { display: inline-block; margin-top: 4px; padding: 0 7px; border-radius: 999px; border: 1px dashed var(--line); font-size: .75rem; color: var(--muted); }
.empty { color: var(--muted); }

/* ---- policy ---- */
.prose { padding: 36px 40px; line-height: 1.7; }
.prose h1 { font-family: var(--display); font-weight: 400; font-size: 2.25rem; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.prose h2 { margin: 30px 0 8px; }
.prose p, .prose li { max-width: 72ch; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose .last-updated { margin-top: 30px; }

/* Phones: the server picker keeps the top row, and the page links (for admins) get a row of their own. */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 0; padding: 10px 16px; }
  .topbar:has(nav a) { padding-bottom: 0; }
  .topbar nav:has(a) { order: 3; flex-basis: calc(100% + 32px); margin: 8px -16px 0; padding: 0 16px; gap: 22px; border-top: 1px solid var(--line); }
  .topbar nav:has(a) a, .topbar nav:has(a) button.link { padding: 11px 0; white-space: nowrap; box-shadow: inset 0 -2px transparent; }
  .topbar nav:has(a) a[aria-current] { box-shadow: inset 0 -2px var(--accent); }
  .topbar nav:has(a) form { margin-left: auto; }
  /* The server list drops down the width of the screen. */
  .switcher { position: static; }
  .switcher .menu { top: calc(100% + 6px); left: 12px; right: 12px; min-width: 0; max-width: none; max-height: 70vh; overflow-y: auto; }
  .menu-text strong { max-width: 100%; }
  /* Staff directory: each person is a card rather than a row of a wide table. */
  .team table, .team tbody, .team tr, .team td { display: block; }
  .team thead { display: none; }
  .team tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .team tr:last-child { border-bottom: 0; }
  .team td { position: relative; padding: 0 0 0 94px; margin-top: 8px; border: 0; overflow-wrap: anywhere; }
  .team td::before { content: attr(data-label); position: absolute; left: 0; top: 0; color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.9; }
  .team td:first-child { margin: 0 0 4px; padding: 0; }
  .team td:first-child::before { content: none; }
  .team tbody tr:hover td { background: none; }
  /* 16px, or iOS zooms in on the field when it's tapped. */
  .form input, .tz-row select { font-size: 16px; }
  .tz-row select { flex-basis: 100%; }
  .tz-card { padding: 18px 16px; }
}
@media (pointer: coarse) {
  .map-controls button { width: 40px; height: 40px; }
}

@media (max-width: 560px) {
  .topbar { padding: 10px 16px; }
  .switcher summary { max-width: calc(100vw - 160px); }
  .hero-body { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px 18px; }
  .avatar { width: 84px; height: 84px; }
  .profile-info h1, .admin-head h1 { font-size: 1.5rem; }
  .login h1 { font-size: 1.6rem; }
  .hero-mc { padding: 12px 18px; }
  .prose { padding: 24px 18px; }
  th, td { padding: 10px 14px; }
}

/* Admin: click-to-copy */
.copy { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: copy; }
.copy:hover { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); padding: 8px 14px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: .875rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.busy, .toast.done { display: flex; align-items: center; gap: 8px; }
.toast.busy::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--bg) 35%, transparent); border-top-color: var(--bg); animation: toast-spin .7s linear infinite; }
.toast.done::before { content: ""; width: 10px; height: 5px; margin: -3px 1px 0; border: solid var(--bg); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
@keyframes toast-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .toast.busy::before { animation: none; } }
/* Phones: at the top, where the on-screen keyboard can't cover it. */
@media (max-width: 640px) {
  .toast { top: calc(env(safe-area-inset-top) + 12px); bottom: auto; transform: translate(-50%, -8px); }
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- staff directory: List / Time zones switch ---- */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.segmented a { padding: 6px 14px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.segmented a:hover { color: var(--text); background: var(--field); }
.segmented a[aria-current] { color: var(--text); background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }

/* ---- time zones view: team filter ---- */
.team-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--muted); font: 600 .88rem "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; transition: background .1s, border-color .1s, color .1s; }
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.chip .count { font-weight: 500; opacity: .8; }
.chip[aria-pressed="true"] { color: color-mix(in srgb, var(--role, var(--accent)) 72%, var(--text));
  border-color: color-mix(in srgb, var(--role, var(--accent)) 60%, transparent); background: color-mix(in srgb, var(--role, var(--accent)) 16%, var(--card)); }

/* ---- time zones view: map ---- */
.tz-map-card { padding: 10px 16px 12px; }
.tz-map-card .map-wrap { position: relative; }
.band-labels { position: relative; height: 34px; overflow: hidden; }
.band-label { position: absolute; top: 2px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; line-height: 1.2;
  font-size: .72rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.band-label b { font-size: .8rem; font-weight: 650; color: var(--text); }
.band-label.has b { color: var(--accent); }
.map-frame { position: relative; }
.bands-map:not(.zoomed) { cursor: default; }
.bands path { --band: color-mix(in srgb, var(--text) 3%, var(--field)); fill: var(--band); stroke: var(--band); stroke-width: .8px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bands path.odd { --band: color-mix(in srgb, var(--text) 8%, var(--field)); }
.bands path.half { --band: color-mix(in srgb, var(--text) 13%, var(--field)); }
.bands path.lv1 { --band: color-mix(in srgb, var(--accent) 12%, var(--field)); }
.bands path.lv2 { --band: color-mix(in srgb, var(--accent) 19%, var(--field)); }
.bands path.lv3 { --band: color-mix(in srgb, var(--accent) 27%, var(--field)); }
.bands path.lv4 { --band: color-mix(in srgb, var(--accent) 36%, var(--field)); }
.bands path.hover { fill: color-mix(in srgb, var(--band) 84%, var(--text)); stroke: color-mix(in srgb, var(--band) 84%, var(--text)); }
.land path { fill: var(--text); fill-opacity: .09; stroke: var(--text); stroke-opacity: .18; stroke-width: .5px; vector-effect: non-scaling-stroke; pointer-events: none; }
.edges path { display: none; fill: none; stroke: color-mix(in srgb, var(--text) 45%, var(--field)); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.edges path.on { display: inline; }

.pins { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 12px; }
.pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; padding: 2px; border: 0; border-radius: 999px; background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgb(10 6 30 / .3); pointer-events: auto; cursor: pointer; transition: opacity .12s; }
.pin img { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--field); }
.pin img + img { margin-left: -9px; box-shadow: 0 0 0 2px var(--card); }
.pin .n { padding: 0 7px 0 5px; color: var(--text); font-size: .78rem; font-weight: 700; }
.pin:hover, .pin:focus-visible { z-index: 2; outline: 0; box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgb(10 6 30 / .3); }
.pin.away { opacity: .4; }
.pin::before { content: ""; position: absolute; inset: -7px; border-radius: 999px; }   /* a little room around the pin for the pointer */

.pin-card { position: absolute; z-index: 15; width: 290px; max-width: calc(100% - 8px); max-height: 340px; overflow-y: auto; padding: 12px 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgb(10 6 30 / .45); }
.pin-card h3 { margin: 0 0 6px; font-size: .9rem; font-weight: 650; }
.pin-card h3 .muted { font-weight: 500; }
.pin-card .person + h3 { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pin-card .person { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; line-height: 1.35; }
.pin-card .person img { border-radius: 50%; flex: none; }
.pin-card .person.away { opacity: .55; }

/* ---- time zones view: meeting planner ---- */
.planner { margin-top: 16px; padding: 18px 20px 20px; }
.planner-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; }
.planner-head h2 { margin: 0; }
.planner-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--muted); font-size: .88rem; }
.planner-controls .ctl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 7px; white-space: nowrap; }
.planner-best { margin: 12px 0 14px; font-weight: 500; }
.planner-slot { min-height: 3em; margin: 10px 0 0; }
.planner-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.planner-grid { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: .8rem; font-variant-numeric: tabular-nums; }
.planner-grid th, .planner-grid td { height: 34px; padding: 0; border: 0; text-align: center; vertical-align: middle; }
.planner-grid .row-label { position: sticky; left: 0; z-index: 1; width: 200px; padding: 6px 12px; text-align: left; background: var(--card); border-right: 1px solid var(--line); }
.planner-grid thead th { height: 30px; background: var(--field); color: var(--muted); font-size: .75rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.planner-grid thead th.now { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.planner-grid tbody td { color: var(--muted); border-bottom: 1px solid var(--line); border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.planner-grid tbody th { border-bottom: 1px solid var(--line); }
.planner-grid tbody td.free { background: color-mix(in srgb, var(--accent) 20%, var(--card)); color: var(--text); font-weight: 600; }
.planner-grid tfoot td { color: var(--text); font-weight: 650; border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.planner-grid tfoot th { font-size: .85rem; }
.planner-grid td.count.lv1 { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.planner-grid td.count.lv2 { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.planner-grid td.count.lv3 { background: color-mix(in srgb, var(--accent) 34%, var(--card)); }
.planner-grid td.count.lv4 { background: color-mix(in srgb, var(--accent) 48%, var(--card)); }
.planner-grid td.best { box-shadow: inset 0 -3px var(--accent); }
.planner-grid [data-slot] { cursor: pointer; }
.planner-grid .col-on { background-image: linear-gradient(color-mix(in srgb, var(--text) 9%, transparent), color-mix(in srgb, var(--text) 9%, transparent)); }
.planner-grid th.col-picked { background: var(--text); color: var(--bg); }
.row-top { display: flex; align-items: center; gap: 8px; }
.row-top strong { font-size: .85rem; white-space: nowrap; }
.row-avatars { display: inline-flex; align-items: center; }
.row-avatars img { border-radius: 50%; box-shadow: 0 0 0 2px var(--card); }
.row-avatars img + img { margin-left: -5px; }
.row-avatars .more { margin-left: 4px; color: var(--muted); font-size: .72rem; }
.row-cities { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
  .tz-map-card { padding: 8px 10px 10px; }
  .planner { padding: 16px 14px; }
  .planner-controls { gap: 8px 14px; }
  .planner-grid .row-label { width: 150px; padding: 6px 10px; }
  .planner-grid { min-width: 820px; }
}

/* ---- dropdowns (static/dropdown.js) ---- */
.dd { position: relative; display: inline-block; }
.dd-button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text);
  font: 600 .88rem "Schibsted Grotesk", system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: background .1s, border-color .1s; }
.dd-button:hover, .dd-button[aria-expanded="true"] { background: var(--field); border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.dd-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dd-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.dd-detail { color: var(--muted); font-weight: 500; }
.dd-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 100%; max-width: calc(100vw - 32px); max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgb(10 6 30 / .45); outline: none;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
.dd.up .dd-list { top: auto; bottom: calc(100% + 6px); }
.dd.right .dd-list { left: auto; right: 0; }
.dd-list li { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 7px 12px 7px 28px; border-radius: 8px;
  color: var(--text); font-size: .88rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.dd-list li.active { background: var(--field); }
.dd-list li[aria-selected="true"] { color: var(--accent); font-weight: 650; }
.dd-list li[aria-selected="true"]::before { content: ""; position: absolute; left: 10px; top: 50%; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-75%) rotate(-45deg); }
.dd-list .dd-detail { font-size: .8rem; }

/* Directory: everyone on one grid */
.avail-admin { margin-top: 24px; }
.avail-scroll { overflow-x: auto; }
.avail-grid { --name: 170px; min-width: 900px; padding: 12px 18px 6px; }
.avail-row { display: grid; grid-template-columns: var(--name) repeat(3, minmax(0, 1fr)); align-items: center; column-gap: 8px; }
.avail-row + .avail-row { margin-top: 3px; }
.avail-days-head { font-weight: 600; font-size: .85rem; }
.avail-name { min-width: 0; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; position: sticky; left: 0; background: var(--card); }
.avail-name .muted { font-weight: 400; font-size: .75rem; }
.avail-strip { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 1px; }
.avail-tick { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: visible; height: 1.4em; line-height: 1.4; }
.avail-cell { height: 22px; }
.avail-cell.free { background: var(--accent); }
.avail-cell.busy { background: color-mix(in srgb, var(--text) 13%, var(--field)); }
.avail-cell.unset { background: var(--field); }
.avail-cell.count { height: 26px; display: grid; place-items: center; font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text);
  background: color-mix(in srgb, var(--accent) var(--share), var(--field)); }
.avail-cell.count.all { background: var(--accent); color: var(--accent-ink); }
.avail-everyone { margin-bottom: 8px; }
.avail-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.avail-admin .avail-legend { padding: 8px 18px 14px; }
.avail-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.key.free { background: var(--accent); }
.key.busy { background: color-mix(in srgb, var(--text) 13%, var(--field)); }
.key.unset { background: var(--field); }
.key.count { width: 18px; height: 18px; display: inline-grid; place-items: center; border: 0; font-size: .72rem; font-style: normal; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--accent) 40%, var(--field)); }
.key.count.all { background: var(--accent); color: var(--accent-ink); }

/* ---- directory: socials ---- */
.socials { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.socials dt { color: var(--muted); font-size: .82rem; line-height: 1.75; }
.socials dd { margin: 0; overflow-wrap: anywhere; }
.row-note { display: block; margin-top: 2px; }

@media (max-width: 560px) {
  .link-fields { grid-template-columns: 1fr; }
  .link-fields .btn { width: 100%; }
}


/* ---- log out icon ---- */
.logout-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px;
  background: none; color: var(--muted); cursor: pointer; }
.logout-btn:hover { background: var(--field); color: var(--text); }
@media (pointer: coarse) { .logout-btn { width: 44px; height: 44px; } }

/* ---- this site's frame ---- */
main.wide { max-width: 1320px; padding-inline: 24px; }
.topbar nav { margin-left: 12px; }
.account { display: flex; align-items: center; gap: 14px; margin-left: auto; white-space: nowrap; }
.account a { color: var(--muted); text-decoration: none; font-weight: 500; }
.account a:hover { color: var(--text); }
.account form { margin: 0; }
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.who img { border-radius: 50%; }

/* ---- overview ---- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: 2.25rem; }
/* Hairlines drawn outside each figure and clipped by the panel, so a short last row has no filled gaps. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.figure { display: grid; align-content: start; gap: 1px; padding: 15px 20px 16px; color: inherit; text-decoration: none; box-shadow: -1px 0 var(--line), 0 -1px var(--line); }
a.figure:hover { background: var(--field); }
.figure-value { font-size: 1.75rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.figure-label { font-weight: 500; }
.figure-note { color: var(--muted); font-size: .82rem; }
.alert { color: var(--err); font-weight: 600; }
.missing { color: var(--accent); font-weight: 600; }

.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.team-head .all { margin-left: auto; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.team-head .muted + .all { margin-left: 12px; }
.empty-note { padding: 14px 18px; margin: 0; color: var(--muted); }
.unavailable { padding: 14px 18px; margin: 0; color: var(--err); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.numeric { text-align: right; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: flex-start; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.rows .main a { font-weight: 550; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.rows .main a:hover { text-decoration: underline; }
.rows .side { flex: none; text-align: right; font-size: .85rem; color: var(--muted); }
.quote { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.faces { display: flex; flex: none; }
.faces img { border-radius: 50%; box-shadow: 0 0 0 2px var(--card); }
.faces img + img { margin-left: -6px; }
.gap-list { display: flex; flex-wrap: wrap; gap: 4px 10px; }

.categories { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: .88rem; }
.category { display: inline-flex; align-items: center; gap: 7px; }
.category .swatch { background: var(--swatch, var(--muted)); }
.category.done { color: var(--muted); }
.avail-admin[data-compact] .avail-legend { display: none; }

.columns .team table th:first-child { width: auto; }
@media (min-width: 641px) {
  .columns .team th, .columns .team td { padding-inline: 12px; }
  .columns .team th:first-child, .columns .team td:first-child { padding-left: 18px; }
}
.pending { white-space: nowrap; }

@media (min-width: 1200px) {
  .figures { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}
@media (max-width: 1040px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  main.wide { padding-inline: 16px; }
  .topbar nav { margin-left: -16px; }
  .who span { display: none; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure { padding: 12px 14px; }
  .numeric, th.numeric { text-align: left; }
}
