/* MadeVisa — a classic 1999 web-portal style kit: blue title strips, light-yellow boxes,
   grey bevelled buttons, sunken inputs, underlined blue links. Full width, responsive. */

:root {
  --desk: #008080;
  --face: #c0c0c0;
  --hl: #ffffff;
  --lt: #dfdfdf;
  --sh: #808080;
  --dk: #0a0a0a;
  --navy: #000080;
  --blue: #003399;
  --blue-2: #0b3d91;
  --yellow: #ffffcc;
  --green: #33cc33;
  --link: #0000cc;
  --raised: inset -1px -1px var(--dk), inset 1px 1px var(--hl), inset -2px -2px var(--sh), inset 2px 2px var(--lt);
  --pressed: inset -1px -1px var(--hl), inset 1px 1px var(--dk), inset -2px -2px var(--lt), inset 2px 2px var(--sh);
  --sunken: inset -1px -1px var(--hl), inset 1px 1px var(--sh), inset -2px -2px var(--lt), inset 2px 2px var(--dk);
  --win: inset -1px -1px var(--dk), inset 1px 1px var(--lt), inset -2px -2px var(--sh), inset 2px 2px var(--hl);
  --ui: Tahoma, 'MS Sans Serif', 'Microsoft Sans Serif', 'Segoe UI', Geneva, Verdana, sans-serif;
  --page: Verdana, Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: #fff; color: #000; font: 14px/1.5 var(--page); display: flex; flex-direction: column; }
body a { color: var(--link); }
body a:visited { color: #551a8b; }
:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
img { max-width: 100%; height: auto; }
code { font-family: 'Courier New', monospace; }
.small { font-size: 11px; color: #333; }
.right { text-align: right; margin: 4px 0 0; }
.center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 4px; z-index: 99; background: #ffffe1; padding: 6px 10px; border: 1px solid #000; }
.skip:focus { left: 8px; }
.ico { flex: none; vertical-align: middle; image-rendering: pixelated; }

/* ------------------------------------------------------------------ the web page inside */
/* header, navigation, footer */
.site-head { background: var(--face); box-shadow: inset 0 -1px var(--sh), inset 0 -2px var(--dk); }
.head-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px clamp(12px, 2.5vw, 32px) 6px; background: #fff; border-bottom: 1px solid var(--sh); }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 32px; width: auto; display: block; }
.head-tag { font-size: 12px; color: #555; }
.head-links { margin-left: auto; font-size: 12px; }
.nav { display: flex; gap: 4px; padding: 6px clamp(12px, 2.5vw, 32px) 8px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 12px; background: var(--face); box-shadow: var(--raised); color: #000 !important; text-decoration: none; font: 13px var(--ui); white-space: nowrap; }
.nav-btn:hover, .nav-btn:focus-visible { background: #d4d0c8; }
.nav-btn:active { box-shadow: var(--pressed); }
.nav-btn.on { box-shadow: var(--pressed); background: #fff; font-weight: bold; }
.page { flex: 1; width: 100%; padding: 16px clamp(12px, 2.5vw, 32px) 8px; }
.site-foot { background: var(--face); box-shadow: inset 0 1px var(--hl), inset 0 2px var(--lt); border-top: 1px solid var(--sh); text-align: center; font-size: 12px; padding: 12px clamp(12px, 2.5vw, 32px); margin-top: 24px; }
.site-foot p { margin: 4px 0; }
.site-foot .copy { color: #444; }

.welcome { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; background: #eee; padding: 5px 8px; margin-bottom: 8px; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-bottom: 14px; }
.tile { display: flex; align-items: center; gap: 12px; background: var(--blue); color: #fff !important; text-decoration: none; padding: 12px 12px 12px 14px; min-height: 88px; position: relative; }
.tile b { display: block; color: #ffcc00; font: bold 16px/1.1 Arial, sans-serif; letter-spacing: 1px; margin-bottom: 4px; }
.tile span span { font-size: 12px; }
.tile-go { position: absolute; right: 8px; bottom: 8px; width: 18px; height: 18px; border-radius: 50%; background: #ffcc00; color: #000; font-size: 9px; display: flex; align-items: center; justify-content: center; border: 1px solid #000; }
.tile:hover, .tile:focus { background: #0047cc; }

.portal, .board-wrap, .job-wrap, .guide-wrap { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 24vw, 380px); gap: 14px; align-items: start; }
.portal-side .box, .board-side .box, .job-side .box, .guide-side .box { margin-bottom: 12px; }

.box { margin: 0 0 14px; border: 1px solid var(--blue); }
.box-h { margin: 0; background: var(--blue); color: #fff; font: bold 16px/1.25 Arial, Helvetica, sans-serif; padding: 4px 6px; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.box-h > span:first-child { display: flex; align-items: center; gap: 6px; }
.box-h-right { font: normal 11px var(--page); }
.box.grey, .box-h.grey { border-color: #666; }
.box.grey .box-h, .box-h.grey { background: #666; }
.box.green { border-color: var(--green); }
.box.green .box-h { background: var(--green); }
.box.note { border-color: #999; }
.box.note .box-h { background: #e0e0e0; color: #000; font-size: 13px; }
.box-b { background: var(--yellow); padding: 8px 10px; }
.box.white .box-b, .box-b.white { background: #fff; }
.box-bar { background: #e8e8e8; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-bottom: 1px solid #ccc; }
.box-foot { margin: 0; font-size: 11px; padding: 3px 10px; background: #eee; border-top: 1px solid #ccc; color: #333; }
.box .msg { display: flex; gap: 12px; align-items: flex-start; }
.box .msg p { margin: 0 0 6px; }
.dialog-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dialog-h1 { font: bold 18px Arial, sans-serif; margin: 0 0 8px; }
.side-h { font: bold 14px Arial, sans-serif; margin: 12px 0 4px; }
.lead { font-size: 13px; max-width: 75ch; }

/* forms */
.search-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.search-row input[type='search'] { flex: 1 1 240px; }
.search-checks { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.search-checks label { display: inline-flex; align-items: center; }

.btn, button {
  font: 13px var(--ui); color: #000 !important; background: var(--face); box-shadow: var(--raised); border: none; border-radius: 0;
  min-height: 24px; min-width: 75px; padding: 3px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none;
}
.btn:active, button:active { box-shadow: var(--pressed); padding: 4px 11px 2px 13px; }
.btn:focus-visible, button:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn-primary, .btn-default { font-weight: bold; box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--dk), inset -2px -2px var(--dk), inset 2px 2px var(--hl), inset -3px -3px var(--sh), inset 3px 3px var(--lt); }
.btn-big { font-size: 15px; padding: 8px 18px; }
button:disabled { color: var(--sh) !important; text-shadow: 1px 1px var(--hl); cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
input[type='text'], input[type='search'], select, textarea {
  font: 13px var(--ui); background: #fff; color: #000; border: none; border-radius: 0; box-shadow: var(--sunken); padding: 4px 6px; min-height: 26px; max-width: 100%;
}
select { appearance: none; padding-right: 22px; background: #fff no-repeat right 2px center / 16px 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='20'%3E%3Crect width='16' height='20' fill='%23c0c0c0'/%3E%3Cpath d='M0 19.5h16M15.5 0v20' stroke='%23000'/%3E%3Cpath d='M1 1.5h14M1.5 1v18' stroke='%23fff'/%3E%3Cpath d='M1 18.5h14M14.5 1v18' stroke='%23808080'/%3E%3Cpath d='M4 8h8l-4 4z' fill='%23000'/%3E%3C/svg%3E"); }
select:disabled { color: #555; }
textarea { width: 100%; }
input[type='file'] { font: 13px var(--ui); max-width: 100%; }
input[type='checkbox'] { appearance: none; width: 13px; height: 13px; margin: 0 5px 0 0; background: #fff; box-shadow: var(--sunken); vertical-align: -2px; flex: none; }
input[type='checkbox']:checked { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M0 2h1v1h1v1h1v-1h1v-1h1v-1h1v-1h1v3h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1z'/%3E%3C/svg%3E") no-repeat 3px 3px; }
.field-row-stacked { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; }
fieldset { border: 1px solid #999; margin: 0 0 12px; padding: 6px 10px 8px; min-width: 0; background: #fff; }
legend { padding: 0 4px; font-weight: bold; }

/* lists */
.joblist { margin: 0; padding: 0 0 0 2.6em; }
.board-main .joblist { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 0 40px; padding-left: 0; list-style-position: inside; }
.board-main .joblist li { padding-left: 2.2em; text-indent: -2.2em; }
.board-main .joblist li > * { text-indent: 0; }
.joblist li { margin: 0 0 9px; }
.joblist li::marker { color: #666; font-size: 11px; }
.jl-t { font-weight: bold; font-size: 14px; }
.jl-m { font-size: 12px; color: #333; }
.jl-m b { color: #000; }
.empty { margin: 8px 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px; background: #eee; border-top: 1px solid #ccc; font-size: 12px; }
.tag { display: inline-block; font: bold 10px/1 Arial, sans-serif; padding: 2px 4px; margin-left: 6px; border: 1px solid #000; background: #eee; vertical-align: 2px; letter-spacing: .3px; }
.tag-visa { background: #ffcc00; }
.tag-remote { background: #ccffff; }
.hoods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.hoods li { padding-left: 12px; position: relative; font-size: 13px; }
.hoods li::before { content: '•'; position: absolute; left: 0; color: var(--blue); font-weight: bold; }
.hoods span { font-size: 11px; color: #333; }
ul.tree { list-style: none; margin: 0; padding: 0 0 0 4px; }
ul.tree li { padding: 3px 0 3px 16px; position: relative; }
ul.tree li::before { content: '•'; position: absolute; left: 3px; color: var(--blue); font-weight: bold; }
ul.checks { padding-left: 4px; list-style: none; }
ul.checks li { padding-left: 18px; position: relative; margin: 3px 0; }
ul.checks li::before { content: '✔'; position: absolute; left: 1px; color: var(--blue); }
ol.steps li { margin: 0 0 8px; }
.mono { font-family: 'Courier New', monospace; font-size: 12px; }
.err { color: #b00000; font-weight: bold; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; }
.chip { font-size: 11px; padding: 1px 6px; border: 1px solid #999; background: #fff; }
.chip.ok { background: #e6ffe6; border-color: #393; }
.chip.no { background: #ffe8e8; border-color: #c33; }

/* tables and numbers */
.table-wrap { overflow: auto; max-height: 440px; border: 1px solid #999; background: #fff; }
table.grid { border-collapse: collapse; width: 100%; font-size: 12px; background: #fff; }
.grid th { position: sticky; top: 0; background: #dde4f5; text-align: left; padding: 3px 6px; border-bottom: 1px solid #99a; }
.grid td { padding: 3px 6px; border-bottom: 1px solid #e3e3e3; }
.grid tbody tr:nth-child(even) td { background: #f6f6ff; }
.grid.plain { border: 1px solid #ccc; }
table.numbers { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 2px 0 8px; }
.numbers td { text-align: center; border: 1px solid #ccc; background: #fff; padding: 6px 4px; }
.numbers b { display: block; font: bold 20px Arial, sans-serif; color: var(--blue); }
.numbers span { font-size: 11px; color: #333; }

/* job page */
.job-h1 { font: bold 20px/1.25 Arial, Helvetica, sans-serif; margin: 2px 0 6px; }
.job-sub { margin: 0 0 12px; font-size: 13px; }
.notepad { font: 13px/1.6 var(--page); color: #111; overflow-wrap: anywhere; }
.notepad > :first-child { margin-top: 0; }
.notepad h2, .notepad h3, .notepad h4 { font: bold 14px Arial, sans-serif; margin: 1.2em 0 .4em; }
.notepad ul, .notepad ol { padding-left: 1.4em; }
dl.facts { margin: 0; display: grid; gap: 3px; }
dl.facts.cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3px 16px; }
.fact { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: 12px; }
.fact dt { color: #444; }
.fact dd { margin: 0; font-weight: bold; overflow-wrap: anywhere; }
.visa-line { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: 12px; }
.match-score { font-size: 14px; margin: 0 0 8px; }
.match-score b { font-size: 20px; }
.match.good .match-score b { color: #080; }
.match.mid .match-score b { color: #b77a00; }
.match.low .match-score b { color: #c00; }
.parts { margin-bottom: 8px; }
.req-h { margin: 8px 0 2px; font-weight: bold; }
details summary { cursor: pointer; font-weight: bold; margin: 6px 0; }

/* visa guides */
.center-wide { width: 100%; }
.center-col { max-width: 620px; margin: 30px auto; }
.explorer-h { font: bold 14px Arial, sans-serif; margin: 14px 0 6px; color: var(--blue); border-bottom: 1px solid #ccc; }
.explorer { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; background: #fff; border: 1px solid #ccc; }
.explorer a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 6px 4px; text-decoration: none; }
.explorer a .ex-name { text-decoration: underline; }
.explorer a:hover .ex-name, .explorer a:focus .ex-name { background: var(--navy); color: #fff; }
.ex-meta { font-size: 11px; color: #555; }
.sec-h { display: flex; align-items: center; gap: 6px; font: bold 15px Arial, sans-serif; margin: 18px 0 8px; color: var(--blue); }
.route p { margin: 4px 0 8px; }

/* CV match */
.cv-page { display: grid; grid-template-columns: 90px 1fr; gap: 16px; }
.cv-art { padding-top: 6px; text-align: center; }
.wiz-h { font: bold 16px Arial, sans-serif; margin: 0 0 8px; }

/* book */
.book-wrap { width: 100%; }
.book-top { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
.book-cover { box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }
.stars { color: #b8860b; font-size: 18px; margin: 0 0 8px; }
.book-pages { display: flex; gap: 10px; overflow-x: auto; padding: 10px; background: #fff; border: 1px solid #ccc; }
.book-pages img { flex: none; border: 1px solid #999; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .portal, .board-wrap, .job-wrap, .guide-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .head-row { padding-top: 8px; }
  .head-tag { display: none; }
  .logo img { height: 28px; }
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: 8px; }
  .nav-btn { padding: 7px 6px; justify-content: center; font-size: 12px; }
  .board-main .joblist { grid-template-columns: 1fr; }
  .page { padding-top: 12px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; padding: 10px 40px 10px 12px; }
  .tile .ico { width: 32px; height: 32px; }
  .welcome { font-size: 13px; }
  .box-h { font-size: 15px; }
  .box-b { padding: 8px; }
  .search-row > * { flex: 1 1 100%; }
  .search-row button { flex: 0 0 auto; }
  .search-row select { width: 100%; }
  .hoods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-page { grid-template-columns: 1fr; }
  .cv-art { display: none; }
  .book-top { grid-template-columns: 1fr; }
  .book-cover { max-width: 200px; }
  .numbers td { display: inline-block; width: 50%; border-width: 0 0 1px 0; }
  .fact { grid-template-columns: 90px 1fr; }
  .box-bar .btn { flex: 1 1 auto; }
  .explorer { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .table-wrap { max-height: none; }
  .jl-t { font-size: 15px; }
  input[type='text'], input[type='search'], select, textarea { font-size: 16px; min-height: 34px; }
  .btn, button { min-height: 34px; }
}
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 14px; align-items: start; }

/* pixel flags */
.flag { image-rendering: pixelated; display: inline-block; vertical-align: middle; flex: none; box-shadow: 1px 1px 0 rgba(0, 0, 0, .25); }
.explorer .flag { margin: 4px 0 6px; }
.hoods li.has-flag { padding-left: 28px; }
.hoods li.has-flag::before { content: none; }
.hoods li.has-flag .flag { position: absolute; left: 0; top: 3px; }
.with-flag { display: flex; align-items: center; gap: 10px; }

/* positioning copy */
.pitch { font-size: 15px; max-width: 95ch; }
.why { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; font-size: 13px; }
.why li { padding-left: 18px; position: relative; }
.why li::before { content: '✔'; position: absolute; left: 0; color: var(--blue); }
.src-note { margin: 8px 0 0; color: #333; }
