/* Plain CSS, no build step, no external font, no external anything.
   The Content Security Policy in index.html forbids inline styles, so this is a
   file rather than a <style> block. */

:root {
  color-scheme: dark;
  --bg: #070b16;
  --bg-glow: #121a33;
  --surface: #10182c;
  --surface-2: #162036;
  --line: rgba(201, 162, 39, 0.16);
  --text: #ece7db;
  --muted: #8d96ab;
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.18);
  --navy: #1a2744;
  --link: #8ec0ff;
  --review: #2a2414;
}

body {
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 1.5rem 1.75rem 2.5rem;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% -10%, rgba(201, 162, 39, 0.08), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(80, 110, 180, 0.12), transparent 32%);
  min-height: 100vh;
}

#gate header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.2rem;
}

.meta {
  color: var(--muted);
  margin: 0;
  font-size: 0.85rem;
}

#gate header .meta { margin: 0; }

.muted { color: var(--muted); font-size: 0.85rem; }

button {
  font: inherit;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
button:hover { background: #1c2a48; }
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

#signout-button {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

/* Seven stats, named counts so every row is full. auto-fit leaves a ragged
   remainder, which is how "With peers" used to sit alone on a second row. */
dl {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  margin: 0 0 1.25rem;
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.15rem;
  background: var(--surface);
  padding: 0.8rem 0.9rem 0.85rem;
  min-width: 0;
}

dt {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

dd {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

dd.zero { color: #5f677a; font-weight: 500; }

@media (max-width: 72rem) {
  dl { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 40rem) {
  dl { grid-template-columns: repeat(2, 1fr); }
}

#table-wrapper {
  overflow: auto;
  max-height: calc(100vh - 16rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  background: transparent;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

th {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  background: var(--surface-2);
  z-index: 1;
}

tbody tr:hover { background: rgba(201, 162, 39, 0.05); }

tr.review { background: var(--review); }

ul { margin: 0; padding-left: 1.1rem; }
li { margin-bottom: 0.2rem; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(104, 180, 130, 0.16);
  color: #b7e0c3;
  margin-top: 0.25rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(141, 150, 171, 0.16);
  color: #c5ccdb;
}

.status-no-response { background: rgba(120, 140, 180, 0.16); color: #c9d3ea; }
.status-in-process { background: var(--gold-soft); color: #e6c96a; }
.status-rejected { background: rgba(196, 90, 90, 0.18); color: #f0b0b0; }
.status-offer { background: rgba(104, 180, 130, 0.18); color: #b7e0c3; }

a { color: var(--link); }
a:hover { color: #c5dcff; }

#empty-view {
  margin: 0 0 1rem;
  padding: 1.25rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

#controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

/* `hidden` is `display: none` in the UA stylesheet. `#controls { display: flex }`
   is more specific, so without this the filter strip showed on the signed-out
   page. Same trap for any later `display:` on a section that starts hidden. */
#controls[hidden],
#summary[hidden],
#table-wrapper[hidden],
#empty-view[hidden],
#signin[hidden] {
  display: none;
}

#controls label { color: var(--muted); }

.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 18rem;
}

#filter-search {
  flex: 1 1 auto;
  min-width: 12rem;
  font: inherit;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

#filter-search:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

#controls select {
  font: inherit;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
}

#controls .meta { margin: 0 0 0 auto; }

footer {
  margin-top: 1.5rem;
}

footer .meta {
  max-width: 44rem;
}

/* Signed-out only. Paper constellation. Placed last so the cream field wins. */
body.signed-out {
  color-scheme: light;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 6rem;
  overflow: hidden;
  color: #1a2744;
  background-color: #f4efe4;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(201, 162, 39, 0.12), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(26, 39, 68, 0.06), transparent 32%);
}

body.signed-out::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(26, 39, 68, 0.03) 2px,
      rgba(26, 39, 68, 0.03) 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(201, 162, 39, 0.05) 3px,
      rgba(201, 162, 39, 0.05) 4px
    );
}

#constellation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

body.signed-out #gate,
body.signed-out main,
body.signed-out footer {
  position: relative;
  z-index: 1;
}

body.signed-out #gate {
  width: min(28rem, 100%);
  background: rgba(255, 252, 246, 0.86);
  padding: 2.25rem 2rem 2rem;
  border-radius: 18px;
  border: 1px solid rgba(26, 39, 68, 0.08);
  box-shadow:
    0 18px 50px rgba(26, 39, 68, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

body.signed-out #gate header {
  margin-bottom: 0;
}

body.signed-out h1 {
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

body.signed-out #status {
  color: #4a5a78;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

body.signed-out #signin {
  margin: 0;
}

body.signed-out #signin p {
  margin: 0 0 1.5rem;
}

body.signed-out #signin-button {
  font-weight: 600;
  padding: 0.7rem 1.35rem;
  border: 0;
  border-radius: 10px;
  background: #1a2744;
  color: #f4efe4;
}

body.signed-out #signin-button:hover {
  background: #243456;
}

body.signed-out #signin-button:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 3px;
}

body.signed-out footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.25rem 1.25rem;
  text-align: center;
}

body.signed-out footer .meta {
  margin: 0 auto;
  max-width: 40rem;
  color: #4a5a78;
  font-size: 0.78rem;
}

body.signed-out #controls,
body.signed-out #summary,
body.signed-out #table-wrapper,
body.signed-out #empty-view {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  body.signed-out #signin-button { box-shadow: none; }
}
