:root {
  --ink: #151b35;
  --muted: #667089;
  --line: #dce2ef;
  --paper: #f7f8fc;
  --surface: #ffffff;
  --brand: #253184;
  --brand-dark: #17215f;
  --accent: #b99554;
  --accent-soft: #f4ead7;
  --blue: #33419a;
  --danger: #a73535;
  --success: #287255;
  --shadow: 0 22px 60px rgba(21, 27, 53, 0.13);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 252px;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  white-space: nowrap;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 9px 12px;
  color: var(--muted);
  border-radius: 8px;
}

.nav a:hover {
  color: var(--ink);
  background: #eef1fb;
}

.nav a[aria-current="page"] {
  color: var(--brand-dark);
  background: #e9ecfb;
  font-weight: 800;
}

.nav a[hidden] {
  display: none;
}

.topbar.landing-topbar {
  grid-template-columns: auto minmax(0, 1fr);
}

.landing-topbar .nav {
  justify-content: flex-end;
}

.account {
  display: flex;
  justify-content: flex-end;
  min-width: 230px;
  text-align: right;
  color: var(--muted);
  font-size: 0.9rem;
}

.account button {
  margin-left: 0;
}

.profile-menu {
  position: relative;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.profile-menu-trigger,
.profile-login-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 10px;
  color: var(--brand-dark);
  background: #f3f5fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.avatar,
.forum-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: cover;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-weight: 900;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 230px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 750;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: #f3f5fc;
}

.profile-preview-line {
  display: flex;
  gap: 16px;
  align-items: center;
}

.profile-avatar-large {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  object-fit: cover;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 900;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  min-height: calc(100vh - 72px);
  padding: clamp(36px, 6vw, 88px) clamp(18px, 5vw, 72px);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  background:
    linear-gradient(120deg, rgba(37, 49, 132, 0.11), rgba(185, 149, 84, 0.13) 46%, rgba(37, 49, 132, 0.07)),
    var(--paper);
}

.home-hero {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  color: #fff;
  text-align: center;
  background: #151b35;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 18, 48, 0.8), rgba(21, 27, 53, 0.44) 44%, rgba(12, 18, 48, 0.74)),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.16), transparent 42%);
}

.hero-bg-slider,
.hero-bg-slider span {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg-slider span {
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  transition: opacity 1.1s ease, transform 7s ease;
}

.hero-bg-slider span.is-active {
  opacity: 1;
  transform: scale(1.08);
}

.hero-bg-students {
  background-image: url("/assets/home-backgrounds/hallgatok.jpg");
}

.hero-bg-budapest {
  background-image: url("/assets/home-backgrounds/budapest.jpg?v=3");
}

.hero-bg-pecs {
  background-image: url("/assets/home-backgrounds/pecs.jpg");
}

.hero-bg-debrecen {
  background-image: url("/assets/home-backgrounds/debrecen.jpg");
}

.hero-bg-szeged {
  background-image: url("/assets/home-backgrounds/szeged.jpg");
}

.hero-bg-gyor {
  background-image: url("/assets/home-backgrounds/gyor.jpg");
}

.hero-bg-miskolc {
  background-image: url("/assets/home-backgrounds/miskolc.jpg");
}

.home-hero .hero-copy {
  max-width: 1020px;
}

.home-hero .eyebrow {
  color: #e9c987;
  font-size: clamp(0.98rem, 1.35vw, 1.22rem);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.hero-title-lockup {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 2.2vw, 26px);
  flex-wrap: wrap;
}

.hero-title-lockup img {
  width: clamp(74px, 9vw, 128px);
  height: clamp(74px, 9vw, 128px);
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.26));
}

.hero h1 {
  margin: 8px 0 18px;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.home-hero h1 {
  margin: 0;
  color: #fff;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.lead {
  max-width: 720px;
  color: #364354;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.65;
}

.home-hero .lead {
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 26px rgba(37, 49, 132, 0.22);
}

.button.primary:hover {
  background: var(--brand-dark);
}

.button.secondary {
  color: var(--brand-dark);
  background: #fff;
  border-color: var(--line);
}

.home-hero .button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(10px);
}

.home-user-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  margin: 2px 0 0;
  padding: 10px 18px;
  color: #e9fff5;
  background: rgba(40, 114, 85, 0.34);
  border: 1px solid rgba(132, 211, 177, 0.46);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(4, 22, 18, 0.18);
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.home-user-count strong {
  color: #fff;
  font-size: 1.16em;
}

.hero-city-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: min(960px, 100%);
  margin-top: 18px;
}

