@layer reset, theme, layout, component;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ul { margin: 0; }
  img { display: block; max-width: 100%; }
  input, select, textarea, button { font: inherit; }
  a { color: inherit; text-decoration: none; }
  button { cursor: pointer; }
}
@layer theme {
  :root { color-scheme: dark; font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
    --base: #0a111e; --bar: #0d1625; --card: #121f32; --raised: #192d47; --border: #304762;
    --ink: #edf4fd; --muted: #afc2db; --soft: #8ca7c6; --blue: #9bcbf5; --focus: #b6d9fc; }
  body { color: var(--ink); background: var(--base); min-width: 300px; }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
  ::selection { background: #3b5c86; color: #fff; }
  h1 { font-size: clamp(2.55rem, 6.2vw, 5.15rem); font-weight: 760; line-height: 1.01; letter-spacing: -.067em; overflow-wrap: anywhere; }
  h2 { font-size: clamp(1.22rem, 2.3vw, 1.7rem); line-height: 1.22; letter-spacing: -.035em; overflow-wrap: anywhere; }
  h3 { font-size: 1.08rem; line-height: 1.35; }
  p, small { color: var(--muted); }
  code { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
  .lede { font-size: clamp(.98rem, 1.7vw, 1.14rem); max-width: 60ch; }
  .eyebrow { color: var(--blue); font-size: .7rem; line-height: 1.35; letter-spacing: .145em; font-weight: 750; text-transform: uppercase; }
  .quiet { color: var(--soft); font-size: .86rem; }
  .preline { white-space: pre-line; overflow-wrap: anywhere; }
}
@layer layout {
  .wrap { width: min(100% - 3.5rem, 1260px); margin-inline: auto; }
  main { min-height: 65vh; padding-bottom: 4.5rem; }
  .skip { position: absolute; z-index: 9; top: .7rem; left: .7rem; transform: translateY(-180%); padding: .5rem .9rem; border-radius: .4rem; background: #243f63; }
  .skip:focus { transform: none; }
  .top { background: var(--bar); border-bottom: 1px solid #263750; }
  .navigation { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 78px; }
  .brand { display: inline-flex; align-items: center; gap: .68rem; flex-shrink: 0; }
  .brand span { font-size: .91rem; line-height: 1.13; letter-spacing: .075em; font-weight: 760; }
  .brand small { display: block; font-size: .65rem; letter-spacing: .2em; margin-top: .28rem; }
  .desktop-nav, .nav-end, .actions, .subnav { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
  .desktop-nav { justify-content: center; gap: clamp(.4rem, 1.3vw, 1.3rem); font-size: .88rem; }
  .desktop-nav a, .mobile-nav a { color: var(--muted); }
  .desktop-nav a[aria-current], .desktop-nav a:hover, .mobile-nav a[aria-current], .mobile-nav a:hover { color: var(--ink); }
  .mobile-nav { display: none; }
  .footer { background: #0d1727; border-top: 1px solid #263750; }
  .footer-row { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-block: 1.5rem; }
  .footer-row nav { display: flex; gap: .65rem 1.15rem; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
  .footer-row nav a:hover { color: var(--ink); }
  .footer-brand { font-weight: 700; }
  .footer-brand small { display: block; font-weight: 400; font-size: .81rem; }
  .hero { position: relative; isolation: isolate; overflow: hidden; margin-top: 2.1rem; display: grid; align-items: center; min-height: clamp(355px, 43vw, 475px);
    background: radial-gradient(ellipse at 80% 30%, #1d3857, transparent 62%), #111e32; border: 1px solid #344e6e; border-radius: 1.15rem; }
  .hero-copy { z-index: 2; position: relative; width: min(100%, 710px); padding: clamp(1.65rem, 5vw, 4rem); display: grid; gap: 1.2rem; }
  .hero-copy h1 { font-size: clamp(2.55rem, 6vw, 4.7rem); }
  .hero-copy h1 span { color: var(--blue); }
  .hero-copy .actions { margin-top: .35rem; }
  .hero-image { position: absolute; inset: 0 0 0 29%; z-index: -1; overflow: hidden; }
  .hero-image img { height: 100%; width: 100%; object-fit: cover; object-position: 70% center; }
  .hero::before { content: ''; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(90deg, #111e32 5%, #111e32f2 29%, #111e32b9 47%, #111e3236 69%, transparent 94%); }
  .hero-caption { position: absolute; z-index: 1; right: 1.4rem; bottom: 1rem; color: #b9cbe3; font: 650 .61rem/1.2 ui-monospace, monospace; letter-spacing: .17em; }
  .hero-caption span { color: var(--blue); padding-inline: .22rem; }
  .eyebrow-line { display: inline-block; width: 20px; height: 1px; margin: 0 .32rem .2rem 0; background: var(--blue); }
  .home-section { padding-top: clamp(3rem, 6vw, 5rem); display: grid; gap: 1.25rem; }
  .home-quick-access { padding-top: clamp(1.6rem, 3vw, 2.45rem); }
  .home-quick-access .feature { border-top: 2px solid var(--blue); }
  .section-head { display: grid; gap: .5rem; max-width: 66ch; }
  .section-head h2 { font-size: clamp(1.85rem, 3.5vw, 2.8rem); }
  .page-head { display: grid; gap: .83rem; padding: clamp(2.4rem, 6vw, 4.9rem) 0 1.65rem; }
  .page-head h1 { font-size: clamp(2.3rem, 5.8vw, 4.1rem); }
  .grid, .stack { display: grid; gap: 1rem; }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.two, .grid.workspace { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.workspace { align-items: start; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .measure { max-width: 830px; }
  .signin { min-height: 66vh; display: grid; place-items: center; padding-block: 2rem; }
  .signin-card { width: min(100%, 480px); background: radial-gradient(ellipse at 100% 0, #213b5a, transparent 55%), var(--card) !important; }
  .signin-card h1 { font-size: clamp(2rem, 5.2vw, 3rem); }
  .portal-manage { margin-top: 1.2rem; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .portal-manage p { margin-top: .28rem; }
  .subnav { margin-bottom: 1.3rem; }
  @media (max-width: 1050px) { .wrap { width: min(100% - 2rem, 1260px); } .navigation { gap: .85rem; } .desktop-nav { font-size: .8rem; } }
  @media (max-width: 830px) {
    .desktop-nav { display: none; }
    .mobile-nav { position: relative; display: block; }
    .mobile-nav summary { cursor: pointer; color: var(--muted); padding: .5rem; font-size: .87rem; }
    .mobile-nav nav { position: absolute; right: 0; top: calc(100% + .6rem); z-index: 4; min-width: 175px; display: grid; gap: .15rem;
      padding: .45rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--card); box-shadow: 0 12px 30px #0007; }
    .mobile-nav a { padding: .4rem .5rem; }
    .hero-image { inset-inline-start: 10%; }
    .hero::before { background: linear-gradient(90deg, #111e32 1%, #111e32ee 25%, #111e328a 66%, #111e323d); }
    .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 590px) {
    .navigation { min-height: 67px; }
    .wrap { width: min(100% - 1.3rem, 1260px); }
    .brand img { width: 34px; height: 34px; }
    .brand span { font-size: .74rem; }
    .brand small { font-size: .58rem; }
    .nav-end { gap: .2rem; }
    .hero { margin-top: .8rem; min-height: 445px; }
    .hero-image { inset: 18% 0 0 0; opacity: .76; }
    .hero::before { background: linear-gradient(130deg, #111e32 5%, #111e32e9 38%, #111e325c 83%), linear-gradient(0deg, #0a14265e, transparent 35%); }
    .hero-caption { right: .7rem; bottom: .6rem; font-size: .53rem; }
    .grid.three, .grid.two, .grid.workspace, .portal-manage { grid-template-columns: 1fr; }
  }
}
@layer component {
  .button { display: inline-flex; justify-content: center; align-items: center; gap: .32rem; width: fit-content; border: 1px solid #547294; border-radius: .52rem;
    background: #233851; color: var(--ink); padding: .58rem .83rem; font-size: .87rem; font-weight: 680; text-align: center;
    transition: background .16s ease, border-color .16s ease; }
  .button:hover { background: #304d70; border-color: #8ab4de; }
  .button.primary { background: #9bcbf5; border-color: #afd6f7; color: #10233b; }
  .button.primary:hover { background: #c1e1fa; }
  .button.small { font-size: .79rem; padding: .44rem .62rem; }
  .text-link { color: #a9d6ff; width: fit-content; font-weight: 650; text-decoration: underline; text-underline-offset: .23em; }
  .icon { width: 24px; height: 24px; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--blue); flex-shrink: 0; }
  .card { display: grid; align-content: start; gap: .68rem; min-width: 0; border: 1px solid var(--border); border-radius: .87rem; padding: clamp(1rem, 2.6vw, 1.5rem); background: var(--card); }
  .feature { position: relative; padding-right: 2.8rem; transition: background .16s ease, border-color .16s ease; }
  .feature:hover { background: #192b43; border-color: #6281a6; }
  .card-arrow { position: absolute; right: 1rem; top: 1rem; }
  .card-arrow .icon { width: 17px; }
  .product { display: grid; grid-template-columns: auto minmax(150px, .7fr) minmax(0, 1fr); gap: .95rem; align-items: center; padding: 1rem 1.15rem;
    border: 1px solid var(--border); border-radius: .67rem; background: #0f1b2b; }
  .product small { display: block; margin-top: .1rem; }
  .product p, .card p { overflow-wrap: anywhere; }
  .badge { display: inline-flex; width: fit-content; color: #bad4ee; font-size: .74rem; font-weight: 680; padding: .24rem .58rem; border: 1px solid #466385; border-radius: 999px; background: #1c2e48; }
  .badge.available { color: #a4e3ca; border-color: #3b6a5b; background: #172e29; }
  .badge.unavailable { color: #ffc3ca; border-color: #795361; background: #392634; }
  .status-card, .empty { max-width: 850px; }
  .status-list, .grant-list { list-style: none; padding: 0; display: grid; }
  .status-list li, .grant-list li { display: flex; flex-wrap: wrap; gap: .45rem 1rem; align-items: center; justify-content: space-between; padding: .72rem 0; border-bottom: 1px solid var(--border); }
  .status-list small, .grant-list small { display: block; font-size: .78rem; margin-top: .13rem; }
  .form { display: grid; gap: .75rem; }
  label { display: grid; gap: .33rem; font-weight: 630; font-size: .9rem; min-width: 0; }
  label.checkbox { display: flex; align-items: center; }
  input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; padding: .56rem .65rem; border-radius: .47rem; color: var(--ink); border: 1px solid #516b8d; background: #0b1727; }
  textarea { resize: vertical; }
  .separate { border-top: 1px solid var(--border); padding-top: .8rem; }
  details summary { cursor: pointer; }
  .notice { padding: .68rem .8rem; border-radius: .55rem; background: #1d3450; border: 1px solid #4c729c; color: var(--ink); margin-bottom: .75rem; }
  .notice.error { background: #3e2b3b; border-color: #875363; }
  .problem { margin-top: 2rem; }
  .problem h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
  @media (max-width: 590px) { .product { grid-template-columns: auto minmax(0, 1fr); } .product p { grid-column: 2; } }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
}
.owner-profiles { display: grid; gap: 1.25rem; margin-block: 1.25rem; }
.owner-profile { display: grid; gap: .8rem; }
.owner-profile-heading { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.owner-profile-heading h2 { margin: .25rem 0 0; }
.owner-state { border: 1px solid #34567a; border-radius: 999px; padding: .35rem .7rem; font-size: .82rem; color: #c4dbfa; }
.owner-fields { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .8rem; border: 1px solid #2b4564; border-radius: .75rem; padding: .85rem; }
.owner-fields legend { padding-inline: .4rem; font-weight: 650; }
.owner-fields small { display: block; margin-top: .3rem; color: #afc0d8; }
