:root {
  --bg: #1d1d1f;
  --bg-elevated: #26262a;
  --text: #ffffff;
  --text-muted: hsl(220, 19%, 78%);
  --border: hsla(0, 0%, 100%, 0.18);
  --border-strong: hsla(0, 0%, 100%, 0.35);
  --accent-glow-a: rgba(56, 140, 160, 0.28);
  --accent-glow-b: rgba(70, 100, 180, 0.22);
  --error: #ff8a8a;
  --font-sans: "Outfit", system-ui, sans-serif;
  --radius-pill: 999px;
  --header-h: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, var(--accent-glow-a), transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 30%, var(--accent-glow-b), transparent 50%),
    radial-gradient(ellipse 40% 35% at 15% 40%, rgba(40, 90, 120, 0.18), transparent 50%);
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 1rem 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  display: block;
  width: 112px;
  height: auto;
}

.brand-hero-logo {
  display: block;
  width: min(220px, 58vw);
  height: auto;
  margin: 0 auto 1.5rem;
}

.footer-logo {
  display: block;
  width: 96px;
  height: auto;
  margin: 0 auto 0.65rem;
  opacity: 0.85;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.user-chip img {
  border-radius: 50%;
  object-fit: cover;
}

.logout-form {
  margin: 0;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--text);
  background: hsla(0, 0%, 100%, 0.06);
  outline: none;
}

.site-main {
  flex: 1;
  width: min(720px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.page-login .site-main {
  display: flex;
  align-items: center;
  width: min(640px, calc(100% - 2.5rem));
  min-height: calc(100vh - var(--header-h) - 5rem);
  padding-top: 0;
  padding-bottom: 2rem;
}

.hero {
  text-align: center;
  padding: 1rem 0 2.5rem;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-weight: 300;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lede {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
  font-weight: 300;
  font-size: 1.1rem;
}

.cta-row {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.flash {
  margin: 1.5rem auto 0;
  max-width: 28rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.flash.error {
  color: var(--error);
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 120, 120, 0.25);
}

.index-section {
  padding-top: 0.5rem;
}

.index-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.index-header h2 {
  margin: 0;
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.search input {
  width: min(240px, 100%);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.search input::placeholder {
  color: var(--text-muted);
}

.search input:focus-visible {
  outline: none;
  border-color: var(--border-strong);
}

.report-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.report-link {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.report-link:hover,
.report-link:focus-visible {
  background: hsla(0, 0%, 100%, 0.04);
  border-color: var(--border);
  border-radius: 0.65rem;
  outline: none;
}

.report-title {
  font-size: 1.15rem;
  font-weight: 500;
}

.report-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

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

.empty {
  color: var(--text-muted);
}

.empty code {
  font-size: 0.9em;
  color: var(--text);
}

.site-footer {
  padding: 1.75rem 1.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .site-header {
    padding: 1rem 1.15rem;
  }

  .user-chip span {
    display: none;
  }

  .site-main {
    width: min(100%, calc(100% - 2rem));
  }
}
