/* ---------- The stage ---------- */

.ss-fit {
  position: relative;
  height: 460px;
  container-type: inline-size;
}

.ss-stage {
  /* One gutter: the window's inset from the stage's top and sides */
  --g: clamp(24px, 5.5cqi, 32px);
  /* The toolbar's geometry, shared with the popup's anchor */
  --bar-h: 40px;
  --tool: 26px;
  --tool-gap: 4px;
  --bar-pad-r: 8px;
  --pop-w: 300px;
  --pop-anchor: calc(var(--g) + var(--bar-pad-r) + 2 * (var(--tool) + var(--tool-gap)));

  /* Browser chrome, light */
  --bw-chrome: #ffffff;
  --bw-page: #ffffff;
  --bw-omni: #eef1f5;
  --bw-line: rgb(0 0 0 / 7%);
  --bw-ink: rgb(0 0 0 / 7%);
  --bw-ink-strong: rgb(0 0 0 / 11%);
  --bw-icon: #5f6368;
  --bw-url: #202124;
  --bw-url-faint: #6b7076;
  --bw-hover: rgb(0 0 0 / 6%);
  --shadow-hero: 0 0 0 1px rgb(0 0 0 / 6%), 0 30px 60px -12px rgb(50 50 93 / 22%), 0 18px 36px -18px rgb(0 0 0 / 26%);
  --shadow-float: 0 0 0 1px rgb(0 0 0 / 8%), 0 4px 16px rgb(0 0 0 / 12%), 0 12px 32px rgb(0 0 0 / 8%);
  --travel: cubic-bezier(0.45, 0, 0.1, 1);
  --settle: cubic-bezier(0.22, 1, 0.36, 1);

  position: absolute;
  inset: 0;
  overflow: hidden;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: normal;
  color: #000;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  pointer-events: none;
}

[data-theme="dark"] .ss-stage {
  --bw-chrome: #323336;
  --bw-page: #2a2b2d;
  --bw-omni: #222326;
  --bw-line: rgb(255 255 255 / 7%);
  --bw-ink: rgb(255 255 255 / 7%);
  --bw-ink-strong: rgb(255 255 255 / 11%);
  --bw-icon: #b5b8bd;
  --bw-url: #e8eaed;
  --bw-url-faint: #9aa0a6;
  --bw-hover: rgb(255 255 255 / 8%);
  --shadow-hero:
    0 0 0 1px rgb(255 255 255 / 8%), 0 30px 60px -12px rgb(0 0 0 / 55%), 0 18px 36px -18px rgb(0 0 0 / 60%);
  --shadow-float: 0 0 0 1px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 30%);
}

/* A snap: state changes that happen out of sight take no time */
.ss-stage[data-instant],
.ss-stage[data-instant] *,
.ss-stage[data-instant] *::before,
.ss-stage[data-instant] *::after {
  transition: none !important;
  animation: none !important;
}

/* ---------- The browser window ---------- */

.ss-window {
  position: absolute;
  top: var(--g);
  left: var(--g);
  right: var(--g);
  bottom: -48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bw-page);
  box-shadow: var(--shadow-hero);
}

.ss-window__bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--tool-gap);
  height: var(--bar-h);
  padding: 0 var(--bar-pad-r) 0 15.5px;
  background: var(--bw-chrome);
  border-bottom: 1px solid var(--bw-line);
}

.ss-window__lights {
  display: flex;
  flex: none;
  gap: 6px;
  margin-right: 10px;
}

.ss-window__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 12%);
}

.ss-window__dot:nth-child(1) {
  background: #ff5f57;
}

.ss-window__dot:nth-child(2) {
  background: #febc2e;
}

.ss-window__dot:nth-child(3) {
  background: #28c840;
}

.ss-tool {
  display: grid;
  flex: none;
  place-items: center;
  width: var(--tool);
  height: var(--tool);
  border-radius: 50%;
  color: var(--bw-icon);
  transition: background-color 150ms ease;
}

.ss-tool svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ss-tool[data-hover],
.ss-tool[data-pressed] {
  background: var(--bw-hover);
}

.ss-window__url {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 28px;
  margin: 0 4px;
  padding: 0 12px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bw-omni);
  color: var(--bw-url);
  font-size: 11.5px;
  white-space: nowrap;
}

.ss-window__url svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: var(--bw-icon);
}

