@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono-400-500.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: 'Hanken Grotesk', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-mono: 'Geist Mono', 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;

  --ink: #292a23;
  --ink-soft: #45453b;
  --muted: #5b584c;
  --faint: #6d695c;
  --hairline: rgba(48, 45, 36, 0.09);
  --hairline-soft: rgba(48, 45, 36, 0.055);
  --hairline-strong: rgba(48, 45, 36, 0.15);

  --cream: #f4f0e7;
  --paper: #fbf9f4;
  --surface: rgba(255, 254, 250, 0.74);
  --surface-strong: rgba(255, 254, 250, 0.9);
  --surface-soft: rgba(250, 247, 240, 0.7);

  --sage: #7f9270;
  --sage-deep: #596a4d;
  --sage-soft: #e7ebdf;
  --sage-wash: rgba(127, 146, 112, 0.12);
  --accent: #dc6349;
  --accent-deep: #ab4029;
  --accent-soft: #f6e7e0;
  --gold: #c69a50;
  --test: #b5853e;
  --danger: #a94731;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.72) inset, 0 10px 30px rgba(68, 57, 37, 0.045);
  --shadow-shell: 0 40px 100px rgba(57, 47, 29, 0.26), 0 8px 28px rgba(57, 47, 29, 0.1), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  --radius-card: 18px;
  --ease: cubic-bezier(0.22, 0.68, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: #e9e3d7;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: 'ss01' 1, 'cv02' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

::selection {
  background: #dfe4d1;
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

code,
kbd {
  font-family: var(--font-mono);
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(48, 45, 36, 0.16) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(48, 45, 36, 0.14);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(48, 45, 36, 0.25);
  background-clip: content-box;
}

:focus-visible {
  outline: 2px solid rgba(220, 99, 73, 0.62);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Atmosphere ---------- */

.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 800px at 4% 0%, #dfe2c9 0%, rgba(223, 226, 201, 0) 58%),
    radial-gradient(900px 700px at 100% 6%, #f1ce9e 0%, rgba(241, 206, 158, 0) 60%),
    radial-gradient(1100px 900px at 74% 104%, #d4c5a8 0%, rgba(212, 197, 168, 0) 58%),
    linear-gradient(146deg, #ebe5d9 0%, #ede8dd 44%, #e6dfd1 100%);
}

.atmosphere-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.6;
  transform: translateZ(0);
}

.glow-sage {
  width: 38vw;
  height: 48vh;
  left: -10vw;
  top: -18vh;
  background: rgba(164, 180, 139, 0.55);
}

.glow-amber {
  width: 34vw;
  height: 42vh;
  right: -6vw;
  top: -8vh;
  background: rgba(230, 175, 112, 0.44);
}

.glow-rose {
  width: 26vw;
  height: 32vh;
  left: 2vw;
  bottom: -20vh;
  background: rgba(210, 159, 133, 0.4);
}

.glow-moss {
  width: 40vw;
  height: 50vh;
  right: 2vw;
  bottom: -26vh;
  background: rgba(158, 173, 133, 0.4);
}

.atmosphere-grain {
  position: absolute;
  inset: 0;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- Boot ---------- */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(243, 239, 231, 0.97);
  transition: opacity 0.34s var(--ease), visibility 0.34s;
}

.boot-screen.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-screen.is-done .boot-mark,
.boot-screen.is-done .boot-rule i {
  animation: none;
}

.boot-mark {
  width: 38px;
  height: 38px;
  opacity: 0.85;
  animation: stampFloat 5s ease-in-out infinite;
}

.boot-screen p {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.boot-rule {
  width: 82px;
  height: 1px;
  overflow: hidden;
  background: rgba(48, 45, 36, 0.1);
}

.boot-rule i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--ink-soft);
  animation: bootRule 1.4s ease-in-out infinite;
}

@keyframes bootRule {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(280%);
  }
}

/* ---------- Brand ---------- */

.brand-mark {
  width: 29px;
  height: 29px;
  flex: none;
  display: grid;
  place-items: center;
  color: #f6f1e6;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 2px 6px rgba(48, 40, 25, 0.18);
  transform: rotate(-2deg);
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-mark--dark {
  background: var(--ink);
}

.eyebrow {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dot-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 7px 2px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.tiny-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--sage);
  vertical-align: 1px;
}

/* ---------- Auth ---------- */

.auth-screen {
  position: relative;
  z-index: 10;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.42s var(--ease) both;
}

.auth-shell {
  flex: none;
  margin-block: auto;
  width: min(1040px, 100%);
  min-height: min(690px, calc(100dvh - 48px));
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  border-radius: 27px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255, 255, 255, 0.5), transparent 55%),
    #f5f1e7;
  box-shadow: var(--shadow-shell);
  animation: shellIn 0.62s var(--ease) both;
}

.auth-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 32px 38px 28px;
  background:
    radial-gradient(90% 80% at 14% 8%, rgba(255, 253, 247, 0.68), transparent 58%),
    linear-gradient(155deg, rgba(235, 233, 216, 0.86), rgba(225, 223, 205, 0.62));
  border-right: 1px solid rgba(48, 45, 36, 0.06);
}

.auth-art::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(69, 65, 52, 0.045) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(69, 65, 52, 0.035) 47px 48px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%);
}

.auth-art::after {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  right: -220px;
  bottom: -250px;
  border-radius: 50%;
  border: 1px solid rgba(71, 67, 52, 0.09);
  box-shadow: 0 0 0 34px rgba(71, 67, 52, 0.018), 0 0 0 68px rgba(71, 67, 52, 0.014);
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand-name {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.auth-brand-name span {
  color: var(--muted);
  font-weight: 450;
}

.brand-slash {
  width: 1px;
  height: 13px;
  background: var(--hairline-strong);
  transform: rotate(16deg);
  margin: 0 1px;
}

.auth-brand-sub {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-art-center {
  position: relative;
  z-index: 2;
  margin: auto 0;
  padding: 26px 0 20px;
  max-width: 420px;
}

.auth-stamp-wrap {
  position: relative;
  width: 234px;
  margin: 0 0 30px 4px;
}

.auth-stamp {
  width: 218px;
  transform: rotate(-3.4deg);
  filter: drop-shadow(0 22px 28px rgba(62, 50, 29, 0.16));
  animation: stampFloat 9s ease-in-out infinite;
}

.auth-stamp svg {
  width: 100%;
  height: auto;
}

.auth-postmark {
  position: absolute;
  width: 194px;
  right: -74px;
  top: 21px;
  color: rgba(73, 67, 52, 0.32);
  transform: rotate(-8deg);
  mix-blend-mode: multiply;
}

.auth-eyebrow {
  margin-bottom: 10px;
  color: var(--muted);
}

.auth-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 4.1vw, 50px);
  line-height: 0.99;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}

.auth-title em {
  font-style: italic;
  color: var(--sage-deep);
}

.auth-copy {
  max-width: 340px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.auth-art-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  color: var(--muted);
  font-size: 10.5px;
}

.auth-art-foot span {
  display: inline-flex;
  align-items: center;
}

.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 40px 24px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.6), transparent 52%),
    #faf8f2;
}

.auth-mobile-brand {
  display: none;
}

.auth-panel-inner {
  width: min(348px, 100%);
  margin: auto;
  padding: 20px 0 12px;
}

.auth-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 30px;
}

.auth-tab {
  position: relative;
  padding: 0 1px 12px;
  margin-bottom: -1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: color 0.25s var(--ease);
}

.auth-tab.is-active {
  color: var(--ink);
}

.auth-tabs::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: var(--tab-indicator-width, 0px);
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateX(var(--tab-indicator-offset, 0px));
  transition: transform 0.4s var(--ease), width 0.4s var(--ease);
  pointer-events: none;
}

.auth-tabs.is-instant::after {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .auth-tab,
  .auth-tabs::after {
    transition: none;
  }
}

.auth-heading {
  margin-bottom: 24px;
}

.auth-heading h2 {
  font-family: var(--font-serif);
  font-size: 33px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 7px;
}

.auth-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.005em;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-aside {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 45px;
  border-radius: 11px;
  border: 1px solid rgba(53, 49, 39, 0.1);
  background: rgba(255, 254, 250, 0.6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.input-wrap:hover {
  border-color: rgba(53, 49, 39, 0.17);
}

.input-wrap:focus-within {
  border-color: rgba(92, 106, 78, 0.55);
  background: rgba(255, 255, 252, 0.88);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.11), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.input-wrap > .icon {
  width: 15px;
  height: 15px;
  margin-left: 13px;
  color: var(--faint);
}

.input-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 13px 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  letter-spacing: 0.005em;
}

.input-wrap input::placeholder {
  color: #777266;
}

.input-action {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  margin-right: 5px;
  border-radius: 7px;
  color: var(--faint);
  transition: color 0.2s, background 0.2s;
}

.input-action:hover {
  color: var(--ink-soft);
  background: rgba(48, 45, 36, 0.055);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  margin-top: 1px;
  border-radius: 10px;
  border: 1px solid var(--hairline-soft);
  background: rgba(248, 245, 238, 0.5);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s;
}

.check-row:hover {
  border-color: var(--hairline);
  background: rgba(252, 249, 243, 0.7);
}

.check-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-ui {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 4.5px;
  border: 1px solid rgba(53, 49, 39, 0.2);
  background: rgba(255, 255, 255, 0.65);
  color: var(--paper);
  transition: background 0.2s, border-color 0.2s;
}

.check-ui .icon {
  width: 10px;
  height: 10px;
  stroke-width: 2.2;
  opacity: 0;
  transition: opacity 0.15s;
}

.check-row input:checked + .check-ui {
  background: var(--ink);
  border-color: var(--ink);
}

.check-row input:checked + .check-ui .icon {
  opacity: 1;
}

.check-row input:focus-visible + .check-ui {
  outline: 2px solid rgba(220, 99, 73, 0.55);
  outline-offset: 2px;
}

.check-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.check-copy strong {
  font-size: 10.5px;
  font-weight: 550;
  color: var(--ink-soft);
}

.check-copy small {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.45;
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(169, 71, 49, 0.17);
  background: rgba(246, 231, 224, 0.72);
  color: var(--accent-deep);
  font-size: 10.5px;
  line-height: 1.45;
  animation: softShake 0.36s ease;
}

.form-error .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.auth-submit {
  width: 100%;
  height: 45px;
  margin-top: 2px;
  padding: 0 8px 0 16px;
  justify-content: space-between;
}

.button-label {
  display: inline-flex;
  align-items: center;
}

.button-arrow {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.25s var(--ease), background 0.25s;
}

.button-arrow .icon {
  width: 13px;
  height: 13px;
}

.button:hover .button-arrow {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.16);
}

.or-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.or-rule::before,
.or-rule::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--hairline-soft);
}

.demo-button {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  justify-content: flex-start;
  gap: 9px;
  color: var(--ink-soft);
}

.demo-mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 6px;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

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

