/* GALDC site stylesheet — hand-authored, no framework runtime. */

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

html, body { margin: 0; padding: 0; }

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  color: #1f2937;
  background: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.flex-col-min-screen { display: flex; flex-direction: column; min-height: 100vh; }

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ---------------- Navbar ---------------- */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  min-height: 4rem;
  background: #ffffff;
  position: relative;
  z-index: 20;
  gap: 0.5rem;
}

.navbar-start a { display: inline-block; line-height: 0; margin: 0.25rem; }
.navbar-start img { max-width: 250px; height: auto; }

.navbar-center { display: none; flex: 1; justify-content: center; }
.mobile-menu-wrap { display: flex; }

@media (min-width: 1024px) {
  .navbar-center { display: flex; }
  .mobile-menu-wrap { display: none; }
}

.menu-horizontal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.25rem;
  gap: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.menu-horizontal > li { display: flex; align-items: center; margin: 0.25rem; }

.menu-horizontal > li > a,
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  color: #1f2937;
  text-decoration: none;
  border-radius: 0.25rem;
  background: transparent;
  border: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-family: inherit;
  cursor: pointer;
}

.menu-horizontal > li > a:hover,
.menu-horizontal > li > a:focus-visible,
.dropdown-trigger:hover,
.dropdown-trigger:focus-visible {
  color: #2563eb;
  outline: none;
}

.dropdown { position: relative; }

.dropdown-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 13rem;
  background: #ffffff;
  border-radius: 0.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Invisible bridge so the cursor can travel from the trigger to the dropdown
 * without leaving the hover area. Without this the menu closes mid-traverse. */
.dropdown-content::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.dropdown-content li { margin: 0; }

.dropdown-content a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #1f2937;
  text-decoration: none;
  border-radius: 0.375rem;
}

.dropdown-content a:hover,
.dropdown-content a:focus-visible {
  background: #f1f5f9;
  outline: none;
}

@media (hover: hover) and (min-width: 1024px) {
  .dropdown:hover .dropdown-content,
  .dropdown:focus-within .dropdown-content { display: block; }
}

.dropdown.is-open > .dropdown-content { display: block; }

/* ---------------- Mobile menu ---------------- */

.navbar-toggle {
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: #1f2937;
  border-radius: 0.5rem;
}
.navbar-toggle:hover,
.navbar-toggle:focus-visible { background: #f1f5f9; outline: none; }
.navbar-toggle svg { width: 22px; height: 22px; display: block; }

.mobile-menu {
  display: none;
  position: absolute;
  right: 1rem;
  top: 3.5rem;
  width: 13rem;
  max-height: 80vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 0.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  z-index: 50;
}

.mobile-menu.is-open { display: block; }

.mobile-menu li { margin: 0; }
.mobile-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #1f2937;
  text-decoration: none;
  border-radius: 0.375rem;
}
.mobile-menu a:hover,
.mobile-menu a:focus-visible { background: #f1f5f9; outline: none; }

.mobile-menu .menu-title {
  display: block;
  padding: 0.4rem 0.75rem 0.1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #6b7280;
}

.mobile-menu ul {
  list-style: none;
  padding-left: 0.5rem;
  margin: 0 0 0.25rem;
}

/* ---------------- Hero strip below navbar ---------------- */

.hero-strip { width: 100%; }
.hero-strip img { width: 100%; height: auto; }

/* ---------------- Page banner ---------------- */

.page-banner img { width: 100%; height: auto; }

/* ---------------- Page body (main + sidebar) ---------------- */

.page-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #ffffff;
}

.page-body > main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  overflow-wrap: break-word;
}

.sidebar {
  width: 100%;
  padding: 1rem;
  background: #ffffff;
}

@media (min-width: 640px) {
  .page-body { flex-direction: row; }
  .page-body > main {
    border-bottom: none;
    border-right: 1px solid #e5e7eb;
  }
  .sidebar { width: 16rem; flex-shrink: 0; }
}

.sidebar .card {
  background: #ffffff;
  border-radius: 0.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 1rem;
}

.sidebar .card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar .card p { margin: 0; }

/* ---------------- Typography ---------------- */

h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin: 1rem 0 1rem; }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.35; margin: 1rem 0 0.5rem; }

p { margin: 0 0 0.75rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }

.list-none { list-style: none; padding-left: 0; }
.list-disc { list-style: disc; padding-left: 1.5rem; }

.link {
  color: #2563eb;
  text-decoration: underline;
}
.link:hover { color: #1e40af; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
}
table th, table td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
table thead th { background: #f9fafb; }

/* Scroll wrapper for wide tables on narrow viewports */
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
}
.table-wrap > table { margin: 0; }

hr { border: 0; border-top: 1px solid #e5e7eb; margin: 1.5rem 0; }

.text-center { text-align: center; }

/* ---------------- Homepage chooser ---------------- */

.chooser {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 1.5rem 0 3rem;
  position: relative;
}

.chooser-logo { margin-top: 1rem; }
.chooser-logo a { display: inline-block; line-height: 0; }
.chooser-logo img { max-width: 300px; height: auto; }

.chooser-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 72rem;
  gap: 2rem;
  padding: 0 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .chooser-grid {
    flex-direction: row;
    padding: 0 3rem;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
  }
}

.chooser-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  color: #1f2937;
}

.chooser-card img { margin-bottom: 1rem; }

.chooser-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1rem 0;
}

.chooser-card a { color: #0284c7; text-decoration: none; }
.chooser-card a:hover { color: #38bdf8; }

.chooser-card p { color: #1f2937; margin: 1rem 0 1.5rem; }

/* Push the button to the bottom of each card so both cards' buttons line up. */
.chooser-card a.btn { margin-top: auto; }
.chooser-card a.btn,
.chooser-card a.btn:hover,
.chooser-card a.btn:visited,
.chooser-card a.btn:focus { color: #ffffff; text-decoration: none; }

/* Footer overlay on the hero image — pinned to the viewport so it stays visible
 * regardless of where the chooser content reaches. */
.chooser-credit {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}
.chooser-credit a {
  display: inline-block;
  pointer-events: auto;
  padding: 0.4rem 0.9rem;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9999px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.chooser-credit a:hover { background: rgba(15, 23, 42, 0.85); }

/* Buttons — match DaisyUI .btn at 48px height, padding 0 1rem, 14px / 600 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 20rem;
  height: 3rem;
  min-height: 3rem;
  padding: 0 1rem;
  text-align: center;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  text-transform: none;
}
.btn-blue { background: #2563eb; }
.btn-blue:hover { background: #3b82f6; }
.btn-green { background: #16a34a; }
.btn-green:hover { background: #22c55e; }

/* ---------------- Footer ---------------- */

.site-footer {
  background: #ffffff;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #475569;
  border-top: 2px solid #f3f4f6;
  margin-top: 1rem;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #1f2937; text-decoration: underline; }

/* ---------------- 404 ---------------- */

.prose {
  max-width: 70ch;
  margin: 2rem auto;
  padding: 0 1rem;
}
.prose .link { color: #0284c7; }
.prose .link:hover { color: #0ea5e9; }
