/* jighq.com's holding page: Jig's own colours, type
   and brand mark (web/app/globals.css), light and dark. */
@font-face {
  font-family: "Google Sans";
  src: url("/fonts/googlesans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --bg: #F8FAFD; --panel: #FFFFFF; --panel-2: #F1F4F9; --border: #DDE3EA; --divider: #E8ECF1;
  --muted: #5E6368; --text-2: #444746; --ink: #1F1F1F;
  --accent: #165DAB; --accent-soft: #E3EDF9; --on-accent: #FFFFFF;
  --hover: rgb(31 31 31 / 0.06);
  --r-sm: 6px; --r-md: 12px; --r-pill: 999px;
  --font-ui: "Google Sans", Roboto, "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #353B43; --panel: #3C444E; --panel-2: #414D5E; --border: #4A525D; --divider: #4A525D;
    --muted: #AEB5C0; --text-2: #B9C0CC; --ink: #F1F4F9;
    --accent: #8DB6EA; --accent-soft: #3A4756; --on-accent: #0E2A4D;
    --hover: rgb(241 244 249 / 0.06);
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 72px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font-ui);
}
main { max-width: 880px; margin: 0 auto; padding: 24px 16px 64px; }
main:focus { outline: none; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--panel); border-radius: var(--r-sm); z-index: 10; }
.skip:focus { top: 8px; }

/* brand and top bar */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px;
}
.brand-name { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 16px; background: var(--bg);
}
.topbar-title { color: var(--text-2); font-size: 15px; }
.search { margin-left: auto; flex: 0 1 320px; min-width: 0; }
.search input {
  width: 100%; height: 36px; padding: 0 12px; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-pill);
}
.search input::placeholder { color: var(--muted); }
@media (max-width: 520px) { .topbar-title { display: none; } }

/* text */
h1 { font-size: 28px; line-height: 36px; font-weight: 400; margin: 16px 0 8px; text-wrap: balance; }
h2 { font-size: 18px; font-weight: 500; margin: 0 0 10px; }
h3 { font-size: 15px; font-weight: 500; margin: 14px 0 6px; }
.lede { color: var(--text-2); margin: 0 0 20px; }
.meta { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.note { color: var(--text-2); font-size: 14px; }
.num { color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px 16px; margin: 0; }
ul, ol { padding-left: 22px; margin: 0; }
li + li { margin-top: 4px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: 14px; color: var(--muted); margin-top: 4px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* cards: the manuals on the home page */
.cards { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards li + li { margin-top: 0; }
.card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--ink); text-decoration: none;
}
.card:hover { background: var(--panel-2); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-code { color: var(--muted); font-size: 13px; }
.card-title { font-size: 17px; font-weight: 500; }
.card-text { color: var(--text-2); font-size: 14px; }
.card-meta { margin-top: auto; color: var(--muted); font-size: 13px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: var(--r-pill); background: var(--panel-2); color: var(--text-2); font-size: 12px; white-space: nowrap; }

/* department filter */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.chip-btn {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px;
  border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--panel);
  color: var(--ink); text-decoration: none; font-size: 14px;
}
.chip-btn:hover { background: var(--panel-2); }
.chip-btn[aria-current="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 500; }

/* sections */
.block, .phase { margin-top: 20px; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); }
.purpose { color: var(--text-2); margin: 8px 0 12px; }
.sub + .sub { margin-top: 4px; }

/* step rows */
.rows { list-style: none; padding: 0; margin: 8px -8px 0; }
.rows li + li { margin-top: 0; border-top: 1px solid var(--divider); }
.row { display: flex; gap: 12px; align-items: baseline; padding: 10px 8px; flex-wrap: wrap; }
.row-link { color: var(--ink); text-decoration: none; border-radius: var(--r-sm); flex-wrap: nowrap; }
.row-link:hover { background: var(--hover); }
.row .num { flex: none; width: 44px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 500; }
.row-text { color: var(--text-2); font-size: 14px; }
.row-owner { flex: none; max-width: 32%; color: var(--muted); font-size: 13px; text-align: right; }
.row-badges { color: var(--muted); font-size: 13px; }
.row-links { width: 100%; font-size: 14px; color: var(--text-2); }
.rows > .row { flex-direction: column; gap: 2px; }
@media (max-width: 520px) {
  .row-link { flex-wrap: wrap; }
  .row-owner { flex: 1 1 100%; min-width: 0; max-width: none; text-align: left; padding-left: 56px; }
}

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; margin: 12px 0; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* documents */
.docs { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.block .docs { margin: 0 -16px -16px; border-width: 1px 0 0; border-radius: 0 0 var(--r-md) var(--r-md); }
.docs li + li { margin-top: 0; border-top: 1px solid var(--divider); }
.doc { display: flex; align-items: baseline; gap: 4px 16px; padding: 12px 16px; flex-wrap: wrap; }
.doc-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.doc-name { overflow-wrap: anywhere; }
.doc-where { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.doc-gets { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.doc-get { display: inline-flex; align-items: center; min-height: 32px; color: var(--accent); font-size: 14px; font-weight: 500; text-decoration: none; }
.doc-get:hover { text-decoration: underline; }

.links { padding-left: 18px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--divider); border-radius: var(--r-sm); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--divider); }
thead th { border-top: 0; background: var(--panel-2); font-weight: 500; color: var(--ink); }

.toc, .more { margin: 12px 0 0; }
.toc { padding: 12px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); }
.toc summary, .more summary { cursor: pointer; color: var(--accent); font-weight: 500; min-height: 32px; display: flex; align-items: center; }
.toc ul { margin-top: 8px; }
.handoff p { margin: 0 0 8px; }
.fine { margin-top: 28px; color: var(--muted); font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 18px; background: transparent; color: var(--accent);
  font: inherit; font-weight: 500; cursor: pointer;
}
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; font-size: 14px; }
.pager a { text-decoration: none; max-width: 48%; }

/* phones: body text at least 16px, touch targets at least 44px (docs/DESIGN.md) */
@media (max-width: 520px) {
  body { font-size: 16px; line-height: 24px; }
  h1 { font-size: 24px; line-height: 32px; }
  .search input, .chip-btn, .btn, .doc-get, .toc summary, .more summary { min-height: 44px; }
  .crumbs a, .links a, .pager a, .row-links a { display: inline-block; padding: 10px 0; }
  .links li + li { margin-top: 0; }
}

/* the holding page on jighq.com */
.hold { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 32px 16px; }
.hold .brand { justify-content: center; }
.hold h1 { margin-top: 28px; }