.hero-city-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  font-weight: 850;
  backdrop-filter: blur(14px);
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.button.danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.button.danger:hover {
  background: #842929;
}

.text-link {
  width: max-content;
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--brand-dark);
}

.hero-visual {
  position: relative;
  min-height: 480px;
}

.logo-showcase {
  display: grid;
  place-items: center;
  width: min(520px, 100%);
  min-height: 420px;
  padding: clamp(18px, 3vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.logo-showcase img {
  width: min(440px, 100%);
  height: auto;
}

.scale-card {
  position: absolute;
  right: 0;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.scale-card span {
  width: 54px;
  height: 54px;
  background:
    linear-gradient(90deg, transparent 46%, var(--brand) 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, var(--brand) 46% 54%, transparent 54%),
    radial-gradient(circle at 50% 72%, var(--accent) 0 16%, transparent 17%),
    radial-gradient(circle at 30% 34%, transparent 0 18%, var(--blue) 19% 23%, transparent 24%),
    radial-gradient(circle at 70% 34%, transparent 0 18%, var(--blue) 19% 23%, transparent 24%);
  border-radius: 8px;
}

.section {
  padding: clamp(44px, 6vw, 82px) clamp(18px, 5vw, 72px);
}

.page-section {
  min-height: calc(100vh - 154px);
}

.band {
  background: #fff;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
}

.section-head h1,
.section-head h2,
.two-column h1,
.two-column h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  letter-spacing: 0;
}

.section-head p,
.two-column > div > p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
}

.panel h2 {
  margin: 0;
  font-size: 1.25rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.panel,
.search-panel,
.mini-panel,
.highlight-card {
  padding: clamp(18px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(24, 33, 47, 0.07);
}

.search-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.search-panel fieldset {
  grid-column: 1 / -1;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  color: #334052;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd5df;
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 49, 132, 0.14);
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  padding: 0;
  margin-bottom: 8px;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-grid label,
.profile-switch label {
  display: inline-flex;
  align-items: center;
  width: auto;
  gap: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #f3f5fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
}

.tag-grid input,
.profile-switch input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--brand);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.job-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(21, 27, 53, 0.06);
}

.job-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.job-meta {
  color: var(--muted);
  line-height: 1.45;
}

.job-facts,
.job-detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.job-facts span,
.job-detail-meta span {
  padding: 6px 8px;
  color: #33419a;
  background: #f3f5fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.company-dashboard {
  display: grid;
  gap: 18px;
}

.company-job-card {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(24, 33, 47, 0.07);
}

.company-job-card > header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.company-job-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.company-job-count {
  display: grid;
  min-width: 118px;
  padding: 12px 14px;
  color: var(--brand-dark);
  background: #eef1fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.company-job-count strong {
  font-size: 1.9rem;
  line-height: 1;
}

.company-job-count span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.company-applications {
  display: grid;
  gap: 12px;
}

.company-application {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #f8f9fd;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
}

.company-application > div:first-child {
  display: grid;
  gap: 3px;
}

.company-application strong {
  color: var(--brand-dark);
}

.company-application span,
.company-application small,
.muted-note {
  color: var(--muted);
}

.company-application p {
  margin: 0;
  line-height: 1.55;
}

.application-history {
  display: grid;
  gap: 16px;
}

.application-history-card {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(24, 33, 47, 0.07);
}

.application-history-card > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.application-history-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
}

.application-history-card p {
  margin: 0;
  line-height: 1.55;
}

.application-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 10px;
  color: #1c684d;
  background: #e9f7f0;
  border: 1px solid #c9eadb;
  border-radius: 8px;
  font-weight: 850;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 5px 8px;
  color: var(--brand-dark);
  background: #e9ecfb;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 750;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

form {
  display: grid;
  gap: 15px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.profile-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message.success {
  color: var(--success);
}

.form-message.error {
  color: var(--danger);
}

.feature-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-top: 26px;
}

.mini-panel h2,
.highlight-card h3 {
  margin: 0;
}

.mini-panel p,
.highlight-card p,
.muted-note {
  color: var(--muted);
  line-height: 1.55;
}

.saved-jobs-list {
  display: grid;
  gap: 8px;
}

.saved-job-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fd;
}

.saved-job-item a {
  display: grid;
  gap: 2px;
}

.saved-job-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.job-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 24px;
  align-items: start;
}

.job-detail {
  display: grid;
  gap: 18px;
}

.job-detail h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.cv-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.cv-form {
  max-height: none;
}

.cv-preview-shell {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 12px;
}

.cv-preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cv-preview {
  min-height: 680px;
  background: #eef1fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
}

