/* ============================================================
   房東社宅稅務與福利試算器
   顧問型試算器：大數字、一般 vs 社宅對照、極簡輸入
   延續官網黑・金・白設計系統（見 site.css :root 變數）
   ============================================================ */

.txc-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px var(--gutter) 72px;
}

.txc-topline {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.txc-step-tag {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-4);
  background: rgba(201,169,106,.14);
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  padding: 6px 16px;
}

.txc-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.txc-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper-line);
}
.txc-dots span.is-active { background: var(--gold); width: 22px; border-radius: 6px; }
.txc-dots span.is-done { background: var(--gold-3); }

.txc-card {
  background: var(--paper-2);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow-md);
}
@media (min-width: 640px) { .txc-card { padding: 40px 36px; } }

.txc-q-note { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .06em; margin-bottom: 6px; }
.txc-question {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3.6vw, 1.5rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}
.txc-question em {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  margin-left: 8px;
  vertical-align: middle;
}
.txc-hint { font-size: 13px; color: var(--muted); margin: -6px 0 16px; line-height: 1.7; }

.txc-input-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.txc-text-input {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  border: 1.5px solid var(--paper-line);
  border-radius: var(--radius-s);
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
}
.txc-text-input:focus { outline: none; border-color: var(--gold); }
.txc-input-suffix { font-size: 13px; color: var(--muted); white-space: nowrap; }

.txc-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.txc-options.cols-2 { grid-template-columns: 1fr 1fr; }
.txc-options.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 480px) { .txc-options.cols-3 { grid-template-columns: 1fr 1fr; } }
.txc-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1.5px solid var(--paper-line);
  border-radius: var(--radius-s);
  background: var(--white);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.txc-choice:hover { border-color: var(--gold-2); }
.txc-choice.is-selected { border-color: var(--gold); background: rgba(201,169,106,.1); color: var(--gold-4); }
.txc-choice-check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--paper-line); flex-shrink: 0;
}
.txc-choice.is-selected .txc-choice-check { border-color: var(--gold); background: var(--gold); }

.txc-advanced-toggle {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-4);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.txc-advanced-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--paper-line);
}
.txc-advanced-box.is-hidden { display: none; }
.txc-field-label { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 12px 0 6px; }

.txc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  gap: 10px;
}
.txc-nav-left { flex: 1; }
.txc-btn-back {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 10px 4px;
  text-decoration: none;
}
.txc-btn-skip {
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 10px 14px;
}
.txc-btn-next {
  font-size: 15px; font-weight: 800; color: var(--ink);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border: none; border-radius: var(--radius-s);
  padding: 13px 28px; cursor: pointer;
  box-shadow: 0 14px 28px -12px rgba(201,169,106,.55);
  transition: transform .2s, box-shadow .2s;
}
.txc-btn-next:hover { transform: translateY(-2px); }
.txc-btn-next:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 結果頁 ---------- */
.txc-result-wrap { max-width: 920px; margin: 0 auto; padding: 8px var(--gutter) 90px; }

.txc-headline {
  text-align: center;
  background:
    radial-gradient(circle at 80% 10%, rgba(201,169,106,.22), transparent 45%),
    linear-gradient(180deg, #16120f 0%, #0f0d0b 100%);
  border-radius: var(--radius);
  padding: 40px 26px;
  margin-bottom: 28px;
  color: var(--white);
}
.txc-headline-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; color: var(--gold-2); margin-bottom: 10px; }
.txc-headline h2 { font-family: var(--serif); font-size: clamp(1.3rem, 4.2vw, 1.8rem); margin: 0 0 20px; }

.txc-big-numbers { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .txc-big-numbers { grid-template-columns: 1fr 1fr 1fr; } }
.txc-big-num-item { }
.txc-big-num-label { font-size: 12.5px; color: rgba(255,255,255,.66); margin-bottom: 6px; }
.txc-big-num-value { font-family: var(--serif); font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 700; color: var(--gold-2); }
.txc-big-num-sub { font-size: 11.5px; color: rgba(255,255,255,.5); margin-top: 4px; }

