html, body {
      min-height: 100%;
    }

    :root {
      --ink: #0c1b2a;
      --slate: #3a4a5a;
      --paper: #f0ebe3;
      --accent: #0b6b6e;
      --accent-dark: #084e51;
      --sunset: #d9894c;
      --card: #ffffff;
      --shadow: 0 20px 40px rgba(12, 27, 42, 0.12);
    }

    body {
      margin: 0;
      padding: 0;
      font-family: "Verdana", "Segoe UI", "Tahoma", sans-serif;
      color: var(--ink);
      min-height: 100vh;
      background-image:
        linear-gradient(120deg, rgba(217, 137, 76, 0.8) 0%, rgba(11, 107, 110, 0.781) 100%),
        linear-gradient(120deg, #efe6d8 0%, #ebe1d3 45%, #dfe6ea 100%);
      background-attachment: fixed;
      background-repeat: no-repeat;
      background-size: 140% 140%;
      animation: bgFloat 12s ease-in-out infinite;
    }

    @keyframes bgFloat {
      0% {
        background-position: 0% 50%;
      }
      50% {
        background-position: 100% 50%;
      }
      100% {
        background-position: 0% 50%;
      }
    }

    header {
      background-color: #184060;
      color: white;
      padding: 18px 0 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      box-shadow: 0 12px 30px rgba(12, 27, 42, 0.22);
    }

    .header-top {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      width: 100%;
      padding: 0 10px;
      box-sizing: border-box;
      column-gap: 20px;
      margin: 0;
    }

    .header-top h1 {
      margin: 0;
      text-align: center;
      font-family: "Verdana", "Segoe UI", "Tahoma", sans-serif;
      letter-spacing: 0.5px;
    }

    .header-top .login-btn {
      justify-self: end;
      color: #fdfdff;
    }

    .header-top .login-btn:hover {
      background-color: #0077cc;
    }

    .user-box {
      width: 240px;
      height: 80px;
      background-color: #eef4f5;
      border-radius: 10px;
      padding: 12px;
      box-shadow: 0 8px 18px rgba(12, 27, 42, 0.12);
      margin-right: 20px;
      box-sizing: border-box;
      color: #000;
      display: flex;
      align-items: center;
      gap: 12px;
    }


    nav {
      margin-top: 10px;
    }

    details.nav-group {
      display: inline-block;
      margin: 0 10px;
      position: relative;
    }

    summary.nav-link {
      list-style: none;
      padding: 10px 20px;
      margin: 0;
      font-weight: bold;
      color: white;
      background-color: #0b4f6b;
      border-radius: 6px;
      cursor: pointer;
    }

    a.nav-link {
      display: inline-block;
      margin: 0 10px;
      list-style: none;
      padding: 10px 20px;
      font-weight: bold;
      color: white;
      background-color: #0b4f6b;
      border-radius: 6px;
      cursor: pointer;
      text-decoration: none;
    }

    a.nav-link:hover {
      background-color: #0f6d8a;
    }

    details[open] summary.nav-link {
      background-color: #0f6d8a;
    }

    details.nav-group summary.nav-link:hover {
      background-color: #0f6d8a;
    }
      

    .dropdown-links {
      position: absolute;
      top: 100%;
      left: 0;
      background-color: #0b4f6b;
      border-radius: 6px;
      z-index: 10;
      min-width: 100%;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      opacity: 0;
      transform: translateY(-10px);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    details[open] .dropdown-links {
      opacity: 1;
      transform: translateY(0);
    }

    .dropdown-links a {
      display: block;
      padding: 10px;
      color: white;
      text-decoration: none;
      font-weight: bold;
      border-bottom: 1px solid #003366;
    }

    .dropdown-links a:hover {
      background-color: #0f6d8a;
    }

    .dropdown-links a:last-child {
      border-bottom: none;
    }

    .page-layout {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      width: 100%;
      margin: 60px 0 40px 0;
      padding: 0 20px 40px;
      box-sizing: border-box;
    }



    .user-box h3 {
      margin: 0;
      font-size: 0.9em;
      font-weight: bold;
    }

    .user-avatar {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      object-fit: cover;
      background-color: #ccc;
      flex-shrink: 0;
    }

    .user-content {
      flex: 1;
      min-width: 0;
    }

    .user-name {
      font-weight: bold;
      margin: 0 0 4px 0;
      font-size: 0.9em;
    }

    .user-actions {
      margin: 0;
    }

    .user-actions a {
      display: inline-block;
      font-size: 0.8em;
      color: #005599;
      text-decoration: none;
      padding: 2px 0;
    }

    .user-actions a:hover {
      text-decoration: underline;
    }

    .container {
      max-width: 1100px;
      width: 100%;
      margin: 0 auto;
      padding: 20px;
      box-sizing: border-box;
    }

    .hero {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 30px;
      align-items: center;
      background: var(--card);
      border-radius: 24px;
      padding: 36px;
      box-shadow: var(--shadow);
      margin-bottom: 36px;
      animation: riseIn 0.7s ease both;
    }

    .hero-kicker {
      text-transform: uppercase;
      font-size: 0.8rem;
      letter-spacing: 2px;
      color: var(--accent);
      font-weight: 700;
      margin: 0 0 12px;
    }

    .hero-title {
      font-family: "Verdana", "Segoe UI", "Tahoma", sans-serif;
      font-size: clamp(1.8rem, 2.5vw, 2.6rem);
      margin: 0 0 16px;
      color: var(--ink);
    }

    .hero-subtitle {
      color: var(--slate);
      margin: 0 0 24px;
      line-height: 1.6;
      font-size: 1.05rem;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 24px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 18px;
      border-radius: 999px;
      font-weight: 700;
      text-decoration: none;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .btn-primary {
      background: var(--accent);
      color: #fff;
      box-shadow: 0 10px 20px rgba(11, 107, 110, 0.25);
    }

    .btn-secondary {
      background: var(--sunset);
      color: #fff;
      box-shadow: 0 10px 20px rgba(217, 137, 76, 0.25);
    }

    .btn-ghost {
      background: transparent;
      color: var(--accent);
      border: 2px solid rgba(11, 107, 110, 0.4);
    }

    .btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 26px rgba(12, 27, 42, 0.2);
    }

    .hero-meta {
      display: grid;
      gap: 12px;
      font-size: 0.9rem;
      color: var(--slate);
    }

    .meta-label {
      text-transform: uppercase;
      letter-spacing: 1px;
      font-size: 0.7rem;
      display: block;
      color: rgba(58, 74, 90, 0.8);
      margin-bottom: 4px;
    }

    .hero-visual {
      display: flex;
      justify-content: center;
    }

    .hero-card {
      background: linear-gradient(140deg, rgba(11, 107, 110, 0.1), rgba(217, 137, 76, 0.1));
      border-radius: 20px;
      padding: 24px;
      display: grid;
      gap: 16px;
      align-items: center;
      max-width: 320px;
      text-align: center;
      box-shadow: inset 0 0 0 1px rgba(12, 27, 42, 0.08);
    }

    .hero-card img {
      width: 120px;
      height: 120px;
      object-fit: contain;
      margin: 0 auto;
    }

    .hero-card-title {
      margin: 0;
      font-weight: 700;
      color: var(--ink);
    }

    .hero-card-text {
      margin: 0;
      color: var(--slate);
      font-size: 0.95rem;
    }

    .feature-section,
    .projects-section,
    .updates-section {
      margin-bottom: 36px;
    }

    .section-heading {
      margin-bottom: 20px;
    }

    .section-kicker {
      text-transform: uppercase;
      letter-spacing: 1.5px;
      font-size: 0.75rem;
      color: var(--accent);
      font-weight: 700;
      margin: 0 0 8px;
    }

    .section-heading h2 {
      margin: 0;
      font-family: "Verdana", "Segoe UI", "Tahoma", sans-serif;
      color: var(--ink);
    }

    .feature-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 20px;
    }

    .feature-card {
      background: var(--card);
      border-radius: 18px;
      padding: 24px;
      box-shadow: var(--shadow);
      display: grid;
      gap: 12px;
      animation: riseIn 0.6s ease both;
    }

    .feature-card h3 {
      margin: 0;
      font-size: 1.2rem;
    }

    .feature-card p {
      margin: 0;
      color: var(--slate);
      line-height: 1.5;
    }

    .feature-media {
      width: 96px;
      height: 96px;
      border-radius: 16px;
      background: rgba(11, 107, 110, 0.1);
      display: grid;
      place-items: center;
    }

    .feature-media img {
      width: 64px;
      height: 64px;
      object-fit: contain;
    }

    .text-link {
      color: var(--accent);
      text-decoration: none;
      font-weight: 700;
      margin-top: 6px;
      display: inline-flex;
      gap: 6px;
      align-items: center;
    }

    .text-link:hover {
      color: var(--accent-dark);
    }

    .project-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 18px;
    }

    .project-card {
      background: var(--card);
      padding: 20px;
      border-radius: 16px;
      text-decoration: none;
      color: var(--ink);
      box-shadow: var(--shadow);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      display: grid;
      gap: 14px;
      align-content: start;
      animation: riseIn 0.6s ease both;
    }

    .project-card img {
      width: 100%;
      height: 180px;
      object-fit: contain;
      background: rgba(12, 27, 42, 0.05);
      border-radius: 12px;
      padding: 12px;
      box-sizing: border-box;
    }

    .project-hero {
      width: 100%;
      max-height: 360px;
      object-fit: contain;
      background: rgba(12, 27, 42, 0.06);
      border-radius: 18px;
      padding: 18px;
      box-sizing: border-box;
      margin: 16px 0 20px;
    }

    .project-progress {
      color: var(--slate);
      font-weight: 600;
    }

    .project-card h3 {
      margin: 0;
      font-size: 1.1rem;
    }

    .project-card p {
      margin: 0;
      color: var(--slate);
      line-height: 1.5;
    }

    .project-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 18px 32px rgba(12, 27, 42, 0.16);
    }

    .updates-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 16px;
    }

    .update-card {
      background: var(--card);
      padding: 20px;
      border-radius: 16px;
      box-shadow: var(--shadow);
      animation: riseIn 0.6s ease both;
    }

    .feature-card:nth-child(2),
    .project-card:nth-child(2),
    .update-card:nth-child(2) {
      animation-delay: 0.1s;
    }

    .feature-card:nth-child(3),
    .project-card:nth-child(3),
    .update-card:nth-child(3) {
      animation-delay: 0.2s;
    }

    .project-card:nth-child(4) {
      animation-delay: 0.3s;
    }

    .project-card:nth-child(5) {
      animation-delay: 0.4s;
    }

    .project-card:nth-child(6) {
      animation-delay: 0.5s;
    }

    @keyframes riseIn {
      from {
        opacity: 0;
        transform: translateY(12px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .update-card h3 {
      margin: 0 0 10px;
      color: var(--ink);
    }

    .update-card p {
      margin: 0;
      color: var(--slate);
      line-height: 1.5;
    }

    /* Page Styles */
    .page {
      display: none;
    }

    .back-btn {
      background-color: #005599;
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: bold;
      margin-top: 20px;
    }

    .back-btn:hover {
      background-color: #0077cc;
    }

    .project-row {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      margin-bottom: 20px;
    }

    summary {
      font-weight: bold;
      cursor: pointer;
      font-size: 1.2em;
      margin-bottom: 10px;
    }

    blogEntry {
      background-color: #f4f4f4;
      padding: 20px;
      border-radius: 8px;
      margin: 20px 0;
      display: block;
    }

    blogEntry h2 {
      margin: 0;
      font-size: 1.5em;
    }

    blogEntry p {
      margin: 10px 0;
    }

    footer {
      background-color: #003366;
      color: #ccc;
      padding: 15px;
      text-align: center;
      font-size: 0.9em;
    }

    /* User page specific styles */
    .main-content {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      width: 100%;
      margin: 40px 0 40px 0;
      padding: 0 20px;
      box-sizing: border-box;
      gap: 20px;
    }

    .form-container {
      background: white;
      padding: 30px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      max-width: 500px;
      width: 100%;
      flex: 1;
      max-width: 600px;
    }

    .form-container h2 {
      margin-top: 0;
      color: #003366;
      border-bottom: 2px solid #005599;
      padding-bottom: 10px;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-group label {
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
      color: #003366;
    }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input[type="file"] {
      width: 100%;
      padding: 10px;
      border: 2px solid #ddd;
      border-radius: 6px;
      font-size: 16px;
      box-sizing: border-box;
    }

    .form-group input[type="text"]:focus,
    .form-group input[type="password"]:focus {
      border-color: #005599;
      outline: none;
    }

    .form-group .current-avatar {
      width: 100px;
      height: 100px;
      border-radius: 50%;
      object-fit: cover;
      display: block;
      margin: 10px 0;
      background-color: #ccc;
    }

    .form-actions {
      text-align: center;
      margin-top: 30px;
    }

    .submit-btn {
      background-color: #005599;
      color: white;
      border: none;
      padding: 12px 30px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: bold;
      font-size: 16px;
    }

    .submit-btn:hover {
      background-color: #0077cc;
    }

    .alternative-action {
      margin-top: 20px;
      text-align: center;
      padding-top: 20px;
      border-top: 1px solid #eee;
    }

    .alternative-action a {
      color: #005599;
      text-decoration: none;
      font-weight: bold;
    }

    .alternative-action a:hover {
      text-decoration: underline;
    }

    .error-message {
      background-color: #ffebee;
      color: #c62828;
      padding: 10px;
      border-radius: 6px;
      margin-bottom: 20px;
      border-left: 4px solid #c62828;
    }

    .success-message {
      background-color: #e8f5e8;
      color: #2e7d32;
      padding: 10px;
      border-radius: 6px;
      margin-bottom: 20px;
      border-left: 4px solid #2e7d32;
    }

    .role-info {
      background-color: #e6f2ff;
      padding: 10px;
      border-radius: 6px;
      margin-bottom: 20px;
      font-size: 0.9em;
      color: #003366;
    }

    .back-btn {
      background-color: #6c757d;
      margin-top: 20px;
    }

    .back-btn:hover {
      background-color: #5a6268;
    }

    /* ACT page specific styles */
    .act-header {
      background-color: #003366;
      color: #fff;
      padding: 12px 20px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .act-header-inner {
      max-width: 960px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .act-header-title {
      margin: 0;
      font-size: 1.4rem;
    }

    .act-header-meta {
      font-size: 0.85rem;
      opacity: 0.9;
    }

    .act-nav a {
      display: inline-block;
      margin-left: 10px;
      padding: 8px 14px;
      border-radius: 999px;
      background-color: #005599;
      color: #fff;
      text-decoration: none;
      font-weight: 600;
      font-size: 0.9rem;
    }

    .act-nav a:hover {
      background-color: #0077cc;
    }

    .act-page-layout {
      display: flex;
      align-items: stretch;
      justify-content: center;
      width: 100%;
      margin: 40px 0 40px 0;
      padding: 0 20px;
      box-sizing: border-box;
    }

    /* ACT container starts centered like other pages */
    .act-container {
      max-width: 960px;
      width: 100%;
      margin: 0 auto;
      padding: 20px;
      box-sizing: border-box;
    }

    .act-layout {
      flex: 1;
      display: flex;
      min-height: 0;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 10px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      overflow: hidden;
    }

    /* When actively testing, let ACT container expand horizontally */
    .act-container.act-wide {
      max-width: none;
      width: 100%;
    }

    .act-main {
      flex: 2;
      padding: 24px;
      overflow-y: auto;
      box-sizing: border-box;
    }

    .act-main h1 {
      margin-top: 0;
      color: #003366;
      border-bottom: 2px solid #005599;
      padding-bottom: 10px;
      margin-bottom: 16px;
    }

    .act-subtitle {
      margin: 0 0 20px 0;
      color: #333;
      font-size: 0.95rem;
    }

    .act-sidebar {
      width: 30%;
      min-width: 220px;
      max-width: 70%;
      border-left: 1px solid #dde3f0;
      padding: 20px;
      box-sizing: border-box;
      overflow-y: auto;
      background: #f4f7fb;
    }

    .act-sidebar h2 {
      margin-top: 0;
      color: #003366;
      font-size: 1.1rem;
      margin-bottom: 12px;
    }

    .act-divider {
      width: 5px;
      background: #dde3f0;
      cursor: col-resize;
    }

    .act-question {
      margin-bottom: 20px;
      padding: 16px;
      border-radius: 8px;
      background: #f8f9fc;
      border: 1px solid #e0e5f0;
    }

    .act-question h3 {
      margin-top: 0;
      margin-bottom: 10px;
      color: #003366;
      font-size: 1rem;
    }

    .act-options {
      margin-left: 0;
      margin-top: 8px;
    }

    .act-options label {
      display: block;
      padding: 6px 10px;
      border-radius: 6px;
      cursor: pointer;
      transition: background-color 0.15s ease;
      font-size: 0.95rem;
    }

    .act-options label:hover {
      background-color: #e6efff;
    }

    .act-options input[type="radio"] {
      margin-right: 6px;
    }

    .act-setup {
      margin-bottom: 20px;
      padding: 16px;
      border-radius: 8px;
      background: #f8f9fc;
      border: 1px solid #e0e5f0;
    }

    .act-setup label {
      display: block;
      margin-bottom: 10px;
      font-weight: 600;
      color: #003366;
    }

    .act-setup select,
    .act-setup input[type="number"] {
      margin-top: 4px;
      padding: 6px 8px;
      border-radius: 4px;
      border: 1px solid #ccd3e2;
      font-size: 0.95rem;
    }

    .act-result {
      margin-top: 20px;
      font-weight: bold;
    }

    .act-question-result {
      margin-bottom: 20px;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid #e0e5f0;
      background: #fdfdff;
      font-size: 0.95rem;
    }

    .act-question-result strong {
      color: #003366;
    }

    .act-timer {
      position: fixed;
      top: 10px;
      left: 50%;
      transform: translateX(-50%);
      background-color: rgba(0, 51, 102, 0.9);
      color: white;
      font-size: 1.2em;
      font-weight: bold;
      padding: 8px 18px;
      border-radius: 999px;
      z-index: 9999;
      user-select: none;
      font-family: inherit;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    }

    @media (max-width: 900px) {
      .act-layout {
        flex-direction: column;
      }

      .act-sidebar {
        width: 100%;
        max-width: none;
        min-width: 0;
        border-left: none;
        border-top: 1px solid #dde3f0;
      }

      .act-divider {
        display: none !important;
      }
    }

    @media (max-width: 768px) {
      .main-content {
        flex-direction: column;
        align-items: center;
      }

      .user-box {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
      }

      .header-top {
        grid-template-columns: 1fr;
        text-align: center;
      }
    }
