:root {
  --navy: #0b2b4d;
  --navy-2: #123c68;
  --blue: #1769e8;
  --teal: #56d3e3;
  --ink: #14263d;
  --muted: #607086;
  --line: #dbe3ed;
  --surface: #ffffff;
  --soft: #f4f8fc;
  --success: #149863;
  --warning: #b66b08;
  --danger: #c53f43;
  --shadow: 0 24px 60px rgba(8, 36, 66, .12);
  font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  color: var(--ink);
  background: #f8fbfe;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #f8fbfe; color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.container { width: min(1480px, calc(100% - 48px)); margin: 0 auto; }
.site-header, .admin-header { position: sticky; top: 0; z-index: 30; background: rgba(7, 31, 57, .97); color: white; border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(16px); }
.header-inner { min-height: 80px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 410px; }
.brand img { width: 84px; height: 40px; object-fit: contain; }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 18px; line-height: 1.25; }
.brand small { font-size: 12px; opacity: .8; letter-spacing: .04em; }
nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
nav a { text-decoration: none; font-weight: 700; font-size: 15px; opacity: .84; }
nav a:hover, nav a:focus-visible { opacity: 1; color: var(--teal); }
.header-cta, .primary, .secondary, .button-link { border: 0; border-radius: 8px; min-height: 44px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.header-cta, .primary { background: linear-gradient(135deg, #1f7df2, #135ed4); color: white; box-shadow: 0 8px 20px rgba(23,105,232,.25); }
.header-cta:hover, .primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(23,105,232,.32); }
.secondary { background: #eef4fa; color: var(--navy); border: 1px solid #d2deea; }
.hero { position: relative; overflow: hidden; background:
  radial-gradient(circle at 22% 22%, rgba(71, 180, 255, .18), transparent 34%),
  linear-gradient(180deg, #f7fbff 0%, #eef7ff 45%, #f9fcff 100%); }
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; opacity: .35; }
.hero::before { inset: 40px 45% 45% -80px; background-image: radial-gradient(circle, #5db7ee 1px, transparent 1.5px); background-size: 32px 32px; mask-image: linear-gradient(to bottom right, #000, transparent 70%); }
.hero::after { width: 900px; height: 360px; right: -170px; top: 260px; border: 1px solid rgba(55,146,222,.35); border-radius: 50%; transform: rotate(-10deg); box-shadow: inset 0 0 0 40px rgba(89,175,238,.025), inset 0 0 0 80px rgba(89,175,238,.02); }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, .9fr) minmax(620px, 1.1fr); gap: 40px; padding: 60px 0 72px; align-items: start; }
.hero-copy { padding-top: 20px; }
.hero-copy > h1 { margin: 0; font-size: clamp(42px, 4vw, 70px); line-height: 1.14; letter-spacing: -.04em; color: #0a2c57; max-width: 760px; }
.hero-copy > p { max-width: 730px; margin: 28px 0 0; font-size: 19px; line-height: 1.9; color: #263a51; }
.mission-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.mission-points article { min-width: 0; display: grid; gap: 12px; align-content: start; }
.mission-points h2 { font-size: 18px; margin: 0; color: #104a92; }
.mission-points p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.icon-circle { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #dceafe; color: #104a92; font-weight: 900; font-size: 24px; box-shadow: inset 0 0 0 1px rgba(16,74,146,.08); }
.eligibility-card, .progress-card, .form-shell, .dashboard-card, .login-card { background: rgba(255,255,255,.96); border: 1px solid rgba(195,211,226,.78); box-shadow: var(--shadow); border-radius: 16px; }
.eligibility-card { padding: 24px 28px; margin-top: 38px; }
.eligibility-card h2, .progress-card h2 { margin: 0 0 14px; font-size: 20px; color: var(--navy); }
.eligibility-card ul { margin: 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.eligibility-card li { position: relative; padding-left: 28px; color: #35465a; line-height: 1.6; }
.eligibility-card li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: #e3f8ef; color: var(--success); font-size: 12px; font-weight: 900; }
.progress-card { padding: 22px 26px; margin-top: 18px; }
.process-line { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.process-line li { position: relative; text-align: center; display: grid; justify-items: center; gap: 6px; color: #8190a1; }
.process-line li:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: 63%; right: -40%; height: 2px; background: #d5dfea; }
.process-line span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #e8eef5; font-weight: 900; position: relative; z-index: 1; }
.process-line strong { font-size: 13px; }
.process-line small { font-size: 10px; line-height: 1.35; }
.process-line .active { color: #115ab9; }
.process-line .active span { background: var(--blue); color: white; box-shadow: 0 8px 20px rgba(23,105,232,.25); }
.form-shell { padding: 34px 36px 30px; min-height: 800px; }
.form-heading { text-align: center; }
.form-heading h2 { margin: 4px 0 8px; font-size: 30px; color: #071e3d; }
.form-heading p { margin: 0; color: var(--muted); }
.form-heading .step-label { color: #1665d9; font-size: 12px; text-transform: uppercase; font-weight: 900; letter-spacing: .08em; }
.stepper { margin: 28px 0 32px; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.step-dot { position: relative; appearance: none; border: 0; background: transparent; color: #7b8999; padding: 0 6px 16px; font-size: 12px; font-weight: 800; cursor: pointer; }
.step-dot span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px; background: #e8eef5; }
.step-dot.current, .step-dot.done { color: #145dbf; }
.step-dot.current::after { content: ""; height: 3px; background: #1769e8; position: absolute; bottom: -1px; left: 10%; right: 10%; border-radius: 3px 3px 0 0; }
.step-dot.current span, .step-dot.done span { background: #1769e8; color: white; }
.form-step { display: none; animation: fade-in .22s ease; }
.form-step.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.field-grid { display: grid; gap: 18px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.address-grid { grid-template-columns: 1fr 1fr; }
.field-grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: 8px; font-weight: 800; font-size: 14px; color: #25374b; }
em { color: #da3e45; font-style: normal; }
input, select, textarea { width: 100%; border: 1px solid #ced9e5; background: #fff; color: #152b43; border-radius: 8px; padding: 12px 14px; outline: none; min-height: 46px; transition: border .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: #4388e8; box-shadow: 0 0 0 3px rgba(23,105,232,.12); }
input:invalid:not(:placeholder-shown) { border-color: #d97477; }
fieldset { min-width: 0; border: 1px solid #dde6ef; border-radius: 12px; margin: 0 0 18px; padding: 18px; }
legend { padding: 0 8px; font-weight: 900; color: #143b67; }
.radio-row { display: flex; gap: 28px; flex-wrap: wrap; }
.radio-row label, .check-grid label, .declarations label { display: flex; align-items: flex-start; gap: 9px; font-weight: 600; }
.radio-row input, .check-grid input, .declarations input { width: 18px; height: 18px; min-height: auto; margin: 1px 0 0; flex: none; accent-color: var(--blue); }
.hint { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.upload-grid { display: grid; gap: 14px; }
.upload-box { padding: 17px 18px; border: 1px dashed #9fb7cf; border-radius: 12px; background: #f8fbfe; cursor: pointer; }
.upload-box:hover { border-color: #3d83de; background: #f3f8ff; }
.upload-box span { font-weight: 500; color: var(--muted); font-size: 12px; }
.upload-box input { padding: 8px; min-height: auto; background: transparent; border: 0; }
.upload-box output { font-size: 12px; color: #145dbf; font-weight: 700; }
.file-note { margin: 16px 0; padding: 15px 17px; border-radius: 10px; background: #fff7e6; border: 1px solid #f0d49d; color: #674716; }
.file-note p { margin: 5px 0 0; font-size: 13px; line-height: 1.55; }
.privacy-box { border: 1px solid #ccd9e7; border-radius: 12px; overflow: hidden; margin-top: 16px; }
.privacy-box h3 { margin: 0; padding: 14px 16px; background: #eef5fc; color: #143b67; font-size: 16px; }
.privacy-scroll { max-height: 220px; overflow: auto; padding: 14px 16px; color: #4b5c6f; font-size: 12px; line-height: 1.7; }
.privacy-scroll p { margin: 0 0 10px; }
.declarations { margin-top: 18px; display: grid; gap: 12px; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.form-actions .primary { margin-left: auto; min-width: 170px; }
.form-alert { min-height: 24px; margin-top: 14px; color: var(--danger); font-weight: 700; font-size: 13px; }
.form-alert.success { color: var(--success); }
.success-panel { text-align: center; padding: 80px 20px; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; background: #e6f7ef; color: var(--success); display: grid; place-items: center; font-size: 36px; font-weight: 900; }
.success-panel h2 { font-size: 30px; margin: 0 0 10px; }
.success-panel p { color: var(--muted); }
.success-panel > strong { display: block; width: fit-content; margin: 28px auto; padding: 14px 22px; border-radius: 10px; background: #eef5fc; color: #114f9e; letter-spacing: .12em; font-size: 22px; }
footer { background: #08233f; color: white; }
.footer-inner { min-height: 94px; display: grid; grid-template-columns: 1fr auto auto; gap: 26px; align-items: center; }
.footer-inner div { display: grid; gap: 3px; }
.footer-inner span, .footer-inner p { font-size: 12px; opacity: .72; }
.footer-inner a { opacity: .65; text-decoration: none; }

/* Admin */
.admin-body { background: #f3f7fb; }
.admin-header .brand { min-width: auto; }
.admin-main { padding: 46px 0 80px; }
.login-card { width: min(460px, 100%); margin: 60px auto; padding: 34px; }
.login-card h1 { margin: 0 0 8px; color: var(--navy); }
.login-card p { color: var(--muted); line-height: 1.6; }
.login-card form { display: grid; gap: 18px; margin-top: 24px; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.admin-title h1 { margin: 0; font-size: 34px; color: var(--navy); }
.admin-title p { margin: 6px 0 0; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { padding: 22px; border-radius: 14px; background: white; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(17,48,82,.07); }
.stat-card small { color: var(--muted); font-weight: 800; }
.stat-card strong { display: block; margin-top: 8px; font-size: 34px; color: var(--navy); }
.stat-card progress { width: 100%; margin-top: 12px; accent-color: var(--blue); }
.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.dashboard-card { padding: 22px; box-shadow: 0 12px 30px rgba(17,48,82,.07); }
.card-title, .table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-title h2, .table-toolbar h2 { margin: 0; font-size: 19px; color: var(--navy); }
.city-chart { display: grid; gap: 10px; margin-top: 20px; }
.city-row { display: grid; grid-template-columns: 82px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; }
.city-row progress { width: 100%; height: 10px; border: 0; border-radius: 6px; overflow: hidden; background: #edf2f7; accent-color: #2f8de5; }
.city-row progress::-webkit-progress-bar { background: #edf2f7; border-radius: 6px; }
.city-row progress::-webkit-progress-value { background: linear-gradient(90deg, #1969e7, #54c9e1); border-radius: 6px; }
.city-row progress::-moz-progress-bar { background: linear-gradient(90deg, #1969e7, #54c9e1); border-radius: 6px; }
.status-summary { display: grid; gap: 12px; margin-top: 20px; }
.status-row { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 9px; background: #f6f9fc; }
.table-card { margin-top: 18px; }
.table-toolbar > div { display: flex; gap: 9px; }
.table-toolbar input { min-width: 300px; }
.table-scroll { overflow: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e3eaf1; text-align: left; white-space: nowrap; }
th { color: #607086; font-size: 12px; background: #f7fafc; position: sticky; top: 0; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #edf3f9; color: #33516d; font-weight: 800; }
.status-pill.approved { background: #def5e9; color: #127248; }
.status-pill.needs_revision { background: #fff0d9; color: #8a5706; }
.status-pill.withdrawn { background: #f4e7e8; color: #984449; }
.row-button { border: 0; background: #eaf3ff; color: #145dbf; font-weight: 800; border-radius: 7px; padding: 8px 10px; cursor: pointer; }
.detail-dialog { width: min(920px, calc(100% - 30px)); max-height: 90vh; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.detail-dialog::backdrop { background: rgba(3,18,33,.62); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; right: 14px; top: 12px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef3f8; font-size: 24px; cursor: pointer; }
.detail-head { padding: 30px 34px 20px; border-bottom: 1px solid var(--line); }
.detail-head h2 { margin: 0; color: var(--navy); }
.detail-body { padding: 24px 34px 34px; overflow: auto; max-height: calc(90vh - 100px); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; }
.detail-item { padding: 12px 0; border-bottom: 1px dashed #dde5ed; }
.detail-item small { display: block; color: var(--muted); margin-bottom: 4px; }
.detail-item strong { word-break: break-word; }
.detail-wide { grid-column: 1 / -1; }
.document-list { display: grid; gap: 10px; margin-top: 12px; }
.document-list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; border-radius: 8px; background: #eef5fc; text-decoration: none; color: #145dbf; font-weight: 800; }
.review-form { margin-top: 24px; display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 1150px) {
  .header-inner nav { display: none; }
  .brand { min-width: 0; margin-right: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-top: 0; }
  .form-shell { min-height: 0; }
}
@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1480px); }
  .header-inner { min-height: 70px; gap: 12px; }
  .brand img { width: 64px; }
  .brand strong { font-size: 14px; }
  .brand small { display: none; }
  .header-cta { padding: 0 13px; min-height: 40px; font-size: 13px; }
  .hero-grid { padding: 34px 0 48px; gap: 24px; }
  .hero-copy > h1 { font-size: 38px; }
  .hero-copy > p { font-size: 16px; margin-top: 20px; }
  .mission-points { grid-template-columns: 1fr; gap: 16px; }
  .mission-points article { grid-template-columns: 54px 1fr; }
  .icon-circle { width: 50px; height: 50px; font-size: 20px; }
  .process-line { overflow-x: auto; grid-template-columns: repeat(5, 110px); padding-bottom: 5px; }
  .form-shell { padding: 24px 18px; border-radius: 12px; }
  .form-heading h2 { font-size: 24px; }
  .stepper { overflow-x: auto; grid-template-columns: repeat(4, 100px); }
  .field-grid.two, .address-grid, .check-grid { grid-template-columns: 1fr; }
  .field-grid .wide { grid-column: auto; }
  .form-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.96); padding: 12px 0 4px; }
  .footer-inner { grid-template-columns: 1fr; padding: 20px 0; gap: 10px; }
  .footer-inner p { margin: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .admin-title, .table-toolbar { align-items: stretch; flex-direction: column; }
  .table-toolbar > div { display: grid; grid-template-columns: 1fr; width: 100%; }
  .table-toolbar input { min-width: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-wide { grid-column: auto; }
}
@media (max-width: 1150px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy, .form-shell { min-width: 0; width: 100%; }
}
@media (max-width: 760px) {
  .stepper { overflow: visible; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step-dot { font-size: 10px; padding-inline: 1px; }
  .step-dot span { width: 25px; height: 25px; }
}

.legal-details { margin: -4px 0 2px 27px; color: var(--muted); font-size: 12px; }
.legal-details summary { cursor: pointer; color: #145dbf; font-weight: 800; }
.legal-details p { line-height: 1.65; }
.section-subtitle { margin: 6px 0 16px; color: var(--navy); font-size: 18px; }
.organization-fields { margin: 0 0 22px; padding: 20px; border: 1px solid #cddbea; border-radius: 12px; background: #f7fbff; }
.organization-fields h3 { margin: 0 0 16px; color: var(--navy); }
.founder-type-fieldset { margin-bottom: 22px; }
.founder-type-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.founder-type-cards label { display: block; position: relative; cursor: pointer; }
.founder-type-cards input { position: absolute; opacity: 0; pointer-events: none; }
.founder-type-cards span { min-height: 82px; display: grid; align-content: center; gap: 5px; padding: 15px 16px; border: 1px solid #cedae6; border-radius: 10px; background: #fff; transition: border .15s, box-shadow .15s, background .15s; }
.founder-type-cards strong { color: var(--navy); }
.founder-type-cards small { color: var(--muted); font-weight: 500; line-height: 1.5; }
.founder-type-cards input:checked + span { border-color: #2e7fe7; background: #f1f7ff; box-shadow: 0 0 0 3px rgba(23,105,232,.1); }
@media (max-width: 760px) {
  .founder-type-cards { grid-template-columns: 1fr; }
  .organization-fields { padding: 16px 14px; }
}
