@font-face {
  font-family: "IEAM Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IEAM Cormorant";
  src: url("fonts/cormorant.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --green: #06241c;
  --green-light: #064e3b;
  --gold: #c8ad72;
  --cream: #f7f5ef;
  --ink: #172019;
  --line: #dedfd7;
  --muted: #687067;
  --white: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IEAM Inter", Inter, Arial, sans-serif;
  color: var(--ink);
  background: #f1f3ef;
}
.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(20px, 5vw, 72px);
  background: var(--green);
  color: var(--white);
  border-bottom: 1px solid rgba(200,173,114,.22);
}
.brand {
  font-family: "IEAM Cormorant", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .8px;
}
.tagline {
  color: #cbd5cf;
  font-size: 12px;
  margin-top: 4px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
select, input, textarea {
  border: 1px solid #d9ddd4;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--white);
}
select:focus, input:focus, textarea:focus {
  outline: 2px solid rgba(6,78,59,.12);
  border-color: var(--green-light);
}
select { min-width: 72px; }
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}
.hero {
  background: linear-gradient(135deg, #06241c 0%, #0b3a2c 100%);
  color: var(--white);
  border: 1px solid rgba(200,173,114,.18);
  border-radius: 16px;
  padding: 38px;
  box-shadow: 0 18px 44px rgba(6,36,28,.16);
}
.hero h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-family: "IEAM Cormorant", Georgia, serif;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -.8px;
}
.hero > p:not(.eyebrow) { max-width: 760px; line-height: 1.6; color: #edf3f0; }
.eyebrow {
  color: #d9c79d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.mode-switch {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.mode, button { cursor: pointer; }
.mode {
  border: 1px solid rgba(255,255,255,.48);
  background: transparent;
  color: var(--white);
  border-radius: 999px;
  padding: 10px 16px;
}
.mode.active {
  background: var(--cream);
  color: var(--green);
  font-weight: 750;
}
.section-card {
  background: var(--white);
  border: 1px solid #e2e4dc;
  border-radius: 12px;
  padding: 24px;
  margin-top: 18px;
  box-shadow: 0 6px 22px rgba(25,44,35,.04);
}
.section-card h2 {
  margin: 0 0 20px;
  font-family: "IEAM Cormorant", Georgia, serif;
  font-size: 27px;
  color: var(--green);
}
.section-number { color: var(--gold); margin-right: 8px; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  align-items: start;
  column-gap: 24px;
  row-gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field legend {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}
.field legend {
  width: 100%;
  padding: 0 0 10px;
}
.field input, .field textarea, .field select { width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
fieldset.field { min-inline-size: 0; border: 0; margin: 0; padding: 0; }
.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  align-items: start;
  column-gap: 16px;
  row-gap: 9px;
}
.option {
  min-height: 24px;
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
  font-weight: 500 !important;
}
.option input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
}
.submit-row { display: flex; justify-content: flex-end; margin-top: 18px; }
.primary {
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: var(--green);
  padding: 12px 18px;
  font-weight: 800;
}
.secondary {
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 8px;
  background: transparent;
  color: var(--white);
  padding: 9px 12px;
}
.section-card .secondary { border-color: var(--line); color: var(--ink); }
.internal-toggle {
  display: block;
  margin: 18px 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--green-light);
  font-weight: 800;
}
.internal-panel {
  margin-top: 12px;
  background: var(--green);
  color: var(--white);
  border-radius: 12px;
  padding: 24px;
}
.hidden { display: none; }
.internal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.internal-head h2 {
  margin: 4px 0 18px;
  color: var(--white);
}
.internal-head strong {
  font-family: "IEAM Cormorant", Georgia, serif;
  font-size: 34px;
  color: var(--gold);
}
.score-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.score-row {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(200,173,114,.12);
  border-radius: 8px;
  padding: 12px;
}
.score-row label { display:flex; justify-content:space-between; gap:12px; font-size:13px; }
.score-row input { width:100%; margin-top:10px; accent-color: var(--gold); }
.priority-box {
  display:flex;
  align-items:center;
  gap:12px;
  margin:18px 0 12px;
  background:rgba(200,173,114,.10);
  border:1px solid rgba(200,173,114,.5);
  border-radius:10px;
  padding:14px;
}
.priority-box strong {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--gold);
  color:var(--green);
}
#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(100px);
  opacity: 0;
  transition: .25s;
  background: var(--green);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow:0 8px 24px rgba(0,0,0,.2);
}
#toast.show { transform: translateY(0); opacity: 1; }
.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; }
.language-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 0 4px;
}
.language-option {
  min-width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,.72);
  padding: 0 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  transition: color .2s ease, opacity .2s ease;
}
.language-option:hover {
  color: var(--white);
}
.language-option.active {
  color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.language-option[data-lang="zh"] {
  font-size: 14px;
  letter-spacing: 0;
}
.ieam-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.ieam-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e2e4dc;
  border-radius: 10px;
  background: var(--white);
  font-size: 13px;
}
.ieam-table thead th {
  padding: 14px 16px;
  background: var(--green);
  color: #e8dbc1;
  text-align: left;
  font-family: "IEAM Inter", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,.10);
}
.ieam-table thead th:last-child { border-right: 0; }
.ieam-table tbody td {
  padding: 15px 16px;
  border-right: 1px solid #edf0eb;
  border-bottom: 1px solid #edf0eb;
  line-height: 1.45;
  vertical-align: top;
}
.ieam-table tbody td:first-child {
  color: var(--green);
  font-weight: 750;
}
.ieam-table tbody td:last-child { border-right: 0; }
.ieam-table tbody tr:last-child td { border-bottom: 0; }
.ieam-table tbody tr { transition: background .18s ease; }
.ieam-table tbody tr:hover { background: #f7f8f4; }
@media (max-width: 680px) {
  .topbar { min-height:68px; padding:10px 16px; }
  .brand { font-size:16px; }
  .tagline { display:none; }
  .hero { padding:26px 20px; }
  .hero h1 { font-size:38px; }
  .grid, .options, .score-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .mode-switch { flex-wrap:wrap; }
  .actions { gap: 4px; }
  .language-switcher { border-right: 1px solid rgba(255,255,255,.12); margin-right: 2px; }
  #copyBtn { max-width: 38px; overflow: hidden; white-space: nowrap; text-indent: -999px; position: relative; }
  #copyBtn::after { content: "⧉"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-indent: 0; }
  .ieam-table,
  .ieam-table tbody,
  .ieam-table tr,
  .ieam-table td { display: block; width: 100%; }
  .ieam-table thead { display: none; }
  .ieam-table tbody tr {
    border-bottom: 1px solid #e2e4dc;
    padding: 8px 0;
  }
  .ieam-table tbody tr:last-child { border-bottom: 0; }
  .ieam-table tbody td {
    border: 0;
    padding: 8px 14px 8px 46%;
    min-height: 38px;
    position: relative;
  }
  .ieam-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 14px;
    width: 40%;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
  }
}
@media print {
  .topbar, .mode-switch, .submit-row, .internal-toggle, .internal-panel { display:none !important; }
  body { background:white; }
  main { max-width:none; padding:0; }
  .hero { border-radius:0; box-shadow:none; }
  .section-card { break-inside:avoid; }
}
