/* Apply Assistant — one stylesheet, no framework, no CDN.
   A free host serves this from the same box, so it stays small and it works
   on a phone, which is how most people in Sri Lanka will open it. */

:root {
  --ink: #16202c;
  --muted: #5b6b7c;
  --line: #dfe5ec;
  --bg: #f4f6f9;
  --card: #ffffff;
  --brand: #1f5fa9;
  --brand-dark: #17497f;
  --good: #1a7f4b;
  --warn: #9a6a06;
  --bad: #a52a2a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: var(--brand); }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 60px; }
.narrow { max-width: 620px; }

/* ------------------------------------------------------------- header ---- */
header.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
header.top .inner {
  max-width: 900px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
header.top .brand {
  font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none;
}
header.top nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
header.top nav a { text-decoration: none; font-size: 14px; }

/* --------------------------------------------------------------- cards --- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

h1 { font-size: 26px; margin: 0 0 10px; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 0 0 6px; }
p.lead { font-size: 17px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* --------------------------------------------------------------- forms --- */
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
textarea.letter { min-height: 380px; font-family: Consolas, "Courier New", monospace;
                  font-size: 14px; line-height: 1.6; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f0f4f9; }
.btn.danger { background: var(--bad); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.spread { justify-content: space-between; }

/* -------------------------------------------------------------- notices -- */
.notice, .error, .ok {
  border-radius: 8px; padding: 11px 14px; margin: 0 0 16px; font-size: 15px;
}
.notice { background: #fff7e3; border: 1px solid #f0dcae; color: var(--warn); }
.error  { background: #fdecec; border: 1px solid #f2c7c7; color: var(--bad); }
.ok     { background: #eaf7f0; border: 1px solid #bfe4cf; color: var(--good); }

/* ---------------------------------------------------------------- jobs --- */
.job {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}
.job a.title { font-weight: 600; font-size: 17px; text-decoration: none; }
.job .meta { color: var(--muted); font-size: 14px; margin-top: 3px; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.tag.Strong { background: #e4f4ea; color: var(--good); }
.tag.Good   { background: #e6effa; color: var(--brand); }
.tag.Maybe  { background: #fdf2dd; color: var(--warn); }
.tag.Low    { background: #eef1f4; color: var(--muted); }
.tag.status { background: #eef1f4; color: var(--muted); }

.advert {
  white-space: pre-wrap; background: #fbfcfd; border: 1px solid var(--line);
  border-radius: 8px; padding: 12px; max-height: 320px; overflow: auto;
  font-size: 14px; color: #2c3846;
}

table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain th, table.plain td {
  text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line);
}
table.plain th { color: var(--muted); font-weight: 600; }

footer.foot {
  color: var(--muted); font-size: 13px; text-align: center;
  padding: 24px 16px 40px;
}
footer.foot a { color: var(--muted); }

@media (max-width: 560px) {
  h1 { font-size: 22px; }
  .card { padding: 16px; }
  .row .btn { flex: 1 1 auto; text-align: center; }
}
