:root {
  color-scheme: light;
  --bg: #f0f4f2;
  --surface: #ffffff;
  --surface-soft: #f7f8f5;
  --ink: #19201f;
  --muted: #65706d;
  --line: #dbe2df;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --amber: #b7791f;
  --rose: #b42318;
  --shadow: 0 18px 50px rgba(27, 39, 36, 0.12);
  --shadow-strong: 0 28px 80px rgba(11, 95, 89, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, rgba(15, 118, 110, 0.18), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(183, 121, 31, 0.18), transparent 28%),
    linear-gradient(180deg, #f8fbf9 0%, #edf3f1 48%, #f6f7f3 100%),
    var(--bg);
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px 28px 28px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 16px;
  background: linear-gradient(180deg, var(--bg) 72%, rgba(238, 242, 243, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--accent);
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 30px;
  align-items: center;
  padding: 18px 2px 30px;
}

.hero-copy {
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: 48px;
  line-height: 1.12;
}

h2 {
  margin-bottom: 7px;
  font-size: 21px;
}

h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

.hero-copy p:last-child,
.panel-heading p,
.info-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.primary-link,
.text-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-weight: 850;
}

.primary-link {
  border: 0;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--accent), #063f3b);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.26);
}

.text-link {
  color: var(--accent-strong);
}

.trust-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.trust-row span {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
}

.info-grid a {
  color: var(--accent-strong);
  font-weight: 800;
}

.hero-visual {
  margin: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  border: 1px solid rgba(219, 226, 223, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 18px;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.status-pill {
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
}

.input-panel,
.result-panel {
  min-height: calc(100vh - 244px);
  border: 1px solid rgba(219, 226, 223, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.input-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.upload-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.34);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(236, 247, 245, 0.96), rgba(255, 251, 240, 0.78)),
    #f3fbf9;
  box-shadow: 0 12px 34px rgba(15, 118, 110, 0.1);
}

.upload-card img {
  width: 92px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.15);
}

.upload-card h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

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

.upload-meta {
  margin-top: 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.workflow-rail span {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workflow-rail strong {
  display: grid;
  width: 24px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

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

label span,
.output-toolbar span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 190px;
  resize: vertical;
  padding: 12px;
  line-height: 1.58;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.68);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  flex: 1;
}

.textarea-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.textarea-card textarea {
  flex: 1;
}

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

.import-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.manual-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.manual-entry summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-entry .textarea-card {
  padding: 0 14px 14px;
}

.manual-entry textarea {
  min-height: 160px;
}

#resumeFile {
  display: none;
}

button,
.file-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 15px;
  background: linear-gradient(135deg, var(--accent), #073f3b);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

button:hover,
.file-button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary,
.file-button {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.secondary:hover,
.file-button:hover {
  background: #edf2ef;
}

.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.result-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.score-strip {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.score-box {
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: linear-gradient(160deg, #ecf7f5, #fff8e8);
}

.score-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-box strong {
  font-size: 32px;
  line-height: 1;
}

#summary {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px 0;
}

.tab {
  min-height: 38px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  background: transparent;
  color: var(--muted);
}

.tab:hover {
  background: var(--surface-soft);
  color: var(--ink);
  transform: none;
}

.tab.active {
  border-color: var(--line);
  border-bottom-color: var(--surface);
  background: var(--surface);
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tab-panel {
  display: none;
  flex: 1;
  overflow: auto;
  padding: 18px;
}

.tab-panel.active {
  display: block;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.chip {
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: #ecf7f5;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.output-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

pre {
  min-height: 430px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.18), transparent 22%),
    #101817;
  color: #edf7f3;
  line-height: 1.7;
  white-space: pre-wrap;
}

#coverLetterPitch {
  color: var(--muted);
  line-height: 1.7;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 22px 0 4px;
}

.info-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.policy-page {
  max-width: 860px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.policy-page h1 {
  margin-bottom: 8px;
}

.policy-page section {
  margin-top: 26px;
}

.policy-page p {
  color: var(--muted);
  line-height: 1.75;
}

.policy-updated {
  font-weight: 700;
}

.notice {
  color: var(--rose);
}

@media (max-width: 1080px) {
  .product-hero,
  .workspace,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .input-panel,
  .result-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .site-header,
  .panel-heading,
  .score-strip,
  .field-row,
  .columns,
  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .product-hero {
    padding-top: 10px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .upload-card {
    grid-template-columns: 74px 1fr;
  }

  .upload-card .file-button {
    grid-column: 1 / -1;
  }

  .upload-card img {
    width: 74px;
  }

  .workflow-rail {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 220px;
  }

  .actions button,
  .file-button {
    flex: 1 1 150px;
  }

  .policy-page {
    padding: 22px;
  }
}