.ss-window__host {
  flex: none;
}

.ss-window__path {
  min-width: 0;
  margin-left: -7px;
  overflow: hidden;
  color: var(--bw-url-faint);
  text-overflow: ellipsis;
}

/* The extension's own toolbar button. Pressed and open, it keeps a fill, as Chrome does while its popup is showing */
.ss-ext img {
  display: block;
  width: 16px;
  height: 16px;
}

.ss-stage[data-open] .ss-ext {
  background: var(--bw-hover);
}

.ss-window__body {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 28px 30px;
}

/* Placeholder ink for the page under the popup */
.ss-bar {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--bw-ink);
}

.ss-bar[data-strong] {
  background: var(--bw-ink-strong);
}

/* ---------- The popup ---------- */

.ss-popover {
  position: absolute;
  z-index: 20;
  top: calc(var(--g) + var(--bar-h) + 4px);
  right: var(--pop-anchor);
  width: var(--pop-w);
  isolation: isolate;
  border-radius: 10px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  transform-origin: top right;
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(0.4, 0, 1, 1),
    visibility 0s linear 240ms;
}

/* The surface draws on ::before, so only the surface scales on the way in and the text never lands on a transform */
.ss-popover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--pop-bg, #fff);
  box-shadow: var(--shadow-float);
  transform: scale(0.97);
  transform-origin: top right;
  transition: transform 300ms ease;
}

.ss-stage[data-open] .ss-popover {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 180ms ease;
}

.ss-stage[data-open] .ss-popover::before {
  transform: none;
  transition: transform 240ms var(--settle);
}

/* ---------- Text that changes ---------- */

.ss-roll {
  display: inline-grid;
  padding-block: 0.45em;
  margin-block: -0.45em;
  vertical-align: bottom;
  -webkit-mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
  mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
  transition: width 450ms var(--settle);
}

.ss-roll[data-align="end"] {
  grid-template-columns: 100%;
}

.ss-roll__item {
  grid-area: 1 / 1;
  justify-self: start;
  width: max-content;
  white-space: pre;
}

.ss-roll[data-align="end"] .ss-roll__item {
  justify-self: unsafe end;
}

.ss-roll[data-align="center"] .ss-roll__item {
  justify-self: unsafe center;
}

.ss-roll__item[data-in] {
  animation: ss-roll-in 420ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

.ss-roll__item[data-out] {
  animation: ss-roll-out 420ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

@keyframes ss-roll-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
}

@keyframes ss-roll-out {
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}

/* ---------- The cursor ---------- */

.ss-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity 250ms ease;
}

.ss-stage[data-cursor] .ss-cursor {
  opacity: 1;
}

.ss-stage[data-cursor] .ss-cursor[data-idle] {
  opacity: 0;
  transition-duration: 600ms;
}

.ss-cursor__press {
  display: grid;
  transform-origin: 0 0;
  transition: transform 260ms var(--settle);
}

.ss-cursor[data-pressed] .ss-cursor__press {
  transform: scale(0.9);
  transition: transform 80ms ease-out;
}

.ss-cursor__glyph {
  grid-area: 1 / 1;
  opacity: 0;
  transform: scale(0);
  transition:
    transform 200ms ease,
    opacity 200ms ease;
}

.ss-cursor__glyph svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 30%));
}

.ss-cursor[data-kind="pointer"] [data-glyph="pointer"],
.ss-cursor[data-kind="hand"] [data-glyph="hand"],
.ss-cursor[data-kind="ibeam"] [data-glyph="ibeam"] {
  opacity: 1;
  transform: none;
}

/* Each glyph's hotspot sits at the cursor's origin */
[data-glyph="pointer"] {
  margin: -5.25px 0 0 -7.5px;
  transform-origin: 7.5px 5.25px;
}

[data-glyph="hand"] {
  margin: -3.25px 0 0 -9.75px;
  transform-origin: 9.75px 3.25px;
}

[data-glyph="ibeam"] {
  margin: -8px 0 0 -5px;
  transform-origin: 5px 8px;
}

/* ---------- Compact: the phone column ---------- */

.project-preview {
  container-type: inline-size;
}