.demo-note {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-fine {
  margin-top: 18px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.auth-panel-foot {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

/* ---------- Buttons & atoms ---------- */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform 0.22s var(--ease), background 0.22s, border-color 0.22s, box-shadow 0.22s, color 0.22s, opacity 0.2s;
}

.button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.button .icon {
  width: 14px;
  height: 14px;
}

.button--dark {
  background: var(--ink);
  color: #f8f4e9;
  border-color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.13) inset, 0 4px 10px rgba(41, 42, 35, 0.13);
}

.button--dark:hover {
  background: #37392f;
  border-color: #37392f;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.13) inset, 0 8px 18px rgba(41, 42, 35, 0.16);
}

.button--paper {
  background: rgba(255, 254, 250, 0.55);
  border-color: var(--hairline);
  color: var(--ink-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.button--paper:hover {
  background: rgba(255, 255, 252, 0.9);
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
}

.button--quiet {
  background: transparent;
  border-color: var(--hairline);
  color: var(--muted);
}

.button--quiet:hover {
  background: rgba(255, 255, 252, 0.6);
  border-color: var(--hairline-strong);
  color: var(--ink-soft);
}

.button--danger {
  background: #ab4c35;
  border-color: #ab4c35;
  color: #fff6f1;
  box-shadow: 0 4px 12px rgba(171, 76, 53, 0.16);
}

.button--danger:hover {
  background: #99422e;
  transform: translateY(-1px);
}

.button--small {
  height: 31px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 10.5px;
}

.button--block {
  width: 100%;
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.button.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.button.is-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  color: var(--paper);
  animation: spin 0.7s linear infinite;
}

.button--paper.is-loading::after,
.button--quiet.is-loading::after {
  border-color: rgba(48, 45, 36, 0.18);
  border-top-color: var(--ink-soft);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.icon-button:hover {
  background: rgba(255, 255, 252, 0.62);
  color: var(--ink);
}

.icon-button .icon {
  width: 16px;
  height: 16px;
}

.mini-button {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  color: var(--faint);
  transition: background 0.2s, color 0.2s;
}

.mini-button:hover {
  background: rgba(255, 255, 252, 0.7);
  color: var(--ink);
}

.mini-button .icon {
  width: 12px;
  height: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.text-link .icon {
  width: 12px;
  height: 12px;
  transition: transform 0.25s var(--ease);
}

.text-link:hover {
  color: var(--ink);
}

.text-link:hover .icon {
  transform: translateX(2px);
}

.avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: #f7f2e6;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.avatar--top {
  display: none;
  border: 0;
}

/* ---------- App shell ---------- */

.app-shell {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: clamp(232px, 18.2vw, 270px) minmax(0, 1fr);
  width: calc(100vw - 24px);
  max-width: 1580px;
  height: calc(100dvh - 24px);
  margin: 12px auto;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: #f6f3ea;
  box-shadow: var(--shadow-shell);
  animation: shellIn 0.52s var(--ease) both;
}

.app-shell.is-static {
  animation: none;
}

.sidebar {
  position: relative;
  z-index: 30;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 13px 13px;
  border-right: 1px solid rgba(48, 45, 36, 0.07);
  background:
    radial-gradient(80% 40% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    linear-gradient(180deg, #f7f4ec, #f2eee5);
  overflow-y: auto;
  overflow-x: hidden;
}

.traffic-lights {
  display: flex;
  gap: 7px;
  padding: 3px 6px 17px;
}

.traffic-light {
  width: 11.5px;
  height: 11.5px;
  border-radius: 50%;
  box-shadow: 0 0 0 0.5px rgba(48, 45, 36, 0.08) inset, 0 1px 1px rgba(48, 45, 36, 0.08);
}

.traffic-red {
  background: #ec6b5c;
}

.traffic-amber {
  background: #e9b755;
}

.traffic-green {
  background: #5ebd5b;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 5px;
  margin-bottom: 19px;
}

.product-pill {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(48, 45, 36, 0.075);
  background: rgba(255, 254, 250, 0.62);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.product-spark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-left: -2px;
  border-radius: 7px;
  border: 1px solid rgba(48, 45, 36, 0.075);
  background: rgba(255, 254, 250, 0.52);
  color: var(--sage-deep);
}

.product-spark .icon {
  width: 12px;
  height: 12px;
}

.side-primary {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 16px;
}

.side-action {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 33px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 450;
  transition: background 0.2s, color 0.2s;
}

.side-action .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.side-action:hover {
  background: rgba(255, 255, 252, 0.55);
  color: var(--ink);
}

.side-action kbd {
  margin-left: auto;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 1px 4px;
  border: 1px solid rgba(48, 45, 36, 0.07);
  border-radius: 4px;
  background: rgba(255, 255, 252, 0.35);
}

.nav-block {
  margin-bottom: 17px;
}

.nav-heading {
  margin: 0;
  padding: 0 9px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.015em;
}

.nav-heading--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 5px;
}

.nav-block > .nav-heading {
  margin-bottom: 6px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 33px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 450;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.nav-item .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-item:hover {
  background: rgba(255, 255, 252, 0.48);
  color: var(--ink);
}

.nav-item.is-active {
  color: var(--ink);
  background: rgba(255, 254, 250, 0.76);
  box-shadow: 0 1px 2px rgba(48, 40, 24, 0.045), 0 0 0 1px rgba(255, 255, 255, 0.46) inset;
  font-weight: 500;
}

.nav-item.is-active .icon {
  color: var(--ink-soft);
}

.nav-count {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.environments {
  padding-top: 15px;
  border-top: 1px solid var(--hairline-soft);
}

.env-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.env-row:hover {
  background: rgba(255, 255, 252, 0.45);
  color: var(--ink-soft);
}

.env-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  flex: none;
}

.env-dot--live {
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.1);
}

.env-dot--test {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 154, 80, 0.1);
}

.env-count {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.side-spacer {
  flex: 1;
  min-height: 18px;
}

.side-utilities {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 11px;
  margin-bottom: 9px;
  border-top: 1px solid var(--hairline-soft);
}

.side-utility {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 29px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.side-utility .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.side-utility:hover {
  background: rgba(255, 255, 252, 0.5);
  color: var(--ink-soft);
}

.side-utility:hover .icon {
  color: var(--muted);
}

.side-utility.is-active {
  color: var(--ink);
  background: rgba(255, 255, 252, 0.55);
}

.side-utility.is-active .icon {
  color: var(--ink-soft);
}

.mini-status-dot {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.09);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}

.profile-card:hover,
.profile-card[aria-expanded='true'] {
  background: rgba(255, 254, 250, 0.58);
  border-color: var(--hairline-soft);
}

.profile-card .avatar {
  width: 28px;
  height: 28px;
  font-size: 12.5px;
}

.profile-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.25;
}

.profile-text strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-text small {
  color: var(--faint);
  font-size: 9.5px;
}

.profile-more {
  margin-left: auto;
  color: var(--faint);
}

.profile-more .icon {
  width: 14px;
  height: 14px;
}

.nav-scrim {
  display: none;
}

.workspace {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(85% 60% at 64% -10%, rgba(255, 255, 255, 0.85), transparent 58%),
    linear-gradient(180deg, #fbf9f4, #f8f5ee);
}

.route-progress {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 1.5px;
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0;
  background: linear-gradient(90deg, var(--sage), var(--accent));
  transition: transform 0.4s var(--ease), opacity 0.25s;
}

.route-progress.is-active {
  opacity: 1;
  transform: scaleX(0.7);
  transition: transform 2.6s cubic-bezier(0.1, 0.6, 0.2, 1);
}

.route-progress.is-done {
  transform: scaleX(1);
  opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.35s 0.1s;
}

.topbar {
  position: relative;
  z-index: 20;
  flex: none;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(18px, 2.7vw, 34px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  min-width: 155px;
}

.topbar-right {
  justify-content: flex-end;
  gap: 1px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.01em;
}

.crumbs .icon {
  width: 10px;
  height: 10px;
  opacity: 0.7;
}

.crumb-current {
  color: var(--muted);
}

.status-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(48, 45, 36, 0.075);
  background: rgba(255, 254, 250, 0.55);
  box-shadow: 0 1px 2px rgba(48, 40, 24, 0.03), 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 450;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.status-pill:hover {
  background: rgba(255, 255, 252, 0.84);
  border-color: var(--hairline);
}

.status-label {
  transition: color 0.32s var(--ease);
}

.status-label.is-warn {
  color: #8a6425;
}

.status-label.is-refreshing {
  animation: statusLabelSwap 0.42s var(--ease) both;
}

@keyframes statusLabelSwap {
  from { opacity: 0; transform: translateY(2.5px); }
  to { opacity: 1; transform: none; }
}

.status-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.09);
  animation: statusPulse 3.2s ease-in-out infinite;
}

.status-divider {
  width: 1px;
  height: 10px;
  background: var(--hairline);
}

.status-meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.mobile-nav-button {
  display: none;
}

.scroller {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  view-transition-name: bureau-scroller;
}

::view-transition-group(bureau-scroller) {
  animation-duration: 0.38s;
  animation-timing-function: var(--ease);
}

::view-transition-old(bureau-scroller) {
  animation: ledgerOut 0.18s var(--ease) both;
}

::view-transition-new(bureau-scroller) {
  animation: ledgerIn 0.34s var(--ease) both;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

html:active-view-transition .page {
  animation: none;
}

.page.is-flat,
.page.is-flat .stat-card,
.page.is-flat .activity-card,
.page.is-flat .content-grid,
.page.is-flat .year-card,
.page.is-flat .usage-lower,
.page.is-flat .keys-card,
.page.is-flat .settings-grid,
.page.is-flat .endpoint-dock {
  animation: none;
}

.view {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 12px clamp(22px, 3.4vw, 44px) 38px;
}

.page {
  animation: pageIn 0.38s var(--ease) both;
}

.view-loading {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.view-loading-mark {
  width: 33px;
  height: 33px;
  opacity: 0.55;
  animation: stampFloat 5s ease-in-out infinite;
}

.view-loading p {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.view-error {
  max-width: 430px;
  margin: 12vh auto;
  padding: 28px;
  text-align: center;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.view-error h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 8px;
}

.view-error p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
}

/* ---------- Overview hero ---------- */

.page--overview {
  padding-bottom: 4px;
}

.hero {
  position: relative;
  text-align: center;
  padding: 8px 0 25px;
}

.hero-stamp-wrap {
  position: relative;
  width: 118px;
  margin: 0 auto 13px;
}

.hero-stamp {
  width: 104px;
  margin: 0 auto;
  transform: rotate(-3.5deg);
  filter: drop-shadow(0 12px 14px rgba(62, 50, 29, 0.13));
  animation: stampFloat 10s ease-in-out infinite;
}

.hero-stamp svg {
  width: 100%;
  height: auto;
}

.hero-postmark {
  position: absolute;
  width: 104px;
  right: -51px;
  top: 3px;
  color: rgba(73, 67, 52, 0.26);
  transform: rotate(-8deg);
  mix-blend-mode: multiply;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 0;
  max-width: 100%;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-kicker > span {
  white-space: nowrap;
}

.hero-kicker > .registry-tag {
  margin-left: 7px;
}

.kicker-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 8px;
  border-radius: 50%;
  background: var(--faint);
}

.registry-tag {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.32s var(--ease), border-color 0.32s var(--ease), background 0.32s var(--ease);
}

.registry-tag--live {
  border-color: rgba(127, 146, 112, 0.35);
  color: var(--sage-deep);
  background: rgba(235, 239, 226, 0.5);
}

.registry-tag--off {
  border-style: dashed;
  border-color: rgba(198, 154, 78, 0.45);
  color: #8a6425;
  background: rgba(198, 154, 78, 0.08);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(31px, 3.1vw, 40px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero-title em {
  font-style: italic;
  color: var(--sage-deep);
}

.hero-sub {
  margin: 7px auto 0;
  max-width: 440px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- Stat cards ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 14px 15px 13px;
  border-radius: 15px;
  border: 1px solid var(--hairline-soft);
  background:
    radial-gradient(100% 90% at 0% 0%, rgba(255, 255, 253, 0.55), transparent 62%),
    rgba(255, 254, 250, 0.46);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset, 0 7px 22px rgba(68, 57, 37, 0.025);
  overflow: hidden;
  animation: riseIn 0.44s var(--ease) both;
  animation-delay: calc(0.04s + var(--i) * 0.04s);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--hairline);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset, 0 14px 30px rgba(68, 57, 37, 0.06);
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  color: var(--sage-deep);
  background: var(--sage-soft);
}

.stat-icon .icon {
  width: 12px;
  height: 12px;
}

.stat-icon--accent {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.stat-icon--gold {
  color: #77571f;
  background: rgba(241, 228, 200, 0.72);
}

.stat-icon--ink {
  color: var(--ink-soft);
  background: rgba(48, 45, 36, 0.07);
}

.stat-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 480;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stat-spark {
  width: 58px;
  height: 22px;
  flex: none;
  opacity: 0.8;
  margin-bottom: 1px;
}

.spark-line {
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark-area {
  fill: rgba(127, 146, 112, 0.1);
}

.spark-dot {
  fill: var(--sage-deep);
}

.stat-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
}

.stat-foot .stat-note {
  overflow: hidden;
  text-overflow: ellipsis;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.delta .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2;
}

.delta.is-up {
  color: var(--sage-deep);
}

.delta.is-down {
  color: var(--accent-deep);
}

.delta.is-flat {
  color: var(--muted);
}

.stat-meter {
  height: 3px;
  margin-top: 9px;
  border-radius: 99px;
  background: rgba(48, 45, 36, 0.06);
  overflow: hidden;
}

.stat-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
  transition: width 0.8s var(--ease);
}

/* ---------- Cards / panels ---------- */

.card {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline-soft);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 253, 0.55), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.activity-card {
  padding: 17px 18px 13px;
  margin-bottom: 12px;
  animation: riseIn 0.46s 0.14s var(--ease) both;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-title {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-sub {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10.5px;
}

.card-head-right {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: none;
}

.year-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.heat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 5px;
}

.heat-tabs {
  display: flex;
  gap: 15px;
}

.heat-tab {
  position: relative;
  padding: 0 0 6px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.heat-tab::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 1px;
  border-radius: 2px;
  background: var(--ink);
  transition: left 0.28s var(--ease), right 0.28s var(--ease);
}

.heat-tab:hover {
  color: var(--muted);
}

.heat-tab.is-active {
  color: var(--ink);
}

.heat-tab.is-active::after {
  left: 0;
  right: 0;
}

.heat-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.legend-cell {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--hm-empty);
}

.heat-legend .legend-cell:first-of-type {
  margin-left: 4px;
}

.heat-legend .legend-cell:last-of-type {
  margin-right: 2px;
}

.legend-sep {
  width: 1px;
  height: 9px;
  margin: 0 6px;
  background: var(--hairline);
}

.today-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.today-key i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Heatmap ---------- */

.heatmap-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 0 4px;
  scrollbar-width: none;
}

.heatmap-scroll::-webkit-scrollbar {
  display: none;
}

.heatmap {
  --hm-cell: 11px;
  --hm-gap: 4px;
  --hm-empty: #e9e4da;
  width: max-content;
  min-width: 100%;
}

.heatmap.is-switching {
  animation: heatSwap 0.38s var(--ease) both;
}

.heatmap--lg {
  --hm-cell: 12.5px;
  --hm-gap: 4.5px;
}

.heatmap-months {
  display: grid;
  column-gap: var(--hm-gap);
  margin-bottom: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.heatmap-month {
  overflow: visible;
  padding-left: 1px;
}

.heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--hm-cell));
  gap: var(--hm-gap);
  width: max-content;
}

.hm-cell {
  width: var(--hm-cell);
  height: var(--hm-cell);
  padding: 0;
  border: 0;
  border-radius: calc(var(--hm-cell) * 0.24);
  background: var(--hm-empty);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), filter 0.16s;
  cursor: pointer;
  position: relative;
}

.hm-cell:hover,
.hm-cell:focus-visible {
  transform: scale(1.25);
  z-index: 3;
  box-shadow: 0 0 0 1.5px rgba(255, 254, 250, 0.9), 0 2px 6px rgba(48, 40, 24, 0.18);
  outline: none;
}

.hm-cell.l1 {
  background: #dde3d3;
}

.hm-cell.l2 {
  background: #c4cfb2;
}

.hm-cell.l3 {
  background: #9caf89;
}

.hm-cell.l4 {
  background: #6f8260;
}

.heatmap[data-metric='errors'] .hm-cell.l1 {
  background: #f0ddd3;
}

.heatmap[data-metric='errors'] .hm-cell.l2 {
  background: #e7c1b0;
}

.heatmap[data-metric='errors'] .hm-cell.l3 {
  background: #d8977d;
}

.heatmap[data-metric='errors'] .hm-cell.l4 {
  background: #b96349;
}

.hm-cell.is-void {
  opacity: 0;
  pointer-events: none;
}

.hm-cell.is-future {
  background: rgba(48, 45, 36, 0.032);
  cursor: default;
}

.hm-cell.is-future:hover {
  transform: none;
  box-shadow: none;
}

.hm-cell.is-today {
  background: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(220, 99, 73, 0.12);
}

.hm-cell.is-today::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 249, 244, 0.9);
  transform: translate(-50%, -50%);
}

.hm-cell.is-selected {
  box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 3.5px rgba(41, 42, 35, 0.1);
}

.activity-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline-soft);
}

.activity-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--faint);
  font-size: 9.5px;
}

.activity-facts strong {
  color: var(--ink-soft);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.activity-updated {
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

/* ---------- Recent & keys panels ---------- */

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 12px;
  animation: riseIn 0.46s 0.2s var(--ease) both;
}

.panel {
  padding: 16px 17px 12px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.live-dot {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: var(--sage);
  animation: statusPulse 3s ease-in-out infinite;
}

.request-list {
  margin-top: 4px;
}

.request-row {
  display: grid;
  grid-template-columns: 6px 38px minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 3px;
  border-top: 1px solid var(--hairline-soft);
  transition: background 0.2s;
  border-radius: 5px;
}

.request-row:first-child {
  border-top: 0;
}

.request-row:hover {
  background: rgba(255, 255, 252, 0.4);
}

.req-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}

.req-dot.warn {
  background: var(--gold);
}

.req-dot.err {
  background: var(--accent);
}

.req-method {
  justify-self: start;
  padding: 1.5px 4px;
  border-radius: 4px;
  background: rgba(48, 45, 36, 0.045);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-align: center;
}

.req-path {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.req-meta {
  color: var(--faint);
  font-size: 8.5px;
  white-space: nowrap;
}

.req-time {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: right;
  white-space: nowrap;
}

.panel-foot-link {
  display: flex;
  justify-content: center;
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline-soft);
}

.mini-key-list {
  margin-top: 2px;
}

.mini-key-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 37px;
  padding: 5px 2px;
  border-top: 1px solid var(--hairline-soft);
}

.mini-key-row:first-child {
  border-top: 0;
}

.key-tile {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  border: 1px solid rgba(48, 45, 36, 0.055);
  color: var(--sage-deep);
  background: linear-gradient(145deg, rgba(237, 240, 229, 0.85), rgba(243, 239, 229, 0.7));
}

.key-tile .icon {
  width: 13px;
  height: 13px;
}

.key-tile--test {
  color: #7a5a1f;
  background: linear-gradient(145deg, rgba(245, 237, 218, 0.9), rgba(243, 239, 229, 0.7));
}

.key-tile--revoked {
  color: var(--faint);
  background: rgba(48, 45, 36, 0.035);
}

.mini-key-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mini-key-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-key-preview {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-key-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.env-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 252, 0.4);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.env-tag::before {
  content: '';
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--sage);
}

.env-tag--test::before {
  background: var(--gold);
}

.env-tag--revoked {
  border-style: dashed;
  background: transparent;
}

.env-tag--revoked::before {
  background: var(--faint);
}

.dashed-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 31px;
  margin-top: 7px;
  border-radius: 8px;
  border: 1px dashed rgba(48, 45, 36, 0.13);
  color: var(--faint);
  font-size: 9.5px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.dashed-add:hover {
  color: var(--ink-soft);
  border-color: rgba(48, 45, 36, 0.24);
  background: rgba(255, 255, 252, 0.35);
}

.dashed-add .icon {
  width: 11px;
  height: 11px;
}

/* ---------- Endpoint dock ---------- */

.endpoint-dock {
  position: sticky;
  bottom: 15px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 11px 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: #fbf9f3;
  box-shadow: 0 18px 42px rgba(58, 47, 29, 0.1), 0 2px 7px rgba(58, 47, 29, 0.045), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  animation: riseIn 0.46s 0.24s var(--ease) both;
}

