/* 都更通：手寫 CSS，依 elayadesign landing-page-design 的 tokens（間距、字級、圓角、動態曲線）。 */
:root {
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px; --s-400: 32px;
  --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
  --ink: #111111; --ink-2: #444444; --ink-3: #666666; --line: #E4E4E0; --bg: #FFFFFF; --bg-2: #F6F6F3;
  --brand: #0E6B52; --brand-ink: #FFFFFF; --brand-2: #E7F2EE; --ad: #8A5A00; --ad-bg: #FFF4DC; --err: #B42318;
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-full: 9999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 24px; color: var(--ink); background: var(--bg);
  text-wrap: pretty; padding-bottom: 88px; }
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible
  { outline: 3px solid var(--brand); outline-offset: 2px; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
p { margin: 0 0 var(--s-200); }

/* Text styles (named per design guide) */
.heading-1 { font-size: 36px; line-height: 40px; font-weight: 600; }
.heading-2 { font-size: 30px; line-height: 36px; font-weight: 600; }
.heading-3 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
@media (min-width: 900px) {
  .heading-1 { font-size: 60px; line-height: 60px; }
  .heading-2 { font-size: 36px; line-height: 40px; }
  .heading-3 { font-size: 30px; line-height: 36px; }
}
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-lg { font-size: 18px; line-height: 28px; font-weight: 400; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--ink-3); }
.muted { color: var(--ink-3); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--s-200); }
.narrow { max-width: 720px; }
@media (min-width: 900px) { .wrap { padding: 0 var(--s-400); } }
.section { padding: var(--s-700) 0; }
.section-alt { background: var(--bg-2); }
.stack > * + * { margin-top: var(--s-200); }
.stack-lg > * + * { margin-top: var(--s-300); }
.grid { display: grid; gap: var(--s-200); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.skip { position: absolute; left: var(--s-200); top: -100px; background: var(--ink); color: #fff; padding: var(--s-75) var(--s-100);
  border-radius: var(--r-lg); z-index: 100; }
.skip:focus { top: var(--s-200); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Nav: floating translucent pill */
.nav { position: sticky; top: var(--s-200); z-index: 50; margin: var(--s-200) auto 0; width: calc(100% - var(--s-400)); max-width: 1120px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-200); padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: rgba(255,255,255,0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--r-full); }
.brand { font-weight: 600; font-size: 16px; line-height: 24px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: var(--s-75); }
.brand-mark { width: 24px; height: 24px; border-radius: var(--r-md); display: inline-block; }
.brand-tag { display: none; margin-left: var(--s-75); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); }
@media (min-width: 1100px) { .brand-tag { display: inline; } }
.nav-links { display: none; gap: var(--s-50); list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: var(--s-75) var(--s-100); border-radius: var(--r-full); color: var(--ink-2); text-decoration: none;
  font-size: 14px; line-height: 20px; font-weight: 500; transition: background-color .3s var(--ease); }
