@font-face {
  font-family: "Input Mono Condensed ExtraLight Embedded";
  src:
    local("Input Mono Condensed ExtraLight"),
    local("InputMonoCondensed-ExtraLight"),
    url("assets/InputMonoCondensed-ExtraLight.ttf") format("truetype");
  font-style: normal;
  font-weight: 200;
  font-display: block;
}

:root {
  color-scheme: light;
  font-family:
    "Input Mono Condensed ExtraLight Embedded",
    "Input Mono Condensed",
    "InputMonoCondensed",
    ui-monospace,
    "SFMono-Regular",
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-synthesis: none;
  background: #ffffff;
  color: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 280px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
}

body {
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 3.2vw, 56px);
  font-family: inherit;
  font-size: clamp(60px, 3.75vw, 84px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.035em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.stage {
  position: relative;
  width: 100%;
  height: 1em;
  min-width: 0;
  contain: layout style paint;
}

.frame {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: baseline;
  width: 100%;
  min-width: 0;
  opacity: 0;
  transition: opacity 150ms linear;
  will-change: opacity;
  pointer-events: none;
}

.frame.is-visible {
  opacity: 1;
}

.datum {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.word {
  text-align: left;
}

.position {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  body {
    padding-right: 14px;
    padding-left: 14px;
    font-size: clamp(36px, 10.5vw, 63px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .frame {
    transition-duration: 1ms;
  }
}

/* Distribuzione Aruba / PWA: safe area senza modificare la composizione. */
html,
body {
  height: 100dvh;
  overscroll-behavior: none;
}

body {
  padding-top: env(safe-area-inset-top, 0);
  padding-right: max(clamp(20px, 3.2vw, 56px), env(safe-area-inset-right, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: max(clamp(20px, 3.2vw, 56px), env(safe-area-inset-left, 0px));
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

@media (max-width: 760px) {
  body {
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
  }
}
