/* ===============================
       Theme variables
    ================================= */
    :root {
      --primary: #0b569b;
      --secondary: #08457e;
      --light: #f8f9fa;
      --dark: #222222;
      --dark-alt: #333;
      --gray: #ccc;
      --bg-color: #f2f2f2;
      --nav-text: #bbcad8;
      --hover-accent: #ffc107;

      --header-h: 64px;
      --radius: 10px;
      --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    /* ===============================
       Base styles
    ================================= */
    *, *::before, *::after { box-sizing: border-box; }
    html, body { height: 100%; }
    html { overflow-x: hidden; }
    body {
      margin: 0;
      font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
      background: var(--bg-color);
      color: var(--dark);
      line-height: 1.5;
      -webkit-tap-highlight-color: transparent;
      transition: background-color .25s, color .25s;
    }
    a { color: inherit; text-decoration: none; }
    img { max-width: 100%; display: block; }
    .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;
    }

    /* Lighten text inputs, textareas, and selects */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    textarea,
    select {
      background-color: #f9f9f9;       /* light grey background */
      color: #222;                     /* dark text for contrast */
      border: 1px solid #ccc;          /* subtle border */
      border-radius: 4px;
      padding: 0.5rem 0.75rem;
      font-size: 1rem;
      transition: background-color 0.2s ease, border-color 0.2s ease;
    }

    /* On focus: slightly brighter background and accent border */
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    input[type="search"]:focus,
    input[type="number"]:focus,
    textarea:focus,
    select:focus {
      background-color: #fff;          /* pure white on focus */
      border-color: #0078d4;           /* accent color (blue) */
      outline: none;                   /* remove default outline */
      box-shadow: 0 0 0 2px rgba(0,120,212,0.2);
    }

    /* Optional: placeholder color */
    ::placeholder {
      color: #777;
    }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-bar select,
.filter-bar input[type="text"],
.filter-bar button {
  padding: 0.5rem;
  font-size: 0.9rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
}

.alert.success {
  background-color: #e6f4ea;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.alert.error {
  background-color: #fbeaea;
  color: #c62828;
  border: 1px solid #f5c6cb;
}

.alert {
  position: relative;
  padding: 1rem;
  padding-right: 2rem;
  /* your existing styles… */
}

