@import url("./fonts/manrope.css");

:root {
  color-scheme: dark;
  --surface: oklch(16% 0.006 90);
  --surface-2: oklch(22% 0.008 90);
  --bar: oklch(9% 0.004 90);
  --ink: oklch(97% 0.004 95);
  --ink-2: oklch(72% 0.012 90);
  --on-ink: oklch(12% 0.004 90);
  --rule: 3px;
  --rule-color: oklch(30% 0.008 90);
  --rule-w: 2px;
  --font: "Manrope", sans-serif;
  --bar-h: 72px;
  --gutter: 48px;
  --label-col: 220px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
html { scrollbar-color: var(--ink-2) var(--surface); }
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--ink); color: var(--on-ink); }
:focus-visible { outline: var(--rule) solid var(--ink); outline-offset: -3px; }
button { font: inherit; color: inherit; }
svg { display: block; }

.skip { position: absolute; left: 16px; top: -200px; z-index: 10; padding: 8px 16px; background: var(--ink); color: var(--on-ink); }
.skip:focus-visible { top: 16px; outline-offset: 0; }

/* bar */
.bar {
  height: var(--bar-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--bar); color: var(--ink);
}
.wordmark { display: inline-flex; align-items: center; gap: 14px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark:focus-visible { outline-color: var(--ink); outline-offset: 4px; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; background: var(--ink); color: var(--on-ink); font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }

/* standard button in the sign system */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 18px;
  border: 1px solid var(--rule-color); background: transparent; color: var(--ink-2);
  font-size: 0.9375rem; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.btn:hover { color: var(--ink); border-color: var(--ink-2); }
.btn:active { color: var(--ink); border-color: var(--ink-2); background: var(--surface-2); }
.btn.is-copied { color: var(--ink); border-color: var(--ink); }
.btn:focus-visible { outline: var(--rule) solid var(--ink); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }

/* the bands */
main { flex: 1; display: flex; flex-direction: column; }
.bands { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-auto-rows: minmax(0, 1fr); }
.bands > li + li { border-top: var(--rule-w) solid var(--rule-color); }
.band {
  display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr) auto; align-items: center; gap: 24px;
  width: 100%; height: 100%; min-height: 104px; padding: 16px var(--gutter);
  border: 0; background: var(--surface); text-align: left; cursor: pointer;
}
.band:hover { background: var(--surface-2); }
.band:active { background: var(--surface-2); box-shadow: inset 0 0 0 3px var(--ink); }
.band:disabled, .band[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.band[aria-busy="true"] { cursor: progress; }
.band__label { font-size: 1.125rem; font-weight: 500; color: var(--ink-2); }
.band__value {
  font-size: clamp(1.75rem, 3.2vw, 3.25rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em;
  overflow-wrap: break-word; min-width: 0; text-wrap: balance;
}
.band__value--text { font-variant-numeric: proportional-nums; }
.band__action { display: flex; align-items: center; justify-self: end; }
.band__state { font-size: 1rem; font-weight: 500; color: var(--ink-2); min-width: 7.5em; text-align: right; opacity: 0; }
.band:hover .band__state, .band:focus-visible .band__state, .band.is-copied .band__state, .band.is-failed .band__state { opacity: 1; }
.band.is-copied .band__state { color: var(--ink); }
.band.is-failed .band__state { color: var(--ink); font-weight: 700; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 60rem) {
  :root { --gutter: 20px; --bar-h: 64px; }
  .wordmark { font-size: 1.25rem; gap: 10px; }
  .mark { width: 34px; height: 34px; font-size: 0.9375rem; }
  .bands { grid-auto-rows: auto; }
  .band { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px; padding: 18px var(--gutter) 20px; min-height: 0; }
  .band__label { font-size: 1rem; }
  .band__value { font-size: clamp(1.375rem, 6.2vw, 2rem); text-wrap: pretty; }
  .band__action { display: none; }
  .band.is-copied .band__action, .band.is-failed .band__action { display: flex; justify-self: start; }
  .band__state { min-width: 0; font-size: 0.875rem; text-align: left; }
  .btn { font-size: 0.875rem; padding: 0 12px; height: 40px; }
}

