:root {
  --navy: #1c2c50;
  --card: #f3f6fb;
  --card-hover: #eaf0f9;
  --ink: #0f172a;
  --muted: #5b6b8b;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  --icon-size: 34px;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--navy);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  width: min(680px, 92vw);
  margin: auto;
}

/* Header */
.brand {
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.brand img { max-width: 260px; height: auto; }

/* Tile list */
.stack { display: grid; gap: 16px; }

/* Core tile styles */
.tile {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .12s ease, background .12s ease;
  outline: none;
}
.tile:where(a, summary) {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tile:hover { background: var(--card-hover); /* transform: translateY(-1px); */ }
.tile:focus-visible { box-shadow: 0 0 0 3px #a7c1ff inset, var(--shadow); }

/* Anchor tiles */
a.tile {
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
}

/* Details (accordion) */
details {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
details > summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
}
details > summary::-webkit-details-marker { display: none; }

/* Submenu inside accordions */
.submenu {
  padding: 0 14px 14px 58px;
  display: grid;
  gap: 6px;
}
.submenu a {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.submenu a:hover { background: #fff; }
.submenu a:focus-visible {
  outline: 3px solid #a7c1ff;
  outline-offset: 2px;
  background: #fff;
}

/* Group headings inside submenu */
.submenu strong {
  display: block;
  margin: 12px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
}
.submenu em {
  display: block;
  margin: 8px 0 2px 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: normal;
}

/* Icon wrapper (SVG/PNG) */
.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex: 0 0 var(--icon-size);
  display: grid;
  place-items: center;
  background: #e7efff;          
  border-radius: 10px;
  overflow: hidden;          
}
.icon img,
.icon svg {
  width: 70%;
  height: 70%;
  display: block;
}

/* Chevron rotation */
.chev {
  margin-left: auto;
  opacity: .6;
  transform: rotate(0deg);
  transition: transform .12s ease;
}
details[open] .chev { transform: rotate(180deg); }

/* Footer */
footer {
  color: #cbd5e1;
  font-size: 14px;
  text-align: center;
  margin-top: 26px;
}

/* Small screens: tighten submenu indent */
@media (max-width: 480px) {
  .submenu { padding: 0 10px 12px 50px; }
}

/* Reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {
  .tile, .chev { transition: none; }
}

/* Visually hidden utility for screen-reader-only text */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Skip link stays hidden unless focused via keyboard */
.skip-link {
  position: absolute;
  left: -9999px; top: auto;
  background: #fff; color: #000;
  padding: .5rem 1rem; border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(0,0,0,.2);
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 9999; }

/* Semantic lists without affecting layout*/
.flat-list { list-style: none; margin: 0; padding: 0; display: contents; }
.flat-list > li { display: contents; }