.dock-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: none;
  border-radius: 9px;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.dock-icon .icon {
  width: 15px;
  height: 15px;
}

.dock-copy {
  min-width: 0;
  flex: 1;
}

.dock-label {
  margin-bottom: 1px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dock-endpoint {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.dock-endpoint code {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-tag {
  flex: none;
  padding: 1.5px 4px;
  border-radius: 4px;
  background: var(--sage-wash);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.dock-copy-button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 7px;
  color: var(--faint);
  transition: background 0.2s, color 0.2s;
}

.dock-copy-button:hover {
  background: rgba(48, 45, 36, 0.055);
  color: var(--ink-soft);
}

.dock-copy-button .icon {
  width: 13px;
  height: 13px;
}

/* ---------- Shared page head ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 0 20px;
}

.page-head-copy {
  min-width: 0;
}

.page-title {
  margin: 5px 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 39px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
}

.page-lede {
  max-width: 480px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.year-control {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.48);
  overflow: hidden;
}

.year-control button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 100%;
  color: var(--faint);
  transition: background 0.2s, color 0.2s;
}

.year-control button:hover:not(:disabled) {
  background: rgba(255, 255, 252, 0.75);
  color: var(--ink);
}

.year-control button:disabled {
  opacity: 0.25;
  cursor: default;
}

.year-control .icon {
  width: 12px;
  height: 12px;
}

.year-control span {
  min-width: 47px;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Usage page ---------- */

.usage-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 254, 250, 0.35);
}

.usage-fact {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--faint);
  font-size: 9.5px;
}

.usage-fact strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.fact-divider {
  width: 1px;
  height: 11px;
  background: var(--hairline);
}

.year-card {
  padding: 18px 20px 14px;
  margin-bottom: 12px;
  animation: riseIn 0.46s var(--ease) both;
}

.year-card .card-title {
  font-size: 13px;
}

.year-card .heat-toolbar {
  margin: 14px 0 6px;
}

.year-card .activity-foot {
  margin-top: 10px;
}

.usage-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 12px;
  align-items: start;
  animation: riseIn 0.46s 0.1s var(--ease) both;
}

.month-card {
  padding: 16px 17px 16px;
}

.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.month-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.month-title h2 {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.month-title span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

.month-nav .icon-button {
  width: 27px;
  height: 27px;
}

.month-nav .icon-button .icon {
  width: 13px;
  height: 13px;
}

.month-nav .today-button {
  height: 26px;
  padding: 0 8px;
  margin-right: 3px;
  border-radius: 7px;
  border: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  transition: background 0.2s, border-color 0.2s;
}

.month-nav .today-button:hover {
  background: rgba(255, 255, 252, 0.55);
  border-color: var(--hairline);
}

.month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
}

.month-weekdays span {
  padding-left: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.month-grid.is-fresh {
  animation: monthIn 0.4s var(--ease) both;
}

.month-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 61px;
  padding: 6px 7px 7px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(48, 45, 36, 0.027);
  text-align: left;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}

.month-day:hover {
  transform: translateY(-1px);
  border-color: rgba(48, 45, 36, 0.15);
  box-shadow: 0 3px 10px rgba(48, 40, 24, 0.05);
  z-index: 1;
}

.month-day.is-outside {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
  opacity: 0.35;
}

.month-day.is-future {
  opacity: 0.45;
  pointer-events: none;
}

.month-day.l1 {
  background: #eef0e7;
}

.month-day.l2 {
  background: #dde4d2;
}

.month-day.l3 {
  background: #c3d1b2;
}

.month-day.l4 {
  background: #9db18b;
}

.month-day.l5 {
  background: #5e7350;
}

.month-day.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2.5px rgba(41, 42, 35, 0.08);
}

.md-top {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.md-num {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.month-day.l3 .md-num,
.month-day.l4 .md-num,
.month-day.l5 .md-num,
.month-day.l4 .md-hits {
  color: #2c3327;
}

.month-day.l5 .md-num,
.month-day.l5 .md-hits {
  color: #fbf8ef;
}

.md-today {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.md-hits {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.md-hits.is-empty {
  color: var(--faint);
  font-weight: 400;
}

.md-error {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: rgba(189, 78, 54, 0.62);
}

.day-inspector {
  position: relative;
  padding: 17px 18px 16px;
  min-height: 462px;
}

.day-inspector > :not(.inspector-head) {
  animation: inspectorIn 0.38s var(--ease) both;
}

.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.inspector-title-wrap {
  min-width: 0;
}

.inspector-date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.today-chip {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inspector-nav {
  display: flex;
  gap: 1px;
  flex: none;
}

.inspector-nav .icon-button {
  width: 26px;
  height: 26px;
}

.inspector-nav .icon-button .icon {
  width: 13px;
  height: 13px;
}

.inspector-total {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 3px;
}

.inspector-total strong {
  color: var(--ink);
  font-size: 36px;
  font-weight: 450;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.inspector-total span {
  color: var(--muted);
  font-size: 10.5px;
}

.inspector-kpis {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 12px 0 16px;
  padding: 9px 0;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}

.day-kpi {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 11px;
}

.day-kpi:first-child {
  padding-left: 0;
}

.day-kpi + .day-kpi {
  border-left: 1px solid var(--hairline-soft);
}

.day-kpi span {
  color: var(--faint);
  font-size: 8.5px;
}

.day-kpi strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.hour-block {
  margin-bottom: 16px;
}

.subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.subhead h3 {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 550;
}

.subhead span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.hour-chart {
  position: relative;
  padding-top: 3px;
}

.hour-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 92px;
  padding-bottom: 1px;
  background-image: linear-gradient(to bottom, var(--hairline-soft) 1px, transparent 1px);
  background-size: 100% 33.333%;
}

.hour-bar {
  position: relative;
  flex: 1;
  min-width: 2px;
  border-radius: 2.5px 2.5px 1px 1px;
  background: rgba(127, 146, 112, 0.32);
  transition: background 0.2s, transform 0.2s;
}

.hour-bar.is-active {
  background: var(--sage);
}

.hour-bar:hover {
  background: var(--sage-deep);
  transform: scaleY(1.02);
}

.hour-bar.is-future-hour {
  background: rgba(48, 45, 36, 0.05);
}

.hour-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.breakdowns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--hairline-soft);
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.breakdown-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.breakdown-name {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-value {
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.breakdown-track {
  height: 2.5px;
  border-radius: 99px;
  background: rgba(48, 45, 36, 0.055);
  overflow: hidden;
}

.breakdown-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
  transition: width 0.6s var(--ease);
}

.breakdown-track i.tone-test {
  background: var(--gold);
}

.empty-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 300px;
  color: var(--faint);
  text-align: center;
}

.empty-day-mark {
  width: 44px;
  height: 55px;
  opacity: 0.36;
  transform: rotate(-4deg);
}

.empty-day-mark svg {
  width: 100%;
  height: auto;
}

.empty-day h3 {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
}

.empty-day p {
  max-width: 220px;
  font-size: 10px;
  line-height: 1.5;
}

.inspector-skeleton {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-top: 8px;
}

.skeleton-line {
  height: 9px;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(48, 45, 36, 0.05) 20%, rgba(255, 255, 255, 0.32) 50%, rgba(48, 45, 36, 0.05) 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton-line.w-30 {
  width: 30%;
}

.skeleton-line.w-52 {
  width: 52%;
}

.skeleton-line.w-70 {
  width: 70%;
}

.skeleton-block {
  height: 82px;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(48, 45, 36, 0.04) 20%, rgba(255, 255, 255, 0.28) 50%, rgba(48, 45, 36, 0.04) 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  margin-top: 4px;
}

/* ---------- Keys page ---------- */

.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  margin-bottom: 14px;
  border-radius: 11px;
  border: 1px solid rgba(127, 146, 112, 0.16);
  background: rgba(235, 239, 226, 0.44);
  color: var(--sage-deep);
  font-size: 10.5px;
}

.security-note .icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.security-note p {
  min-width: 0;
  color: var(--muted);
}

.security-note strong {
  color: var(--sage-deep);
  font-weight: 550;
}

.security-note .text-link {
  margin-left: auto;
  flex: none;
  color: var(--sage-deep);
}

.keys-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2.5px;
  border-radius: 9px;
  border: 1px solid var(--hairline-soft);
  background: rgba(48, 45, 36, 0.027);
}

.segment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.segment:hover {
  color: var(--muted);
}

.segment.is-active {
  color: var(--ink-soft);
  background: rgba(255, 254, 250, 0.78);
  box-shadow: 0 1px 2px rgba(48, 40, 24, 0.06);
}

.segment em {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-style: normal;
  color: var(--faint);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 196px;
  height: 31px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 254, 250, 0.4);
  transition: border-color 0.2s, background 0.2s;
}

.search-field:focus-within {
  border-color: rgba(92, 106, 78, 0.4);
  background: rgba(255, 255, 252, 0.75);
}

.search-field .icon {
  width: 12px;
  height: 12px;
  color: var(--faint);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  font-size: 10px;
}

.search-field input::placeholder {
  color: var(--faint);
}

.keys-card {
  overflow: hidden;
  animation: riseIn 0.46s 0.06s var(--ease) both;
}

.key-list-head {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 0.8fr 0.85fr 0.7fr 76px;
  gap: 12px;
  align-items: center;
  padding: 10px 17px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.key-list-head span:nth-child(4),
.key-list-head span:nth-child(5) {
  text-align: right;
}

.key-row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 0.8fr 0.85fr 0.7fr 76px;
  gap: 12px;
  align-items: center;
  padding: 13px 17px;
  border-bottom: 1px solid var(--hairline-soft);
  transition: background 0.2s;
}

.key-row:last-child {
  border-bottom: 0;
}

.key-row:hover {
  background: rgba(255, 255, 252, 0.35);
}

.key-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.key-identity .key-tile {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.key-identity .key-tile .icon {
  width: 14px;
  height: 14px;
}

.key-info {
  min-width: 0;
}

.key-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.key-name-line strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-preview {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.01em;
}

.key-cell {
  min-width: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.key-cell--mobile {
  display: none;
}

.key-cell span {
  display: none;
}

.key-cell--right {
  text-align: right;
}

.key-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid rgba(127, 146, 112, 0.18);
  background: rgba(235, 239, 226, 0.45);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.key-status::before {
  content: '';
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--sage);
}

.key-status--revoked {
  border-color: var(--hairline-soft);
  background: rgba(48, 45, 36, 0.035);
  color: var(--faint);
}

.key-status--revoked::before {
  background: var(--faint);
}

.key-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.key-action {
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--faint);
  font-size: 8.5px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.key-action:hover {
  border-color: var(--hairline);
  background: rgba(255, 255, 252, 0.55);
  color: var(--ink-soft);
}

.key-action--danger:hover {
  border-color: rgba(169, 71, 49, 0.14);
  background: rgba(246, 231, 224, 0.6);
  color: var(--accent-deep);
}

.key-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 20px;
  text-align: center;
}

.key-empty .key-empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  border-radius: 12px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 254, 250, 0.5);
  color: var(--faint);
}

.key-empty h3 {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
}

.key-empty p {
  max-width: 280px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.keys-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--faint);
  font-size: 9px;
}

.keys-footnote .icon {
  width: 11px;
  height: 11px;
}

/* ---------- Settings ---------- */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
  align-items: start;
  animation: riseIn 0.55s var(--ease) both;
}

.settings-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-card {
  padding: 18px;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.settings-card-head h2 {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.settings-card-head p {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.profile-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 17px;
  border-radius: 11px;
  border: 1px solid var(--hairline-soft);
  background: rgba(248, 245, 238, 0.42);
}

.profile-banner .avatar {
  width: 40px;
  height: 40px;
  font-size: 17px;
}

.profile-banner-info {
  min-width: 0;
}

.profile-banner-info strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-banner-info span {
  display: block;
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-banner em {
  margin-left: auto;
  flex: none;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.settings-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.settings-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 3px;
}

.save-state {
  color: var(--faint);
  font-size: 9px;
}

.registry-none {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.45;
}

.switch {
  position: relative;
  width: 32px;
  height: 19px;
  flex: none;
  margin-top: 1px;
  border-radius: 99px;
  border: 1px solid rgba(48, 45, 36, 0.12);
  background: rgba(48, 45, 36, 0.08);
  transition: background 0.24s var(--ease), border-color 0.24s;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 1px 2px rgba(48, 40, 24, 0.2);
  transition: transform 0.24s var(--ease);
}

.switch[aria-checked='true'] {
  background: var(--sage);
  border-color: var(--sage-deep);
}

.switch[aria-checked='true']::after {
  transform: translateX(13px);
}

.plan-name-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.plan-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.plan-price {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.plan-copy {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10px;
}

.plan-meter {
  margin-top: 14px;
}

.plan-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--faint);
  font-size: 8.5px;
}

.plan-meter-head strong {
  color: var(--ink-soft);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.plan-meter-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(48, 45, 36, 0.06);
  overflow: hidden;
}

.plan-meter-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), #99a985);
  transition: width 0.8s var(--ease);
}

.plan-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--hairline-soft);
}

.session-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.session-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--hairline-soft);
  color: var(--muted);
  background: rgba(255, 254, 250, 0.4);
}

.session-icon .icon {
  width: 13px;
  height: 13px;
}

.session-copy {
  min-width: 0;
}

.session-copy strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 550;
}

.session-copy span {
  display: block;
  margin-top: 1px;
  color: var(--faint);
  font-size: 9px;
}

.session-row .button {
  margin-left: auto;
  flex: none;
}

.provider-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid rgba(198, 154, 78, 0.32);
  background: rgba(198, 154, 78, 0.07);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  animation: payPaneIn 0.4s var(--ease) both;
}

.provider-banner .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex: none;
  color: #8a6425;
}

.provider-banner strong {
  color: #7d5a20;
  font-weight: 550;
}

.provider-banner code {
  font-family: var(--font-mono);
  font-size: 8.5px;
}

/* Which registries the server actually holds credentials for. */
.registry-board {
  display: grid;
  gap: 1px;
  margin-top: 12px;
  padding: 11px 12px 12px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background: var(--surface);
}

.registry-board-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 12.5px;
}

.registry-board-head .icon {
  width: 12px;
  height: 12px;
  color: var(--sage-deep);
}

.registry-board-head small {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: right;
}

.registry-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
}

.registry-dot {
  width: 5.5px;
  height: 5.5px;
  flex: none;
  border-radius: 50%;
}

.registry-dot.is-live {
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.1);
  animation: statusPulse 3.2s ease-in-out infinite;
}

.registry-dot.is-off {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 154, 78, 0.12);
}

.registry-name {
  flex: none;
  max-width: 46%;
  color: var(--ink);
  font-weight: 500;
}

