:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --blue: #eef8ff;
  --blue-strong: #d6ecff;
  --line: #d2d2d7;
  --focus: #0071e3;
  --action: #0071e3;
  --action-dark: #0063c7;
  --paper: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(180deg, #edf8ff 0, #f5f5f7 190px, #f5f5f7 100%);
}

button,
textarea,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(245, 245, 247, 0.78);
  backdrop-filter: blur(18px);
}

.app-topbar-inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 auto;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #ffffff;
  background: #1d1d1f;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0;
}

.brand-pill {
  margin-left: auto;
  padding: 6px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 92px) 0 64px;
}

.intro {
  margin: 0 auto 42px;
  text-align: center;
}

h1 {
  max-width: 960px;
  margin: 0 auto;
  font-size: clamp(2.45rem, 6vw, 5.35rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

.generator {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.tool-home {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(1040px, 100%);
  margin: 0 auto 30px;
}

.tool-home-note {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.tool-card {
  display: block;
  min-height: 188px;
  padding: 26px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 28px;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: rgba(0, 113, 227, 0.2);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.11);
  outline: none;
  transform: translateY(-4px);
}

.tool-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.5rem;
  line-height: 1.08;
}

.tool-card span {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.tool-card .tool-card-open {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 20px;
  color: var(--action);
  font-size: 0.86rem;
  font-weight: 850;
}

.tool-card .tool-card-open span {
  color: inherit;
  font-size: 1rem;
  transition: transform 180ms ease;
}

.tool-card:hover .tool-card-open span,
.tool-card:focus-visible .tool-card-open span {
  transform: translateX(3px);
}

.tool-card-featured {
  grid-column: span 2;
  position: relative;
  overflow: hidden;
  color: #f8fffd;
  background:
    radial-gradient(circle at 88% 12%, rgba(74, 222, 128, 0.28), transparent 34%),
    linear-gradient(135deg, #0d2c25, #123d32 58%, #0d332b);
  border-color: rgba(255, 255, 255, 0.08);
}

.tool-card-featured::after {
  content: "Q";
  position: absolute;
  right: 28px;
  bottom: -38px;
  color: rgba(255, 255, 255, 0.055);
  font-family: Georgia, serif;
  font-size: 12rem;
  font-weight: 700;
  line-height: 1;
}

.tool-card-featured span {
  max-width: 560px;
  color: rgba(242, 255, 250, 0.72);
}

.tool-card-featured .tool-card-open {
  color: #baf7d8;
}

.tool-card-featured .tool-card-kicker {
  width: fit-content;
  margin-bottom: 28px;
  padding: 6px 10px;
  color: #baf7d8;
  background: rgba(45, 212, 134, 0.12);
  border: 1px solid rgba(137, 255, 196, 0.2);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.qual-tool {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.qual-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin: 24px 0 28px;
}

.qual-heading h2 {
  width: auto;
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.7rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  text-align: left;
}

.qual-heading > p {
  max-width: 500px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
}

.qual-eyebrow {
  color: #16764f;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.qual-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.qual-form,
.qual-decision {
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(15, 45, 35, 0.08);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(26, 56, 46, 0.08);
}

.qual-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3vw, 34px);
}

.qual-decision {
  position: sticky;
  top: 72px;
  min-height: 630px;
  overflow: hidden;
}

.qual-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-top: 8px;
}

.qual-section-heading > span {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #fff;
  background: #123d32;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 850;
}

.qual-section-heading h3,
.qual-section-heading p {
  margin: 0;
}

.qual-section-heading h3 {
  font-size: 1.02rem;
}

.qual-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
}

.qual-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qual-field {
  display: grid;
  gap: 7px;
  color: #24463c;
  font-size: 0.83rem;
  font-weight: 800;
}

.qual-field small {
  color: #8a9893;
  font-weight: 600;
}

.qual-field input,
.qual-field select,
.qual-field textarea {
  width: 100%;
  color: #182b25;
  background: #f6faf8;
  border: 1px solid #dce8e3;
  border-radius: 12px;
  outline: none;
}

.qual-field input,
.qual-field select {
  min-height: 48px;
  padding: 0 13px;
}

.qual-field textarea {
  min-height: 90px;
  padding: 13px;
  resize: vertical;
}

.qual-field input:focus,
.qual-field select:focus,
.qual-field textarea:focus {
  border-color: #2a9d6e;
  box-shadow: 0 0 0 3px rgba(42, 157, 110, 0.12);
}

.qual-dropzone {
  display: grid;
  min-height: 176px;
  place-items: center;
  align-content: center;
  padding: 22px;
  color: #4f655d;
  background: #f4faf7;
  border: 1.5px dashed #9ac7b4;
  border-radius: 18px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.qual-dropzone:hover,
.qual-dropzone:focus-visible,
.qual-dropzone.is-dragging {
  background: #eef9f3;
  border-color: #168c5d;
  outline: none;
  transform: translateY(-1px);
}

.qual-upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 9px;
  place-items: center;
  color: #16764f;
  background: #dff5e9;
  border-radius: 14px;
}

.qual-upload-icon svg {
  width: 23px;
}

.qual-dropzone strong {
  color: #173c30;
  font-size: 1rem;
}

.qual-dropzone > span:last-child {
  margin-top: 4px;
  color: #7c8d87;
  font-size: 0.78rem;
}

.primary-button.qual-primary {
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  background: #153f34;
  border-color: #153f34;
}

.primary-button.qual-primary:hover,
.primary-button.qual-primary:focus-visible {
  background: #0d3027;
  border-color: #0d3027;
}

.qual-empty-state,
.qual-working {
  display: grid;
  min-height: 630px;
  place-items: center;
  align-content: center;
  padding: 44px;
  text-align: center;
}

.qual-empty-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  place-items: center;
  color: #f1fff9;
  background: #123d32;
  border-radius: 20px;
  font-family: Georgia, serif;
  font-size: 2rem;
}

.qual-empty-state h3,
.qual-working h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.8rem;
}