@container (max-width: 499px) {
  .ss-fit {
    height: 412px;
  }

  [data-demo="azkmark"] {
    height: 428px;
  }

  .ss-stage {
    --g: 16px;
    --pop-anchor: calc(var(--g) + var(--bar-pad-r));
    --pop-w: min(320px, calc(100cqi - 2 * var(--g) - 2 * var(--bar-pad-r)));
  }

  .ss-window {
    -webkit-mask-image: linear-gradient(#000 140px, transparent 240px);
    mask-image: linear-gradient(#000 140px, transparent 240px);
  }

  .ss-window__path {
    display: none;
  }

  .ss-window__body {
    padding: 22px 20px;
  }

  .ss-tool[data-wide] {
    display: none;
  }

  .ss-window__lights {
    margin-right: 6px;
  }
}

/* azkmark: warm paper, a serif title, the green of its bookmark mark */

.azk {
  --shelf: #f7f5ee;
  --page: #fffdf7;
  --ink: #28352b;
  --secondary: #596555;
  --rule: rgb(61 78 54 / 15%);
  --accent: #315d3e;
  --accent-soft: #e8eee1;
  --control-rule: #d5d9c9;
  --body-font: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  --display-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

.azk .ss-popover {
  --pop-bg: var(--page);
  overflow: visible;
  color: var(--ink);
  font-family: var(--body-font);
}

/* The page being saved: an article */
.azk-article {
  display: grid;
  gap: 11px;
  /* The page's lines end under the popup, never a sliver past its edge */
  max-width: min(460px, calc(100cqi - 210px));
}

.azk-article .ss-bar:first-child {
  margin-bottom: 4px;
}

.azk-article .azk-gap {
  height: 6px;
}

.azk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.azk-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 18px/1.2 var(--display-font);
  letter-spacing: -0.02em;
}

.azk-brand svg {
  width: 15px;
  height: 18px;
  fill: var(--accent);
}

.azk-library {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  color: var(--secondary);
  font-size: 11.5px;
  font-weight: 500;
}

.azk-library svg,
.azk-chevron,
.azk-save svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.azk-library svg {
  width: 15px;
  height: 15px;
}

.azk-summary {
  padding: 12px 16px 14px;
}

.azk-host {
  color: var(--secondary);
  font-size: 11px;
}

.azk-title {
  margin-top: 4px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--control-rule);
  font: 500 16.5px/1.35 var(--display-font);
}

.azk-fields {
  padding: 12px 16px 14px;
  background: var(--shelf);
}

.azk-label {
  margin-bottom: 4px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 600;
}

.azk-label span {
  font-weight: 400;
}

.azk-select,
.azk-input,
.azk-add {
  display: flex;
  align-items: center;
  height: 30px;
  border: 1px solid var(--control-rule);
  border-radius: 4px;
  background: var(--page);
  font-size: 12.5px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.azk-select {
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 9px 0 10px;
}

.azk-chevron {
  width: 12px;
  height: 12px;
  color: var(--secondary);
}

/* Draft tags open above the field, carrying the field down with them */
.azk-chips {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms var(--travel);
}

.azk-chips > div {
  display: flex;
  min-height: 0;
}

.ss-stage[data-tagged] .azk-chips {
  grid-template-rows: 1fr;
}

.azk-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  margin-bottom: 6px;
  padding: 0 5px 0 8px;
  will-change: transform;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  opacity: 0;
}

.azk-chip svg {
  width: 16px;
  height: 16px;
  padding: 3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  opacity: 0;
}

/* The typed words lift out of the field and become the chip: the chip starts on the words' own spot, unfilled, and gains its fill as it travels */
.ss-stage[data-flying] .azk-chip {
  opacity: 1;
  transform: translate(var(--fx, 0), var(--fy, 0));
  transition: none;
}

.ss-stage[data-tagged] .azk-chip {
  opacity: 1;
  transform: none;
  background: var(--accent-soft);
  color: var(--accent);
  transition:
    transform 480ms var(--travel),
    background-color 240ms ease 60ms,
    color 240ms ease 60ms;
}

.ss-stage[data-tagged] .azk-chip svg {
  opacity: 1;
  transition: opacity 240ms ease 380ms;
}

.azk-tagrow {
  display: flex;
  gap: 6px;
}

.azk-input {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 0 10px;
}

.azk-input[data-hover] {
  border-color: #67705f;
}

.ss-stage[data-focus] .azk-input {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgb(49 93 62 / 16%);
}

.azk-placeholder {
  position: absolute;
  left: 12px;
  color: var(--secondary);
  /* Back only once the words have lifted clear of the field */
  transition: opacity 200ms ease 320ms;
}

.ss-stage[data-typed] .azk-placeholder {
  opacity: 0;
  transition: none;
}

.azk-caret {
  width: 1px;
  height: 15px;
  margin-left: 1px;
  background: var(--accent);
  opacity: 0;
}

.ss-stage[data-focus]:not([data-handoff]) .azk-caret {
  animation: azk-blink 1s steps(1) infinite;
}

@keyframes azk-blink {
  0%,
  50% {
    opacity: 1;
  }
}

.azk-add {
  flex: none;
  justify-content: center;
  width: 42px;
  background: var(--shelf);
  color: var(--accent);
}

.azk-add[data-hover] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.azk-add[data-pressed] {
  background: #dfe7d6;
}

.azk-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
}