.registry-services {
  min-width: 0;
  margin-left: 2px;
  color: var(--faint);
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-state {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.registry-state.is-live {
  color: var(--sage-deep);
}

.registry-state.is-off {
  color: #8a6425;
}

@media (max-width: 560px) {
  .registry-name {
    max-width: none;
    flex: 1 1 auto;
  }

  .registry-services {
    display: none;
  }
}

/* ---------- Modals ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(43, 40, 31, 0.34);
  animation: fadeIn 0.22s var(--ease) both;
}

.modal {
  position: relative;
  width: min(440px, 100%);
  max-height: min(86dvh, 760px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(255, 255, 255, 0.6), transparent 55%),
    #faf8f2;
  box-shadow: 0 40px 90px rgba(45, 36, 20, 0.24), 0 8px 24px rgba(45, 36, 20, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  animation: modalIn 0.32s var(--ease) both;
}

.modal--wide {
  width: min(650px, 100%);
}

.modal--small {
  width: min(390px, 100%);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  color: var(--faint);
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(48, 45, 36, 0.055);
  color: var(--ink-soft);
}

.modal-close .icon {
  width: 14px;
  height: 14px;
}

.modal-head {
  margin-bottom: 18px;
  padding-right: 25px;
}

.modal-head .eyebrow {
  margin-bottom: 6px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.modal-copy {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 20px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field > label,
.form-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
}

.form-field input {
  height: 40px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: rgba(255, 254, 250, 0.64);
  outline: 0;
  font-size: 12px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-field input:focus {
  border-color: rgba(92, 106, 78, 0.5);
  background: rgba(255, 255, 252, 0.9);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.1);
}

.form-field input::placeholder {
  color: var(--faint);
}

.input-error {
  color: var(--accent-deep);
  font-size: 9px;
  min-height: 0;
}

.env-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.env-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: rgba(255, 254, 250, 0.46);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.env-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.env-choice:has(input:checked) {
  border-color: rgba(92, 106, 78, 0.5);
  background: rgba(248, 250, 243, 0.9);
  box-shadow: 0 0 0 2.5px rgba(127, 146, 112, 0.09);
}

.env-choice-title {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 550;
}

.env-choice-title .env-dot {
  box-shadow: none;
}

.env-choice span:last-child {
  color: var(--faint);
  font-size: 8.5px;
}

.modal-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(48, 45, 36, 0.032);
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
}

.modal-note .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  flex: none;
}

.created-wrap {
  text-align: left;
}

.created-seal {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  box-shadow: 0 0 0 6px rgba(231, 235, 223, 0.4);
}

.created-seal .icon {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.secret-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px 0 10px;
  padding: 11px 10px 11px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(92, 106, 78, 0.3);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 4px),
    rgba(240, 243, 232, 0.6);
}

.secret-strip::before,
.secret-strip::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(250, 248, 242, 0.98);
  border: 1px solid var(--hairline-soft);
  transform: translateY(-50%);
}

.secret-strip::before {
  left: -5px;
}

.secret-strip::after {
  right: -5px;
}

.secret-value {
  overflow: auto;
  flex: 1;
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  scrollbar-width: none;
}

.secret-value::-webkit-scrollbar {
  display: none;
}

.icon-copy {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 6px;
  border: 1px solid rgba(92, 106, 78, 0.18);
  background: rgba(255, 255, 252, 0.62);
  color: var(--sage-deep);
  transition: background 0.2s, border-color 0.2s;
}

.icon-copy:hover {
  background: #fffdf8;
  border-color: rgba(92, 106, 78, 0.35);
}

.icon-copy .icon {
  width: 12px;
  height: 12px;
}

.code-block {
  position: relative;
  overflow: hidden;
  padding: 12px 13px;
  border-radius: 10px;
  background: #2b2d27;
  color: #e5e1d5;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block .code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: #b9b5a8;
  background: rgba(255, 255, 255, 0.055);
  transition: background 0.2s, color 0.2s;
}

.code-block .code-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f3eee2;
}

.code-block .code-copy .icon {
  width: 12px;
  height: 12px;
}

.code-keyword {
  color: #c9b98a;
}

.code-string {
  color: #aebd97;
}

.created-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.created-actions .fine {
  color: var(--faint);
  font-size: 8px;
  line-height: 1.4;
}

.modal-divider {
  height: 1px;
  margin: 17px 0;
  background: var(--hairline-soft);
}

/* ---------- Confirm modal ---------- */

.confirm-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.confirm-mark .icon {
  width: 16px;
  height: 16px;
}

.confirm-body {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.confirm-body strong {
  color: var(--ink-soft);
  font-weight: 550;
}

/* ---------- Command palette ---------- */

.command-backdrop {
  place-items: start center;
  padding-top: max(10vh, 64px);
}

.command-panel {
  width: min(500px, 100%);
  overflow: hidden;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: #fbf9f3;
  box-shadow: 0 40px 90px rgba(45, 36, 20, 0.22), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  animation: modalIn 0.28s var(--ease) both;
}

.command-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--hairline-soft);
}

.command-search .icon {
  width: 15px;
  height: 15px;
  color: var(--faint);
}

.command-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 13px;
}

.command-search input::placeholder {
  color: var(--faint);
}

.command-search kbd {
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--hairline-soft);
  color: var(--faint);
  font-size: 8px;
}

.command-list {
  max-height: 330px;
  overflow-y: auto;
  padding: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(48, 45, 36, 0.2) transparent;
  overscroll-behavior: contain;
}

.command-list::-webkit-scrollbar {
  width: 9px;
}

.command-list::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 99px;
  background: rgba(48, 45, 36, 0.2);
  background-clip: padding-box;
}

.command-group-label {
  padding: 8px 9px 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 35px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.command-item > .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
  flex: none;
}

.command-item:hover,
.command-item.is-focused {
  background: rgba(48, 45, 36, 0.055);
  color: var(--ink);
}

.command-item.is-focused > .icon {
  color: var(--muted);
}

.command-item .command-hint {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.command-empty {
  padding: 30px 20px;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
}

.command-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 9px 15px;
  border-top: 1px solid var(--hairline-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.command-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.command-foot kbd {
  padding: 1px 4px;
  border: 1px solid var(--hairline-soft);
  border-radius: 3px;
  font-size: 7px;
}

/* ---------- Popover ---------- */

.profile-popover {
  position: fixed;
  z-index: 95;
  width: 232px;
  padding: 6px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: #fbf9f3;
  box-shadow: 0 22px 48px rgba(45, 36, 20, 0.17), 0 2px 6px rgba(45, 36, 20, 0.05);
  animation: popIn 0.2s var(--ease) both;
}

.popover-account {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline-soft);
}

.popover-account .avatar {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.popover-account div {
  min-width: 0;
}

.popover-account strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-account span {
  display: block;
  overflow: hidden;
  color: var(--faint);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: left;
  transition: background 0.16s, color 0.16s;
}

.popover-item .icon {
  width: 13px;
  height: 13px;
  color: var(--faint);
}

.popover-item:hover {
  background: rgba(48, 45, 36, 0.05);
  color: var(--ink-soft);
}

.popover-item--danger {
  color: var(--accent-deep);
}

.popover-item--danger .icon {
  color: var(--accent-deep);
}

.popover-sep {
  height: 1px;
  margin: 4px 2px;
  background: var(--hairline-soft);
}

/* ---------- Tooltip ---------- */

.heat-tooltip {
  position: fixed;
  z-index: 120;
  min-width: 176px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(40, 42, 35, 0.96);
  color: #f7f3e9;
  box-shadow: 0 12px 26px rgba(40, 32, 20, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}

.heat-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tt-date {
  color: #b9b5a8;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tt-main {
  font-size: 11px;
  font-weight: 500;
}

.tt-main strong {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.tt-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: #aaa69a;
  font-size: 8.5px;
}

.tt-sub i {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--sage);
}

.tt-hint {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #a9a597;
  font-family: var(--font-mono);
  font-size: 7.5px;
}

/* ---------- Toasts ---------- */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #2a2c25;
  color: #f6f2e8;
  box-shadow: 0 12px 32px rgba(45, 36, 20, 0.22);
  font-size: 10.5px;
  animation: toastIn 0.32s var(--ease) both;
  pointer-events: auto;
}

.toast.is-leaving {
  animation: toastOut 0.25s var(--ease) both;
}

.toast-region.is-above-dock {
  bottom: 92px;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex: none;
  background: rgba(255, 255, 255, 0.08);
  color: #c8d4b7;
}

.toast-icon .icon {
  width: 11px;
  height: 11px;
}

.toast--error .toast-icon {
  color: #efb3a1;
}

/* ---------- Docs & status ---------- */

.docs-section {
  margin-top: 18px;
}

.docs-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  margin-bottom: 7px;
}

.docs-section h3 .icon {
  width: 13px;
  height: 13px;
  color: var(--faint);
}

.docs-section p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.docs-endpoint {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 254, 250, 0.45);
}

.docs-endpoint .method-tag {
  background: rgba(48, 45, 36, 0.055);
  color: var(--muted);
}

.docs-endpoint code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-endpoint .icon-copy {
  width: 24px;
  height: 24px;
}

.status-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-bottom: 13px;
  border-radius: 11px;
  border: 1px solid rgba(127, 146, 112, 0.16);
  background: rgba(235, 239, 226, 0.42);
}

.status-hero .status-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(127, 146, 112, 0.24);
}

.status-orbit::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(127, 146, 112, 0.1);
  animation: statusPulse 3s ease-in-out infinite;
}

.status-hero strong {
  display: block;
  color: var(--sage-deep);
  font-size: 12px;
  font-weight: 550;
}

.status-hero span {
  display: block;
  margin-top: 1px;
  color: var(--faint);
  font-size: 9px;
}

.status-list {
  border-top: 1px solid var(--hairline-soft);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-size: 10px;
}

.status-row:last-child {
  border-bottom: 0;
}

.status-row .status-dot {
  width: 4.5px;
  height: 4.5px;
  animation: none;
}

.status-row span:last-child {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-row span.is-warn {
  color: #8a6425;
}

/* ---------- Misc ---------- */

.empty-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 154px;
  padding: 20px;
  text-align: center;
}

.empty-block .empty-mark {
  width: 37px;
  height: 46px;
  margin-bottom: 2px;
  opacity: 0.34;
  transform: rotate(-3deg);
}

.empty-block .empty-mark svg {
  width: 100%;
  height: auto;
}

.empty-block h3 {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
}

.empty-block p {
  max-width: 240px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.empty-block .button {
  margin-top: 5px;
}

.mini-rule {
  width: 28px;
  height: 1px;
  margin: 4px auto;
  background: var(--hairline);
}

.no-data-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  color: var(--faint);
  font-size: 9.5px;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .view {
    padding-left: 30px;
    padding-right: 30px;
  }

  .stat-value {
    font-size: 27px;
  }

  .stat-spark {
    width: 48px;
  }

  .key-list-head,
  .key-row {
    grid-template-columns: minmax(0, 2fr) 0.8fr 0.9fr 0.6fr 70px;
  }
}

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .usage-lower {
    grid-template-columns: 1fr;
  }

  .day-inspector {
    min-height: 0;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-column--side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .auth-shell {
    grid-template-columns: 0.94fr 1.06fr;
  }

  .auth-art {
    padding: 28px;
  }

  .auth-poster {
    width: 190px;
  }

  .api-postmark {
    right: -60px;
  }

  .heatmap {
    min-width: max-content;
  }

  .key-list-head {
    display: none;
  }

  .key-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 16px;
  }

  .key-cell {
    display: none;
  }

  .key-status {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
  }

  .key-actions {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-end;
  }

  .key-identity {
    grid-row: 1 / span 2;
  }

  .key-cell--mobile {
    display: flex;
    grid-column: 1;
    gap: 10px;
    margin-top: -3px;
    padding-left: 42px;
  }

  .key-cell--mobile span {
    display: inline;
  }
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    width: min(440px, 100%);
    min-height: auto;
  }

  .auth-art {
    display: none;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 26px;
  }

  .auth-mobile-brand .brand-mark {
    width: 27px;
    height: 27px;
  }

  .auth-mobile-brand .auth-brand-name {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
  }

  .auth-mobile-brand .auth-brand-name span {
    color: var(--muted);
    font-weight: 450;
  }

  .auth-mobile-brand .brand-slash {
    display: inline-block;
  }

  .auth-mobile-brand .auth-brand-sub {
    display: inline;
  }

  .auth-screen {
    padding: 16px;
    align-items: center;
    overflow-y: auto;
  }

  .auth-panel {
    padding: 26px 28px 20px;
  }

  .auth-panel-inner {
    padding-top: 0;
  }

  .app-shell {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: 0;
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-column: 1;
    grid-row: 1;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(284px, 86vw);
    z-index: 70;
    border-right: 1px solid rgba(48, 45, 36, 0.1);
    background: #f6f3ec;
    box-shadow: 0 20px 60px rgba(45, 36, 20, 0.18);
    transform: translateX(-104%);
    transition: transform 0.36s var(--ease);
    overflow-y: auto;
  }

  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(43, 40, 31, 0.32);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .app-shell.nav-open .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  .sidebar .nav-item,
  .sidebar .side-action {
    height: 38px;
  }

  .sidebar .env-row {
    height: 34px;
  }

  .sidebar .side-utility {
    height: 36px;
  }

  .mobile-nav-button {
    display: grid;
    margin-left: -7px;
  }

  .topbar {
    height: 54px;
    padding: 0 16px;
  }

  .topbar-left {
    min-width: 0;
  }

  .crumbs {
    display: none;
  }

  .topbar-right {
    min-width: 0;
  }

  .avatar--top {
    display: grid;
    margin-left: 3px;
  }

  .status-pill {
    height: 27px;
    font-size: 9.5px;
    padding: 0 9px;
  }

  .status-meta {
    display: none;
  }

  .status-divider {
    display: none;
  }

  .view {
    padding: 8px 20px 32px;
  }

  .hero {
    padding-top: 6px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-top: 8px;
  }

  .page-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .page-actions .button--dark {
    margin-left: auto;
  }

  .usage-facts {
    gap: 8px 13px;
  }

  .settings-column--side {
    grid-template-columns: 1fr;
  }

  .keys-toolbar {
    flex-wrap: wrap;
  }

  .search-field {
    width: 100%;
    order: 2;
  }

  .segmented {
    order: 1;
  }

  .endpoint-dock {
    bottom: 10px;
    gap: 9px;
  }

  .dock-actions .button--quiet {
    display: none;
  }
}

