/* BIMAS public-surface experience layer.
   Shared presentation and accessibility only; portal workflows remain unchanged. */
@font-face {
  font-family: "Material Symbols Outlined";
  src: url("fonts/material-symbols.ttf?v=1.0") format("truetype");
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
}

:root {
  color-scheme: light;
  accent-color: #004699;
  --bimas-public-blue: #004699;
  --bimas-public-navy: #071a33;
  --bimas-public-orange: #e05c00;
  --bimas-public-focus: #f59e0b;
}

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

html {
  min-width: 320px;
  background: #f2f4f8;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-wrap: anywhere;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  height: max(3px, env(safe-area-inset-top, 0px));
  background: linear-gradient(90deg, var(--bimas-public-blue), #1563cc 58%, var(--bimas-public-orange));
  pointer-events: none;
}

button, input, select, textarea { font: inherit; }
button, [role="button"], a { -webkit-tap-highlight-color: transparent; }
button, [role="button"] { touch-action: manipulation; }
img { max-width: 100%; }
[hidden] { display: none !important; }
[aria-busy="true"] { cursor: progress; }

:is(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline: 3px solid var(--bimas-public-focus) !important;
  outline-offset: 3px !important;
}

table { font-variant-numeric: tabular-nums; }
th { text-wrap: balance; }

@media (max-width: 700px) {
  :is(button,.btn,a.btn,input[type="button"],input[type="submit"]) {
    min-height: 44px;
  }

  :is(.portal-nav,.search-row,.form-row) {
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
  }

  .bimas-responsive-table,
  .bimas-responsive-table tbody,
  .bimas-responsive-table tr {
    display: block;
    width: 100%;
  }

  .bimas-responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .bimas-responsive-table tbody tr {
    margin-bottom: .75rem;
    padding: .7rem .85rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: .85rem;
    background: var(--surface-0, #fff);
  }

  .bimas-responsive-table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
    width: 100%;
    padding: .55rem 0;
    border: 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
    text-align: right;
  }

  .bimas-responsive-table tbody td:last-child { border-bottom: 0; }
  .bimas-responsive-table tbody td::before {
    content: attr(data-label);
    color: var(--text-secondary, #475569);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  body::before { background: Highlight; }
  :is(.card,.login-card,.search-card,.result-card,.verification-card) {
    border: 1px solid CanvasText !important;
  }
}

@media print {
  body::before { display: none; }
  :is(button,.btn,.portal-nav,.search-card) { box-shadow: none !important; }
}