.txc-group-card {
  background: var(--paper-2);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-bottom: 18px;
}
.txc-group-title { font-size: 14.5px; font-weight: 800; color: var(--gold-4); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.txc-group-rows { display: flex; flex-direction: column; gap: 10px; }
.txc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--paper-line-2); }
.txc-row:last-child { border-bottom: none; }
.txc-row-label { font-size: 13.5px; color: var(--text-2); }
.txc-row-value { font-size: 15.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.txc-row-value.is-highlight { color: var(--gold-4); }

/* 比較表 */
.txc-compare-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13.5px; }
.txc-compare-table th, .txc-compare-table td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--paper-line-2); }
.txc-compare-table th:first-child, .txc-compare-table td:first-child { text-align: left; }
.txc-compare-table thead th { font-weight: 800; color: var(--text); border-bottom: 2px solid var(--paper-line); }
.txc-compare-table tbody td.is-social { color: var(--gold-4); font-weight: 700; }

.txc-note-box {
  background: rgba(201,169,106,.08);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 12px;
}

.txc-disclaimer-fixed {
  background: var(--ink);
  color: rgba(255,255,255,.72);
  font-size: 11.5px;
  line-height: 1.9;
  border-radius: var(--radius-s);
  padding: 18px 18px;
  margin-top: 24px;
}
.txc-disclaimer-fixed strong { color: var(--gold-2); }