@media (max-width: 680px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 12px 12px 11px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-spark {
    display: none;
  }

  .stat-foot {
    font-size: 8.5px;
  }

  .key-action {
    height: 30px;
    padding: 0 9px;
    font-size: 9px;
  }

  .pg-text-button {
    min-height: 30px;
  }

  .activity-card {
    padding: 14px 13px 11px;
  }

  .card-head {
    gap: 8px;
  }

  .card-head-right {
    gap: 7px;
  }

  .card-head-right .year-chip {
    display: none;
  }

  .heat-legend {
    display: none;
  }

  .heat-toolbar {
    margin-top: 9px;
  }

  .activity-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .usage-facts {
    flex-wrap: wrap;
    overflow: visible;
    gap: 7px 16px;
  }

  .usage-fact {
    flex: none;
  }

  .fact-divider {
    display: none;
  }

  .year-card {
    padding: 14px 13px 12px;
  }

  .page-title {
    font-size: 32px;
  }

  .page-lede {
    font-size: 11px;
  }

  .page-actions .year-control {
    height: 34px;
  }

  .month-card {
    padding: 13px 12px;
  }

  .month-day {
    min-height: 49px;
    padding: 5px 5px 6px;
    border-radius: 7px;
  }

  .md-num {
    font-size: 8px;
  }

  .md-hits {
    font-size: 10px;
  }

  .month-weekdays span {
    padding-left: 3px;
    font-size: 7px;
  }

  .month-weekdays,
  .month-grid {
    gap: 3px;
  }

  .day-inspector {
    padding: 15px 14px;
  }

  .breakdowns {
    gap: 13px;
  }

  .inspector-total strong {
    font-size: 32px;
  }

  .endpoint-dock {
    padding: 8px;
    border-radius: 14px;
  }

  .dock-icon {
    width: 29px;
    height: 29px;
  }

  .dock-actions .button--dark {
    height: 33px;
    padding: 0 10px;
    font-size: 10px;
  }

  .dock-endpoint code {
    font-size: 9px;
  }

  .method-tag {
    font-size: 6.5px;
  }

  .dock-copy-button {
    display: none;
  }

  .content-grid {
    gap: 10px;
  }

  .panel {
    padding: 14px 13px 11px;
  }

  .req-method {
    display: none;
  }

  .request-row {
    grid-template-columns: 6px minmax(0, 1fr) auto 32px;
  }

  .req-meta {
    display: none;
  }

  .req-time {
    grid-column: 4;
  }

  .keys-toolbar {
    gap: 8px;
  }

  .segmented {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .key-row {
    padding: 12px;
  }

  .key-cell--mobile {
    padding-left: 0;
  }

  .security-note {
    align-items: flex-start;
  }

  .security-note .text-link {
    display: none;
  }

  .settings-card {
    padding: 15px;
  }

  .settings-form-row {
    grid-template-columns: 1fr;
  }

  .profile-banner {
    padding: 10px;
  }

  .modal {
    width: 100%;
    max-height: 90dvh;
    padding: 19px;
    border-radius: 17px;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: end;
  }

  .command-backdrop {
    align-items: start;
    padding: 10px;
    padding-top: 32px;
  }

  .command-panel {
    border-radius: 15px;
  }

  .created-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .created-actions .fine {
    text-align: center;
  }

  .created-actions .button {
    width: 100%;
  }

  .env-choices {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal-actions .button {
    width: 100%;
  }

  .toast-region {
    bottom: 16px;
    width: calc(100vw - 28px);
  }

  .toast-region.is-above-dock {
    bottom: 78px;
  }

  .toast {
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .auth-screen {
    padding: 0;
    background: rgba(246, 243, 236, 0.6);
  }

  .auth-shell {
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: rgba(251, 249, 244, 0.82);
  }

  .auth-panel {
    padding: 22px 22px 18px;
    min-height: 100dvh;
  }

  .auth-panel-inner {
    width: 100%;
    margin: auto;
  }

  .auth-mobile-brand {
    margin-bottom: 22px;
  }

  .auth-heading h2 {
    font-size: 31px;
  }

  .auth-tabs {
    margin-bottom: 26px;
  }

  .auth-panel-foot {
    padding-top: 18px;
    display: none;
  }

  .env-choices {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .env-choice {
    padding: 8px 9px;
  }

  .env-choice span:last-child {
    font-size: 8px;
    line-height: 1.35;
  }

  .modal {
    padding: 17px;
  }

  .modal-head {
    margin-bottom: 14px;
  }

  .modal-actions {
    margin-top: 14px;
  }

  .hero-kicker {
    justify-content: center;
    column-gap: 10px;
    font-size: 8.5px;
  }

  .hero-kicker > .dot-sep {
    display: none;
  }

  .hero-kicker > .registry-tag {
    margin-left: 0;
  }

  .hero-title {
    font-size: 29px;
  }

  .hero-sub {
    font-size: 11.5px;
    max-width: 290px;
  }

  .hero-stamp-wrap {
    width: 95px;
    margin-bottom: 11px;
  }

  .hero-stamp {
    width: 86px;
  }

  .hero-postmark {
    width: 82px;
    right: -38px;
    top: 2px;
  }

  .view {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .status-pill {
    gap: 5px;
    height: 26px;
    padding: 0 9px;
    font-size: 9px;
  }

  .status-label {
    display: inline-block;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  .status-pill .status-dot {
    margin: 0;
  }

  .topbar-right .icon-button:first-child {
    display: none;
  }

  .stat-head {
    font-size: 10px;
  }

  .stat-value {
    font-size: 21px;
  }

  .stat-unit {
    font-size: 8px;
  }

  .stat-foot {
    min-height: 0;
    margin-top: 9px;
    font-size: 9px;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 1px;
  }

  .stat-foot .stat-note {
    overflow: visible;
    text-overflow: clip;
  }

  .stat-icon {
    width: 21px;
    height: 21px;
  }

  .card-title {
    font-size: 12px;
  }

  .card-sub {
    font-size: 9.5px;
  }

  .card-head-right .text-link {
    font-size: 9.5px;
  }

  .page-actions .button {
    flex: 1;
    min-width: 0;
  }

  .page-actions .year-control {
    flex: none;
  }

  .page-actions .button--quiet {
    display: none;
  }

  .usage-facts {
    margin-bottom: 9px;
  }

  .fact-divider {
    display: none;
  }

  .seed-tag {
    display: none;
  }

  .month-nav .today-button {
    display: none;
  }

  .month-day {
    min-height: 42px;
    border-radius: 6px;
  }

  .md-hits {
    font-size: 8.5px;
  }

  .day-kpi {
    padding: 0 8px;
  }

  .day-kpi strong {
    font-size: 11px;
  }

  .hour-bars {
    gap: 1.5px;
    height: 76px;
  }

  .breakdowns {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .endpoint-dock .button--dark span.button-text {
    display: none;
  }

  .dock-label {
    display: none;
  }

  .search-field {
    height: 30px;
  }

  .key-name-line strong {
    font-size: 11px;
  }

  .key-status {
    font-size: 6.5px;
    height: 17px;
  }

  .settings-card-head {
    margin-bottom: 13px;
  }

  .profile-banner em {
    display: none;
  }

  .session-row {
    flex-wrap: wrap;
  }

  .session-row .button {
    width: 100%;
    margin-left: 39px;
  }

  .command-foot {
    display: none;
  }
}

/* ---------- Motion ---------- */

@keyframes shellIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ledgerOut {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes ledgerIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes monthIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heatSwap {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes inspectorIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(5px) scale(0.97);
  }
}

@keyframes stampFloat {
  0%,
  100% {
    transform: rotate(-3.5deg) translateY(0);
  }
  50% {
    transform: rotate(-2.2deg) translateY(-3px);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.62;
    transform: scale(0.82);
  }
}

@keyframes shimmer {
  from {
    background-position: 150% 0;
  }
  to {
    background-position: -50% 0;
  }
}

@keyframes softShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  55% {
    transform: translateX(2px);
  }
  80% {
    transform: translateX(-1px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Playground ---------- */

.nav-beta {
  margin-left: auto;
  padding: 1px 4px;
  border: 1px solid rgba(198, 154, 80, 0.32);
  border-radius: 3px;
  color: #7d5c22;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page--playground {
  padding-bottom: 30px;
}

.pg-kicker {
  margin-bottom: 3px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pg-page-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.5);
  color: var(--muted);
}

.pg-page-chip code {
  color: var(--ink-soft);
  font-size: 9.5px;
}

.pg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 12px;
  align-items: stretch;
}

.pg-under {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 12px;
  margin-top: 12px;
}

.pg-composer,
.pg-response,
.pg-curl,
.pg-history {
  min-width: 0;
  padding: 17px 18px 16px;
}

.pg-composer {
  display: flex;
  flex-direction: column;
}

.pg-card-head {
  margin-bottom: 14px;
}

.pg-edge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(127, 146, 112, 0.2);
  border-radius: 999px;
  background: rgba(231, 235, 223, 0.55);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
}

.pg-edge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.12);
  animation: pgPulse 2.8s ease-in-out infinite;
}

.pg-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.pg-method--post {
  background: var(--sage-wash);
  color: var(--sage-deep);
}

.pg-method--get {
  background: rgba(198, 154, 80, 0.16);
  color: #78591f;
}

.pg-endpoints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 14px;
}

.pg-endpoint {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--hairline-soft);
  border-radius: 11px;
  background: rgba(255, 254, 250, 0.36);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.pg-endpoint:hover {
  border-color: var(--hairline-strong);
  background: rgba(255, 255, 252, 0.62);
}

.pg-endpoint.is-active {
  border-color: rgba(92, 106, 78, 0.35);
  background: rgba(247, 249, 242, 0.78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.62) inset, 0 4px 12px rgba(60, 70, 50, 0.04);
}

.pg-endpoint:focus-visible {
  outline: 2px solid rgba(127, 146, 112, 0.45);
  outline-offset: 2px;
}

.pg-endpoint-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pg-endpoint-copy code {
  color: var(--ink-soft);
  font-size: 9.5px;
}

.pg-endpoint-copy small {
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.35;
}

.pg-endpoint-tick {
  display: grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: auto;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.pg-endpoint-tick .icon {
  width: 8px;
  height: 8px;
}

.pg-endpoint.is-active .pg-endpoint-tick {
  border-color: var(--sage-deep);
  background: var(--sage-deep);
  color: #f7f4ea;
}

.pg-field {
  margin-bottom: 13px;
}

.pg-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pg-select-wrap {
  position: relative;
}

.pg-select-wrap select {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 10px;
  appearance: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.6);
  color: var(--ink-soft);
  font-size: 10.5px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pg-select-wrap select:hover {
  border-color: var(--hairline-strong);
}

.pg-select-wrap select:focus-visible {
  outline: none;
  border-color: rgba(92, 106, 78, 0.45);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.1);
}

.pg-select-wrap > .icon {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 12px;
  height: 12px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.pg-key-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 8.5px;
}

.pg-key-meta .env-dot {
  width: 5px;
  height: 5px;
}

.pg-key-meta code {
  color: var(--muted);
  font-size: 8.5px;
}

.pg-key-live {
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.pg-dot {
  color: var(--faint);
}

.pg-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pg-json-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 8px;
}

.pg-json-state .icon {
  width: 9px;
  height: 9px;
}

.pg-json-state.is-invalid {
  color: var(--accent-deep);
}

.pg-editor {
  display: flex;
  min-height: 178px;
  max-height: 300px;
  border-radius: 11px;
  overflow: hidden;
  background: #2b2d27;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.pg-gutter {
  flex: none;
  width: 32px;
  padding: 12px 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.14);
  color: #9a9c8e;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.75;
  text-align: right;
  user-select: none;
}

.pg-gutter span {
  display: block;
  padding-right: 8px;
}

.pg-editor textarea {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: #e5e1d5;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.75;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  caret-color: #d9cfa9;
}

.pg-editor textarea::selection {
  background: rgba(201, 185, 138, 0.28);
}

.pg-editor-note {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

.pg-inline-error {
  min-height: 12px;
  margin-top: 4px;
  color: var(--accent-deep);
  font-size: 9px;
}

.pg-get {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 206px;
  margin-bottom: 10px;
  padding: 22px 18px;
  border: 1px dashed rgba(48, 45, 36, 0.14);
  border-radius: 12px;
  background: radial-gradient(85% 110% at 50% 0%, rgba(255, 255, 253, 0.5), rgba(251, 249, 244, 0.14));
  text-align: center;
}

.pg-get-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(127, 146, 112, 0.2);
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.pg-get-mark .icon {
  width: 14px;
  height: 14px;
}

.pg-get h3 {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
}

.pg-get p {
  max-width: 300px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.55;
}

.pg-composer select:disabled,
.pg-composer textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.pg-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 13px;
}

.pg-shortcut {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
  font-size: 8.5px;
}

.pg-shortcut kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: rgba(255, 254, 250, 0.55);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.pg-shortcut span {
  margin-left: 3px;
}

.pg-send-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  flex-wrap: wrap;
}

.pg-text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 450;
  transition: color 0.2s;
}

.pg-text-button .icon {
  width: 11px;
  height: 11px;
}

.pg-text-button:hover {
  color: var(--ink);
}

.pg-text-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.pg-text-button:focus-visible {
  outline: 2px solid rgba(127, 146, 112, 0.4);
  outline-offset: 3px;
  border-radius: 4px;
}

.pg-response {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pg-response-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pg-status-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.pg-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pg-status i {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: currentColor;
}

.pg-status.is-idle {
  background: rgba(48, 45, 36, 0.05);
  color: var(--faint);
}

.pg-status.is-ok {
  background: rgba(127, 146, 112, 0.14);
  color: var(--sage-deep);
}

.pg-status.is-warn {
  background: rgba(189, 78, 54, 0.1);
  color: var(--accent-deep);
}

.pg-latency {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.pg-receipt {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(48, 45, 36, 0.14);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.34);
}

.pg-receipt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pg-receipt-id {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--faint);
}

.pg-receipt-id .icon {
  flex: none;
  width: 11px;
  height: 11px;
}

