/* The site-wide menu bar (hub/nav.js). Self-contained, so every part of the site looks the same whatever its own
   styles are. */
@font-face { font-family: 'Cormorant Garamond'; font-weight: 700; font-display: swap; src: url(../vendor/fonts/cormorant-garamond-latin-700-normal.woff2) format('woff2'); }

.hub-nav {
  --hub-panel: rgba(17, 14, 40, 0.78);
  --hub-solid: #141030;
  --hub-line: rgba(246, 227, 180, 0.14);
  --hub-text: #f4efe3;
  --hub-muted: #aca6c6;
  --hub-accent: #e6bd6a;
  --hub-cream: #f6e3b4;
  --hub-serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --hub-glass: blur(16px) saturate(150%);
  position: fixed; top: 0; left: 0; right: 0; z-index: 1400;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  background: linear-gradient(rgba(11, 10, 31, 0.88), rgba(11, 10, 31, 0.4) 75%, transparent);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--hub-text);
  pointer-events: none;
}
.hub-nav > * { pointer-events: auto; }
.hub-nav *, .hub-nav *::before { box-sizing: border-box; }
.hub-nav [hidden] { display: none !important; }

.hub-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.hub-logo {
  width: 46px; height: auto; flex: none; max-width: none;
  animation: hub-glow 9s ease-in-out infinite;
}
@keyframes hub-glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(230, 189, 106, 0.3)); }
  50% { filter: drop-shadow(0 0 16px rgba(230, 189, 106, 0.7)); }
}
.hub-name { display: flex; flex-direction: column; min-width: 0; line-height: 1; }
.hub-title {
  font: 700 27px/1 var(--hub-serif); letter-spacing: 0.3px; color: var(--hub-cream);
  text-shadow: 0 1px 6px rgba(5, 3, 20, 0.9), 0 0 16px rgba(230, 189, 106, 0.45);
}
.hub-sub {
  margin-top: 4px; padding-top: 4px; border-top: 1.5px solid #d6aa5a;
  font: 700 13px/1.1 var(--hub-serif); letter-spacing: 1.2px; text-transform: uppercase; color: var(--hub-cream);
  text-shadow: 0 1px 5px rgba(5, 3, 20, 0.95); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* The row of single icons. */
.hub-icons { display: flex; align-items: center; gap: 6px; flex: none; }
.hub-group { display: flex; gap: 6px; padding-right: 6px; margin-right: 0; border-right: 1px solid var(--hub-line); }
.hub-icon {
  position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none; padding: 0; margin: 0;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--hub-line); background: var(--hub-panel); color: var(--hub-cream);
  backdrop-filter: var(--hub-glass); -webkit-backdrop-filter: var(--hub-glass);
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s, background 0.2s; text-decoration: none; font: inherit;
}
.hub-icon svg { display: block; }
.hub-icon:hover, .hub-icon[aria-expanded="true"] { border-color: rgba(230, 189, 106, 0.6); box-shadow: 0 0 14px rgba(230, 189, 106, 0.35); color: #fff; }
.hub-icon.on { color: var(--hub-accent); border-color: rgba(230, 189, 106, 0.7); background: rgba(230, 189, 106, 0.16); box-shadow: 0 0 14px rgba(230, 189, 106, 0.3); }
.hub-user-btn.in { color: var(--hub-accent); }
/* Signed in: their picture (or initial) fills the round button, ringed in gold */
.hub-face { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.hub-face.has-face { box-shadow: inset 0 0 0 1.5px rgba(230, 189, 106, 0.85); }
.hub-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; max-width: none; }
.hub-initial { font: 700 18px/1 var(--hub-serif); color: var(--hub-cream); }
.hub-avatar .hub-initial { font-size: 24px; }
.hub-user-btn.in { padding: 0; overflow: hidden; border-color: rgba(230, 189, 106, 0.7); }
.hub-desktop { display: none; }
@media (hover: hover) and (pointer: fine) { .hub-tool.hub-desktop, .hub-tile.hub-desktop { display: grid; } .hub-tile.hub-desktop { display: flex; } }

/* Phones: the page's own tools move into the Menu, which names them. */
@media (max-width: 699px) {
  .hub-tools { display: none; }
  .hub-title { font-size: 21px; }
  .hub-logo { width: 36px; }
  .hub-brand { gap: 8px; }
  .hub-sub { font-size: 10px; letter-spacing: 0.6px; white-space: normal; }
  .hub-icon { width: 36px; height: 36px; }
}
@media (max-width: 359px) { .hub-sub { display: none; } }

/* The drop-down panels. */
.hub-drop {
  position: absolute; top: calc(100% - 2px); right: 12px; width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 90px - env(safe-area-inset-top, 0px)); overflow-y: auto;
  padding: 14px; border-radius: 18px;
  border: 1px solid var(--hub-line); background: rgba(17, 14, 40, 0.92);
  backdrop-filter: var(--hub-glass); -webkit-backdrop-filter: var(--hub-glass);
  box-shadow: 0 0 0 1px rgba(246, 227, 180, 0.05), 0 12px 40px rgba(5, 3, 20, 0.7), 0 0 24px rgba(167, 123, 255, 0.15);
  animation: hub-drop 0.18s ease-out;
}
@keyframes hub-drop { from { opacity: 0; transform: translateY(-6px); } }
.hub-drop-title { margin: 4px 2px 8px; font: 700 13px/1 var(--hub-serif); letter-spacing: 1.3px; text-transform: uppercase; color: var(--hub-accent); }
.hub-drop-title:not(:first-child) { margin-top: 14px; }
/* Tiles laid out across, wrapping onto more rows as needed. */
.hub-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.hub-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 72px;
  padding: 10px 6px; border-radius: 14px; border: 1px solid var(--hub-line); background: rgba(246, 227, 180, 0.04);
  color: var(--hub-text); text-decoration: none; font: 13px/1.15 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.hub-tile svg { color: var(--hub-cream); }