.qual-empty-state p,
.qual-working p {
  max-width: 430px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.qual-empty-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.qual-empty-steps span {
  padding: 7px 10px;
  color: #4f685f;
  background: #f1f7f4;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 750;
}

.qual-spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  border: 3px solid #d8eee4;
  border-top-color: #16764f;
  border-radius: 50%;
  animation: qual-spin 800ms linear infinite;
}

@keyframes qual-spin {
  to { transform: rotate(360deg); }
}

.qual-result {
  min-height: 630px;
}

.qual-verdict {
  display: flex;
  gap: 14px;
  padding: 28px 30px;
  color: #12372c;
  background: #e8f7ef;
  border-bottom: 1px solid rgba(18, 61, 50, 0.08);
}

.qual-result-not_eligible .qual-verdict {
  color: #632723;
  background: #fff0ed;
}

.qual-result-manual_review .qual-verdict {
  color: #604817;
  background: #fff8e8;
}

.qual-verdict-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  background: #1c9a63;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #1c9a63;
}

.qual-result-not_eligible .qual-verdict-dot {
  background: #ca4b40;
  box-shadow: 0 0 0 2px #ca4b40;
}

.qual-result-manual_review .qual-verdict-dot {
  background: #d6981e;
  box-shadow: 0 0 0 2px #d6981e;
}

.qual-verdict-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.qual-verdict h3 {
  margin: 5px 0 7px;
  font-family: Georgia, serif;
  font-size: 1.65rem;
}

.qual-verdict p {
  margin: 0;
  line-height: 1.5;
}

.qual-result-section {
  padding: 25px 30px;
  border-bottom: 1px solid #e8eeeb;
}

.qual-result-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.qual-result-heading span {
  color: #173c30;
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.qual-result-heading small {
  color: #798a84;
  text-align: right;
}

.qual-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  background: #e5ece9;
  border: 1px solid #e5ece9;
  border-radius: 12px;
}

.qual-facts div {
  padding: 11px 12px;
  background: #f9fbfa;
}

.qual-facts dt {
  color: #71827b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.qual-facts dd {
  margin: 3px 0 0;
  color: #1f3930;
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.qual-list-block {
  margin-top: 18px;
}

.qual-list-block h4 {
  margin: 0 0 8px;
  color: #40564e;
  font-size: 0.82rem;
}

.qual-list-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #52655e;
  font-size: 0.86rem;
  line-height: 1.45;
}

.qual-missing-list {
  padding: 12px 14px;
  background: #fff8e8;
  border-radius: 11px;
}

.qual-criterion-section blockquote {
  margin: 0;
  padding: 16px;
  color: #233d34;
  background: #f5f8f7;
  border-left: 3px solid #2a9d6e;
  border-radius: 0 11px 11px 0;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-line;
}

.qual-source,
.qual-disclaimer {
  color: #7b8a85;
  font-size: 0.72rem;
  line-height: 1.45;
}

.qual-source {
  margin: 11px 0 0;
}

