:root {
      --paper: #f4efe5;
      --paper-deep: #e9e0cf;
      --ink: #172033;
      --muted: #60708a;
      --line: #d7d1c4;
      --blue: #1f57ff;
      --blue-dark: #1743c7;
      --card: rgba(255, 255, 255, 0.72);
      --card-solid: #fffdf8;
      --shadow: 0 18px 45px rgba(49, 45, 35, 0.08);
      --radius: 1.2rem;
      color-scheme: light;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      color: var(--ink);
      background:
        radial-gradient(circle at 88% 5%, rgba(31, 87, 255, 0.08), transparent 24rem),
        linear-gradient(180deg, #f8f4ec 0%, var(--paper) 42%, #f6f1e8 100%);
      line-height: 1.65;
    }

    button, input, select { font: inherit; }
    a { color: inherit; }

    .site-header {
      max-width: 1180px;
      margin: 0 auto;
      padding: 1.2rem 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      border-bottom: 1px solid rgba(215, 209, 196, 0.78);
    }

    .site-brand {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
    }

    .site-mark {
      width: 2.7rem;
      height: 2.7rem;
      display: grid;
      place-items: center;
      border-radius: 0.8rem;
      color: white;
      background: var(--ink);
      font-weight: 900;
      font-size: 1.25rem;
      box-shadow: var(--shadow);
    }

    .site-brand strong, .site-brand small { display: block; }
    .site-brand small { margin-top: -0.15rem; color: var(--muted); }

    .site-nav {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 0.35rem;
    }

    .site-nav a {
      padding: 0.45rem 0.7rem;
      border-radius: 999px;
      color: var(--muted);
      text-decoration: none;
      font-size: 0.92rem;
    }

    .site-nav a[aria-current="page"] {
      color: #fff;
      background: var(--ink);
    }

    .breadcrumb {
      max-width: 1050px;
      margin: 0 auto;
      padding: 1rem 1rem 0;
      color: var(--muted);
      font-size: 0.9rem;
    }

    .breadcrumb a { text-decoration: none; }
    .breadcrumb span { padding: 0 0.45rem; opacity: 0.55; }

    main {
      max-width: 1050px;
      margin: auto;
      padding: 1rem;
    }

    .tool-hero {
      min-height: 320px;
      display: grid;
      align-items: center;
      padding: 3.5rem 0 2.4rem;
    }

    .eyebrow, .section-kicker {
      margin: 0 0 1rem;
      color: var(--blue);
      font-size: 0.88rem;
      font-weight: 850;
      letter-spacing: 0.14em;
      text-transform: uppercase;
    }

    h1, h2, h3, p { overflow-wrap: anywhere; }

    h1 {
      max-width: 880px;
      margin: 0;
      font-size: clamp(2.65rem, 7vw, 5.7rem);
      line-height: 0.99;
      letter-spacing: -0.065em;
    }

    h1 em {
      color: var(--blue);
      font-style: normal;
      font-weight: 500;
    }

    .hero-note {
      max-width: 700px;
      margin: 1.6rem 0 0;
      color: var(--muted);
      font-size: 1.05rem;
    }

    .workspace {
      padding: 1.5rem;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(255, 253, 248, 0.56);
      box-shadow: var(--shadow);
      backdrop-filter: blur(16px);
    }

    .mode-tabs {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.6rem;
      margin-bottom: 1.25rem;
      padding: 0.35rem;
      border-radius: 1rem;
      background: rgba(23, 32, 51, 0.07);
    }

    .mode-tab {
      border: 0;
      border-radius: 0.78rem;
      padding: 0.78rem 1rem;
      color: var(--muted);
      background: transparent;
      cursor: pointer;
      font-weight: 780;
    }

    .mode-tab[aria-selected="true"] {
      color: white;
      background: var(--ink);
      box-shadow: 0 8px 20px rgba(23, 32, 51, 0.16);
    }

    .panel[hidden] { display: none; }

    .form-grid, .results {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1rem;
    }

    .form-grid label {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      color: #33415a;
      font-size: 0.93rem;
      font-weight: 720;
    }

    .form-grid input, .form-grid select {
      width: 100%;
      min-height: 3.1rem;
      padding: 0.75rem 0.85rem;
      border: 1px solid #c8c1b3;
      border-radius: 0.8rem;
      color: var(--ink);
      background: rgba(255, 255, 255, 0.82);
      outline: none;
      transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
    }

    .form-grid input:focus, .form-grid select:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 4px rgba(31, 87, 255, 0.12);
    }

    .input-hint {
      min-height: 1.2rem;
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 500;
    }

    .results { margin-top: 1.2rem; }

    .results article {
      min-height: 130px;
      padding: 1.2rem;
      border: 1px solid rgba(215, 209, 196, 0.78);
      border-radius: 1rem;
      background: var(--card);
    }

    .results article:last-child {
      color: white;
      border-color: var(--ink);
      background: var(--ink);
    }

    .results small {
      display: block;
      color: inherit;
      opacity: 0.72;
      font-weight: 750;
    }

    .results strong {
      display: block;
      margin-top: 0.5rem;
      font-size: clamp(1.45rem, 3.4vw, 2.05rem);
      line-height: 1.2;
      font-variant-numeric: tabular-nums;
    }

    .result-sub {
      display: block;
      margin-top: 0.4rem;
      font-size: 0.78rem;
      opacity: 0.66;
    }

    .notice {
      margin: 1rem 0 0;
      padding: 0.9rem 1rem;
      border-left: 4px solid var(--blue);
      color: var(--muted);
      background: rgba(31, 87, 255, 0.055);
      font-size: 0.9rem;
    }

    .formula-line {
      margin: 1rem 0 0;
      color: var(--muted);
      font-size: 0.84rem;
    }

    .schedule-wrap {
      margin-top: 1.3rem;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 1rem;
      background: var(--card-solid);
    }

    .schedule-head {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 1rem;
      padding: 1rem 1rem 0.65rem;
    }

    .schedule-head h3 { margin: 0; font-size: 1rem; }
    .schedule-head small { color: var(--muted); }

    .table-scroll { overflow-x: auto; }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
      font-variant-numeric: tabular-nums;
    }

    th, td {
      padding: 0.72rem 0.85rem;
      border-top: 1px solid #e7e1d6;
      text-align: right;
      white-space: nowrap;
    }

    th:first-child, td:first-child { text-align: left; }
    th { color: var(--muted); background: #faf7f0; }

    .content-section { padding: 4.2rem 0 0; }

    .content-section > h2, .eeat-block h2 {
      margin: 0;
      font-size: clamp(2rem, 4vw, 3.1rem);
      line-height: 1.15;
      letter-spacing: -0.035em;
    }

    .guide-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1rem;
      margin-top: 1.5rem;
    }

    .guide-card {
      padding: 1.25rem;
      border-top: 1px solid var(--line);
    }

    .guide-card strong {
      display: inline-grid;
      width: 2rem;
      height: 2rem;
      place-items: center;
      margin-bottom: 1rem;
      border-radius: 50%;
      color: white;
      background: var(--blue);
    }

    .guide-card h3 { margin: 0 0 0.55rem; }
    .guide-card p { margin: 0; color: var(--muted); }

    .faq-list {
      margin-top: 1.4rem;
      border-top: 1px solid var(--line);
    }

    details { border-bottom: 1px solid var(--line); }

    summary {
      padding: 1.15rem 0;
      cursor: pointer;
      font-weight: 780;
      list-style: none;
    }

    summary::-webkit-details-marker { display: none; }
    summary::after { content: "+"; float: right; color: var(--blue); font-size: 1.25rem; }
    details[open] summary::after { content: "−"; }
    details p { max-width: 820px; margin: 0 0 1.25rem; color: var(--muted); }

    .eeat-block {
      padding: 2.2rem 0;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
    }

    .eeat-lead {
      max-width: 780px;
      margin: 1.5rem 0 0;
      color: var(--muted);
      font-size: 1.02rem;
      line-height: 1.9;
    }

    .eeat-list { margin: 1.6rem 0 0; padding-left: 1.3rem; }
    .eeat-list li + li { margin-top: 0.75rem; }

    .site-footer {
      max-width: 1050px;
      margin: 5rem auto 0;
      padding: 2.2rem 1rem 2.8rem;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 1.5rem;
      border-top: 1px solid var(--line);
      color: var(--muted);
    }

    .footer-brand { color: var(--ink); font-weight: 850; text-decoration: none; }
    .site-footer p { margin: 0.35rem 0 0; }
    .site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
    .site-footer small { grid-column: 1 / -1; }

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



    .deposit-intro {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1rem;
    }

    .deposit-intro h3 { margin: 0; font-size: 1.15rem; }
    .deposit-intro p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }

    .action-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.65rem;
      margin-top: 1rem;
    }

    .primary-button, .secondary-button, .icon-button, .official-link {
      border: 0;
      border-radius: 0.78rem;
      cursor: pointer;
      font-weight: 800;
      text-decoration: none;
      transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
    }

    .primary-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      min-height: 2.9rem;
      padding: 0.7rem 1rem;
      color: #fff;
      background: var(--blue);
      box-shadow: 0 10px 22px rgba(31, 87, 255, 0.2);
    }

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

    .secondary-button {
      min-height: 2.9rem;
      padding: 0.7rem 1rem;
      color: var(--ink);
      background: rgba(23, 32, 51, 0.07);
    }

    .comparison-list {
      display: grid;
      gap: 0.85rem;
      margin-top: 1rem;
    }

    .bank-plan {
      display: grid;
      grid-template-columns: minmax(165px, 1.15fr) minmax(120px, 0.75fr) minmax(150px, 0.95fr) auto;
      gap: 0.75rem;
      align-items: end;
      padding: 1rem;
      border: 1px solid var(--line);
      border-radius: 1rem;
      background: rgba(255, 255, 255, 0.62);
    }

    .bank-plan label {
      display: flex;
      flex-direction: column;
      gap: 0.38rem;
      color: #33415a;
      font-size: 0.86rem;
      font-weight: 720;
    }

    .bank-plan input, .bank-plan select {
      width: 100%;
      min-height: 2.8rem;
      padding: 0.65rem 0.75rem;
      border: 1px solid #c8c1b3;
      border-radius: 0.72rem;
      color: var(--ink);
      background: rgba(255, 255, 255, 0.9);
      outline: none;
    }

    .bank-plan input:focus, .bank-plan select:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 4px rgba(31, 87, 255, 0.12);
    }

    .plan-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.4rem;
      min-height: 2.8rem;
    }

    .official-link {
      display: inline-grid;
      place-items: center;
      min-height: 2.55rem;
      padding: 0.55rem 0.7rem;
      color: var(--blue-dark);
      background: rgba(31, 87, 255, 0.09);
      font-size: 0.82rem;
      white-space: nowrap;
    }

    .official-link[aria-disabled="true"] {
      opacity: 0.42;
      pointer-events: none;
    }

    .icon-button {
      width: 2.55rem;
      height: 2.55rem;
      color: #8c2f2f;
      background: rgba(170, 49, 49, 0.09);
      font-size: 1.1rem;
    }

    .comparison-results {
      margin-top: 1.35rem;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 1rem;
      background: var(--card-solid);
    }

    .comparison-results .schedule-head { padding-bottom: 0.85rem; }
    .comparison-results th:first-child, .comparison-results td:first-child { text-align: center; }
    .comparison-results th:nth-child(2), .comparison-results td:nth-child(2) { text-align: left; }
    .comparison-results tbody tr:first-child { background: rgba(31, 87, 255, 0.055); }
    .comparison-results tbody tr:first-child td:nth-child(2) { color: var(--blue-dark); font-weight: 850; }
    .rank-badge { display: inline-grid; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; background: rgba(23, 32, 51, 0.08); font-weight: 850; }
    .rank-badge.best { color: #fff; background: var(--blue); }
    .difference { color: var(--muted); font-size: 0.78rem; }

    .empty-state {
      padding: 1.4rem;
      color: var(--muted);
      text-align: center;
    }

    .bank-links-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.9rem;
      margin-top: 1.4rem;
    }

    .bank-link-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.8rem;
      padding: 1rem;
      border: 1px solid var(--line);
      border-radius: 0.95rem;
      background: rgba(255, 255, 255, 0.58);
      text-decoration: none;
    }

    .bank-link-card:hover { border-color: rgba(31, 87, 255, 0.45); }
    .bank-link-card strong { display: block; }
    .bank-link-card small { display: block; margin-top: 0.15rem; color: var(--muted); }
    .bank-link-card span:last-child { color: var(--blue); font-size: 1.2rem; }

    .notes-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 1rem;
      margin-top: 1.4rem;
    }

    .note-card {
      padding: 1.1rem;
      border-top: 1px solid var(--line);
    }

    .note-card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
    .note-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

    @media (max-width: 760px) {
      .site-header { align-items: flex-start; }
      .site-nav { display: none; }
      .tool-hero { min-height: auto; padding: 3rem 0 2rem; }
      h1 { font-size: clamp(2.7rem, 15vw, 4.6rem); }
      .form-grid, .results, .guide-grid, .bank-links-grid, .notes-grid { grid-template-columns: 1fr; }
      .deposit-intro { display: block; }
      .bank-plan { grid-template-columns: 1fr; }
      .plan-actions { justify-content: flex-start; }
      .workspace { padding: 1rem; }
      .results article { min-height: auto; }
      .content-section { padding-top: 3.2rem; }
      .site-footer { grid-template-columns: 1fr; }
      .site-footer small { grid-column: 1; }
    }

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

/* Tool-center integration */
.tool-related{width:min(1180px,calc(100% - 2rem));margin:clamp(2.5rem,6vw,5rem) auto 0}
.tool-related h2{margin-block-end:1rem}
.section-title{margin:0 0 1rem;font-size:clamp(1.2rem,2vw,1.5rem);line-height:1.25}
.site-footer p{margin:.35rem 0}
@media(max-width:600px){.tool-related{width:min(100% - 1.5rem,1180px)}}