.pg-receipt-id code {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-recorded {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
}

.pg-recorded .icon {
  width: 9px;
  height: 9px;
}

.pg-recorded.is-soft {
  color: var(--accent-deep);
}

.pg-json {
  flex: 1;
  min-height: 150px;
  max-height: 265px;
  margin: 0;
  padding: 12px 13px;
  overflow: auto;
  border: 1px solid rgba(48, 45, 36, 0.07);
  border-radius: 9px;
  background: #f6f2e8;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.json-key { color: #77591f; }
.json-string { color: #4c6040; }
.json-number { color: #a24831; }
.json-literal { color: #7e611e; }

.pg-headers {
  padding-top: 8px;
  border-top: 1px solid var(--hairline-soft);
}

.pg-headers-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pg-headers-toggle span {
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(48, 45, 36, 0.06);
  color: var(--faint);
  font-size: 7px;
}

.pg-headers-toggle .icon {
  width: 11px;
  height: 11px;
  margin-left: auto;
  transition: transform 0.25s var(--ease);
}

.pg-headers.is-open .pg-headers-toggle .icon {
  transform: rotate(180deg);
}

.pg-headers-body {
  display: grid;
  gap: 4px;
  padding-top: 7px;
}

.pg-header-row {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
}

.pg-header-row code {
  flex: none;
  color: var(--muted);
}

.pg-header-row span {
  overflow: hidden;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-receipt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--hairline-soft);
}

.pg-receipt-key {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.pg-receipt-actions {
  display: flex;
  gap: 12px;
}

.pg-idle {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 16px 22px;
  border: 1px dashed rgba(48, 45, 36, 0.14);
  border-radius: 12px;
  background: radial-gradient(80% 100% at 50% 0%, rgba(255, 255, 253, 0.55), rgba(251, 249, 244, 0.16));
  text-align: center;
}

.pg-idle-stamp {
  width: 84px;
  opacity: 0.85;
  filter: saturate(0.9);
  transform: rotate(-2.5deg);
}

.pg-idle-stamp svg {
  width: 100%;
  height: auto;
}

.pg-idle h3 {
  margin-top: 14px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.pg-idle > p {
  max-width: 285px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
}

.pg-idle-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.pg-idle-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.pg-idle-chips .icon {
  width: 10px;
  height: 10px;
}

.pg-sending {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(48, 45, 36, 0.12);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.3);
}

.pg-skel,
.pg-skel-block {
  display: block;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(48, 45, 36, 0.045) 20%, rgba(255, 255, 255, 0.4) 50%, rgba(48, 45, 36, 0.045) 80%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

.pg-skel {
  height: 8px;
}

.pg-skel-block {
  height: 112px;
  margin: 4px 0 8px;
  border-radius: 9px;
}

.pg-skel.w-42 { width: 42%; }
.pg-skel.w-70 { width: 70%; }
.pg-skel.w-52 { width: 52%; }
.pg-skel.w-30 { width: 30%; }

.pg-error-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  border: 1px dashed rgba(189, 78, 54, 0.2);
  border-radius: 12px;
  background: rgba(246, 231, 224, 0.2);
  text-align: center;
}

.pg-error-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.pg-error-mark .icon {
  width: 15px;
  height: 15px;
}

.pg-error-body p {
  max-width: 280px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.pg-curl .card-head {
  margin-bottom: 11px;
}

.pg-curl-block {
  margin: 0;
  padding: 13px 14px;
  overflow-x: auto;
  border-radius: 11px;
  background: #2b2d27;
  color: #d9d4c4;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.pg-history .card-head {
  margin-bottom: 10px;
}

.pg-history-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.pg-history-count {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.pg-history-list {
  display: flex;
  flex-direction: column;
  min-height: 104px;
}

.pg-history-empty {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 8px;
  color: var(--faint);
}

.pg-history-empty .icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.pg-history-empty p {
  font-size: 9px;
  line-height: 1.5;
}

.pg-run {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto 22px;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border-top: 1px solid var(--hairline-soft);
}

.pg-run:first-child {
  border-top: 0;
}

.pg-run-method {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 500;
}

.pg-run-path {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-run-status {
  font-family: var(--font-mono);
  font-size: 8px;
}

.pg-run-status.is-ok { color: var(--sage-deep); }
.pg-run-status.is-warn { color: var(--accent-deep); }

.pg-run-ms {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.pg-run-time {
  color: var(--faint);
  font-size: 8px;
  text-align: right;
}

.pg-run-reuse {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: var(--faint);
  transition: background 0.2s, color 0.2s;
}

.pg-run-reuse:hover {
  background: rgba(48, 45, 36, 0.05);
  color: var(--ink-soft);
}

.pg-run-reuse .icon {
  width: 11px;
  height: 11px;
}

.pg-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 24px;
  text-align: center;
}

.pg-empty-seal {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.pg-empty-seal .icon {
  width: 20px;
  height: 20px;
}

.pg-empty h2 {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 400;
}

.pg-empty > p:not(.eyebrow) {
  max-width: 350px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.pg-empty .button {
  margin-top: 10px;
}

.pg-grid.is-swapping .pg-composer {
  animation: pgSwapIn 0.4s var(--ease) both;
}

.pg-grid.is-swapping .pg-response {
  animation: pgSwapIn 0.4s 0.04s var(--ease) both;
}

.pg-response.is-fresh .pg-receipt {
  animation: pgReceiptIn 0.46s var(--ease) both;
}

.pg-response.is-fresh .pg-json {
  animation: pgReceiptIn 0.5s 0.05s var(--ease) both;
}

@keyframes pgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.62; transform: scale(0.82); }
}

@keyframes pgSwapIn {
  from { opacity: 0; transform: translateY(7px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

@keyframes pgReceiptIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .heatmap-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(48, 45, 36, 0.18) transparent;
    padding-bottom: 6px;
  }

  .heatmap-scroll::-webkit-scrollbar {
    display: block;
    height: 5px;
  }

  .heatmap-scroll::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: rgba(48, 45, 36, 0.18);
  }
}

/* ---------- Entry curtain ---------- */

.entry-curtain {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(52% 60% at 50% 36%, rgba(255, 254, 250, 0.9), transparent 64%),
    radial-gradient(120% 100% at 5% 0%, rgba(219, 227, 204, 0.95), transparent 56%),
    radial-gradient(100% 110% at 100% 100%, rgba(238, 222, 198, 0.85), transparent 58%),
    #f0ebdf;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.14s ease-out, transform 0.62s cubic-bezier(0.64, 0, 0.18, 1);
  will-change: opacity, transform;
}

.entry-curtain.is-visible {
  opacity: 1;
}

.entry-curtain::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(48, 45, 36, 0.09);
  border-radius: 18px;
  pointer-events: none;
}

.entry-curtain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(48, 45, 36, 0.16) 0.6px, transparent 0.7px);
  background-size: 5px 5px;
  opacity: 0.3;
  pointer-events: none;
}

.entry-curtain.is-opening {
  opacity: 1;
  transform: translateY(-102%);
}

.entry-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  text-align: center;
  transition: opacity 0.12s ease, transform 0.18s var(--ease);
}

.entry-curtain.is-opening .entry-inner {
  transition: none;
}

.entry-stamp-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.entry-postmark {
  position: absolute;
  top: 4px;
  left: 56%;
  width: 152px;
  color: var(--muted);
  opacity: 0.3;
  transform: rotate(7deg);
}

.entry-postmark svg {
  width: 100%;
  height: auto;
}

.entry-stamp {
  position: relative;
  z-index: 1;
  width: 122px;
  opacity: 0;
  filter: drop-shadow(0 10px 18px rgba(57, 47, 29, 0.12));
  transform: translateY(-26px) scale(1.5) rotate(-11deg);
  animation: stampLand 0.5s 0.14s cubic-bezier(0.2, 0.9, 0.24, 1.06) forwards;
}

.entry-stamp svg {
  width: 100%;
  height: auto;
}

.entry-eyebrow {
  margin-top: 24px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0;
  animation: entryFadeUp 0.3s 0.16s var(--ease) forwards;
}

.entry-title {
  margin-top: 9px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: entryFadeUp 0.34s 0.2s var(--ease) forwards;
}

.entry-copy {
  max-width: 320px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  opacity: 0;
  animation: entryFadeUp 0.34s 0.24s var(--ease) forwards;
}

.entry-progress {
  position: relative;
  width: 132px;
  height: 2px;
  margin-top: 25px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(48, 45, 36, 0.1);
  opacity: 0;
  animation: entryFadeUp 0.26s 0.26s var(--ease) forwards;
}

.entry-progress i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--sage-deep));
  transform: scaleX(0.06);
  transform-origin: left;
  animation: entryLoad 0.42s 0.24s var(--ease) forwards;
}

.entry-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  margin-top: 14px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: entryFadeUp 0.28s 0.28s var(--ease) forwards;
}

.entry-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.entry-foot .icon {
  width: 9px;
  height: 9px;
}

@keyframes stampLand {
  0% { opacity: 0; transform: translateY(-30px) scale(1.55) rotate(-11deg); }
  55% { opacity: 1; }
  100% { opacity: 0.94; transform: translateY(0) scale(1) rotate(-2.5deg); }
}

@keyframes entryFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes entryLoad {
  from { transform: scaleX(0.06); }
  to { transform: scaleX(1); }
}


@media (max-width: 1100px) {
  .pg-grid {
    grid-template-columns: 1fr;
  }

  .pg-under {
    grid-template-columns: 1fr;
  }

  .pg-response {
    min-height: 390px;
  }
}

@media (max-width: 680px) {
  .pg-page-chip {
    display: none;
  }

  .pg-endpoints {
    grid-template-columns: 1fr;
  }

  .pg-send-row {
    flex-wrap: wrap;
  }

  .pg-send-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .pg-run {
    grid-template-columns: auto minmax(0, 1fr) auto auto 22px;
  }

  .pg-run-time {
    display: none;
  }

  .pg-receipt-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 500px) {
  .pg-composer,
  .pg-response,
  .pg-curl,
  .pg-history {
    padding: 14px;
  }

  .pg-shortcut {
    display: none;
  }

  .pg-send-actions {
    justify-content: space-between;
  }

  .pg-send-row .button--dark {
    flex: 1;
    justify-content: center;
  }

  .pg-json {
    font-size: 9px;
  }

  .pg-endpoint-copy small {
    display: none;
  }

  .heatmap {
    --hm-cell: 14px;
    --hm-gap: 5px;
  }

  .heatmap--lg {
    --hm-cell: 15px;
    --hm-gap: 5px;
  }

  .key-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 4px 10px;
    padding: 13px 12px;
  }

  .key-identity {
    grid-row: 1;
    grid-column: 1;
  }

  .key-status {
    grid-row: 1;
    grid-column: 2;
  }

  .key-cell--mobile {
    grid-row: 2;
    grid-column: 1 / -1;
    margin-top: 0;
    padding-left: 42px;
    flex-wrap: wrap;
    row-gap: 1px;
  }

  .key-actions {
    grid-row: 3;
    grid-column: 1 / -1;
    margin-top: 3px;
    justify-content: flex-end;
  }

  .entry-foot {
    display: none;
  }
}

@media (min-width: 501px) and (max-height: 700px) {
  .auth-screen {
    align-items: center;
    overflow-y: auto;
    padding: 14px 20px;
  }

  .auth-shell {
    min-height: auto;
  }

  .auth-art {
    padding: 24px 32px 20px;
  }

  .auth-art-center {
    padding: 10px 0;
  }

  .auth-stamp-wrap {
    width: 190px;
    margin-bottom: 18px;
  }

  .auth-stamp {
    width: 176px;
  }

  .auth-title {
    font-size: clamp(32px, 3.2vw, 40px);
  }

  .auth-art-foot,
  .auth-panel-foot {
    display: none;
  }

  .auth-panel {
    padding: 24px 34px 18px;
  }

  .auth-panel-inner {
    padding: 4px 0;
  }

  .auth-tabs {
    margin-bottom: 20px;
  }

  .auth-heading {
    margin-bottom: 16px;
  }

  .auth-heading h2 {
    font-size: 29px;
  }

  .auth-copy {
    font-size: 12.5px;
  }
}

@media (max-width: 500px) and (max-height: 640px) {
  .auth-panel {
    padding: 16px 18px 12px;
  }

  .auth-mobile-brand {
    margin-bottom: 14px;
  }

  .auth-tabs {
    margin-bottom: 18px;
  }

  .auth-heading {
    margin-bottom: 16px;
  }

  .auth-heading h2 {
    font-size: 27px;
  }

  .auth-heading p {
    font-size: 11px;
  }

  .auth-form {
    gap: 10px;
  }

  .input-wrap,
  .auth-submit {
    height: 42px;
  }

  .or-rule {
    margin: 12px 0;
  }

  .demo-button {
    height: 40px;
  }

  .auth-fine {
    margin-top: 12px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Overview strip ---------- */

.overview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.overview-strip-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--hairline-soft);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 253, 0.55), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--ease), border-color 0.25s var(--ease), box-shadow 0.35s var(--ease);
}

.overview-strip-card:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-strong);
}

.overview-strip-card > .icon {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--faint);
  transition: transform 0.35s var(--ease), color 0.25s var(--ease);
}

.overview-strip-card:hover > .icon {
  transform: translateX(2px);
  color: var(--sage-deep);
}

.strip-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.strip-icon .icon {
  width: 14px;
  height: 14px;
}

.strip-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
}

.strip-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.strip-value {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.1;
  color: var(--ink);
}

.strip-value small {
  font-family: inherit;
  font-size: 11px;
  color: var(--faint);
}

.strip-note {
  color: var(--faint);
  font-size: 9.5px;
}

/* ---------- Services page ---------- */

.svc-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--hairline-soft);
  background: var(--sage-wash);
  color: var(--sage-deep);
}

.svc-summary .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.svc-summary p {
  font-size: 11px;
  line-height: 1.55;
}

.svc-summary a {
  color: var(--sage-deep);
  text-decoration: underline;
}

.svc-group-block {
  margin-bottom: 18px;
}

.svc-group-title {
  margin: 0 2px 9px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
}

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 11px;
}

.svc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 16px 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline-soft);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 253, 0.55), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-card);
  animation: riseIn 0.5s calc(var(--i, 0) * 60ms) var(--ease) both;
  transition: transform 0.4s var(--ease), border-color 0.25s var(--ease);
}

.svc-card:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-strong);
}

.svc-card.is-off {
  opacity: 0.62;
}

.svc-card.is-off:hover {
  transform: none;
}

.svc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.svc-group {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.svc-off-chip {
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.svc-name {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.2;
  color: var(--ink);
}

.svc-desc {
  margin: 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.svc-endpoint {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.svc-endpoint code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-soft);
}

.svc-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.svc-price {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--gold);
}

.svc-price.is-free {
  color: var(--sage-deep);
}

.svc-price small {
  font-family: var(--font-sans);
  font-size: 9px;
  color: var(--faint);
}

.svc-price-note {
  color: var(--faint);
  font-size: 9px;
}

.svc-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.svc-fields--none {
  color: var(--faint);
  font-size: 9.5px;
  font-style: italic;
}

.svc-field {
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--hairline);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.svc-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 3px;
}

/* ---------- Wallet page ---------- */

.wallet-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  margin-bottom: 12px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline-soft);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(231, 235, 223, 0.5), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-card);
  animation: riseIn 0.5s var(--ease) both;
}

.wallet-hero.is-low {
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(246, 231, 224, 0.65), transparent 55%),
    var(--surface);
}

.wallet-hero-main {
  display: grid;
  gap: 3px;
  align-content: center;
}

.wallet-hero-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wallet-hero-balance {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  color: var(--ink);
}

.wallet-hero.is-low .wallet-hero-balance {
  color: var(--accent-deep);
}

.wallet-hero-note {
  color: var(--faint);
  font-size: 10px;
}

.wallet-hero-side {
  display: flex;
  gap: 26px;
  align-items: center;
}

.wallet-hero-stat {
  display: grid;
  gap: 3px;
}

.wallet-hero-stat span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wallet-hero-stat strong {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
}

.wallet-grid {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 7fr;
  gap: 11px;
  margin-bottom: 12px;
}

.wallet-topup-card,
.wallet-ledger-card {
  padding: 16px 17px 14px;
}

.wallet-topup-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.wallet-topup-form .button {
  justify-self: start;
}

.wallet-requests {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline-soft);
}

.wallet-empty-line {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  font-style: italic;
}

.wallet-request,
.wallet-txn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 253, 0.4);
}

.wallet-request-mark,
.wallet-txn-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.wallet-request-mark.is-warn,
.wallet-txn-mark.is-debit {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.wallet-request-mark .icon,
.wallet-txn-mark .icon {
  width: 12px;
  height: 12px;
}

.wallet-txn-mark.is-debit .icon {
  transform: rotate(180deg);
}

.wallet-request-copy,
.wallet-txn-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
}

.wallet-request-copy strong,
.wallet-txn-copy strong {
  font-size: 11px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-request-copy small,
.wallet-txn-copy small {
  color: var(--faint);
  font-size: 9px;
}

.wallet-request-status {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
}

.wallet-request-status.approved {
  color: var(--sage-deep);
}

.wallet-request-status.declined {
  color: var(--accent-deep);
}

.wallet-txn-amount {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.wallet-txn-amount.is-credit {
  color: var(--sage-deep);
}

.wallet-txn-amount.is-debit {
  color: var(--accent-deep);
}

.wallet-txn-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.wallet-history-card {
  padding: 16px 17px 14px;
  margin-bottom: 12px;
}

.wallet-history-card .wallet-requests {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

/* ---------- Playground charge row ---------- */

.pg-endpoint-price {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
}

.pg-endpoint-price small {
  display: block;
  font-family: var(--font-sans);
  font-size: 8px;
  color: var(--faint);
}

.pg-charge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--faint);
  font-size: 10px;
}

.pg-charge strong {
  color: var(--gold);
  font-family: var(--font-mono);
}

.pg-charge .icon {
  width: 12px;
  height: 12px;
  color: var(--sage-deep);
}

.pg-charge-row {
  margin: 9px 0;
}

.pg-charge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--sage-wash);
  color: var(--sage-deep);
  font-size: 10px;
}

.pg-charge-chip strong {
  font-family: var(--font-mono);
}

.pg-charge-chip.is-soft {
  background: rgba(48, 45, 36, 0.05);
  color: var(--faint);
}

.pg-charge-chip .icon {
  width: 11px;
  height: 11px;
}

/* ---------- Docs service list ---------- */

.docs-service-list {
  display: grid;
  gap: 6px;
}

.docs-service-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--hairline-soft);
}

.docs-service-row code {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-soft);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-service-name {
  flex: 1;
  color: var(--faint);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-service-price {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--gold);
  white-space: nowrap;
}

.svc-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.svc-doc-table th {
  text-align: left;
  padding: 5px 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hairline);
}

.svc-doc-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--ink-soft);
}

.svc-doc-table code {
  font-family: var(--font-mono);
  font-size: 9.5px;
}

/* ---------- Responsive: services & wallet ---------- */

