.vhost-page {
  --vhost-cyan: #63b9ff;
  --vhost-green: #48d5a7;
  --vhost-red: #ff756b;
}

.vhost-hero {
  min-height: 640px;
}

.vhost-hero .core-hero-media {
  object-position: 58% 52%;
}

.vhost-hero::after {
  background: linear-gradient(90deg, rgba(5, 11, 23, 0.98) 0%, rgba(5, 11, 23, 0.9) 45%, rgba(5, 11, 23, 0.32) 78%, rgba(5, 11, 23, 0.42) 100%);
}

.vhost-hero .core-shell {
  max-width: 1280px;
}

.vhost-hero h1 {
  max-width: 760px;
}

.vhost-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 44px;
  margin-bottom: 34px;
}

.vhost-section-head .core-heading {
  margin-bottom: 0;
}

.billing-switch {
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 14, 27, 0.84);
}

.billing-switch legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.billing-switch label {
  cursor: pointer;
}

.billing-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.billing-switch span {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  border-radius: 5px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease;
}

.billing-switch small {
  color: var(--vhost-green);
  font-size: 11px;
}

.billing-switch input:checked + span {
  color: #07111f;
  background: var(--vhost-cyan);
}

.billing-switch input:checked + span small {
  color: #0b553f;
}

.billing-switch input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 590px;
  padding: 30px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(13, 21, 39, 0.82);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.plan-card.is-featured {
  border-color: rgba(99, 185, 255, 0.62);
  background: linear-gradient(180deg, rgba(24, 48, 78, 0.94), rgba(13, 21, 39, 0.88) 45%);
  box-shadow: 0 22px 70px rgba(28, 120, 190, 0.18);
}

.plan-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  margin: 0;
  color: var(--vhost-green);
  font-size: 12px;
  font-weight: 800;
}

.plan-code {
  margin: 0 0 12px;
  color: var(--vhost-cyan);
  font-family: "Orbitron", "Noto Sans TC", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 0;
  font-size: 28px;
}

.plan-audience {
  min-height: 54px;
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 20px 0 10px;
  border-top: 1px solid var(--border);
}

.plan-price span,
.plan-price small {
  color: var(--muted-strong);
  font-weight: 700;
}

.plan-price strong {
  color: var(--foreground);
  font-size: 42px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.plan-saving {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--vhost-green);
  font-size: 12px;
  font-weight: 700;
}

.plan-specs {
  margin: 0 0 24px;
}

.plan-specs div {
  display: flex;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(126, 163, 217, 0.12);
}

.plan-specs dt {
  color: var(--muted);
  font-size: 13px;
}

.plan-specs dd {
  margin: 0;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.plan-select,
.checkout-submit {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  border: 1px solid var(--vhost-cyan);
  border-radius: 6px;
  color: #07111f;
  background: var(--vhost-cyan);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.plan-card:not(.is-featured) .plan-select {
  color: var(--foreground);
  background: transparent;
}

.plan-select:hover,
.checkout-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #82c8ff;
  color: #07111f;
}

.plan-select:focus-visible,
.checkout-submit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.pricing-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.plan-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(9, 15, 29, 0.58);
}

.plan-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.plan-table th,
.plan-table td {
  min-width: 168px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(126, 163, 217, 0.14);
  text-align: left;
}

.plan-table thead th {
  color: var(--foreground);
  background: rgba(99, 185, 255, 0.08);
  font-size: 15px;
}

.plan-table tbody th {
  color: var(--muted);
  font-weight: 600;
}

.plan-table tbody td {
  color: var(--muted-strong);
  font-weight: 700;
}

.plan-table tr:last-child th,
.plan-table tr:last-child td {
  border-bottom: 0;
}

.vhost-included img {
  object-position: 58% center;
}

.included-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
  gap: 0 26px;
}

.included-list div {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.included-list strong,
.included-list span {
  display: block;
}

.included-list strong {
  margin-bottom: 5px;
  color: var(--foreground);
  font-size: 15px;
}

.included-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.service-boundaries {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 70px;
}

.service-boundaries .core-heading {
  margin: 0;
}

.boundary-columns section {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.boundary-columns section:last-child {
  border-bottom: 1px solid var(--border);
}

.boundary-columns h3 {
  color: var(--vhost-cyan);
  font-size: 17px;
}

.boundary-columns ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  padding-left: 18px;
}

.boundary-columns li {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
}

.vhost-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.vhost-process li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 26px 24px;
  border-right: 1px solid var(--border);
}

.vhost-process li:last-child {
  border-right: 0;
}

.vhost-process > li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #07111f;
  background: var(--vhost-cyan);
  font-weight: 800;
}

.vhost-process strong,
.vhost-process small {
  display: block;
}

.vhost-process strong {
  margin-bottom: 6px;
  color: var(--foreground);
}