.azk-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--page);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 150ms ease;
}

.azk-save[data-hover] {
  background: #23472d;
}

.azk-save[data-pressed] {
  background: #1b3923;
}

.azk-save svg {
  flex: none;
  width: 16px;
  height: 16px;
  transition: fill 200ms ease;
}

.ss-stage[data-saved] .azk-save svg {
  fill: currentColor;
}

/* URL Transformer: a white card on a cool canvas, one blue */

.urlt {
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --foreground: #101828;
  --secondary: #344054;
  --muted: #667085;
  --border: #e4e7ec;
  --border-strong: #cfd6e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #067647;
}

.urlt .ss-popover {
  --pop-bg: var(--canvas);
  padding: 8px;
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* The protected app behind: a sidebar and a sparse dashboard */
.urlt-app {
  display: grid;
  /* The content column starts under the popup at desktop widths, so only the
     sidebar shows beside it and no column edge lands just short of it */
  grid-template-columns: 120px 1fr;
  gap: 30px;
  max-width: calc(100cqi - 210px);
}

.urlt-app nav,
.urlt-app section {
  display: grid;
  align-content: start;
  gap: 12px;
}

.urlt-app .ss-bar[data-strong] {
  height: 10px;
  margin-bottom: 6px;
}

.urlt-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.urlt-tiles span {
  height: 54px;
  border-radius: 8px;
  background: var(--bw-ink);
}

.urlt-rows {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.urlt-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(15 23 42 / 6%);
}

.urlt-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px 2px;
}

.urlt-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 8px rgb(37 99 235 / 24%);
}

.urlt-mark svg,
.urlt-icon svg,
.urlt-token-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.urlt-mark svg {
  width: 15px;
  height: 15px;
}

.urlt-title {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.urlt-tabs {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: stretch;
  gap: 2px;
  margin: 0 10px;
  padding: 3px;
  border-radius: 7px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.urlt-tabs span {
  display: grid;
  place-items: center;
  height: 24px;
  padding: 0 6px;
  border-radius: 5px;
}

.urlt-tabs span:first-child {
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 1px 3px rgb(15 23 42 / 10%);
}

.urlt-view {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.urlt-field {
  display: grid;
  gap: 4px;
}

.urlt-label {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 650;
}

.urlt-input {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.urlt-token {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-subtle);
}

.urlt-token-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
}

.urlt-token-icon svg {
  width: 14px;
  height: 14px;
}

.urlt-token b {
  display: block;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 650;
}

.urlt-token small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10.5px;
}

.urlt-transform {
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
  box-shadow: 0 5px 12px rgb(37 99 235 / 20%);
  transition: background-color 140ms ease;
}

.urlt-transform[data-hover] {
  background: var(--primary-hover);
}

.urlt-transform[data-pressed] {
  background: #1e40af;
}

.urlt-icon[data-pressed] {
  background: #eef2f7;
}

/* The result is hidden until a URL is transformed; it opens with its content */
.urlt-result {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: -10px;
  transition:
    grid-template-rows 380ms var(--travel),
    margin-top 380ms var(--travel);
}

.urlt-result > div {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 200ms ease;
}

.ss-stage[data-result] .urlt-result {
  grid-template-rows: 1fr;
  margin-top: 0;
}

.ss-stage[data-result] .urlt-result > div {
  opacity: 1;
  transition: opacity 240ms ease 340ms;
}

.urlt-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.urlt-icons {
  display: flex;
  gap: 6px;
}

.urlt-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--secondary);
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.urlt-icon[data-hover] {
  border-color: #aeb8c7;
  background: var(--surface-subtle);
}