.txc-result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; justify-content: center; }
.txc-btn-primary, .txc-btn-secondary {
  font-size: 14px; font-weight: 800; border-radius: var(--radius-s);
  padding: 13px 24px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.txc-btn-primary { color: var(--ink); background: linear-gradient(135deg, var(--gold-2), var(--gold)); border: none; box-shadow: 0 14px 28px -12px rgba(201,169,106,.55); }
.txc-btn-secondary { color: var(--text); background: var(--white); border: 1.5px solid var(--paper-line); }
.txc-btn-secondary:hover { border-color: var(--gold-2); }

.txc-restart-link { text-align: center; margin-top: 18px; }
.txc-restart-link a { font-size: 13px; color: var(--muted); text-decoration: underline; }

/* ---------- App 內建瀏覽器（LINE/FB/IG 等）提示橫幅：列印／另存 PDF 可能無反應 ---------- */
.inapp-browser-banner {
  max-width: 560px; margin: 16px auto 0; padding: 14px 16px;
  background: #fff4e5; border: 1px solid #e8b464; border-radius: 12px;
}
.inapp-banner-text { margin: 0 0 10px; font-size: 12.5px; line-height: 1.75; color: #6b4e1a; }
.inapp-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.inapp-banner-btn {
  border: 1px solid #e8b464; background: #fff; color: #6b4e1a; border-radius: 999px;
  padding: 9px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.inapp-banner-btn-primary {
  border-color: transparent; background: linear-gradient(180deg, #deb667 0%, #c9a96a 100%); color: #1b1612;
}
.inapp-banner-hint { margin: 8px 0 0; font-size: 12px; color: #6b4e1a; font-weight: 700; min-height: 16px; }

/* ---------- 儲存我的試算結果（客戶自助，取代原本業務模式區塊） ---------- */
.txc-save-card {
  max-width: 480px; margin: 40px auto 0; padding: 32px 28px;
  background: var(--paper-2); border: 1px solid var(--paper-line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); text-align: center;
}
.txc-save-card h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 10px; color: var(--text); }
.txc-save-lead { font-size: 13.5px; color: var(--muted); line-height: 1.8; margin: 0 0 24px; }

.txc-save-fields { text-align: left; }
.txc-save-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.txc-save-field { display: flex; flex-direction: column; gap: 5px; }
.txc-save-field.full { grid-column: 1 / -1; }
.txc-save-field label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.txc-save-field label .req { color: var(--danger); margin-left: 3px; }
.txc-save-field input, .txc-save-field textarea {
  box-sizing: border-box; width: 100%;
  padding: 12px 14px; font-size: 14.5px; border: 1.5px solid var(--paper-line);
  border-radius: var(--radius-s); background: var(--white); color: var(--text); font-family: var(--sans);
}
.txc-save-field textarea { resize: vertical; min-height: 54px; }
.txc-contact-either-label { font-size: 11.5px; color: var(--muted-2); text-align: center; margin: 2px 0 10px; }

@media (max-width: 480px) {
  .txc-save-row { grid-template-columns: 1fr; }
  .txc-save-card { padding: 26px 20px; }
}

.txc-consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 20px; text-align: left; }
.txc-consent-row input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--gold-3); flex-shrink: 0; }
.txc-consent-row label { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.txc-consent-row a { color: var(--gold-3); text-decoration: underline; }

.txc-btn-generate {
  width: 100%; font-size: 15.5px; font-weight: 800; color: var(--ink);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border: none; border-radius: var(--radius-s); padding: 15px 20px; cursor: pointer;
  box-shadow: 0 14px 28px -12px rgba(201,169,106,.55);
}
.txc-btn-generate:disabled { opacity: .45; cursor: not-allowed; }
.txc-save-msg { font-size: 12.5px; color: var(--muted); margin-top: 10px; min-height: 1.4em; }

/* ---------- 送出成功畫面 ---------- */
.txc-success-card {
  max-width: 480px; margin: 40px auto 0;
  background: var(--ink-2); color: #fff; border-radius: var(--radius);
  padding: 34px 28px; text-align: center;
}
.txc-success-icon { font-size: 40px; margin-bottom: 10px; }
.txc-success-card h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 8px; color: #fff; }
.txc-success-card p { font-size: 13px; color: rgba(255,255,255,.72); line-height: 1.8; margin: 0 0 22px; }
.txc-success-actions { display: flex; flex-direction: column; gap: 10px; }
.txc-btn-pdf, .txc-btn-advisor {
  font-size: 14.5px; font-weight: 800; border-radius: var(--radius-s); padding: 14px 20px;
  cursor: pointer; text-decoration: none; border: none; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.txc-btn-pdf { color: var(--ink); background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.txc-btn-advisor { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); }
.txc-save-note { max-width: 480px; margin: 14px auto 0; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.7; }

@media (prefers-reduced-motion: reduce) {
  .txc-choice, .txc-btn-next, .txc-btn-primary, .txc-btn-secondary { transition: none !important; }
}

/* ---------- 列印報告標頭：畫面上永遠隱藏，僅 @media print 時顯示 ---------- */
.txc-print-header { display: none; }
.txc-print-only { display: none; }

/* ---------- 列印／另存為 PDF：報告版面 ---------- */
@media print {
  /* 隱藏網站導覽、促案 Hero、頁尾與所有互動操作區塊，只留試算結果本身 */
  .topbar, .site-header, .crumbs, .calc-hero, .txc-shell, .site-footer,
  .no-print, .txc-result-actions, .txc-restart-link, .inapp-browser-banner { display: none !important; }

  html, body { background: #fff !important; }
  .txc-result-wrap { max-width: none; width: 100%; margin: 0; padding: 0; }

  /* 顯示報告標頭與條件摘要（畫面模式下刻意隱藏，列印時才出現） */
  .txc-print-header {
    display: flex; align-items: center; gap: 16px;
    border-bottom: 2px solid #c9a96a; padding-bottom: 14px; margin-bottom: 18px;
  }
  .txc-print-logo { width: 52px; height: auto; flex-shrink: 0; }
  .txc-print-header-text { flex: 1; }
  .txc-print-header-text h1 { font-size: 17px; margin: 0 0 4px; color: #1a1a1a; }
  .txc-print-header-text p { font-size: 11px; margin: 0; color: #555; }
  .txc-print-meta { font-size: 10.5px; color: #555; text-align: right; line-height: 1.7; white-space: nowrap; }
  .txc-print-only { display: block; }

  .txc-headline {
    background: #16120f !important; color: #fff !important;
    padding: 20px 18px; margin-bottom: 14px;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
  }
  .txc-headline h2 { font-size: 15px; }
  .txc-big-num-value { font-size: 18px; }

  .txc-group-card {
    border: 1px solid #ddd; box-shadow: none; padding: 14px 16px; margin-bottom: 10px;
    page-break-inside: avoid;
  }
  .txc-group-title { font-size: 12.5px; }
  .txc-row { padding: 5px 0; font-size: 11.5px; }
  .txc-row-value { font-size: 12.5px; }
  .txc-compare-table { font-size: 11px; }
  .txc-note-box { font-size: 10.5px; padding: 8px 10px; }

  .txc-disclaimer-fixed {
    background: #f4f4f4 !important; color: #333 !important; font-size: 9.5px;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
  }
  .txc-disclaimer-fixed strong { color: #8a6d2a !important; }

  @page { margin: 10mm; }
}