.generated-cv {
  width: min(100%, 780px);
  margin: 0 auto;
  color: #17215f;
  background: #fff;
  border: 1px solid #d8def0;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(21, 27, 53, 0.14);
  overflow: hidden;
}

.cv-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(210px, 0.45fr);
  gap: 20px;
  padding: 34px;
  color: #fff;
  background: linear-gradient(135deg, #17215f, #253184);
}

.cv-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
}

.cv-hero p {
  margin: 8px 0 0;
  color: #eef1fb;
  font-weight: 800;
}

.cv-photo {
  width: 118px;
  height: 118px;
  align-self: center;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.cv-contact {
  display: grid;
  gap: 7px;
  align-content: center;
  font-size: 0.92rem;
}

.cv-contact span {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.cv-section {
  display: grid;
  gap: 10px;
  padding: 22px 28px;
}

.cv-section h2 {
  margin: 0;
  color: #253184;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-section p,
.cv-section li {
  color: #26304f;
  line-height: 1.58;
}

.cv-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.cv-summary {
  border-bottom: 1px solid #d8def0;
}

.cv-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
}

.cv-columns aside {
  background: #f7f8fc;
  border-left: 1px solid #d8def0;
}

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

.forum-page {
  background:
    linear-gradient(180deg, rgba(37, 49, 132, 0.04), transparent 260px),
    var(--paper);
}

.forum-shell {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(21, 27, 53, 0.07);
}

.forum-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  color: #fff;
  background: var(--brand);
}

.forum-toolbar span {
  color: #dfe5ff;
  font-size: 0.92rem;
}

.forum-category-list,
.forum-thread-list {
  display: grid;
}

.forum-category-row,
.forum-thread-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(110px, auto) minmax(190px, 0.38fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.forum-thread-row {
  grid-template-columns: 120px auto minmax(0, 1fr) minmax(135px, auto) minmax(160px, 0.3fr);
}

.forum-category-row:hover,
.forum-thread-row:hover {
  background: #f8f9fd;
}

.forum-node-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.forum-node-main {
  display: grid;
  gap: 5px;
}

.forum-node-main strong {
  color: var(--brand-dark);
  font-size: 1.04rem;
}

.forum-node-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.forum-node-main small,
.forum-node-last small {
  color: var(--muted);
}

.forum-node-stats {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.forum-vote-cell {
  display: grid;
  gap: 4px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.forum-vote-cell span {
  font-size: 0.86rem;
}

.forum-node-last {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 0.92rem;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  align-items: start;
}

.forum-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: start;
}

.forum-main-stack,
.forum-side-stack,
.forum-sidebar {
  display: grid;
  gap: 18px;
}

.forum-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  align-items: stretch;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.forum-tabs button {
  min-height: 50px;
  padding: 10px 16px;
  color: var(--brand-dark);
  background: #fff;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
  font-weight: 850;
}

.forum-tabs button.active {
  color: #fff;
  background: var(--brand);
}

.forum-tabs label {
  flex: 1 1 220px;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  color: var(--muted);
}

.forum-side-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(21, 27, 53, 0.07);
}

.forum-side-card h2 {
  margin: 0;
  font-size: 1rem;
}

.forum-side-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.forum-latest-list {
  display: grid;
  gap: 10px;
}

.forum-latest-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.forum-latest-list span {
  display: grid;
  gap: 2px;
}

.forum-latest-list small {
  color: var(--muted);
}

.forum-form,
.forum-reply-form {
  position: sticky;
  top: 98px;
}

.forum-composer-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
  background: rgba(21, 27, 53, 0.48);
  backdrop-filter: blur(8px);
}

.forum-composer {
  display: grid;
  gap: 14px;
  width: min(100%, 1120px);
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: clamp(16px, 2.5vw, 24px);
  color: #eef1fb;
  background: #20242c;
  border: 1px solid #3a414d;
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.forum-composer-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.forum-composer h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.forum-composer label,
.forum-composer strong {
  color: #eef1fb;
}

.forum-title-field input,
.forum-rich-editor {
  color: #f8f9fd;
  background: #242a32;
  border-color: #46505d;
}

.forum-title-field input {
  min-height: 58px;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  font-weight: 750;
}

.forum-title-field input::placeholder {
  color: #aeb5c1;
}

.forum-editor {
  overflow: hidden;
  border: 1px solid #46505d;
  border-radius: 8px;
}

.forum-editor-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-height: 56px;
  padding: 10px 14px;
  color: #c9ced8;
  background: #272c34;
  border-bottom: 1px solid #46505d;
  font-weight: 850;
}

.forum-editor-toolbar button {
  padding: 6px 9px;
  color: #c9ced8;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.forum-editor-toolbar button:hover,
.forum-editor-toolbar button:focus-visible {
  color: #fff;
  background: #343b46;
}

.forum-rich-editor {
  min-height: clamp(190px, 32vh, 360px);
  padding: 14px;
  border: 0;
  border-radius: 0;
  outline: none;
  overflow: auto;
  line-height: 1.6;
}

.forum-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #aeb5c1;
  pointer-events: none;
}

.forum-rich-editor h3,
.forum-post-content h3,
.forum-editor-preview h3 {
  margin: 0 0 10px;
  color: inherit;
  font-size: 1.28rem;
}

.forum-rich-editor ul,
.forum-post-content ul,
.forum-editor-preview ul,
.forum-rich-editor ol,
.forum-post-content ol,
.forum-editor-preview ol {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding-left: 24px;
}

.forum-rich-editor blockquote,
.forum-post-content blockquote,
.forum-editor-preview blockquote {
  margin: 12px 0;
  padding: 12px 14px;
  color: #3a435c;
  background: #eef1fb;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

.forum-rich-editor a,
.forum-post-content a,
.forum-editor-preview a {
  color: #3658d6;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.forum-inline-image {
  display: block;
  max-width: min(100%, 520px);
  height: auto;
  margin: 12px 0;
  border: 1px solid #46505d;
  border-radius: 8px;
  cursor: grab;
}

.forum-post-content .forum-inline-image,
.forum-editor-preview .forum-inline-image {
  border-color: var(--line);
}

.forum-editor-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  color: var(--ink);
  background: #f8f9fd;
  border: 1px solid #46505d;
  border-radius: 8px;
}

.forum-editor-preview strong {
  color: var(--brand-dark);
}

.forum-editor-preview > div {
  min-height: 80px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.forum-composer-options {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 8px 24px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #46505d;
  border-bottom: 1px solid #46505d;
}

.forum-composer-options label {
  display: inline-flex;
  width: max-content;
  gap: 10px;
  align-items: center;
  color: #eef1fb;
}

.forum-composer-options input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.forum-composer-actions {
  display: flex;
  justify-content: center;
}

.forum-composer-actions .button {
  min-width: min(100%, 320px);
  color: var(--ink);
  background: #f1c64d;
  box-shadow: none;
}

.forum-composer .form-message {
  color: #c9ced8;
}

.forum-composer .form-message.success {
  color: #8ee0bd;
}

.forum-composer .form-message.error {
  color: #ffaaaa;
}

.forum-thread-view {
  display: grid;
  gap: 16px;
}

.forum-thread-header {
  display: grid;
  gap: 14px;
}

.forum-thread-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.forum-post {
  display: grid;
  grid-template-columns: minmax(210px, 0.28fr) minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(21, 27, 53, 0.05);
}

.forum-post aside {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px;
  background: #f3f5fc;
  border-right: 1px solid var(--line);
}

.forum-post aside strong {
  color: var(--brand-dark);
}

.forum-post aside span {
  color: var(--muted);
  font-size: 0.9rem;
}

.forum-post > div {
  padding: 18px;
  color: #26304f;
  line-height: 1.65;
}

.rich-post {
  min-height: 260px;
}

.rich-post .forum-post-author {
  justify-items: center;
  text-align: center;
}

.rich-post .forum-avatar {
  width: clamp(88px, 13vw, 150px);
  height: clamp(88px, 13vw, 150px);
  font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.forum-author-stats {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  color: var(--muted);
  text-align: left;
  font-size: 0.9rem;
}

.forum-post-body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 260px;
}

.forum-post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.forum-post-content {
  padding-block: 18px;
  color: var(--ink);
  font-size: 1.03rem;
}

.forum-post-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.forum-post-actions button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.danger-link {
  color: var(--danger);
}

.original-post {
  border-color: rgba(37, 49, 132, 0.35);
}

.admin-inline-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.6fr) minmax(220px, 1fr) minmax(100px, 0.25fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  background: #f8f9fd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-highlights {
  background: #fff;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.highlight-card {
  display: grid;
  gap: 10px;
}

.highlight-card span {
  width: max-content;
  padding: 6px 8px;
  color: var(--brand);
  background: #e9ecfb;
  border-radius: 8px;
  font-weight: 900;
}

.learning-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.learning-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 180px;
  padding: clamp(22px, 4vw, 34px);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(24, 33, 47, 0.08);
}