.qual-disclaimer {
  margin: 0;
  padding: 17px 30px 22px;
}

.qual-error-state .qual-empty-mark {
  background: #9f3028;
}

#qual-status {
  color: #16764f;
}

#qual-status.error {
  color: #9f1d1d;
}

.tool-panel h2 {
  width: min(760px, 100%);
  margin: 0 auto;
  font-size: 2rem;
  line-height: 1.1;
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  justify-self: start;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.writing-form {
  width: min(760px, 100%);
  display: grid;
  gap: 14px;
}

.writing-form input,
.writing-form textarea,
.writing-output {
  width: 100%;
  padding: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  line-height: 1.55;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.06);
}

.writing-form input {
  min-height: 52px;
}

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

.writing-output-wrap {
  width: min(760px, 100%);
}

.writing-output {
  min-height: 380px;
  background: #ffffff;
  font-family: "Times New Roman", Times, serif;
  resize: vertical;
}

.course-flow {
  width: min(920px, 100%);
  display: grid;
  gap: 18px;
}

.course-flow-copy {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.course-subcategory-list {
  display: grid;
  gap: 28px;
}

.course-subcategory-group {
  display: grid;
  gap: 14px;
}

.course-subcategory-group h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.course-simple-list {
  display: grid;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
}

.course-simple-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.course-simple-item:last-child {
  border-bottom: 0;
}

.course-simple-item:hover,
.course-simple-item:focus-visible {
  background: #f5f5f7;
  outline: none;
}

.course-simple-item span {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.course-simple-item small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
}

.course-choice-card {
  min-height: 154px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.course-choice-card:hover,
.course-choice-card:focus-visible {
  border-color: rgba(0, 113, 227, 0.2);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.11);
  outline: none;
  transform: translateY(-4px);
}

.course-card-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.course-card-copy strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.26rem;
  line-height: 1.22;
}

.course-card-copy span {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.course-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--action);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(16, 47, 77, 0.08);
}

.course-icon svg {
  width: 30px;
  height: 30px;
}

.course-icon.health {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.course-icon.cyber,
.course-icon.computing {
  color: #4338ca;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.course-icon.finance,
.course-icon.entrepreneurship {
  color: #047857;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.course-icon.construction {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.course-icon.psychology {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.course-icon.project {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.course-icon.tourism {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.course-flow-actions,
.course-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.course-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.course-breadcrumb-item {
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.course-breadcrumb-item:not(:disabled) {
  cursor: pointer;
}

.course-breadcrumb-item:not(:disabled):hover,
.course-breadcrumb-item:not(:disabled):focus-visible {
  color: var(--action);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.course-breadcrumb-item:disabled {
  cursor: default;
  opacity: 1;
}

.course-selected span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.course-selected strong {
  color: var(--ink);
}

.course-breadcrumb-separator {
  color: var(--muted);
  font-weight: 800;
}

.course-question-list,
.course-generated-output {
  display: grid;
  gap: 14px;
}

.course-question-card,
.course-answer-card,
.course-empty-note {
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.course-question-meta,
.course-word-count {
  color: var(--action);
  font-size: 0.9rem;
  font-weight: 800;
}

.course-question-card p,
.course-answer-card p {
  margin: 8px 0 0;
  line-height: 1.55;
  white-space: pre-line;
}

.course-info-block {
  display: grid;
  gap: 10px;
}

.course-info-block label,
.course-generated-output h3 {
  margin: 0;
  font-weight: 800;
}

.course-info-block textarea,
.course-answer-card textarea {
  width: 100%;
  min-height: 170px;
  padding: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  line-height: 1.55;
  resize: vertical;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.06);
}

.course-answer-card textarea {
  min-height: 150px;
  margin-top: 12px;
  background: #ffffff;
}

.auth-section,
.admin-panel,
.account-bar {
  width: min(760px, 100%);
  margin: 0 auto 20px;
}

.auth-form,
.admin-panel {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 4vw, 28px);
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-form h2,
.admin-panel h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.auth-form p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form input,
.create-user-form input,
.create-user-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
}

.auth-form input:focus,
.create-user-form input:focus,
.create-user-form select:focus {
  border-color: var(--focus);
  outline: 4px solid rgba(118, 189, 232, 0.24);
}

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.account-actions {
  display: flex;
  gap: 10px;
}

.create-user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.create-user-form button {
  grid-column: 1 / -1;
}

.user-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.user-list li {
  padding: 10px 12px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  overflow-wrap: anywhere;
}

.auth-message {
  min-height: 22px;
  color: var(--action);
  font-weight: 700;
}

.auth-message.error {
  color: #9f1d1d;
}

.cv-form {
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
}

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

#cv-input {
  width: 100%;
  min-height: 300px;
  padding: 28px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 30px;
  box-shadow: var(--shadow);
  line-height: 1.6;
  resize: vertical;
}

#cv-input::placeholder {
  color: #111827;
  opacity: 0.74;
}

#cv-input:focus,
.upload-button:focus-visible,
.cv-document:focus {
  outline: 4px solid rgba(0, 113, 227, 0.16);
  border-color: var(--focus);
}

.generate-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.upload-panel {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(0, 113, 227, 0.28);
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.05);
}

.upload-button {
  display: inline-grid;
  min-height: 46px;
  width: fit-content;
  align-items: center;
  padding: 0 18px;
  color: var(--action);
  background: #ffffff;
  border: 1px solid rgba(0, 113, 227, 0.24);
  border-radius: 999px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
  cursor: pointer;
}

.upload-button:hover {
  background: #f5fbff;
  border-color: rgba(0, 113, 227, 0.38);
  transform: translateY(-1px);
}

.upload-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.attachment-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.attachment-item button {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--action);
  background: #ffffff;
  border: 1px solid rgba(0, 113, 227, 0.24);
  border-radius: 999px;
  font-weight: 800;
}

