body.ytrx-body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.yq-page {
  grid-template-columns: 230px minmax(0, 1fr);
}

.yq-logo {
  width: 128px;
  height: auto;
  display: block;
}

.yq-system-card {
  align-self: stretch;
}

.yq-system-card > p {
  margin: 0 0 10px;
}

.yq-system-meta {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.yq-system-meta .meta-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(41, 104, 138, .14);
  font-size: 12px;
  line-height: 1.5;
}

.yq-system-meta .meta-row:last-child {
  border-bottom: 0;
}

.yq-system-meta .meta-row span:first-child {
  color: var(--ytrx-muted);
  font-weight: 900;
}

.yq-system-meta .meta-row span:last-child {
  min-width: 0;
  color: #17344e;
  font-weight: 800;
  word-break: normal;
  overflow-wrap: break-word;
}

.quote-document .summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 42px;
}

.quote-document .metric,
.quote-document .callout,
.quote-document .total-card,
.quote-document .scope-card,
.quote-document .remittance-card,
.quote-document .sign-box {
  border: 1px solid rgba(41, 104, 138, .14);
  border-radius: var(--ytrx-radius);
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 18px 46px rgba(47, 116, 154, .1), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.quote-document .metric {
  min-width: 0;
  padding: 18px;
  border-left: 4px solid #198fd1;
}

.quote-document .metric span {
  display: block;
  color: var(--ytrx-muted);
  font-size: 14px;
  font-weight: 900;
}

.quote-document .metric strong {
  display: block;
  margin-top: 4px;
  color: #17344e;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quote-document section {
  padding: 44px 0 0;
  border-top: 1px solid rgba(41, 104, 138, .14);
}

.quote-document [id] {
  scroll-margin-top: calc(var(--ytrx-sticky-offset) + 92px);
}

.quote-document section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.quote-document .section-head {
  display: block;
  margin-bottom: 22px;
}

.quote-document .section-head h2 {
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(41, 104, 138, .14);
  color: #17344e;
  font-family: "Iowan Old Style", "Songti TC", "Noto Serif TC", serif;
  font-size: 34px;
  line-height: 1.22;
}

.quote-document section:first-of-type .section-head h2 {
  padding-top: 0;
  border-top: 0;
}

.quote-document .section-head h2::before {
  content: "";
  position: static;
  display: block;
  width: 58px;
  height: 3px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #198fd1, #27bdc7);
}

.quote-document section:first-of-type .section-head h2::before {
  margin-top: 0;
}

.quote-document .section-head p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #415870;
  font-size: 18px;
  line-height: 1.9;
}

.quote-document .quote-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(41, 104, 138, .16);
  border-radius: var(--ytrx-radius);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 18px 46px rgba(47, 116, 154, .1), inset 0 1px 0 rgba(255, 255, 255, .82);
  font-size: 15px;
}

.quote-document .quote-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.quote-document .quote-table .col-item { width: 24%; }
.quote-document .quote-table .col-content { width: 46%; }
.quote-document .quote-table .col-billing { width: 13%; }
.quote-document .quote-table .col-amount { width: 17%; }
.quote-document .monthly-table .col-content { width: 43%; }
.quote-document .monthly-table .col-billing { width: 16%; }

.quote-document .quote-table th,
.quote-document .quote-table td {
  padding: 14px 15px;
  border-bottom: 1px solid rgba(41, 104, 138, .16);
  vertical-align: top;
  text-align: left;
}

