@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700&family=Noto+Serif+TC:wght@600;700&display=swap");

:root {
  --ink: #17343b;
  --ink-soft: #496168;
  --cream: #f8f5ec;
  --paper: #fffdf8;
  --orange: #e6663f;
  --orange-dark: #c94d29;
  --orange-pale: #fae5da;
  --teal: #2b7772;
  --teal-pale: #dceee8;
  --line: #d8ded8;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(28, 61, 63, 0.09);
  --radius-lg: 24px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 14%, rgba(230, 102, 63, 0.08), transparent 18rem),
    var(--cream);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  line-height: 1.7;
}

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

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  z-index: 99;
  top: 10px;
  left: 10px;
  padding: 8px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  max-width: 1240px;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 28px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  color: var(--white);
  background: var(--orange);
  border-radius: 9px 9px 16px 9px;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 22px;
  font-style: italic;
}

.privacy-badge {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

.privacy-badge span {
  margin-right: 5px;
  font-size: 9px;
}

.hero {
  position: relative;
  display: grid;
  max-width: 1240px;
  min-height: 505px;
  margin: 0 auto;
  padding: 70px 28px 82px;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  align-items: center;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 690px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  display: inline-block;
  width: 28px;
  height: 2px;
  margin: 0 10px 4px 0;
  background: var(--orange);
  content: "";
}

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

h1 {
  margin-bottom: 24px;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(44px, 6vw, 74px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

h1 em {
  position: relative;
  color: var(--orange);
  font-style: normal;
}

h1 em::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 5px;
  background: var(--teal);
  border-radius: 99px;
  content: "";
  transform: rotate(-1.5deg);
}

.hero-intro {
  max-width: 640px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.hero-meta span::before {
  margin-right: 8px;
  color: var(--orange);
  content: "✓";
}

.companion-link {
  display: inline-flex;
  gap: 12px;
  margin-top: 28px;
  padding: 12px 17px 12px 12px;
  align-items: center;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.companion-link:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 22px rgba(28, 61, 63, 0.1);
  transform: translateY(-2px);
}

.companion-link:focus-visible {
  outline: 3px solid rgba(230, 102, 63, 0.3);
  outline-offset: 3px;
}

.companion-link > span:nth-child(2) {
  display: grid;
}

.companion-link small {
  color: var(--ink-soft);
  font-size: 11px;
}

.companion-link strong {
  font-size: 14px;
}

.companion-mark {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  color: var(--white);
  background: var(--teal);
  border-radius: 9px;
  place-items: center;
  font-weight: 700;
}

.hero-art {
  position: relative;
  width: min(100%, 420px);
  height: 350px;
  justify-self: end;
}

.sun {
  position: absolute;
  top: 0;
  right: 16px;
  width: 260px;
  height: 260px;
  background: #f4c65d;
  border-radius: 50%;
}

.card {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 190px;
  height: 142px;
  color: var(--white);
  border: 7px solid var(--cream);
  box-shadow: var(--shadow);
  place-items: center;
  font-family: "Noto Serif TC", serif;
  font-size: 24px;
  font-weight: 700;
}

.card-one {
  top: 74px;
  left: 12px;
  background: var(--teal);
  border-radius: 58px 20px 58px 20px;
  transform: rotate(-5deg);
}

.card-two {
  right: 0;
  bottom: 22px;
  background: var(--orange);
  border-radius: 20px 58px 20px 58px;
  transform: rotate(4deg);
}

.path {
  position: absolute;
  right: 105px;
  bottom: 14px;
  width: 205px;
  height: 85px;
  border: 3px dashed rgba(23, 52, 59, 0.35);
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 90px 0;
  transform: rotate(12deg);
}

.page-layout {
  max-width: 920px;
  margin: 0 auto 100px;
  padding: 0 28px;
}

.form-column {
  min-width: 0;
}

#iep-form {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(216, 222, 216, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-section,
.closing-section {
  position: relative;
  margin: 0 clamp(26px, 5vw, 54px);
  padding: clamp(30px, 5vw, 48px) 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

#assessment-sections .form-section:first-child {
  padding-top: clamp(38px, 6vw, 58px);
}

.form-section::before {
  display: none;
}

.section-number {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.section-title-row {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
  justify-content: space-between;
}

h2 {
  margin-bottom: 8px;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(27px, 4vw, 35px);
  line-height: 1.3;
}

.section-description {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.prompt-list {
  display: grid;
  margin: 0 0 28px;
  padding: 20px 22px 20px 42px;
  color: var(--ink-soft);
  background: #f4f3ec;
  border-left: 3px solid var(--teal);
  border-radius: 4px var(--radius-md) var(--radius-md) 4px;
  gap: 5px;
  font-size: 13px;
}

.support-level {
  max-width: 440px;
  margin-bottom: 28px;
}

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

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.observation-field textarea {
  min-height: 145px;
}

.field b {
  color: var(--orange-dark);
}

.full-width {
  grid-column: 1 / -1;
  margin-top: 20px;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

input {
  height: 48px;
  padding: 0 14px;
}

select {
  height: 50px;
  padding: 0 42px 0 14px;
  color: var(--ink);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--teal) 50%),
    linear-gradient(135deg, var(--teal) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 21px,
    calc(100% - 14px) 21px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  appearance: none;
  cursor: pointer;
}

textarea {
  min-height: 115px;
  padding: 13px 14px;
  line-height: 1.65;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(43, 119, 114, 0.12);
}

::placeholder {
  color: #8b9999;
  opacity: 1;
}

.closing-section {
  border-bottom: 0;
}

.form-actions {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 30px clamp(26px, 5vw, 54px);
  align-items: center;
  justify-content: space-between;
  background: var(--teal-pale);
}

.form-actions div {
  display: grid;
}

.form-actions span {
  color: var(--ink-soft);
  font-size: 13px;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--orange);
  border: 1px solid var(--orange);
  box-shadow: 0 9px 22px rgba(201, 77, 41, 0.2);
}

.primary-button:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.secondary-button {
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--teal);
}

.secondary-button:hover {
  background: var(--teal-pale);
}

.text-button {
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.result-panel {
  padding: clamp(28px, 5vw, 52px);
  background: var(--paper);
  border: 2px solid var(--teal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.result-header {
  display: flex;
  gap: 20px;
  margin-bottom: 26px;
  align-items: flex-start;
  justify-content: space-between;
}

.result-header p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.success-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  color: var(--white);
  background: var(--teal);
  border-radius: 50%;
  place-items: center;
  font-size: 25px;
}

.result-text {
  min-height: 500px;
  padding: 22px;
  background: #f5f4ee;
  border: 0;
  border-radius: var(--radius-md);
  font-family: ui-monospace, "Noto Sans Mono", monospace;
  font-size: 13px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.action-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

footer {
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 28px 40px;
  justify-content: space-between;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

footer p {
  margin: 0;
}

.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;
}

[hidden] {
  display: none !important;
}

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

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

  .hero-art {
    position: absolute;
    right: -190px;
    bottom: 20px;
    opacity: 0.22;
  }

  .page-layout {
    max-width: 820px;
  }

}

@media (max-width: 600px) {
  .site-header,
  .hero,
  .page-layout {
    padding-right: 12px;
    padding-left: 12px;
  }

  .site-header {
    min-height: 66px;
  }

  .privacy-badge {
    font-size: 11px;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
    padding-bottom: 52px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-intro {
    font-size: 16px;
  }

  .page-layout {
    margin-bottom: 60px;
  }

  #iep-form,
  .result-panel {
    border-radius: 16px;
  }

  .form-section,
  .closing-section {
    margin-right: 16px;
    margin-left: 16px;
    padding: 32px 0;
  }

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

  .support-level {
    max-width: none;
  }

  .form-actions {
    padding-right: 16px;
    padding-left: 16px;
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .primary-button {
    width: 100%;
  }

  .result-actions {
    display: grid;
  }

  .result-header {
    flex-direction: column-reverse;
  }

  footer {
    gap: 8px;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .brand > span:last-child {
    font-size: 14px;
  }

  .hero-meta {
    gap: 5px 14px;
    font-size: 12px;
  }

  .companion-link {
    width: 100%;
    margin-top: 22px;
  }

  .companion-link strong {
    font-size: 13px;
  }

  .section-title-row {
    margin-bottom: 18px;
  }

  .prompt-list {
    padding: 16px 16px 16px 34px;
  }

  .support-level {
    margin-bottom: 24px;
  }

  .observation-field textarea {
    min-height: 130px;
  }

  .result-panel {
    padding: 24px 16px;
  }

  .result-text {
    min-height: 420px;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
