/* Shell shared with the infra tools (qa-reporting-tool): tokens, reset,
   masthead, buttons, build footer. Page styles live in ui.css. */

:root {
  color-scheme: light;
  --ground: #f6f3f1;
  --surface: #f9f7f5;
  --surface-2: #efeae6;
  --surface-3: #e6e0db;
  --ink: #242424;
  --ink-2: #4e4d4d;
  --ink-3: #797776;
  --line: #dcd8d5;
  --line-2: #cecac8;
  --accent: #2b59d1;
  --accent-soft: #e6ecfa;
  --ok: #1a6b3c;
  --ok-soft: #e6f4ec;
  --warn: #854f0b;
  --warn-soft: #fff8ee;
  --warn-bar: #f0a500;
  --fail: #a00028;
  --fail-soft: #fde8ed;
  --display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: "ABC Diatype Mono", ui-monospace, "JetBrains Mono", "IBM Plex Mono", "SF Mono",
    "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --mono: var(--sans);
  --r: 10px;
  --shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  --shadow-lift: 0 2px 4px rgba(31, 31, 31, 0.07), 0 14px 32px rgba(31, 31, 31, 0.11);
  --field: #ffffff;
  --on-solid: #ffffff;
  --ok-line: #a8d5ba;
  --fail-line: #f2b8c6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.menu[open] > summary:focus-visible {
  outline: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
h1 {
  font-family: var(--display);
  font-weight: 400;
}
a {
  color: var(--accent);
}

/* ---------- Masthead ---------- */
.masthead {
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.masthead-in {
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.masthead-brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}
.logo {
  display: block;
  height: 22px;
  width: auto;
}
.masthead-brand:hover {
  opacity: 0.82;
}
.masthead-title {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  letter-spacing: 0.02em;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  text-decoration: none;
}
.masthead-title:hover {
  color: #fff;
}
.masthead-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.masthead-link.icon-only {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 32px;
  padding: 0;
}
.icon-only svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.menu {
  position: relative;
}
.menu > summary {
  list-style: none;
  cursor: pointer;
}
.menu > summary::-webkit-details-marker {
  display: none;
}
.menu[open] > summary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}
.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  animation: menu-in 0.14s ease-out;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.menu-head {
  padding: 8px 12px 10px;
  font-size: 12px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.menu-head {
  display: block;
  text-decoration: none;
  border-radius: 8px 8px 0 0;
}
a.menu-head:hover {
  color: var(--ink-2);
  background: var(--surface-2);
}
.menu-head b {
  color: var(--ink);
  font-weight: 640;
}
.menu-panel nav,
.menu-panel form {
  display: flex;
  flex-direction: column;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.menu-item span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-item .i {
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: var(--ink-3);
}
.menu-item:hover {
  background: var(--surface-2);
}
.menu-item:hover .i {
  color: var(--ink);
}
.menu-item[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 640;
}
.menu-item.danger:hover,
.menu-item.danger:hover .i {
  background: var(--fail-soft);
  color: var(--fail);
}
.menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}
.masthead-link {
  font: inherit;
  background: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 5px 11px;
}
.masthead-link:hover,
.masthead-link[aria-current="page"] {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.masthead-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
}


/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 580;
  cursor: pointer;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.btn:hover {
  background: var(--surface-3);
  border-color: var(--line-2);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-solid);
}
.btn.primary:hover {
  filter: brightness(1.08);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Build footer ---------- */
main {
  flex: 1 0 auto;
  width: 100%;
}