.urlt-icon svg {
  grid-area: 1 / 1;
  width: 15px;
  height: 15px;
  transition:
    opacity 200ms ease,
    transform 260ms var(--settle);
}

.urlt-check {
  opacity: 0;
  transform: scale(0.6);
}

.ss-stage[data-copied] .urlt-copy {
  border-color: #abefc6;
  background: #ecfdf3;
  color: var(--success);
}

.ss-stage[data-copied] .urlt-copy .urlt-check {
  opacity: 1;
  transform: none;
}

.ss-stage[data-copied] .urlt-copy svg:not(.urlt-check) {
  opacity: 0;
  transform: scale(0.6);
}

.urlt-out {
  height: 64px;
  padding: 7px 9px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font:
    10.5px/1.55 ui-monospace,
    "SFMono-Regular",
    Menlo,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
}

.urlt-out em {
  font-style: normal;
  color: var(--primary);
}

/* HeaderKit: exact hosts, header names in monospace, one blue */

.hk {
  --foreground: #0b1220;
  --muted: #475569;
  --border: #dbe7f5;
  --primary: #2563eb;
  --active-header: #1e40af;
  --surface-muted: #eef2f7;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

.hk .ss-popover {
  --pop-bg: #fff;
  padding: 14px 14px 12px;
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* The API host's response, as Chrome shows raw JSON */
.hk-json {
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100cqi - 210px));
}

.hk-json .ss-bar:nth-child(n + 2):nth-last-child(n + 2) {
  margin-left: 18px;
}

/* The toolbar badge: Chrome's count of live rules on this tab */
.hk-ext {
  position: relative;
}

.hk-badge {
  position: absolute;
  right: -1px;
  bottom: 1px;
  display: grid;
  place-items: center;
  min-width: 13px;
  height: 12px;
  padding: 0 3px;
  border-radius: 3px;
  background: var(--primary);
  box-shadow: 0 0 0 1.5px var(--bw-chrome);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
}

.hk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgb(219 234 254 / 90%);
}

.hk-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hk-profile {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.hk-profile b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 650;
}

.hk-profile svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.hk-master {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px 0 4px;
  border: 1px solid #bfd3ef;
  border-radius: 999px;
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
}

.hk-switch {
  position: relative;
  flex: none;
  width: 26px;
  height: 16px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 180ms ease;
}

.hk-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 22%);
  transition: transform 180ms ease;
}

.hk-switch[data-on] {
  background: var(--primary);
}

.hk-switch[data-on]::after {
  transform: translateX(10px);
}

.hk-scope {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px;
  margin: 12px 0 10px;
  padding: 3px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.hk-scope span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  padding: 0 12px;
  border-radius: 4px;
}

.hk-scope span:first-child {
  background: #fff;
  color: var(--foreground);
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.hk-scope code {
  font: 700 11px var(--mono);
}

.hk-scope i {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.hk-rules {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.hk-rule {
  padding: 8px 10px 9px 11px;
  background: #fff;
  transition: background-color 200ms ease;
}

.hk-rule + .hk-rule {
  border-top: 1px solid var(--border);
}

.hk-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 22px;
}

.hk-name {
  overflow: hidden;
  color: var(--active-header);
  font: 700 11.5px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 200ms ease;
}

.hk-value {
  margin-top: 2px;
  font: 11.5px var(--mono);
  transition: color 200ms ease;
}

.hk-toggle {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 4px;
  margin-right: -4px;
  border-radius: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: background-color 150ms ease;
}

.hk-toggle[data-hover] {
  background: #edf4ff;
}

/* A paused rule reads quieter until it is switched on */
.ss-stage:not([data-trace]) .hk-trace {
  background: rgb(248 250 252 / 82%);
}

.ss-stage:not([data-trace]) .hk-trace .hk-name {
  color: #64748b;
}

.ss-stage:not([data-trace]) .hk-trace .hk-value {
  color: #64748b;
}

.ss-stage:not([data-trace]) .hk-trace .hk-switch {
  background: #cbd5e1;
}

.ss-stage:not([data-trace]) .hk-trace .hk-switch::after {
  transform: none;
}

.hk-manage {
  margin-top: 12px;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 650;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .ss-cursor {
    display: none;
  }
}