.alert .close-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: inherit;
}


    /* ===============================
       Header & navigation
    ================================= */
    /* Skip link: hidden until focused */
    .skip-link {
      position: absolute;
      top: -40px; /* hide above viewport */
      left: 0;
      background: #000;
      color: #fff;
      padding: 8px 16px;
      z-index: 1000;
      text-decoration: none;
      border-radius: 4px;
      transition: top 0.2s ease;
    }

    .skip-link:focus {
      top: 10px; /* slide into view when focused */
    }

    .site-header {
      position: sticky;
      top: 0;
      z-index: 1000;
      height: var(--header-h);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: .75rem;
      padding: 0 1rem;
      background:
        radial-gradient(circle at center, rgb(11, 86, 155) 0%, rgba(19, 43, 65, 0) 90%),
        #000;
      box-shadow: 0 2px 12px rgba(0,0,0,.25);
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: .6rem;
      color: var(--light);
    }
    .brand-mark {
      width: 60px;
      height: 36px;
      background-image: url(../images/tii.png);
      background-size: cover; /* or contain */
      background-position: center;
      background-repeat: no-repeat;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
    }
  .brand-name { font-weight: 600; letter-spacing: .2px; }

    .nav {
      display: flex;
      align-items: center;
      gap: .5rem;
    }

    .theme-toggle,
    .nav-toggle {
      background: transparent;
      color: var(--nav-text);
      border: 1px solid rgba(255,255,255,.2);
      padding: .45rem .6rem;
      border-radius: 8px;
      cursor: pointer;
      transition: background-color .2s, color .2s, border-color .2s;
    }
    .theme-toggle:hover,
    .nav-toggle:hover {
      background: rgba(255,255,255,.08);
      color: var(--light);
      border-color: rgba(255,255,255,.35);
    }

    /* Hamburger with animation */
    .nav-toggle {
      display: none;
      position: relative;
      width: 40px;
      height: 36px;
    }
    .nav-toggle .bar {
      position: absolute;
      left: 9px; right: 9px;
      height: 2px;
      background: currentColor;
      transition: transform .25s ease, opacity .2s ease, top .25s ease;
    }
    .nav-toggle .bar:nth-child(1) { top: 11px; }
    .nav-toggle .bar:nth-child(2) { top: 17px; }
    .nav-toggle .bar:nth-child(3) { top: 23px; }
    .nav-toggle.active .bar:nth-child(1) { top: 17px; transform: rotate(45deg); }
    .nav-toggle.active .bar:nth-child(2) { opacity: 0; }
    .nav-toggle.active .bar:nth-child(3) { top: 17px; transform: rotate(-45deg); }

    /* Desktop menu */
    .menu {
      list-style: none;
      display: flex;
      gap: .5rem;
      margin: 0;
      padding: 0;
    }
    .menu > li { position: relative; }
    .menu > li > a,
    .menu > li > .submenu-toggle {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      padding: .5rem .7rem;
      font-size: 1rem;
      font-weight: 500;
      color: var(--nav-text);
      border-radius: 8px;
      border: 1px solid transparent;
      background: transparent;
      cursor: pointer;
      text-decoration: none;
      white-space: nowrap;
      line-height: 1.2;
    }
    .menu > li > a:hover,
    .menu > li > .submenu-toggle:hover {
      color: var(--light);
      background: rgba(255,255,255,.08);
      border-color: rgba(255,255,255,.2);
    }
    .menu .chev { opacity: .85; }

    /* Submenu (desktop) */
    .submenu {
      position: absolute;
      top: 100%; /* flush to parent */
      left: 0;
      min-width: 220px;
      background: var(--secondary);
      border-radius: 10px;
      padding: .4rem;
      margin-top: 0px; /* remove shadow to allow for submenu */
      list-style: none;
      box-shadow: var(--shadow);
      display: none;
      z-index: 1100; /* above header */
    }
    .submenu li a {
      display: block;
      color: var(--light);
      text-decoration: none;
      padding: .55rem .7rem;
      border-radius: 8px;
    }
    .submenu li a:hover {
      background: rgba(255,255,255,.08);
      color: var(--hover-accent);
    }

    .has-submenu {
      position: relative;
    }

    .has-submenu:hover .submenu,
    .has-submenu:focus-within .submenu {
      display: block;
    }

    /* Open on hover/focus (desktop only) */
    @media (hover:hover) and (pointer:fine) {
      .has-submenu:hover > .submenu,
      .has-submenu:focus-within > .submenu { display: block; }
    }

    /* ===============================
       Hero & sections
    ================================= */
    .hero {
      padding: clamp(2.5rem, 6vw, 5rem) 1rem;
      background: linear-gradient(180deg, rgba(11,86,155,.06), transparent 60%);
    }
    .hero-inner {
      max-width: 1100px;
      margin: 0 auto;
      text-align: center;
    }
    .hero h1 {
      margin: 0 0 .6rem;
      font-size: clamp(1.8rem, 3.6vw, 2.6rem);
      font-weight: 800;
      letter-spacing: .2px;
      color: var(--primary);
    }
    .hero p {
      margin: 0 auto 1.25rem;
      max-width: 65ch;
      color: #475467;
      font-size: 1.05rem;
    }
    .actions { display: inline-flex; gap: .75rem; flex-wrap: wrap; }
    .btn {
      display: inline-block;
      padding: .7rem 1.1rem;
      border-radius: 10px;
      text-decoration: none;
      font-weight: 600;
      transition: transform .12s, background-color .2s, color .2s, border-color .2s;
      will-change: transform;
    }
    .btn:hover { transform: translateY(-1px); }
    .btn.primary { background: var(--primary); color: var(--light); }
    .btn.primary:hover { background: #0d61ad; }
    .btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
    .btn.ghost:hover { background: rgba(11,86,155,.08); }

    .features {
      max-width: 1100px;
      margin: 2rem auto 3rem;
      padding: 0 1rem;
      display: grid;
      gap: 1rem;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .feature {
      background: #fff;
      border-radius: 12px;
      padding: 1rem;
      box-shadow: var(--shadow);
    }
    .feature h3 { margin: .25rem 0 .5rem; color: var(--secondary); }
    .feature p { margin: 0 0 .75rem; color: #4b5563; }
    .link { color: var(--primary); font-weight: 600; }
    .link:hover { text-decoration: underline; }

    .site-footer {
      padding: 1.2rem;
      text-align: center;
      color: #6b7280;
    }

    /* ===============================
       Mobile: slide-down full-width panel
    ================================= */
    @media (max-width: 900px) {
      .nav-toggle { display: inline-block; }

      /* Convert menu to overlay panel below header */
      .menu {
        position: fixed;
        top: var(--header-h);
        left: 0;
        width: 100vw;
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        display: block;
        padding: .5rem;
        background: rgba(0,0,0,0.72);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        z-index: 1200;
      }
      body.nav-open .menu {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }
      /* Prevent background scroll when menu open */
      body.nav-open { overflow: hidden; }

      .menu > li { padding: .15rem; }
      .menu > li > a,
      .menu > li > .submenu-toggle {
        display: flex;
        width: 100%;
        justify-content: space-between;
        color: var(--light);
        background: rgba(255,255,255,.04);
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 10px;
        padding: .6rem .8rem;
      }

      /* Mobile submenu: collapsible block */
      .submenu {
        position: static;
        display: block; /* for height animation container */
        overflow: hidden;
        max-height: 0;
        padding: 0;
        margin-top: .35rem;
        background: rgba(255,255,255,.06);
        border-radius: 10px;
        transition: max-height .25s ease, padding .25s ease;
      }
      .submenu.open {
        max-height: 400px;   /* large enough for items */
        padding: .35rem;
      }

      /* Cards stack */
      .features { grid-template-columns: 1fr; }
    }

    /* ===============================
       Dark mode
    ================================= */
    @media (prefers-color-scheme: dark) { :root { color-scheme: dark; } }
    body.dark { background: #111418; color: var(--light); }
    body.dark .hero { background: linear-gradient(180deg, rgba(11,86,155,.12), transparent 60%); }
    body.dark .feature { background: #171a1f; }
    body.dark .feature p { color: #b9c1ce; }
    body.dark .link { color: var(--nav-text); }
    body.dark .submenu { background: #0b335e; }
