/* ==========================================================================
   LSCC — Mock Applicant Portals (archive.lscc/1, /2)
   Emulated job application interfaces for automation practice.
   Forms do not transmit data; submissions are intercepted client-side.
   Theme switching via <body data-theme="a" | "b">.
   ========================================================================== */

* { box-sizing: border-box; }

html[data-theme="a"] {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --border: #dfe3ea;
  --border-strong: #c6ccd8;
  --text: #1c2430;
  --text-dim: #5b6472;
  --text-faint: #8b93a1;
  --accent: #2356e0;
  --accent-dark: #1a44b8;
  --accent-soft: rgba(35, 86, 224, 0.08);
  --ok: #1f9d61;
  --warn: #b4760a;
  --danger: #c0392b;
  --headbar-bg: #16203a;
  --headbar-text: #ffffff;
  --radius: 8px;
}

html[data-theme="b"] {
  --bg: #eef0f2;
  --surface: #ffffff;
  --surface-alt: #f4f6f8;
  --border: #d8dde3;
  --border-strong: #c2c9d2;
  --text: #20262e;
  --text-dim: #5a6470;
  --text-faint: #8a93a0;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --ok: #1f9d61;
  --warn: #b4760a;
  --danger: #c0392b;
  --headbar-bg: #101a2e;
  --headbar-text: #ffffff;
  --radius: 4px;
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.small { font-size: 12px; color: var(--text-dim); }
.req { color: var(--danger); }
.mono { font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace; }

/* ---- top bar (portal chrome) ---- */
.portal-bar {
  background: var(--headbar-bg);
  color: var(--headbar-text);
  border-bottom: 3px solid var(--accent);
}
.portal-bar-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.brand .mark {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.brand .ctx { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.65); }
.portal-bar-inner .spacer { flex: 1; }
.portal-bar-inner .auth-mono { font-size: 11px; color: rgba(255,255,255,0.55); }

/* ---- layout ---- */
.app-wrap { max-width: 1060px; margin: 0 auto; padding: 28px 24px 64px; }

/* ---- job posting card ---- */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.job-card .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.job-card h1 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.job-card .company { font-size: 15px; color: var(--text-dim); margin-bottom: 12px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13.5px; color: var(--text-dim); }
.job-meta b { color: var(--text); font-weight: 600; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-alt); border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ---- application shell ---- */
.apply-layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .apply-layout { grid-template-columns: 1fr; } }

.apply-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---- form sections ---- */
.fsect { border-bottom: 1px solid var(--border); padding: 22px 26px; }
.fsect:last-child { border-bottom: none; }
.fsect-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.fsect-head h2 { font-size: 14px; letter-spacing: 0.04em; }
.fsect-head .num {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  color: var(--text-faint);
}
.fsect-sub { font-size: 12.5px; color: var(--text-dim); margin: 2px 0 16px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; row-gap: 15px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .grid .full { grid-column: auto; } }

.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.12s, box-shadow 0.12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
textarea { resize: vertical; min-height: 84px; }
select { appearance: auto; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }

/* radio / checkbox option rows */
.opt-list { display: flex; flex-direction: column; gap: 9px; padding: 4px 0 2px; }
.opt { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; }
.opt input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.opt .sub { display: block; font-size: 12px; color: var(--text-dim); }

/* divider inside a section */
.fsect-divider { border: 0; border-top: 1px dashed var(--border); margin: 20px 0; }

/* ---- file upload ---- */
.file-field { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 16px; background: var(--surface-alt); }
.file-field label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.file-field input[type="file"] { font-size: 13px; color: var(--text-dim); }
.file-field .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }
.file-field input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 7px 13px; font-size: 13px; font-weight: 600;
  color: #fff; background: var(--accent); border: none; border-radius: var(--radius);
  cursor: pointer;
}
.file-field input[type="file"]::file-selector-button:hover { background: var(--accent-dark); }

/* ---- consent / agreement ---- */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-dim); }
.consent input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }

/* ---- sidebar ---- */
.sidebar { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.side-card h3 { font-size: 13px; letter-spacing: 0.04em; margin-bottom: 10px; color: var(--text); }
.side-card .job-desc { font-size: 13px; color: var(--text-dim); line-height: 1.65; }
.side-card .job-desc h4 { font-size: 12.5px; color: var(--text); margin: 14px 0 6px; }
.side-card .job-desc ul, .side-card .job-desc p { margin: 0 0 8px; padding-left: 18px; }
.side-card .job-desc p { padding-left: 0; }
.side-card .job-desc li { margin-bottom: 4px; }
.side-note { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; }
.req-id { font-size: 12px; color: var(--text-dim); }
.req-id b { color: var(--text); font-weight: 600; }

/* ---- submit row ---- */
.submit-row { padding: 18px 26px 24px; background: var(--surface-alt); border-top: 1px solid var(--border); }
.btn {
  display: inline-block; padding: 11px 22px; font-size: 14.5px; font-weight: 600;
  border: none; border-radius: var(--radius); cursor: pointer;
  color: #fff; background: var(--accent);
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-ghost {
  background: transparent; color: var(--accent); border: 1px solid var(--border-strong);
  margin-left: 10px;
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* ---- fake submission / confirmation ---- */
.progress-bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.15s linear; }

.confirm-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
  max-width: 560px;
  margin: 10px auto 0;
}
.confirm-panel .check {
  width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.confirm-panel h2 { font-size: 19px; margin-bottom: 8px; }
.confirm-panel p { color: var(--text-dim); font-size: 14px; max-width: 420px; margin: 0 auto 8px; }
.confirm-panel .ref {
  display: inline-block; margin-top: 12px; padding: 7px 16px;
  font-family: "IBM Plex Mono", monospace; font-size: 13px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius);
}
.confirm-panel .btn { margin-top: 18px; }

/* ---- footer ---- */
.portal-foot {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 8px;
}
.portal-foot-inner {
  max-width: 1060px; margin: 0 auto; padding: 20px 24px;
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between;
  font-size: 12px; color: var(--text-faint);
}
.portal-foot-inner .disc { flex-basis: 100%; font-size: 11.5px; line-height: 1.6; }

/* ---- honeypot ---- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