.vhost-process small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.vhost-terms details {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.vhost-terms summary {
  padding: 20px 0;
  color: var(--foreground);
  font-weight: 800;
  cursor: pointer;
}

.vhost-terms details > div {
  max-width: 900px;
  padding-bottom: 18px;
  color: var(--muted-strong);
}

.checkout-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(880px, calc(100dvh - 32px));
  padding: 0;
  border: 1px solid rgba(126, 163, 217, 0.32);
  border-radius: 8px;
  color: var(--foreground);
  background: #0c1426;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.62);
  overflow: auto;
}

.checkout-dialog::backdrop {
  background: rgba(3, 7, 15, 0.78);
  backdrop-filter: blur(6px);
}

.checkout-dialog form {
  padding: 28px;
}

.checkout-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.checkout-head h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.checkout-summary {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  margin-bottom: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.checkout-summary div {
  padding: 16px 14px;
  border-right: 1px solid var(--border);
}

.checkout-summary div:last-child {
  border-right: 0;
}

.checkout-summary span,
.checkout-summary strong {
  display: block;
}

.checkout-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.checkout-summary strong {
  color: var(--foreground);
  font-size: 15px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkout-grid label > span,
.provider-options legend {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.checkout-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.checkout-span {
  grid-column: 1 / -1;
}

.checkout-grid input,
.checkout-grid select,
.checkout-grid textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--foreground);
  background: #091121;
  font: inherit;
  font-size: 15px;
}

.checkout-grid textarea {
  min-height: 82px;
  resize: vertical;
}

.checkout-grid input:focus,
.checkout-grid select:focus,
.checkout-grid textarea:focus {
  outline: 2px solid rgba(99, 185, 255, 0.42);
  border-color: var(--vhost-cyan);
}

.domain-field[hidden] {
  display: none;
}

.provider-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.provider-options legend {
  grid-column: 1 / -1;
  width: 100%;
}

.provider-options label {
  display: grid;
  grid-template-columns: auto 12px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 9px;
  min-height: 64px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #091121;
  cursor: pointer;
}

.provider-options label.is-unavailable {
  opacity: 0.52;
  cursor: not-allowed;
}

.provider-options label:has(input:checked) {
  border-color: var(--vhost-cyan);
  background: rgba(99, 185, 255, 0.08);
}

.provider-options input {
  grid-row: 1 / 3;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--vhost-cyan);
}

.provider-dot {
  grid-row: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.provider-dot.ecpay {
  background: #29b76f;
}

.provider-dot.newebpay {
  background: #3888e8;
}

.provider-options strong {
  grid-row: 1;
  font-size: 14px;
}

.provider-options small {
  grid-column: 2 / 4;
  grid-row: 2;
  color: var(--muted);
  font-size: 11px;
}

.payment-mode-note,
.checkout-status {
  margin: 12px 0 0;
  color: var(--vhost-red);
  font-size: 13px;
  line-height: 1.6;
}

.payment-mode-note.is-test {
  color: #ffd36a;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.terms-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
  accent-color: var(--vhost-cyan);
}

.terms-check a {
  color: var(--vhost-cyan);
}

.checkout-submit {
  margin-top: 18px;
}

.checkout-submit:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.checkout-security {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

body.dialog-open {
  overflow: hidden;
}

@media (max-width: 1020px) {
  .plan-grid {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
  }

  .plan-card {
    min-height: 0;
  }

  .plan-audience {
    min-height: 0;
  }

  .service-boundaries {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .vhost-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vhost-process li:nth-child(2) {
    border-right: 0;
  }

  .vhost-process li:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 760px) {
  .vhost-hero {
    min-height: 620px;
  }

  .vhost-hero .core-hero-media {
    object-position: 64% center;
  }

  .vhost-hero::after {
    background: linear-gradient(180deg, rgba(5, 11, 23, 0.76), rgba(5, 11, 23, 0.96) 62%, #050b17 100%);
  }

  .vhost-section-head {
    display: block;
    margin-bottom: 24px;
  }

  .billing-switch {
    width: 100%;
    margin-top: 18px;
  }

  .billing-switch span {
    width: 100%;
    padding: 0 10px;
  }

  .plan-card {
    padding: 24px 20px;
  }

  .plan-badge {
    position: static;
    margin-bottom: 12px;
  }

  .plan-card h3 {
    font-size: 25px;
  }

  .plan-price strong {
    font-size: 38px;
  }

  .included-list {
    grid-template-columns: 1fr;
  }

  .boundary-columns ul {
    grid-template-columns: 1fr;
  }

  .vhost-process {
    grid-template-columns: 1fr;
  }

  .vhost-process li,
  .vhost-process li:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .vhost-process li:last-child {
    border-bottom: 0;
  }

  .checkout-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }

  .checkout-dialog form {
    padding: 22px 16px;
  }

  .checkout-head h2 {
    font-size: 22px;
  }

  .checkout-summary {
    grid-template-columns: 1fr 1fr;
  }

  .checkout-summary div:first-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .checkout-summary div:nth-child(2) {
    border-right: 1px solid var(--border);
  }

  .checkout-grid,
  .provider-options {
    grid-template-columns: 1fr;
  }

  .checkout-span,
  .provider-options legend {
    grid-column: auto;
  }
}
