:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5f6f67;
  --line: #d8e1dc;
  --panel: #ffffff;
  --soft: #f4f7f2;
  --field: #fbfcfa;
  --accent: #11664f;
  --accent-strong: #0a4d3d;
  --accent-soft: #dff1e9;
  --warning: #a84c22;
  --shadow: 0 24px 70px rgba(23, 33, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(17, 102, 79, 0.1), transparent 36%),
    linear-gradient(180deg, #f7f4ef 0%, #eef5ef 100%);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans TC",
    "Microsoft JhengHei",
    sans-serif;
  line-height: 1.5;
}

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

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(420px, 1.12fr);
  gap: clamp(22px, 4vw, 56px);
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) 0;
  align-items: center;
}

.intro {
  display: flex;
  min-height: 680px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  color: #f8fbf8;
  background:
    linear-gradient(rgba(15, 24, 38, 0.4), rgba(15, 24, 38, 0.78)),
    url("https://images.unsplash.com/photo-1677442136019-21780ecad995?auto=format&fit=crop&w=1200&q=80")
      center / cover;
  box-shadow: var(--shadow);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.brand-row,
.panel-heading,
.actions,
.note-row,
.tool-row {
  display: flex;
  align-items: center;
}

.brand-row {
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  place-items: center;
}

.intro-copy {
  max-width: 540px;
  padding: 72px 0 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 5.6vw, 5.36rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.intro-copy p:last-child {
  max-width: 480px;
  margin-bottom: 0;
  color: rgba(248, 251, 248, 0.88);
  font-size: 1.05rem;
}

.form-panel {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(23, 33, 28, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.panel-heading .eyebrow {
  color: var(--accent);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1;
  letter-spacing: 0;
}

.status-pill {
  flex: 0 0 auto;
  max-width: min(100%, 360px);
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

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

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

.field {
  display: grid;
  gap: 8px;
}

.field > span,
legend {
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 760;
}

b {
  color: var(--warning);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

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

textarea {
  min-height: 148px;
  padding: 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(17, 102, 79, 0.13);
}

input[readonly] {
  color: #40574f;
  background: #edf4f0;
  cursor: default;
}

.hint,
.note-row,
.error {
  font-size: 0.83rem;
}

.hint,
.note-row {
  color: var(--muted);
}

.note-row {
  justify-content: space-between;
  gap: 12px;
}

.error {
  min-height: 1.1em;
  color: #a13b2c;
  font-weight: 700;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.choice-group label {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  cursor: pointer;
}

.choice-group input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.choice-group span {
  font-size: 0.91rem;
  font-weight: 700;
}

.actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

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

button:active {
  transform: translateY(0);
}

.primary-button,
.secondary-button {
  padding: 0 18px;
}

.primary-button {
  min-width: 152px;
  color: white;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(17, 102, 79, 0.24);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.result {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #b9dfcf;
  border-radius: 8px;
  background: #ecf8f2;
}

.result div {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.success-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #b42318;
}

.result strong {
  color: #b42318;
}

.result p {
  margin: 0;
  color: #b42318;
  font-weight: 760;
}

.tool-row {
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: -28px auto 28px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.success-modal {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.success-modal::backdrop {
  background: rgba(14, 26, 21, 0.42);
  backdrop-filter: blur(5px);
  animation: fadeIn 180ms ease-out;
}

.success-card {
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid rgba(17, 102, 79, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(23, 33, 28, 0.24);
  text-align: center;
  animation: modalPop 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
  justify-items: center;
  text-align: center;
}

.success-card h2 {
  font-size: 1.48rem;
}

.success-card p {
  margin-bottom: 6px;
  color: #395d50;
  font-size: 1.02rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.success-icon {
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  place-items: center;
  animation: iconPulse 520ms ease-out;
}

.success-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.8;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  animation: drawCheck 420ms ease-out 140ms forwards;
}

.success-card .primary-button {
  width: 100%;
  margin-top: 4px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

@keyframes iconPulse {
  0% {
    transform: scale(0.7);
  }

  55% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .intro {
    min-height: auto;
  }

  .intro-copy {
    padding: 84px 0 0;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0 24px;
  }

  .intro,
  .form-panel {
    padding: 20px;
  }

  .intro-copy {
    padding: 64px 0 0;
  }

  h1 {
    font-size: clamp(2.24rem, 15.2vw, 3.76rem);
  }

  .field-grid,
  .choice-group {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    width: fit-content;
  }

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

  .site-footer {
    width: min(100% - 20px, 1180px);
    margin: 0 auto 20px;
  }
}
