/* Pages of the High-Resolution Screenshots extension (/highresolution, /privacy, /preview).
   Loaded after tokens.css and site.css: it reuses .topbar, .btn, .card, .prose, .lede and the colors. */

/* ---------- brand ---------- */

/* The extension icon (_mark.html). The SVG has its own tile and colors, so it only needs a size. */
.hr-mark {
  display: block;
  flex: none;
  width: 26px;
  height: 26px;
}

.hr-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hr-chrome-logo {
  width: 16px;
  height: 16px;
  flex: none;
}

/* The top-bar store link. It is the only colored logo in the bar, so it stays quiet. */
.hr-btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
}

.hr-btn-ghost:hover {
  background: var(--raised);
  color: var(--text);
}

.hr-soon {
  cursor: default;
  opacity: 0.7;
}

.btn-primary.hr-soon:hover {
  background: var(--c-accent);
}

.hr-btn-ghost.hr-soon:hover {
  background: transparent;
}

.hr-soon:active {
  transform: none;
}

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  background: var(--panel);
  font-family: var(--font);
  font-size: 0.86em;
  text-align: center;
  white-space: nowrap;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

/* ---------- footer ---------- */

.hr-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.hr-footer p {
  margin: 0;
}

/* ---------- landing: one screen, like the main site (/) ----------
   Header, hero (fills the rest: text left, live comparison right), one row of steps, a small footer.
   Desktop windows do not scroll. Narrow windows stack the hero and may scroll. */

.hr-onepage {
  display: flex;
  flex-direction: column;
}

.hr-landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Asymmetric split, like the main site: the comparison gets a little more than half. */
.hr-hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 56px;
  padding: 32px 0;
}

.hr-hero-text {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.hr-hero-text p {
  margin: 0;
}

.hr-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.hr-hero h1 {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hr-hero .lede {
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 28px;
}

.hr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hr-btn-lg {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

.hr-facts {
  font-size: 13px;
}

/* The same felt-tip stroke as the editor and the welcome page */
.marker {
  padding: 0 0.08em;
  border-radius: 0.12em;
  background: linear-gradient(transparent 48%, var(--c-marker-band) 48%, var(--c-marker-band) 90%, transparent 90%);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Comparison: a card in the place of the product preview on the main site */

.hr-demo {
  min-width: 0;
  margin: 0;
  padding: 20px 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.hr-demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hr-demo h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.hr-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--raised);
}

.hr-seg button {
  min-width: 44px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

.hr-seg button[aria-checked="true"] {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.hr-seg button:focus-visible,
.hr-landing a:focus-visible {
  outline: 2px solid var(--c-accent-strong);
  outline-offset: 2px;
}

.hr-compare {
  display: grid;
  gap: 16px;
}

.hr-shot {
  min-width: 0;
}

/* Both canvases have the same display size, whatever their pixel size is. */
.hr-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 168 / 52;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.hr-shot p {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 8px 0 0;
  font-size: 13px;
}

/* One quiet row of steps at the bottom of the screen, like the main site */

.hr-quick {
  flex: none;
  padding: 16px 0 20px;
  border-top: 1px solid var(--border);
}

.hr-quick-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 14px;
  list-style: none;
}

.hr-quick-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hr-step-n {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.hr-landing-foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  padding: 0 0 16px;
  font-size: 12px;
}

.hr-landing-foot a {
  color: var(--text-faint);
  text-decoration: none;
}

.hr-landing-foot a:hover,
.hr-landing-foot a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.hr-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Short desktop windows (for example 1280 x 720): smaller, so the screen still does not scroll */
@media (max-height: 760px) and (min-width: 961px) {
  .hr-hero h1 {
    font-size: 44px;
  }

  .hr-hero {
    gap: 48px;
    padding: 24px 0;
  }

  .hr-hero-text {
    gap: 20px;
  }

  .hr-demo {
    padding: 16px 20px 20px;
  }

  .hr-compare {
    gap: 12px;
  }
}

/* Narrow windows and tablets: one column. The comparison stays (it is the point of the page) and goes below. */
@media (max-width: 960px) {
  .hr-hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 32px;
  }

  .hr-demo {
    width: 100%;
    max-width: 600px;
  }
}

/* ---------- privacy ---------- */

.hr-table {
  width: 100%;
  margin: 0 0 12px;
  border-collapse: collapse;
  font-size: 14px;
}

.hr-table th,
.hr-table td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.hr-table th {
  font-weight: 500;
}

/* ---------- preview ---------- */

.hr-preview {
  background: var(--stage);
}

.hr-pv-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  /* Three columns: file info | buttons | empty. The equal side columns keep the buttons at the exact center. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.hr-pv-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hr-pv-home {
  display: flex;
}

.hr-pv-meta {
  flex: 1;
  min-width: 0;
}

.hr-pv-meta h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.hr-pv-info {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
}

.hr-pv-actions {
  display: flex;
  gap: 8px;
}

/* The buttons match the editor on the main site: 36 px high, an icon, and a keycap in Copy. */
.hr-pv-actions .btn {
  height: 36px;
}

.hr-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keycap inside a button */
.btn kbd {
  height: 20px;
  min-width: 0;
  border-color: color-mix(in srgb, currentColor 20%, transparent);
  background: transparent;
  color: inherit;
  font-size: 12px;
  line-height: 16px;
  opacity: 0.8;
}

.hr-pv-actions .btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.hr-pv-main {
  padding: 24px 16px 40px;
}

.hr-pv-status {
  max-width: 520px;
  margin: 48px auto;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-md);
}

.hr-pv-status p {
  margin: 0;
}

.hr-pv-status p + p,
.hr-pv-progress {
  margin-top: 12px;
}

.hr-pv-progress {
  overflow: hidden;
  height: 4px;
  border-radius: 2px;
  background: var(--raised);
}

.hr-pv-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--c-accent-strong);
  transition: width var(--t-fast) linear;
}

