/* Fast.com–style layout: light surface, red headline speed, minimal chrome */

:root {
  --fast-red: #db0510;
  --fast-text: #221f1f;
  --fast-muted: #6e6e6e;
  --fast-link: #db0510;
  --fast-bg: #ffffff;
  --fast-header-muted: #8a8a8a;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  background: var(--fast-bg);
  color: var(--fast-text);
  display: flex;
  flex-direction: column;
}

.fast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem 0;
  font-size: 0.8125rem;
}

.fast-header-link {
  color: var(--fast-header-muted);
  text-decoration: none;
}

.fast-header-link:hover,
.fast-header-link:focus-visible {
  color: var(--fast-text);
  text-decoration: underline;
  outline: none;
}

.fast-lang-wrap {
  position: relative;
}

.fast-lang-btn {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--fast-header-muted);
  cursor: pointer;
  text-decoration: none;
}

.fast-lang-btn:hover,
.fast-lang-btn:focus-visible {
  color: var(--fast-text);
  text-decoration: underline;
  outline: none;
}

.fast-lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  min-width: 11rem;
  max-height: min(70vh, 20rem);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.fast-lang-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 1rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  color: var(--fast-text);
  cursor: pointer;
}

.fast-lang-item:hover,
.fast-lang-item:focus-visible {
  background: #f5f5f5;
  outline: none;
}

.fast-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
}

.fast-label {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 4.5vw, 2.125rem);
  font-weight: 400;
  color: var(--fast-muted);
  letter-spacing: -0.02em;
}

.fast-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin: 0.25rem 0 0.75rem;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  transition: opacity 0.2s ease;
}

.fast-hero:hover:not(.is-busy) {
  opacity: 0.92;
}

.fast-hero:focus-visible {
  outline: 2px solid var(--fast-red);
  outline-offset: 4px;
}

.fast-hero.is-busy {
  cursor: wait;
}

.fast-digits {
  font-size: clamp(3.5rem, 14vw, 8.5rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--fast-red);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.fast-unit {
  font-size: clamp(1.25rem, 4vw, 2.5rem);
  font-weight: 300;
  color: var(--fast-red);
  align-self: flex-end;
  margin-bottom: 0.35em;
}

.fast-footnote {
  margin: 0.5rem 0 0;
  max-width: 22rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--fast-muted);
}

.fast-toggle {
  margin-top: 1.75rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--fast-link);
  text-decoration: underline;
  cursor: pointer;
}

.fast-toggle:hover,
.fast-toggle:focus-visible {
  color: #a0040c;
  outline: none;
}

.fast-extra {
  margin-top: 2rem;
  width: 100%;
  max-width: 22rem;
  text-align: left;
}

.fast-block {
  margin-bottom: 1.5rem;
}

.fast-block-title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fast-text);
}

.fast-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e8e8e8;
  font-size: 0.9375rem;
}

.fast-metric-name {
  color: var(--fast-muted);
}

.fast-metric-val {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fast-text);
}

.fast-ms {
  font-weight: 400;
  color: var(--fast-muted);
}

.fast-upload-section .fast-block-title {
  margin-top: 0.25rem;
}

.fast-table {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e8;
  font-size: 0.875rem;
}

.fast-table-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
}

.fast-table-k {
  color: var(--fast-muted);
  flex-shrink: 0;
}

.fast-table-v {
  text-align: right;
  word-break: break-all;
  color: var(--fast-text);
}

.fast-privacy-btn {
  cursor: pointer;
  font: inherit;
}

body.fast-modal-open {
  overflow: hidden;
}

.fast-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.fast-modal[hidden] {
  display: none;
}

.fast-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.fast-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  max-height: min(85vh, 32rem);
  overflow-y: auto;
  padding: 1.5rem 1.5rem 1.35rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.fast-modal-title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--fast-text);
  line-height: 1.3;
}

.fast-modal-p {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #444;
}

.fast-modal-p:last-of-type {
  margin-bottom: 0;
}

.fast-modal-action {
  margin-top: 1.35rem;
  padding: 0.55rem 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--fast-red);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.fast-modal-action:hover,
.fast-modal-action:focus-visible {
  filter: brightness(0.92);
  outline: none;
}

@media (min-width: 600px) {
  .fast-header {
    padding: 1.5rem 2rem 0;
  }

  .fast-main {
    padding-top: 1rem;
  }
}