.learning-option:hover {
  color: var(--ink);
  border-color: rgba(37, 49, 132, 0.3);
  transform: translateY(-2px);
}

.learning-option-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  color: var(--brand);
  background: #e9f3ef;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 900;
}

.learning-option strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.learning-option small {
  display: block;
  max-width: 520px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.learning-section {
  display: grid;
  gap: 22px;
  margin-top: clamp(34px, 6vw, 64px);
}

.compact-head {
  margin-bottom: 0;
}

.quiz-area-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quiz-area-button {
  min-height: 58px;
  padding: 12px 14px;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(24, 33, 47, 0.05);
}

.quiz-area-button:hover,
.quiz-area-button.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.quiz-area-button small {
  display: block;
  margin-top: 4px;
  color: inherit;
  opacity: 0.72;
  font-weight: 800;
}

.quiz-submenu,
.quiz-panel {
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(24, 33, 47, 0.08);
}

.quiz-submenu {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.quiz-submenu h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
}

.quiz-submenu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-panel {
  display: grid;
  gap: 20px;
}

.quiz-submenu[hidden],
.quiz-panel[hidden] {
  display: none;
}

.quiz-form {
  display: grid;
  gap: 16px;
}

.quiz-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.quiz-head h3 {
  margin: 0 0 6px;
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
}

.quiz-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.quiz-question {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #f8f9fd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quiz-question legend {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.45;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d8def0;
  border-radius: 8px;
  cursor: pointer;
}

.quiz-option input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.quiz-option.is-correct {
  border-color: #287857;
  background: #edf7f2;
}

.quiz-option.is-wrong {
  border-color: #b64545;
  background: #fff3f3;
}

.quiz-explanation {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.quiz-result {
  padding: 16px;
  color: var(--brand-dark);
  background: #e9f3ef;
  border: 1px solid rgba(40, 120, 87, 0.24);
  border-radius: 8px;
  font-weight: 900;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dev-reset-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  color: var(--ink);
  background: #f3f5fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.dev-reset-box span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-panel {
  display: grid;
  gap: 24px;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 12px;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

code {
  padding: 2px 6px;
  background: #eef1fb;
  border-radius: 6px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .account {
    min-width: 0;
    text-align: left;
  }

  .hero,
  .two-column,
  .search-panel,
  .auth-grid,
  .feature-strip,
  .job-detail-layout,
  .cv-builder-grid,
  .forum-layout,
  .forum-home-layout,
  .learning-options,
  .admin-inline-form {
    grid-template-columns: 1fr;
  }

  .cv-preview-shell,
  .forum-form,
  .forum-reply-form {
    position: static;
  }

  .hero {
    min-height: auto;
  }

  .home-hero {
    min-height: 760px;
  }

  .hero-visual {
    min-height: 380px;
  }

  .jobs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz-area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz-submenu,
  .quiz-head {
    display: grid;
  }

  .highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .brand {
    font-size: 1.05rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .home-hero {
    min-height: 720px;
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .hero-title-lockup {
    display: grid;
    justify-items: center;
    width: 100%;
  }

  .hero-title-lockup img {
    margin-inline: auto;
  }

  .hero-city-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head,
  .footer {
    display: grid;
  }

  .form-row,
  .admin-login,
  .jobs-grid,
  .learning-option,
  .quiz-area-grid,
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .scale-card {
    right: 6px;
  }

  .cv-hero,
  .cv-columns,
  .forum-category-row,
  .forum-thread-row,
  .forum-post {
    grid-template-columns: 1fr;
  }

  .cv-photo {
    justify-self: start;
  }

  .cv-columns aside {
    border-left: 0;
    border-top: 1px solid #d8def0;
  }

  .forum-node-stats {
    text-align: left;
  }

  .forum-composer-options {
    grid-template-columns: 1fr;
  }

  .forum-composer-options label {
    width: auto;
  }

  .forum-post aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .company-job-card > header {
    display: grid;
  }

  .company-job-count {
    width: 100%;
    text-align: left;
  }

  .application-history-card > header,
  .saved-job-item {
    display: grid;
  }
}

@media (max-width: 760px) {
  .topbar.landing-topbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .landing-topbar .nav {
    width: 100%;
    justify-content: flex-end;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .footer,
  .section-head,
  .cv-form,
  .cv-preview-toolbar,
  .cv-access-note {
    display: none !important;
  }

  .section {
    padding: 0;
  }

  .cv-builder-grid,
  .cv-preview-shell,
  .cv-preview {
    display: block;
    padding: 0;
    min-height: 0;
    border: 0;
    background: #fff;
    overflow: visible;
  }

  .generated-cv {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