@media (max-width: 1080px) {
  .wallet-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .overview-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .wallet-hero {
    flex-direction: column;
    gap: 14px;
  }

  .wallet-hero-side {
    gap: 18px;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .svc-grid {
    grid-template-columns: 1fr;
  }

  .wallet-hero-balance {
    font-size: 28px;
  }
}

/* ---------- Wallet · balance surfaced everywhere ---------- */

.nav-wallet-balance {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(231, 235, 223, 0.8);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  transition: background 0.28s var(--ease), color 0.28s var(--ease);
}

.nav-item.is-active .nav-wallet-balance {
  background: rgba(255, 255, 255, 0.82);
}

.nav-wallet-balance.is-low {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  margin-right: 7px;
  padding: 0 7px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 254, 250, 0.66);
  color: var(--ink-soft);
  transition: transform 0.26s var(--ease), background 0.26s var(--ease),
    border-color 0.26s, box-shadow 0.26s var(--ease);
}

.wallet-chip .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.wallet-chip-amount {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.wallet-chip-plus {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  transition: background 0.26s, transform 0.3s var(--ease);
}

.wallet-chip-plus .icon {
  width: 9px;
  height: 9px;
  color: inherit;
}

.wallet-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 253, 0.95);
  border-color: rgba(48, 45, 36, 0.14);
  box-shadow: 0 7px 18px rgba(68, 57, 37, 0.08);
}

.wallet-chip:hover .wallet-chip-plus {
  transform: rotate(90deg);
}

.wallet-chip.is-low {
  border-color: rgba(171, 64, 41, 0.24);
}

.wallet-chip.is-low .wallet-chip-amount {
  color: var(--accent-deep);
}

.wallet-chip.is-low .wallet-chip-plus {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ---------- Wallet · UPI checkout ---------- */

.pay-card {
  align-self: start;
}

.pay-card > .card-head {
  margin-bottom: 13px;
}

#pay-card-body {
  position: relative;
}

.pay-pane {
  display: grid;
  gap: 12px;
  animation: payPaneIn 0.46s var(--ease) both;
}

@keyframes payPaneIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pay-chip {
  padding: 7px 13px 8px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background: rgba(255, 254, 250, 0.6);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  transition: transform 0.24s var(--ease), background 0.24s, color 0.24s,
    border-color 0.24s, box-shadow 0.24s var(--ease);
}

.pay-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 253, 0.9);
  border-color: rgba(48, 45, 36, 0.14);
}

.pay-chip:focus-visible {
  outline: 2px solid rgba(127, 146, 112, 0.55);
  outline-offset: 2px;
}

.pay-chip.is-on {
  border-color: rgba(92, 106, 78, 0.42);
  background: var(--sage-soft);
  color: var(--sage-deep);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) inset, 0 5px 14px rgba(88, 102, 74, 0.13);
}

.pay-amount-field {
  gap: 7px;
}

.pay-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.pay-amount-field .pay-input {
  height: 42px;
  padding: 0 13px;
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.pay-input-row .button {
  height: 42px;
}

.pay-fine {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.55;
}

.pay-trust {
  display: grid;
  gap: 1px;
  padding-top: 11px;
  border-top: 1px solid var(--hairline-soft);
}

.pay-trust-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 5px;
  border-radius: 10px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.pay-trust-item:hover {
  transform: translateX(3px);
  background: rgba(255, 254, 250, 0.66);
}

.pay-trust-item .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: var(--sage);
}

.pay-trust-item strong {
  display: block;
  margin-bottom: 1px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.pay-pane--qr {
  grid-template-columns: minmax(200px, 0.92fr) minmax(0, 1.08fr);
  gap: 15px;
  align-items: start;
}

.pay-qr-stage {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 14px 12px;
  border-radius: 15px;
  border: 1px dashed rgba(48, 45, 36, 0.15);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(231, 235, 223, 0.6), transparent 62%),
    rgba(255, 254, 250, 0.5);
}

.pay-qr-frame {
  position: relative;
  padding: 9px;
  border-radius: 12px;
  background: #fffefb;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 9px 24px rgba(68, 57, 37, 0.08);
  transition: filter 0.45s var(--ease), transform 0.45s var(--ease);
}

.pay-qr-img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 4px;
  animation: payQrIn 0.55s 0.06s var(--ease) both;
}

@keyframes payQrIn {
  from {
    opacity: 0;
    transform: scale(0.93);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pay-qr-frame:not(.is-dead)::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  top: 9px;
  height: 40px;
  border-radius: 4px;
  background: linear-gradient(180deg, transparent, rgba(127, 146, 112, 0.18), transparent);
  animation: payScan 3.6s var(--ease) infinite;
  pointer-events: none;
}

@keyframes payScan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  86% {
    opacity: 1;
  }
  100% {
    transform: translateY(189px);
    opacity: 0;
  }
}

.pay-qr-frame.is-dead {
  transform: scale(0.985);
  filter: grayscale(1) contrast(0.72);
}

.pay-qr-frame.is-dead::after {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, rgba(48, 45, 36, 0.055) 0 5px, transparent 5px 11px);
}

.pay-qr-dead {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 220px;
  height: 220px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pay-qr-dead .icon {
  width: 22px;
  height: 22px;
  opacity: 0.45;
}

.pay-qr-hint {
  color: var(--faint);
  font-size: 9.5px;
  text-align: center;
  line-height: 1.45;
}

.pay-side {
  display: grid;
  gap: 11px;
  min-width: 0;
  align-content: start;
}

.pay-status {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(127, 146, 112, 0.22);
  background: linear-gradient(180deg, rgba(231, 235, 223, 0.48), rgba(255, 254, 250, 0.42));
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.pay-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sage-deep);
  font-size: 11px;
  font-weight: 550;
}

.pay-status-row .icon {
  width: 13px;
  height: 13px;
  flex: none;
}

.pay-status-row.is-warn {
  color: var(--accent-deep);
}

.pay-status-row.is-warn .icon {
  color: var(--accent);
}

.pay-status-note {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.pay-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--sage);
}

.pay-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(127, 146, 112, 0.5);
  animation: payHalo 1.9s var(--ease) infinite;
}

@keyframes payHalo {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.pay-meta {
  display: grid;
  gap: 0;
  margin: 0;
  padding-top: 2px;
  border-top: 1px solid var(--hairline-soft);
}

.pay-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--hairline-soft);
}

.pay-meta-row dt {
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pay-meta-row dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.pay-countdown {
  font-family: var(--font-serif);
  font-size: 14px;
  transition: color 0.3s var(--ease);
}

.pay-countdown.is-dead {
  color: var(--accent-deep);
}

.pay-sandbox {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(198, 154, 78, 0.3);
  background: rgba(198, 154, 78, 0.07);
  animation: payPaneIn 0.4s 0.08s var(--ease) both;
}

.pay-sandbox p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.pay-sandbox-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(198, 154, 78, 0.18);
  color: #8a6425;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pay-sandbox-tag .icon {
  width: 10px;
  height: 10px;
}

.pay-sandbox-actions,
.pay-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pay-side-actions {
  padding-top: 1px;
}

.pay-pane--receipt,
.pay-pane--problem,
.pay-pane--closed {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 13px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(127, 146, 112, 0.26);
  background: linear-gradient(160deg, rgba(231, 235, 223, 0.55), rgba(255, 254, 250, 0.62));
}

.pay-pane--problem.is-failed,
.pay-pane--problem.is-review {
  border-color: rgba(171, 64, 41, 0.24);
  background: linear-gradient(160deg, rgba(246, 231, 224, 0.72), rgba(255, 254, 250, 0.62));
}

.pay-pane--closed {
  border-color: var(--hairline);
  background: rgba(250, 247, 240, 0.72);
}

.pay-receipt-mark,
.pay-problem-mark,
.pay-closed-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--sage-deep);
  color: #f6f4ec;
  box-shadow: 0 6px 16px rgba(88, 102, 74, 0.22);
  animation: paySeal 0.52s var(--ease) both;
}

@keyframes paySeal {
  from {
    transform: scale(0.7) rotate(-8deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.pay-receipt-mark .icon,
.pay-problem-mark .icon,
.pay-closed-mark .icon {
  width: 16px;
  height: 16px;
}

.pay-problem-mark {
  background: var(--accent-deep);
  box-shadow: 0 6px 16px rgba(171, 64, 41, 0.2);
}

.pay-closed-mark {
  background: var(--ink-soft);
  box-shadow: 0 6px 16px rgba(48, 45, 36, 0.16);
}

.pay-receipt-copy,
.pay-problem-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pay-receipt-copy > strong,
.pay-problem-copy > strong {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.pay-receipt-copy p,
.pay-problem-copy p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.pay-receipt-refs {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  padding: 9px 0 0;
  list-style: none;
  border-top: 1px dashed rgba(48, 45, 36, 0.15);
}

.pay-receipt-refs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pay-receipt-refs span {
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pay-receipt-refs strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
}

.pay-pane--receipt .button,
.pay-pane--problem .button,
.pay-pane--closed .button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
}

.pay-pane--closed div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.pay-pane--closed strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
}

.pay-pane--closed p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.wallet-txn-list {
  display: grid;
  gap: 6px;
  margin-top: 13px;
}

/* ---------- Wallet · payment history and invoice ---------- */

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.wallet-orders-card {
  margin-bottom: 12px;
}

.pay-order-list {
  display: grid;
  gap: 6px;
  margin-top: 13px;
}

.pay-order {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 253, 0.45);
  animation: riseIn 0.4s var(--ease) both;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s;
}

.pay-order:hover {
  transform: translateX(3px);
  background: rgba(255, 254, 250, 0.78);
  border-color: var(--hairline);
}

.pay-order-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--faint);
}

.pay-order.is-ok .pay-order-dot {
  background: var(--sage);
}

.pay-order.is-wait .pay-order-dot,
.pay-order.is-review .pay-order-dot {
  background: var(--gold);
  animation: payBlink 1.7s var(--ease) infinite;
}

.pay-order.is-bad .pay-order-dot {
  background: var(--accent);
}

@keyframes payBlink {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.pay-order-copy {
  display: grid;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.pay-order-copy strong {
  font-size: 11px;
  font-weight: 550;
}

.pay-order-copy strong em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pay-order-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-size: 9px;
}

.pay-order-refs {
  flex: none;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.wallet-invoice {
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline-soft);
  background: var(--surface-soft);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.wallet-invoice > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  transition: background 0.26s var(--ease), color 0.26s;
}

.wallet-invoice > summary::-webkit-details-marker {
  display: none;
}

.wallet-invoice > summary .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.wallet-invoice > summary::after {
  content: '';
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.32s var(--ease), border-color 0.32s;
}

.wallet-invoice[open] > summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.wallet-invoice > summary:hover {
  background: rgba(255, 254, 250, 0.62);
  color: var(--ink);
}

.wallet-invoice-lede {
  padding: 0 16px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
}

.wallet-invoice .wallet-topup-form {
  padding: 6px 16px 15px;
}

.wallet-invoice .wallet-requests {
  margin: 0 16px 15px;
}

.wallet-invoice .wallet-empty-line {
  display: block;
  padding: 0 16px 15px;
}

/* ---------- Shared payment state pill ---------- */

.pay-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(48, 45, 36, 0.05);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pay-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.pay-state.is-ok {
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.pay-state.is-wait {
  background: rgba(198, 154, 78, 0.15);
  color: #8a6425;
}

.pay-state.is-wait i {
  animation: payBlink 1.6s var(--ease) infinite;
  opacity: 1;
}

.pay-state.is-review {
  background: rgba(198, 154, 78, 0.22);
  color: #7d5518;
}

.pay-state.is-bad {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.status-dot.is-warn {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 154, 78, 0.12);
}

.page--services > .provider-banner,
.page--playground > .provider-banner,
.page--settings > .provider-banner,
.page--services > .registry-board,
.page--playground > .registry-board,
.modal > .provider-banner {
  margin-bottom: 12px;
}

/* ---------- Reports page ---------- */

.report-strip {
  margin-bottom: 12px;
}

.report-chart-card {
  margin-bottom: 12px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 12px;
}

.report-service-list {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.report-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(46px, 0.62fr) 40px minmax(58px, 0.62fr);
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 9px;
  transition: background 0.26s var(--ease);
}

.report-service-row:hover {
  background: rgba(255, 254, 250, 0.72);
}

.report-service-name {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.report-service-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 550;
}

.report-service-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.01em;
}

.report-service-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(48, 45, 36, 0.075);
  overflow: hidden;
}

.report-service-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage), #9aab86);
  transition: width 0.9s var(--ease);
}

