/* QUADRAQ site 1.5.0 — application chrome.
 *
 * Board and Line load this file and get the site's header, buttons and typography without
 * rebuilding them. Everything below the header belongs to the app: this stylesheet only
 * covers what has to look the same in both.
 *
 *   <link rel="stylesheet" href="/shared/quadraq-ui.css">
 *
 * The tokens are the brand ones. Use them instead of writing colours by hand, so a change
 * to the palette reaches both apps at once.
 */

:root {
  --graphite: #2C2C2A;
  --graphite-dark: #1B1B1A;
  --amber: #BA7517;
  --amber-light: #EF9F27;
  --ivory: #F1EFE8;
  --paper: #FBFAF7;
  --rule: #D8D5CC;
  --grey: #6E6C66;

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --app-gutter: clamp(16px, 3vw, 32px);
}

/* ————— page basics ————— */
.q-app {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.q-app h1, .q-app h2, .q-app h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.012em;
}

/* ————— header ————— */
.q-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px var(--app-gutter);
  background: rgba(251, 250, 247, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.q-header__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* The logo is an image, always. It is never retyped, recoloured or rebuilt in text. */
.q-header__logo img { display: block; width: 152px; height: auto; }
.q-header__divider { width: 1px; height: 22px; background: var(--rule); flex: none; }
.q-header__app {
  font-family: var(--font-display); font-weight: 500; font-size: 17px;
  color: var(--graphite); white-space: nowrap;
}
.q-header__context {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--grey); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.q-header__right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.q-header__actions { display: flex; align-items: center; gap: 8px; }

/* ————— buttons —————
 * One filled button per screen, graphite. Amber is an accent, never a fill: a solid amber
 * button reads as a warning and competes with the mark.
 */
.q-btn {
  font-family: var(--font-display); font-weight: 500; font-size: 14.5px;
  padding: 9px 16px; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--graphite); background: var(--graphite); color: var(--ivory);
  text-decoration: none; display: inline-block; white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}
.q-btn:hover { background: var(--graphite-dark); transform: translateY(-1px); }
.q-btn--ghost { background: transparent; color: var(--graphite); }
.q-btn--ghost:hover { background: rgba(44, 44, 42, .06); }
.q-btn--quiet { background: transparent; color: var(--grey); border-color: var(--rule); }
.q-btn--quiet:hover { background: rgba(44, 44, 42, .04); color: var(--graphite); }
.q-btn[disabled], .q-btn.is-disabled {
  opacity: .4; cursor: not-allowed; transform: none;
  background: transparent; color: var(--grey); border-color: var(--rule);
}

/* ————— account state —————
 * A dot and a sentence. Amber means something is waiting on the person; quiet grey means
 * everything is in order and needs no attention.
 */
.q-state { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--grey); }
.q-state__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); flex: none; }
.q-state--todo .q-state__dot { background: var(--amber); }
.q-state--ok .q-state__dot { background: #7E9B76; }
.q-state a { color: var(--graphite); text-decoration: underline; text-underline-offset: 2px; }
.q-state a:hover { color: var(--amber); }
.q-state__name { color: var(--graphite); }

/* ————— language switcher, same as the site ————— */
.q-langs { display: flex; align-items: center; gap: 2px; }
.q-langs a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-decoration: none; color: var(--grey); padding: 5px 7px; border-radius: 4px;
}
.q-langs a:hover { color: var(--graphite); background: rgba(44, 44, 42, .07); }
.q-langs a.is-current { color: var(--graphite); background: rgba(186, 117, 23, .14); }

/* ————— version, bottom right of the app, not in the header ————— */
.q-version {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em;
  color: var(--grey);
}

/* ————— small screens ————— */
@media (max-width: 860px) {
  .q-header { gap: 10px; }
  .q-header__context { display: none; }
  .q-header__right { width: 100%; margin-left: 0; justify-content: space-between; }
}
@media (max-width: 520px) {
  .q-header__logo img { width: 128px; }
  .q-header__app { font-size: 15px; }
  .q-btn { font-size: 13.5px; padding: 8px 13px; }
}