.nav-links a:hover { background: var(--bg-2); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.nav .btn { display: none; }
@media (min-width: 900px) { .nav-links { display: flex; } .nav .btn { display: inline-flex; } .menu-btn { display: none; } }
.menu-btn { width: 48px; height: 48px; border: 0; background: transparent; border-radius: var(--r-full); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 14px; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .5s var(--ease), opacity .3s var(--ease); }
.menu-btn span:nth-child(1) { top: 18px; } .menu-btn span:nth-child(2) { top: 28px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 40; background: rgba(255,255,255,0.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: 104px var(--s-300) var(--s-300); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { opacity: 0; transform: translateY(24px); transition: transform .5s var(--ease), opacity .5s var(--ease); }
.menu-open .mobile-menu li { opacity: 1; transform: none; }
.mobile-menu a { display: block; padding: var(--s-200) 0; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line); }

/* Buttons: big tap targets */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75); min-height: 48px; padding: var(--s-75) var(--s-300);
  border-radius: var(--r-full); border: 1px solid transparent; font: inherit; font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background-color .3s var(--ease), transform .3s var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #0B5A45; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-line { background: #06C755; color: #fff; }
.btn-line:hover { background: #05A949; }
.btn-lg { min-height: 56px; font-size: 18px; line-height: 28px; padding: var(--s-100) var(--s-400); }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Sticky bottom CTA on mobile */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: var(--s-100) var(--s-200) calc(var(--s-100) + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); }
.sticky-cta .btn { width: 100%; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* Hero */
.hero { padding: var(--s-700) 0 var(--s-600); }
.hero h1 { max-width: 680px; background: linear-gradient(90deg, #000000, #666666); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { max-width: 680px; margin-top: var(--s-200); color: var(--ink-2); }
.hero .actions { margin-top: var(--s-300); display: flex; flex-wrap: wrap; gap: var(--s-100); }
.proof { margin-top: var(--s-300); display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300); color: var(--ink-3); font-size: 14px; line-height: 20px; }
.proof b { color: var(--ink); font-weight: 600; }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .5s var(--ease); }
.card-link:hover { transform: translateY(-2px); }
.card .kicker { color: var(--brand); font-size: 14px; line-height: 20px; font-weight: 600; }
.card.featured { border-color: var(--ad); }
.step-num { width: 32px; height: 32px; border-radius: var(--r-full); background: var(--brand-2); color: var(--brand); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 600; }

.badge { display: inline-flex; align-items: center; padding: var(--s-25) var(--s-75); border-radius: var(--r-md); font-size: 12px; line-height: 16px;
  font-weight: 600; background: var(--bg-2); color: var(--ink-2); vertical-align: middle; }
.badge-ad { background: var(--ad-bg); color: var(--ad); }
.badge-ok { background: var(--brand-2); color: var(--brand); }
.notice { border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--r-xl); padding: var(--s-200); font-size: 14px; line-height: 20px; }
.notice-warn { background: var(--ad-bg); border-color: #F2D49B; }

/* Tagline reveal */
.tagline { max-width: 680px; }
.tagline .w { color: rgba(17,17,17,0.3); transition: color .6s var(--ease); }
.tagline .w.on { color: var(--ink); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: opacity .3s linear; }
  .tagline .w { color: var(--ink); transition: none; }
  .mobile-menu li { transform: none; }
  html { scroll-behavior: auto; }
}

/* Forms */
.form { display: grid; gap: var(--s-300); }
.field label.lbl, .field legend { display: block; font-weight: 500; margin-bottom: var(--s-75); padding: 0; }
.field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field input[type=text], .field input[type=number], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-100) var(--s-200); font: inherit; font-size: 16px; line-height: 24px; color: var(--ink);
  background: #fff; border: 1px solid #CFCFCA; border-radius: var(--r-xl); }
.field textarea { min-height: 96px; }
.field .help { margin-top: var(--s-50); font-size: 14px; line-height: 20px; color: var(--ink-3); }
.field .err, .form-errors { color: var(--err); font-size: 14px; line-height: 20px; margin-top: var(--s-50); }
.form-errors { border: 1px solid #F1B5AE; background: #FEF3F2; border-radius: var(--r-xl); padding: var(--s-100) var(--s-200); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--err); }
.choices { display: grid; gap: var(--s-75); }
@media (min-width: 640px) { .choices.cols { grid-template-columns: repeat(2, 1fr); } }
.choice { display: flex; align-items: center; gap: var(--s-100); min-height: 48px; padding: var(--s-100) var(--s-200); border: 1px solid #CFCFCA;
  border-radius: var(--r-xl); cursor: pointer; background: #fff; transition: background-color .3s var(--ease); }
.choice:hover { background: var(--bg-2); }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-2); }
.consent { display: flex; gap: var(--s-100); align-items: flex-start; padding: var(--s-200); border: 1px solid var(--line); border-radius: var(--r-xl); background: #fff; }
.consent input { width: 22px; height: 22px; accent-color: var(--brand); margin: var(--s-25) 0 0; flex: none; }
details.notice-text { margin-top: var(--s-75); }
details.notice-text summary { cursor: pointer; color: var(--brand); font-size: 14px; line-height: 20px; min-height: 32px; }
details.notice-text pre { white-space: pre-wrap; font: inherit; font-size: 14px; line-height: 20px; color: var(--ink-2); margin: var(--s-75) 0 0; }
.progress { height: 4px; background: var(--line); border-radius: var(--r-full); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); transform-origin: left; transition: width .5s var(--ease); }