.hr-pv-stage {
  text-align: center;
}

.hr-pv-stage img {
  border-radius: 4px;
  /* The checkerboard shows transparent parts of a PNG or WebP. */
  background: repeating-conic-gradient(#8883 0% 25%, transparent 0% 50%) 50% / 16px 16px;
  box-shadow: var(--shadow-lg);
}

.hr-pv-stage.fit img {
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
}

.hr-pv-stage.actual {
  overflow: auto;
  text-align: left;
}

.hr-pv-stage.actual img {
  max-width: none;
  cursor: zoom-out;
}

.hr-pv-note {
  margin: 20px 0 0;
  font-size: 12.5px;
  text-align: center;
}

.hr-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-iron);
  color: #ffffff;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
}

.hr-toast[hidden],
.hr-pv-stage[hidden],
.hr-pv-status[hidden] {
  display: none;
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  /* Not enough width for three columns: file info on top, the buttons centered below it. */
  .hr-pv-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .hr-pv-actions {
    justify-content: center;
  }

  .hr-pv-actions .hr-label,
  .hr-pv-actions kbd {
    display: none;
  }

  .topbar .brand-name {
    font-size: 14px;
  }

  .topnav {
    gap: 14px;
  }

  .hr-footer {
    padding: 20px 16px;
  }

  .hr-landing {
    padding: 0 16px;
  }

  .hr-hero h1 {
    font-size: 34px;
  }

  .hr-hero {
    gap: 24px;
    padding: 24px 0;
  }

  .hr-hero-text {
    gap: 16px;
  }

  .hr-hero .lede {
    font-size: 16px;
    line-height: 24px;
  }

  /* Phones: the first sentences say enough */
  .hr-lede-more {
    display: none;
  }

  .hr-quick-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hr-landing-foot {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .topbar .brand-name b {
    display: none;
  }
}

/* site.css turns on tabular figures ("tnum"). In Inter that also makes the hyphen wide ("High - Resolution"). */
body.hr {
  font-feature-settings: "cv11", "ss01";
}