.hub-tile:hover { border-color: rgba(230, 189, 106, 0.55); background: rgba(230, 189, 106, 0.1); }
.hub-tile.on { border-color: rgba(230, 189, 106, 0.7); background: rgba(230, 189, 106, 0.16); }
.hub-tile.on svg { color: var(--hub-accent); }
.hub-tile.soon { color: rgba(244, 239, 227, 0.45); border-style: dashed; cursor: default; }
.hub-tile.soon svg { color: rgba(246, 227, 180, 0.45); }
.hub-tile.soon em { font-style: normal; font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--hub-accent); margin-top: -3px; }

/* The account panel. */
.hub-acct-head { display: flex; align-items: center; gap: 12px; }
.hub-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--hub-accent); border: 1px solid rgba(230, 189, 106, 0.5); background: rgba(230, 189, 106, 0.1); }
.hub-acct-name { font: 700 21px/1.1 var(--hub-serif); color: var(--hub-cream); overflow-wrap: anywhere; }
.hub-acct-sub { font-size: 13px; color: var(--hub-muted); overflow-wrap: anywhere; }
.hub-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 10px; }
.hub-stat { padding: 9px 6px; border-radius: 12px; border: 1px solid var(--hub-line); background: rgba(246, 227, 180, 0.04); text-align: center; }
.hub-stat b { display: block; font: 700 20px/1.1 var(--hub-serif); color: var(--hub-accent); }
.hub-stat span { font-size: 11px; color: var(--hub-muted); }
.hub-links { display: flex; gap: 8px; margin-bottom: 12px; }
.hub-link {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px; border-radius: 12px;
  border: 1px solid var(--hub-line); color: var(--hub-text); text-decoration: none; font-size: 14px;
}
.hub-link:hover { border-color: rgba(230, 189, 106, 0.55); }
.hub-link svg { color: var(--hub-accent); flex: none; }
.hub-small { margin: 0 0 10px; font-size: 13px; color: var(--hub-muted); }
.hub-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hub-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hub-line); background: rgba(246, 227, 180, 0.06); color: var(--hub-text); font: inherit; font-size: 14px;
}
.hub-btn:hover { border-color: rgba(230, 189, 106, 0.6); }
.hub-btn:disabled { opacity: 0.5; cursor: default; }
.hub-primary { border-color: rgba(230, 189, 106, 0.6); background: rgba(230, 189, 106, 0.18); color: var(--hub-cream); }
.hub-linkbtn { border: 0; background: none; padding: 4px; color: var(--hub-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
.hub-email { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.hub-email input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--hub-line);
  background: rgba(11, 10, 31, 0.6); color: var(--hub-text); font: inherit; font-size: 15px;
}
.hub-email input:focus { outline: none; border-color: rgba(230, 189, 106, 0.6); }
.hub-status { margin-bottom: 10px; font-size: 13px; color: var(--hub-muted); }
.hub-status:empty { display: none; }
.hub-msg { margin: 10px 0 0; }
.hub-msg:empty { display: none; }
.hub-msg.err { color: #ffb3c4; }

@media (prefers-reduced-motion: reduce) { .hub-logo, .hub-drop { animation: none; } }

/* ---------- The menu button, and the menu that slides out from the left ---------- */
.hub-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hub-menu-btn { flex: none; }
.hub-scrim {
  position: fixed; inset: 0; z-index: 1490; pointer-events: auto;
  background: rgba(5, 3, 20, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: hub-fade 0.2s ease-out;
}
@keyframes hub-fade { from { opacity: 0; } }
.hub-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1500; pointer-events: auto;
  width: min(360px, 88vw); display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  border-right: 1px solid var(--hub-line); background: rgba(15, 12, 36, 0.97);
  box-shadow: 12px 0 40px rgba(5, 3, 20, 0.7), 0 0 24px rgba(167, 123, 255, 0.15);
  animation: hub-slide 0.22s ease-out;
}
@keyframes hub-slide { from { transform: translateX(-100%); } }
.hub-drawer-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--hub-line); }
.hub-drawer-head .hub-name { flex: 1; min-width: 0; }
.hub-drawer-head .hub-title { font-size: 24px; }
.hub-drawer-head .hub-logo { width: 38px; }
.hub-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 10px; }
.hub-drawer-foot { flex: none; padding-top: 10px; border-top: 1px solid var(--hub-line); }
.hub-drawer-foot .hub-tiles { grid-template-columns: repeat(4, 1fr); }
.hub-drawer-foot .hub-tile { min-height: 64px; padding: 8px 4px; font-size: 12px; }
.hub-rows { display: flex; flex-direction: column; gap: 4px; }
.hub-rows-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.hub-rowlink {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid transparent; background: none; color: var(--hub-text); text-decoration: none; text-align: left;
  font: 15px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}
.hub-rowlink svg { color: var(--hub-cream); flex: none; }
.hub-rowlink:hover { background: rgba(230, 189, 106, 0.08); border-color: var(--hub-line); }
.hub-rowlink.on { background: rgba(230, 189, 106, 0.14); border-color: rgba(230, 189, 106, 0.5); }
.hub-rowlink.on svg { color: var(--hub-accent); }
.hub-drawer-open, .hub-drawer-open body { overflow: hidden; }
@media (max-width: 699px) {
  .hub-left { gap: 8px; }
  .hub-drawer .hub-sub { white-space: nowrap; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .hub-drawer, .hub-scrim { animation: none; } }
