/* GENERATED — do not edit. Copied from packages/header/house-bar.css by scripts/header.mjs;
   edit the source and run `npm run header` at the repo root. */
/*
 * The bar across the top of every app: the way home, the app's own name and
 * links, and the way to every other tool. One design, used by the React apps
 * (HouseBar.tsx) and the static ones (house-bar.js), so they cannot drift.
 *
 * Colours come from the house theme's variables. The fallbacks are the same
 * light values, so a static page without theme.css still draws it correctly.
 */
.house-bar {
  background: var(--panel, #fbf9f5);
  border-bottom: 1px solid var(--rule-soft, #e7e3dc);
  color: var(--ink, #1a3a2a);
  font-family: var(--body, system-ui, -apple-system, "Segoe UI", sans-serif);
  position: relative;
  z-index: 40;
}
@media print { .house-bar { display: none; } }

.house-bar-in {
  max-width: var(--house-bar-width, 72rem);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.house-bar a { text-decoration: none; color: inherit; }
.house-bar a:focus-visible { outline: 2px solid var(--accent, #b08d57); outline-offset: 2px; border-radius: 2px; }

/* The name as the site's own bar sets it: the heading face, "Alex Aicken." */
.house-bar-home {
  font-family: var(--heading, Georgia, "Times New Roman", serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--ink, #1a3a2a) !important;
  white-space: nowrap;
}
.house-bar-home:hover { color: var(--accent, #b08d57) !important; }
.house-bar-home { display: inline-flex; align-items: center; gap: 7px; }
/* A small house before the name, so it reads as the way home. */
.house-bar-house { width: 15px; height: 15px; flex: none; color: var(--accent, #b08d57); }
.house-bar-home:hover .house-bar-house { color: currentColor; }

.house-bar-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.house-bar-app:hover { color: var(--accent, #b08d57) !important; }
/* The app's drawn mark on a small paper disc, as the round badges on the site. */
.house-bar-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--rule, #d8d4cd);
  border-radius: 50%;
  background: var(--paper, #f5f2ed);
}
.house-bar-mark svg { width: 19px; height: 19px; display: block; }
.house-bar-app:hover .house-bar-mark { border-color: var(--accent, #b08d57); }

.house-bar-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.house-bar-nav a { color: var(--muted, #5f5c55); white-space: nowrap; }
.house-bar-nav a:hover { color: var(--ink, #1a3a2a); }
/* The page you are on: ink, underlined in the accent. The accent alone is under 3:1 on the bar. */
.house-bar-nav a[aria-current="page"], .house-bar-nav a.active {
  color: var(--ink, #1a3a2a);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent, #b08d57);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* What is left on the shared OpenRouter account, for the apps that spend it. */
.house-bar-credit {
  margin-left: auto;
  font-family: var(--label, ui-monospace, Consolas, monospace);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--good, #2f6b4f);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.house-bar-credit + .house-bar-tools { margin-left: 0; }
/* The figure opens a small panel: what the credit is, and for Admin the way to the admin page. */
.house-bar-credit-button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}
.house-bar-credit-button:focus-visible { outline: 2px solid var(--accent, #b08d57); outline-offset: 2px; border-radius: 2px; }
/* Placed against the bar's own box, so on a phone it can never run off the side of the page. */
.house-bar-in { position: relative; }
.house-bar-credit-panel {
  position: absolute;
  right: 16px;
  top: calc(100% - 2px);
  z-index: 50;
  width: min(20rem, calc(100% - 32px));
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: var(--panel, #fbf9f5);
  border: 1px solid var(--rule, #d8d4cd);
  box-shadow: 0 12px 28px -16px rgba(26, 58, 42, 0.45);
  font-family: var(--body, system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--ink, #1a3a2a);
  white-space: normal;
  text-align: left;
}
@media (min-width: 768px) { .house-bar-credit-panel { right: 24px; } }
@media (min-width: 1024px) { .house-bar-credit-panel { right: 32px; } }
.house-bar-credit-link { text-decoration: underline !important; text-decoration-color: var(--accent, #b08d57) !important; text-underline-offset: 4px; }

.house-bar-tools {
  margin-left: auto;
  font-family: var(--label, ui-monospace, Consolas, monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink, #1a3a2a) !important;
  border: 1px solid var(--rule, #d8d4cd);
  padding: 5px 10px;
  white-space: nowrap;
}
.house-bar-tools:hover { border-color: var(--ink, #1a3a2a); }

/* The pages' own gutters: 16px on a phone, 24px from a tablet up, 32px on a wide screen. */
@media (min-width: 768px) { .house-bar-in { padding: 10px 24px; } }
@media (min-width: 1024px) { .house-bar-in { padding: 10px 32px; } }
@media (max-width: 560px) {
  .house-bar-in { padding: 8px 16px; }
  .house-bar-tools { margin-left: 0; }
}

/* The short home name and the menu are for a phone only. */
.house-bar-short, .house-bar-menu { display: none; }
.house-bar-app-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.house-bar-menu { position: relative; }
.house-bar-menu > summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted, #5f5c55);
  white-space: nowrap;
}
.house-bar-menu > summary::-webkit-details-marker { display: none; }
.house-bar-menu > summary::after { content: ' ▾'; font-size: 11px; }
.house-bar-menu[open] > summary { color: var(--ink, #1a3a2a); }
.house-bar-menu > summary:focus-visible { outline: 2px solid var(--accent, #b08d57); outline-offset: 2px; }
.house-bar-menu-nav {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 12rem;
  /* Never wider than the screen, so an open menu cannot push the page sideways. */
  max-width: calc(100vw - 32px);
  padding: 12px 14px;
  background: var(--panel, #fbf9f5);
  border: 1px solid var(--rule, #d8d4cd);
  box-shadow: 0 12px 28px -16px rgba(26, 58, 42, 0.45);
  font-size: 15px;
}
.house-bar-menu-nav a { color: var(--ink, #1a3a2a); white-space: nowrap; }
.house-bar-menu-nav a[aria-current="page"], .house-bar-menu-nav a.active { text-decoration: underline; text-decoration-color: var(--accent, #b08d57); text-underline-offset: 4px; }

/* On a phone the bar is one line: "AA" for the home link, the links in a menu, "AI credit left" dropped to the figure. */
@media (max-width: 560px) {
  .house-bar-in { flex-wrap: nowrap; gap: 10px; }
  .house-bar-full, .house-bar-nav { display: none; }
  .house-bar-short, .house-bar-menu { display: inline-block; }
  .house-bar-app { min-width: 0; flex: 0 1 auto; }
  .house-bar-long { display: none; }
  /* An app whose name would be cut here says its short one (marks.json): "Reserve" for "Reserve Judgement". */
  .house-bar-app-name .house-bar-short { display: inline; }
}
/* Under 360 px (a 320 px phone has 288 px inside the bar) the home link, the app's name, the menu, the credit and Tools
   do not all fit: the small house goes (the home link is still "AA") and the gaps close up, so a short name is never cut. */
@media (max-width: 359px) {
  .house-bar-in { gap: 7px; }
  .house-bar-house { display: none; }
}

/* On a touch screen every way out of the bar gets a thumb's room: an invisible tap area at
   least 44 px each way, centred on the words, so the bar looks and sits exactly as it does
   with a mouse and stays on one line on a phone. The open menu's links are 44 px tall. */
@media (pointer: coarse) {
  .house-bar-home, .house-bar-app, .house-bar-nav a, .house-bar-menu > summary, .house-bar-credit-button, .house-bar-tools { position: relative; }
  .house-bar-home::before,
  .house-bar-app::before,
  .house-bar-nav a::before,
  .house-bar-menu > summary::before,
  .house-bar-credit-button::before,
  .house-bar-tools::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
  }
  .house-bar-menu-nav { gap: 0; padding-block: 4px; }
  .house-bar-menu-nav a { display: flex; align-items: center; min-height: 44px; }
}

/* The app's badge beside its own title (AppMark, or house-bar.js on a static page). */
.house-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-right: 16px;
  vertical-align: middle;
  border: 1px solid var(--rule, #d8d4cd);
  border-radius: 50%;
  background: var(--paper, #f5f2ed);
  /* Scaled from the site's round badges: at this size their shadow would vanish under the disc. */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 7px 16px -7px rgba(26, 58, 42, 0.5);
}
.house-mark svg { width: var(--house-mark-art, 45px); height: var(--house-mark-art, 45px); display: block; }
h1.house-marked { display: flex; align-items: center; }
/* An app's own title with its badge: one size in every app, as the workbench's titles. */
h1.house-marked, h1:has(> .house-mark) { font-size: clamp(2.3rem, 4.6vw, 3.2rem); line-height: 1.1; }
@media (max-width: 560px) { .house-mark { width: 50px; height: 50px; margin-right: 12px; } .house-mark svg { width: 37px; height: 37px; } }