.report-service-count,
.report-service-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-service-count {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

.report-service-value {
  color: var(--muted);
  font-size: 10.5px;
}

.report-service-value em {
  display: block;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.report-payment-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.report-payment-row {
  display: grid;
  grid-template-columns: auto minmax(58px, 0.4fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 253, 0.45);
  animation: riseIn 0.38s var(--ease) both;
  transition: border-color 0.28s, background 0.28s var(--ease);
}

.report-payment-row:hover {
  border-color: var(--hairline);
  background: rgba(255, 254, 250, 0.72);
}

.report-payment-amount {
  font-family: var(--font-serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.report-payment-when {
  display: grid;
  gap: 1px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}

.report-payment-when small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.report-payment-refs {
  min-width: 0;
}

.report-payment-refs code {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.report-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed rgba(48, 45, 36, 0.14);
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.report-note .icon {
  width: 12px;
  height: 12px;
  flex: none;
  margin-top: 1px;
  color: var(--gold);
}

.report-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--hairline-soft);
  color: var(--faint);
  font-size: 9.5px;
}

.report-txn-list {
  margin-top: 12px;
}

.report-metric {
  flex: none;
}

/* ---------- Responsive: checkout and reports ---------- */

@media (max-width: 1080px) {
  .pay-pane--qr {
    grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.2fr);
  }

  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .pay-pane--qr {
    grid-template-columns: 1fr;
  }

  .pay-qr-stage {
    padding: 13px 11px;
  }

  .pay-side {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .pay-input-row {
    grid-template-columns: 1fr;
  }

  .pay-input-row .button {
    justify-content: center;
  }

  .pay-qr-img,
  .pay-qr-dead {
    width: 186px;
    height: 186px;
  }

  .pay-qr-frame:not(.is-dead)::after {
    animation-name: payScanSmall;
  }

  @keyframes payScanSmall {
    0% {
      transform: translateY(0);
      opacity: 0;
    }
    14% {
      opacity: 1;
    }
    86% {
      opacity: 1;
    }
    100% {
      transform: translateY(155px);
      opacity: 0;
    }
  }

  .pay-pane--receipt,
  .pay-pane--problem,
  .pay-pane--closed {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .pay-pane--receipt .button,
  .pay-pane--problem .button,
  .pay-pane--closed .button {
    justify-self: stretch;
    margin-top: 2px;
  }

  .pay-chip {
    font-size: 14px;
    padding: 6px 11px 7px;
  }

  .report-payment-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .report-payment-row .pay-state {
    grid-column: 1;
    grid-row: 1;
  }

  .report-payment-amount {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .report-payment-when {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .report-payment-row > :nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
  }

  .report-payment-refs code {
    max-width: 100%;
  }

  .report-service-row {
    grid-template-columns: minmax(0, 1fr) 36px 62px;
  }

  .report-service-bar {
    display: none;
  }

  .report-foot {
    flex-wrap: wrap;
  }

  .wallet-chip {
    padding-right: 8px;
  }

  .wallet-chip-plus {
    display: none;
  }
}

@media (max-width: 400px) {
  .pay-order {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .pay-order-refs {
    max-width: 100%;
    flex: 1 1 100%;
    margin-left: 17px;
  }

  .pay-order .button {
    margin-left: 17px;
  }
}

/* ---------- Bulk checks ---------- */

.page--bulk {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page--bulk > * {
  animation: bulkRise 0.5s var(--ease) both;
}

.page--bulk > *:nth-child(2) { animation-delay: 0.04s; }
.page--bulk > *:nth-child(3) { animation-delay: 0.09s; }
.page--bulk > *:nth-child(4) { animation-delay: 0.13s; }
.page--bulk > *:nth-child(5) { animation-delay: 0.17s; }

@keyframes bulkRise {
  from {
    opacity: 0;
    transform: translateY(11px);
  }
}

.bulk-limit-chip,
.bulk-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.bulk-count-chip.is-set {
  color: var(--sage-deep);
  border-color: rgba(127, 146, 112, 0.34);
  background: var(--sage-wash);
}

.bulk-setup {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.bulk-setup .form-field > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.005em;
}

.bulk-select,
.bulk-input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: rgba(255, 254, 250, 0.66);
  color: var(--ink);
  outline: 0;
  font-size: 11.5px;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.bulk-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236d695c' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 10px;
}

.bulk-select:focus,
.bulk-input:focus {
  border-color: rgba(92, 106, 78, 0.5);
  background-color: rgba(255, 255, 252, 0.92);
  box-shadow: 0 0 0 3px rgba(127, 146, 112, 0.1);
}

.bulk-drop {
  position: relative;
  margin-top: 11px;
  border-radius: 13px;
  border: 1px dashed var(--hairline-strong);
  background: rgba(250, 247, 240, 0.5);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.bulk-drop.is-drag {
  border-color: rgba(127, 146, 112, 0.6);
  background: var(--sage-wash);
  box-shadow: 0 0 0 4px rgba(127, 146, 112, 0.1);
}

.bulk-textarea {
  display: block;
  width: 100%;
  min-height: 148px;
  padding: 12px 13px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  resize: vertical;
  outline: 0;
}

.bulk-textarea::placeholder {
  color: rgba(109, 105, 92, 0.62);
}

.bulk-drop-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 13px 9px;
  color: var(--faint);
  font-size: 9px;
}

.bulk-drop-hint > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bulk-file {
  max-width: 132px;
  font-size: 9px;
  color: var(--faint);
}

.bulk-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.bulk-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  cursor: pointer;
}

.bulk-toggle input {
  width: 13px;
  height: 13px;
  accent-color: var(--sage-deep);
}

.bulk-readout-note {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.01em;
}

.bulk-mapping {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(250, 247, 240, 0.62);
}

.bulk-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 9px;
}

.bulk-map-field {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 550;
}

.bulk-map-field em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.bulk-map-select {
  width: 100%;
  height: 30px;
  padding: 0 26px 0 9px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background-color: rgba(255, 254, 250, 0.8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236d695c' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 9px 9px;
  color: var(--ink);
  font-size: 10px;
  appearance: none;
  -webkit-appearance: none;
  outline: 0;
}

.bulk-map-sample {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-map-spare {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 2px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--hairline);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.bulk-map-spare .icon {
  flex: none;
  margin-top: 1px;
  color: var(--sage-deep);
}

.bulk-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 13px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(169, 71, 49, 0.24);
  border-radius: 10px;
  background: rgba(169, 71, 49, 0.06);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
  animation: bulkWarnIn 0.28s var(--ease) both;
}

.bulk-warn .icon {
  flex: none;
  margin-top: 2px;
}

@keyframes bulkWarnIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

.bulk-run-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.bulk-wallet-foot {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.bulk-error {
  margin: 10px 0 0;
}

.bulk-retention {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(198, 154, 78, 0.09);
}

.bulk-retention .icon {
  flex: none;
  margin-top: 1px;
  color: #8a6425;
}

.bulk-retention p {
  margin: 0;
  color: #6f5320;
  font-size: 9.5px;
  line-height: 1.55;
}

.bulk-run.is-running {
  border-color: rgba(127, 146, 112, 0.34);
}

.bulk-run-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bulk-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.bulk-progress-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(48, 45, 36, 0.08);
  overflow: hidden;
}

.bulk-progress-track > i {
  position: relative;
  display: block;
  overflow: hidden;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage), var(--sage-deep));
  transition: width 0.75s var(--ease);
}

.bulk-run.is-running .bulk-progress-track > i::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: bulkSheen 1.5s linear infinite;
}

@keyframes bulkSheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.bulk-progress-count {
  flex: none;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.bulk-progress-count strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 480;
  letter-spacing: -0.03em;
}

.bulk-tally {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.bulk-tally-cell {
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(250, 247, 240, 0.7);
  transition: background 0.3s var(--ease);
}

.bulk-tally-cell span {
  display: block;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bulk-tally-cell strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 480;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.bulk-tally-cell.is-hit strong { color: var(--sage-deep); }
.bulk-tally-cell.is-miss strong { color: #8a6425; }
.bulk-tally-cell.is-err strong { color: var(--danger); }

.bulk-stop {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 11px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(169, 71, 49, 0.08);
  color: #8b3b28;
  font-size: 9.5px;
  line-height: 1.5;
}

.bulk-table-scroll {
  margin-top: 13px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--hairline);
}

.bulk-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 10px;
}

.bulk-table th {
  position: sticky;
  top: 0;
  padding: 8px 10px;
  background: rgba(244, 240, 231, 0.96);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.bulk-table td {
  padding: 7px 10px;
  border-top: 1px solid var(--hairline-soft);
  color: var(--muted);
  vertical-align: top;
}

.bulk-table .bulk-extra {
  max-width: 160px;
  overflow: hidden;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-row {
  animation: bulkRowIn 0.34s var(--ease) both;
}

@keyframes bulkRowIn {
  from { opacity: 0; }
}

.bulk-line {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.bulk-value,
.bulk-answer {
  font-family: var(--font-mono);
  color: var(--ink);
}

.bulk-answer {
  font-weight: 550;
}

.bulk-status {
  white-space: nowrap;
}

.bulk-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 999px;
  background: var(--faint);
}

.bulk-row.is-hit .bulk-status i { background: var(--sage); }
.bulk-row.is-miss .bulk-status i { background: var(--gold); }
.bulk-row.is-bad .bulk-status i { background: var(--test); }
.bulk-row.is-err .bulk-status i { background: var(--danger); }
.bulk-row.is-wait .bulk-status { color: var(--faint); }

.bulk-message {
  display: -webkit-box;
  overflow: hidden;
  max-width: 260px;
  color: var(--faint);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.bulk-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bulk-table-foot {
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 8.5px;
}

.bulk-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.bulk-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(250, 247, 240, 0.62);
  transition: background 0.26s var(--ease), transform 0.26s var(--ease);
}

.bulk-history-row:hover {
  background: rgba(255, 254, 250, 0.9);
  transform: translateY(-1px);
}

.bulk-history-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.bulk-history-open strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 550;
}

.bulk-history-open span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.bulk-history-status {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.bulk-history-row.is-running .bulk-history-status {
  color: var(--sage-deep);
  animation: bulkBreathe 1.8s var(--ease) infinite;
}

@keyframes bulkBreathe {
  50% { opacity: 0.45; }
}

.bulk-history-get {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 9px;
  text-decoration: none;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.bulk-history-get:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
}

@media (max-width: 860px) {
  .bulk-setup {
    grid-template-columns: 1fr;
  }

  .bulk-tally {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .bulk-map-row {
    grid-template-columns: 1fr 1fr;
  }

  .bulk-map-sample {
    display: none;
  }

  .bulk-run-bar {
    flex-wrap: wrap;
  }

  .bulk-wallet-foot {
    width: 100%;
    margin-left: 0;
  }

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

/* ---------- Key rules ---------- */

.key-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.key-rule {
  padding: 2px 7px;
  border: 1px solid var(--sage-soft);
  border-radius: 999px;
  background: var(--sage-wash);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.key-rule--open {
  border-color: var(--hairline);
  background: transparent;
  color: var(--faint);
}

.key-rule.is-hot {
  border-color: rgba(169, 71, 49, 0.28);
  background: rgba(169, 71, 49, 0.07);
  color: var(--danger);
}

.modal--controls {
  width: min(620px, 100%);
}

.controls-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  padding: 2px 2px 2px 0;
}

.controls-block {
  padding: 13px 0;
  border-top: 1px solid var(--hairline);
}

.controls-block:first-child {
  border-top: 0;
  padding-top: 2px;
}

.controls-label {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.controls-input {
  width: 100%;
  margin-top: 5px;
  padding: 9px 11px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.controls-input:focus {
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px var(--sage-wash);
  outline: none;
}

.controls-area {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
}

.controls-meter {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--sage-wash);
  overflow: hidden;
}

.controls-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage-deep), var(--gold));
  transition: width 0.5s var(--ease);
}

.controls-meter i.is-over {
  background: linear-gradient(90deg, var(--danger), var(--accent));
}

.controls-help {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.5;
}

.controls-help code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--sage-wash);
  font-family: var(--font-mono);
  font-size: 10px;
}

.controls-checks {
  display: grid;
  gap: 5px;
}

.controls-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(250, 247, 240, 0.5);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.controls-check:hover {
  border-color: var(--sage-soft);
  background: var(--sage-wash);
  transform: translateX(2px);
}

.controls-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--sage-deep);
  cursor: pointer;
}

.controls-check:has(input:checked) {
  border-color: var(--sage-soft);
  background: var(--sage-wash);
}

.controls-check span {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
}

.controls-check em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-style: normal;
}

.controls-trail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(198, 154, 80, 0.08);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.controls-trail .icon {
  flex: none;
  margin-top: 1px;
  color: var(--gold);
}

@media (max-width: 620px) {
  .modal--controls {
    width: 100%;
  }

  .controls-body {
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .controls-check,
  .controls-meter i {
    transition: none;
  }

  .controls-check:hover {
    transform: none;
  }
}

/* ---------- Webhooks ---------- */

.wh-card {
  overflow: hidden;
  animation: riseIn 0.46s 0.06s var(--ease) both;
}

.dlv-card {
  overflow: hidden;
  animation: riseIn 0.46s 0.14s var(--ease) both;
}

.wh-list-head {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) 0.75fr 0.6fr 0.95fr minmax(0, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 17px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wh-row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) 0.75fr 0.6fr 0.95fr minmax(0, auto);
  gap: 12px;
  align-items: center;
  padding: 13px 17px;
  border-bottom: 1px solid var(--hairline-soft);
  transition: background 0.22s;
}

.wh-row:last-child {
  border-bottom: 0;
}

.wh-row:hover {
  background: rgba(255, 255, 252, 0.4);
}

.wh-row--off {
  opacity: 0.72;
}

.wh-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wh-tile {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(127, 146, 112, 0.2);
  background: rgba(235, 239, 226, 0.5);
  color: var(--sage-deep);
  transition: transform 0.28s var(--ease), border-color 0.22s;
}

.wh-tile .icon {
  width: 14px;
  height: 14px;
}

.wh-row:hover .wh-tile {
  border-color: rgba(127, 146, 112, 0.42);
  transform: translateY(-1px);
}

.wh-tile--off {
  border-color: var(--hairline-soft);
  background: rgba(48, 45, 36, 0.04);
  color: var(--faint);
}

.wh-info {
  min-width: 0;
}

.wh-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wh-name-line strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-url {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.wh-url:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.wh-chip {
  padding: 1.5px 5px;
  border-radius: 4px;
  border: 1px solid var(--hairline-soft);
  background: rgba(48, 45, 36, 0.028);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.wh-chip--none {
  border-style: dashed;
}

.wh-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid rgba(127, 146, 112, 0.18);
  background: rgba(235, 239, 226, 0.45);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wh-status::before {
  content: '';
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--sage);
  animation: whPulse 2.6s var(--ease) infinite;
}

.wh-status--off {
  border-color: var(--hairline-soft);
  background: rgba(48, 45, 36, 0.035);
  color: var(--faint);
}

.wh-status--off::before {
  background: var(--faint);
  animation: none;
}

@keyframes whPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127, 146, 112, 0.42); }
  55% { box-shadow: 0 0 0 3.5px rgba(127, 146, 112, 0); }
}

.wh-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wh-stat em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wh-actions,
.dlv-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.wh-action {
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--faint);
  font-size: 8.5px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.wh-action:hover {
  border-color: var(--hairline);
  background: rgba(255, 255, 252, 0.55);
  color: var(--ink-soft);
}

.wh-action--danger:hover {
  border-color: rgba(169, 71, 49, 0.14);
  background: rgba(246, 231, 224, 0.6);
  color: var(--accent-deep);
}

.wh-mobile {
  display: none;
  color: var(--faint);
  font-size: 9px;
}

.wh-empty {
  padding: 34px 17px 38px;
}

.dlv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 17px;
  border-bottom: 1px solid var(--hairline-soft);
}

.dlv-head .card-title {
  margin-top: 2px;
  font-size: 13px;
}

.dlv-row {
  display: grid;
  grid-template-columns: 1.15fr 1.1fr minmax(0, 1.3fr) 0.95fr 0.85fr minmax(0, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 17px;
  border-bottom: 1px solid var(--hairline-soft);
  transition: background 0.22s;
}

.dlv-row:last-child {
  border-bottom: 0;
}

.dlv-row:hover {
  background: rgba(255, 255, 252, 0.4);
}

.dlv-time,
.dlv-event,
.dlv-hook {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.dlv-time {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.dlv-event {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.dlv-hook {
  color: var(--muted);
}

.dlv-state {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--hairline-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dlv-state--ok {
  border-color: rgba(127, 146, 112, 0.24);
  background: rgba(235, 239, 226, 0.5);
  color: var(--sage-deep);
}

.dlv-state--wait {
  border-color: rgba(176, 138, 61, 0.26);
  background: rgba(246, 238, 222, 0.5);
  color: var(--gold-deep, #8a6a24);
}

.dlv-state--bad {
  border-color: rgba(169, 71, 49, 0.2);
  background: rgba(246, 231, 224, 0.55);
  color: var(--accent-deep);
}

.wh-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.wh-dots em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-style: normal;
}

.wh-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.wh-dot--ok { background: var(--sage); }
.wh-dot--bad { background: var(--accent); }

.dlv-none {
  padding: 22px 17px;
  color: var(--faint);
  font-size: 10px;
  text-align: center;
}

.dlv-json {
  max-height: 240px;
  overflow: auto;
  white-space: pre;
}

.sig-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.sig-row code {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.sig-row p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.sig-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sig-facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 252, 0.4);
}

.sig-facts strong {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 550;
}

.sig-facts span {
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.4;
}

.sig-attempt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.sig-attempt em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
}

.sig-attempt code {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.sig-attempt p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.wh-events .controls-check em {
  text-transform: none;
  letter-spacing: 0;
  font-size: 8px;
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .wh-list-head {
    display: none;
  }

  .wh-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .wh-stat {
    display: none;
  }

  .wh-status {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
  }

  .wh-actions {
    grid-column: 2;
    grid-row: 2;
  }

  .wh-identity {
    grid-row: 1 / span 2;
  }

  .wh-mobile {
    display: block;
    grid-column: 1;
    padding-left: 42px;
  }

  .dlv-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, auto);
    row-gap: 4px;
  }

  /* Scoped to the customer outbox: the same row classes are reused inside the staff dossier, where
     the timestamp is the whole point of the line. */
  .dlv-row .dlv-time {
    display: none;
  }

  .dlv-row .dlv-event { grid-column: 1; grid-row: 1; }
  .dlv-row .dlv-state { grid-column: 2; grid-row: 1; }
  .dlv-row .wh-dots { grid-column: 3; grid-row: 1; justify-self: end; }
  .dlv-row .dlv-hook { grid-column: 1; grid-row: 2; color: var(--faint); }
  .dlv-row .dlv-actions { grid-column: 2 / -1; grid-row: 2; }
}

@media (max-width: 680px) {
  .wh-row,
  .dlv-row {
    padding: 12px 14px;
  }

  .wh-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-start;
  }

  .wh-mobile {
    grid-row: 2;
  }

  .sig-facts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wh-status::before,
  .wh-card,
  .dlv-card,
  .wh-row,
  .wh-tile {
    animation: none;
    transition: none;
  }
}