/* Lists, prose, tables */
.crumbs { font-size: 14px; line-height: 20px; color: var(--ink-3); padding-top: var(--s-300); }
.crumbs a { color: var(--ink-3); }
.prose { font-size: 18px; line-height: 28px; }
.prose h2 { font-size: 24px; line-height: 32px; font-weight: 600; margin: var(--s-500) 0 var(--s-200); }
.prose h3 { font-size: 20px; line-height: 28px; font-weight: 600; margin: var(--s-400) 0 var(--s-100); }
.prose ul, .prose ol { padding-left: var(--s-300); }
.prose li + li { margin-top: var(--s-75); }
.prose img, .article-cover { display: block; width: 100%; height: auto; border-radius: 12px; }
.prose img { margin: var(--s-300) 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 24px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line, #e5e7eb); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose blockquote { border-left: 4px solid var(--brand); margin: var(--s-300) 0; padding: 4px 0 4px var(--s-200); color: var(--ink-2, #555); }
.prose .article-meta { font-size: 14px; color: var(--ink-2, #666); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 24px; }
th, td { text-align: left; padding: var(--s-100); border: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); font-weight: 600; }
.pill-list { display: flex; flex-wrap: wrap; gap: var(--s-75); list-style: none; padding: 0; margin: 0; }
.pill-list a { display: inline-flex; min-height: 40px; align-items: center; padding: var(--s-75) var(--s-200); border: 1px solid var(--line);
  border-radius: var(--r-full); color: var(--ink); text-decoration: none; font-size: 14px; line-height: 20px; }
.pill-list a:hover, .pill-list a[aria-current="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-2); }
.faq details { border: 1px solid var(--line); border-radius: var(--r-xl); background: #fff; }
.faq details + details { margin-top: var(--s-100); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-200); font-weight: 500; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { padding: 0 var(--s-200) var(--s-200); margin: 0; color: var(--ink-2); }
.empty { text-align: center; padding: var(--s-600) var(--s-300); border: 1px dashed #CFCFCA; border-radius: var(--r-2xl); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: var(--s-600) 0 var(--s-400); margin-top: var(--s-700); font-size: 14px; line-height: 20px; color: var(--ink-3); }
.footer a { color: var(--ink-2); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300); }

/* Header auth link + allauth pages */
.nav-actions { display: flex; align-items: center; gap: var(--s-75); margin-left: auto; }
.nav-auth { display: none; padding: var(--s-75) var(--s-100); color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 500; border-radius: var(--r-full); }
.nav-auth:hover { background: var(--bg-2); }
@media (min-width: 900px) { .nav-auth { display: inline-block; } }
.linklike { background: none; border: 0; padding: var(--s-200) 0; font: inherit; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--ink); cursor: pointer; width: 100%; text-align: left; }
.auth-box { max-width: 480px; }
.auth-box h1 { font-size: 30px; line-height: 36px; font-weight: 600; margin-bottom: var(--s-200); }
.auth-box h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin: var(--s-400) 0 var(--s-100); }
.auth-box form { display: grid; gap: var(--s-200); margin: var(--s-200) 0; }
.auth-box label { display: block; font-weight: 500; margin-bottom: var(--s-50); }
.auth-box input[type=email], .auth-box input[type=password], .auth-box input[type=text] {
  width: 100%; min-height: 48px; padding: var(--s-100) var(--s-200); font: inherit; border: 1px solid #CFCFCA; border-radius: var(--r-xl); background: #fff; }
.auth-box input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); vertical-align: middle; margin-right: var(--s-75); }
.auth-box button[type=submit], .auth-box .button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; width: 100%;
  padding: var(--s-75) var(--s-300); border-radius: var(--r-full); border: 0; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-box button[type=submit]:active { transform: scale(0.98); }
.auth-box .helptext, .auth-box ul.errorlist { font-size: 14px; line-height: 20px; color: var(--ink-3); }
.auth-box ul.errorlist { color: var(--err); padding-left: var(--s-200); }
.auth-box .socialaccount_providers, .auth-box ul.providers { list-style: none; padding: 0; margin: var(--s-200) 0; display: grid; gap: var(--s-75); }
.social-btn { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: var(--r-full);
  text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; transition: background-color .3s var(--ease); }
.social-btn:hover { background: var(--bg-2); }
.social-btn.line { background: #06C755; color: #fff; border-color: #06C755; }