.helper {
  width: 100%;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.helper p {
  margin: 0 0 9px;
  color: var(--ink);
  font-weight: 700;
}

.helper ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 28px;
  margin: 0;
  padding-left: 20px;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(0, 113, 227, 0.24);
  color: var(--action);
  background: #ffffff;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  width: min(320px, 100%);
  padding: 0 30px;
  color: #ffffff;
  background: var(--action);
  border-color: var(--action);
  font-size: 1.05rem;
}

.secondary-button {
  padding: 0 20px;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--action-dark);
  border-color: var(--action-dark);
  transform: translateY(-1px);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: #f5fbff;
  border-color: rgba(0, 113, 227, 0.38);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.status-message {
  min-height: 24px;
  margin: 0;
  color: var(--action);
  font-weight: 700;
  text-align: center;
}

.status-message.error {
  color: #9f1d1d;
}

.result {
  width: min(760px, 100%);
  margin: 34px auto 0;
}

.cv-document {
  min-height: 720px;
  padding: clamp(24px, 5vw, 48px);
  color: #000000;
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  line-height: 1.52;
  white-space: pre-wrap;
}

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

.generated-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 14px auto 0;
  color: var(--action);
  font-weight: 800;
  text-align: center;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .app-topbar-inner {
    width: min(100% - 22px, 940px);
  }

  .brand-pill {
    display: none;
  }

  .page-shell {
    width: min(100% - 22px, 940px);
    padding-top: 30px;
  }

  .tool-home {
    grid-template-columns: 1fr;
  }

  .tool-card-featured {
    grid-column: auto;
  }

  .tool-card {
    min-height: 132px;
  }

  .qual-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .qual-heading h2 {
    font-size: 3.6rem;
  }

  .qual-workspace {
    grid-template-columns: 1fr;
  }

  .qual-decision {
    position: static;
    min-height: 480px;
  }

  .qual-field-grid,
  .qual-facts {
    grid-template-columns: 1fr;
  }

  .qual-empty-state,
  .qual-working {
    min-height: 480px;
    padding: 28px;
  }

  .qual-verdict,
  .qual-result-section {
    padding-right: 22px;
    padding-left: 22px;
  }

  .course-choice-grid {
    grid-template-columns: 1fr;
  }

  .course-choice-card {
    min-height: 124px;
    padding: 18px;
  }

  .course-simple-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .course-simple-item small {
    white-space: normal;
  }

  .course-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .course-icon svg {
    width: 25px;
    height: 25px;
  }

  h1 {
    font-size: clamp(1.85rem, 9vw, 3rem);
  }

  #cv-input {
    min-height: 250px;
    padding: 20px;
    border-radius: 24px;
  }

  .helper ul {
    grid-template-columns: 1fr;
  }

  .generate-row {
    justify-content: stretch;
  }

  .primary-button,
  .secondary-button,
  .upload-button {
    width: 100%;
  }

  .account-bar,
  .create-user-form {
    grid-template-columns: 1fr;
  }

  .account-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .account-actions {
    flex-direction: column;
  }

  .attachment-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .cv-document {
    min-height: 560px;
    padding: 22px;
    font-size: 0.94rem;
  }
}
