:root {
  --content-max: 1400px;
  --gutter: 10px;
  --gutter-md: 20px;
  --gutter-lg: 28px;

  --bg:            #e1e9ed;
  --bg-alt:        #f8fafb;
  --card:          #f8fafb;
  --fg:            #1f2937;
  --muted:         #6b7280;
  --accent:        #0446b2;
  --accent-weak:   #3b82f6;

  --border:        #c2c2c5;
  --border-weak:   #eef2f7;
  --shadow:        0 6px 20px rgba(17,24,39,.08);

  --radius: 12px;
  --btn-fg: #ffffff;
  --btn-shadow: 0 6px 18px rgba(30,58,138,.18);
  --hover-bg: rgba(0,0,0,.04);
  --thead-bg: #f4f7fa;
  --row-hover: rgba(0,0,0,.02);
  --focus-ring: rgba(59,130,246,.35);
  --modal-backdrop: rgba(0,0,0,.35);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html, body { background: var(--bg); color: var(--fg); }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(input, select, textarea, button) { font: inherit; color: inherit; }

img, svg, video { display:block; max-width:100%; height:auto; }
canvas { display:block; max-width:100%; }

h1, h2, h3 { font-weight: 700; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem 0; }

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 640px)  { .container { padding-inline: var(--gutter-md); } }
@media (min-width: 1024px) { .container { padding-inline: var(--gutter-lg); } }

main { padding-block: 5px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
hr, .divider { border: 0; border-top: 1px solid var(--border); }

.muted { color: var(--muted); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-weak); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

.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;
}

::selection { background: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 719px){
  html, body { overflow-x: hidden; }
}

:where(a, p, .meta-value, .th-title, .company-link){
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal { position: fixed; inset: 0; display: none; z-index: 9999; overflow: auto; }
.modal.open { display: block; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative; margin: 6vh auto; max-width: 960px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 12px 16px;
  max-width: min(960px, calc(100vw - 24px));
}

@media (max-width: 700px){
  .modal-dialog { margin: 3vh 12px; }
}