/*** Simple.css modifications ***/
/* Fleet theme: adjust these tokens to restyle ordinary Simple.css elements. */
:root {
  color-scheme: dark;
  --bg: #0b1220;
  --accent-bg: #131f30;
  --text: #e8e6df;
  --text-light: #a9b7c8;
  --border: #52647b;
  --accent: #f5c164;
  --accent-hover: #ffe0a3;
  --accent-text: var(--bg);
  --fleet-cyan: #8cd5e3;
  --standard-border-radius: 2px;
  --code: #f06292;
  --preformatted: #ccc;
  --disabled: #192332;
}

/* Static stars stay in the masthead so reading and forms remain distraction-free. */
body > header {
  background-color: #0c1525;
  background-image:
    radial-gradient(ellipse at 50% 100%, #203650 0%, transparent 70%),
    url("/assets/starfield-f1e07ba5.svg");
  background-size: 100% 100%, cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--fleet-cyan);
  box-shadow: 0 3px 18px #8cd5e314;
  padding-bottom: 1.25rem;
}

body > header .fleet-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 45rem;
  margin: 0.5rem auto 0;
  text-align: left;
}

.fleet-brand > div {
  min-width: 0;
}

body > header .fleet-insignia {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  margin: 0;
  opacity: 1;
}

body > header h1 {
  max-width: 45rem;
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

body > header .fleet-tagline {
  color: var(--fleet-cyan);
  font-family: var(--mono-font);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0.4rem 0 0;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

header nav a,
header nav a:visited {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  margin: 0;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
}

@media (max-width: 720px) {
  body > header .fleet-brand {
    gap: 0.75rem;
    max-width: min(45rem, 90%);
  }

  body > header .fleet-insignia {
    width: 2.5rem;
    height: 2.5rem;
  }

  body > header .fleet-tagline {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }
}

header nav a:hover,
header nav a[aria-current="page"] {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}

h2, h3, h4, h5, h6 {
  letter-spacing: 0.025em;
}

h2 {
  font-size: 1.9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

h3 {
  font-size: 1.5rem;
}

th {
  color: var(--fleet-cyan);
  font-family: var(--mono-font);
  font-size: 0.9em;
  letter-spacing: 0.03em;
}

button, .button, input[type="submit"], input[type="reset"], input[type="button"] {
  font-weight: 600;
  border-radius: var(--standard-border-radius);
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--fleet-cyan);
  outline-offset: 4px;
}

body > footer {
  border-top-color: var(--fleet-cyan);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/*** Pagy-specific styles ***/
.pagy {
  display: flex;
  font-family: sans-serif;
  font-size: 0.875rem;
  justify-content: center;
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.pagy > :not([hidden]) ~ :not([hidden]) {
  --space-reverse: 0;
  margin-right: calc(0.25rem * var(--space-reverse));
  margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
}

.pagy a:not(.gap) {
  display: block;
  text-decoration: none;
  border-radius: var(--standard-border-radius);
  background-color: var(--accent-bg);
  padding: 0.25rem 0.75rem;
  color: inherit;
  border: 1px solid;
  border-color: var(--border);
}

.pagy a:not(.gap):hover {
  background-color: var(--bg);
  border: 1px solid;
}

.pagy a:not(.gap):not([href]) { /* disabled links */
  cursor: default;
  background-color: var(--bg);
  border: 1px solid;
  color: var(--text-light);
}

.pagy a:not(.gap).current {
  background-color: var(--accent-bg);
  border: 1px solid;
  color: var(--accent);
}

.pagy label {
  white-space: nowrap;
  display: inline-block;
  border-radius: var(--standard-border-radius);
  background-color: var(--accent-bg);
  padding: 0.125rem 0.75rem;
}

.pagy label input {
  line-height: 1.5rem;
  border-radius: var(--standard-border-radius);
  border-style: none;
  background-color: var(--accent-bg);
}


/*** Additional styles ***/
/* Flash alerts. */
#alert {
  background-color: var(--accent-bg);
  border: 1px solid #ED6E5D;
  border-radius: 5px;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #ED6E5D;
  width: 100%;
  padding: 0 15px;
  margin-left: 0;
  float: none;
}

/* Flash notices. */
#notice {
  background-color: var(--accent-bg);
  border: 1px solid #3EB489;
  border-radius: 5px;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #3EB489;
  width: 100%;
  padding: 0 15px;
  margin-left: 0;
  float: none;
}

/* Validation errors. */
#error_explanation {
  color: #ED6E5D;
}

/* Hide elements. */
.hidden {
  display: none;
}

/* Skip for accessibility */
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 10;
  top: 0.5rem;
  left: 50%;
  width: auto;
  height: auto;
  padding: 8px;
  overflow: visible;
  clip-path: none;
  background: var(--bg);
  transform: translate(-50%, 0);
}