.quote-document .quote-table th {
  background: linear-gradient(135deg, #10223c, #0b3d69);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
}

.quote-document .quote-table tr:last-child td {
  border-bottom: 0;
}

.quote-document .quote-table .category-row td {
  padding: 11px 15px;
  background: linear-gradient(135deg, rgba(33, 105, 223, .13), rgba(15, 141, 155, .12));
  color: #17344e;
  font-size: 13px;
  font-weight: 900;
}

.quote-document .money {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.quote-document .note {
  display: block;
  margin-top: 5px;
  color: var(--ytrx-muted);
  font-size: 13px;
  line-height: 1.55;
}

.quote-document .total-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.quote-document .callout,
.quote-document .total-card,
.quote-document .scope-card,
.quote-document .remittance-card {
  padding: 18px;
}

.quote-document .callout strong,
.quote-document .scope-card h3,
.quote-document .remittance-card h3 {
  color: #17344e;
}

.quote-document .key-note,
.quote-document .danger-note {
  color: #a33f2d;
  font-weight: 900;
}

.quote-document .attention-callout {
  border-color: rgba(163, 63, 45, .2);
  background: linear-gradient(135deg, rgba(163, 63, 45, .055), rgba(255, 255, 255, .7));
}

.quote-document .total-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(41, 104, 138, .14);
}

.quote-document .total-line:last-child {
  border-bottom: 0;
}

.quote-document .grand {
  color: #198fd1;
  font-size: 25px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quote-document .terms,
.quote-document .signature {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quote-document .scope-card ul {
  margin: 0;
  padding-left: 1.15em;
}

.quote-document .remittance-card {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.quote-document .remittance-grid {
  display: grid;
  gap: 8px;
}

.quote-document .remittance-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(41, 104, 138, .12);
  border-radius: 8px;
  background: rgba(232, 249, 255, .72);
}

.quote-document .remittance-item span {
  color: var(--ytrx-muted);
  font-size: 13px;
}

.quote-document .remittance-item strong {
  min-width: 0;
  color: #17344e;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.quote-document .signature {
  margin-top: 28px;
}

.quote-document .sign-box {
  min-height: 112px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.quote-document .sign-line {
  border-top: 1px solid #17344e;
  padding-top: 8px;
  color: var(--ytrx-muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .yq-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body.ytrx-body {
    padding-bottom: 0;
  }

  .quote-document {
    padding: 24px 20px;
  }

  .quote-document .summary-strip,
  .quote-document .terms,
  .quote-document .remittance-card,
  .quote-document .signature {
    grid-template-columns: 1fr;
  }

  .quote-document .section-head h2 {
    font-size: 27px;
    line-height: 1.28;
  }

  .quote-document .section-head h2::before {
    width: 42px;
    height: 3px;
    margin: 0 0 10px;
  }

  .quote-document .section-head p {
    font-size: 16.5px;
  }

  .quote-document .quote-table {
    border: 0;
    background: transparent;
    box-shadow: none;
    display: grid;
    gap: 10px;
  }

  .quote-document .quote-table table,
  .quote-document .quote-table colgroup,
  .quote-document .quote-table thead,
  .quote-document .quote-table tbody,
  .quote-document .quote-table tr,
  .quote-document .quote-table td {
    display: block;
    width: 100%;
  }

  .quote-document .quote-table thead,
  .quote-document .quote-table colgroup {
    display: none;
  }

  .quote-document .quote-table tbody {
    display: grid;
    gap: 10px;
  }

  .quote-document .quote-table tr {
    overflow: hidden;
    border: 1px solid rgba(41, 104, 138, .16);
    border-radius: var(--ytrx-radius);
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 14px 30px rgba(47, 116, 154, .08), inset 0 1px 0 rgba(255, 255, 255, .86);
  }

  .quote-document .quote-table tr.category-row {
    background: linear-gradient(135deg, rgba(33, 105, 223, .13), rgba(15, 141, 155, .12));
    box-shadow: none;
  }

  .quote-document .quote-table td {
    display: block;
    min-width: 0;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(41, 104, 138, .11);
    line-height: 1.72;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .quote-document .quote-table tr td:last-child {
    border-bottom: 0;
  }

  .quote-document .quote-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--ytrx-muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.45;
  }

  .quote-document .quote-table td:nth-child(1)::before { content: "項目"; }
  .quote-document .quote-table td:nth-child(2)::before { content: "內容"; }
  .quote-document .quote-table td:nth-child(3)::before { content: "計費"; }
  .quote-document .quote-table td:nth-child(4)::before { content: "未稅金額"; }
  .quote-document .quote-table .category-row td::before { display: none; content: ""; }

  .quote-document .money {
    text-align: left;
    white-space: normal;
  }

  .quote-document .total-line {
    flex-direction: column;
    gap: 2px;
  }

  .quote-document .total-line .money,
  .quote-document .grand,
  .quote-document .metric strong {
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .quote-document .grand {
    font-size: 22px;
  }

  .quote-document .remittance-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }
}
