:root {
  --bg: #f4efe4;
  --card: #ffffff;
  --ink: #1d1a14;
  --soft: #837b6d;
  --accent: #ff8a1f;
  --down: #d9482f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(60% 50% at 20% 0%, #fffdf7, transparent 70%),
    radial-gradient(50% 45% at 100% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 14px;
}

.rep {
  position: relative;
  width: min(336px, 100%);
  padding: 14px 14px 11px;
  border-radius: 24px;
  background: var(--card);
  box-shadow:
    0 0 0 1px rgba(29, 26, 20, 0.06),
    0 2px 4px rgba(29, 26, 20, 0.05),
    0 20px 40px -18px rgba(29, 26, 20, 0.25),
    0 50px 80px -44px color-mix(in srgb, var(--accent) 55%, transparent);
}
.rep__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.rep__head span:first-child { display: block; font-size: 10.5px; line-height: 14px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 82%, #5a2a00); }
.rep__head h1 { font-size: 18px; line-height: 22px; font-weight: 720; font-stretch: 108%; letter-spacing: -0.02em; }
.terms { position: relative; flex: none; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 11px; background: rgba(29, 26, 20, 0.07); }
.terms__thumb { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 2); border-radius: 8px; background: #ffffff; box-shadow: 0 1px 2px rgba(29, 26, 20, 0.2), 0 4px 8px -4px rgba(29, 26, 20, 0.3); }
.term { position: relative; height: 26px; padding: 0 11px; border: 0; border-radius: 8px; background: none; color: var(--soft); font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color 0.3s ease; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.term[aria-checked="true"] { color: var(--ink); }

.rep__top { display: flex; align-items: center; gap: 13px; margin-top: min(12px, 2.6vh); }
.avg { position: relative; flex: none; width: min(84px, 19vh); height: min(84px, 19vh); }
.avg svg { display: block; width: 100%; height: 100%; overflow: visible; }
.avg circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.avg__trk { stroke: rgba(29, 26, 20, 0.08); }
.avg__arc { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 2px 5px color-mix(in srgb, var(--accent) 50%, transparent)); }
.avg p { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.avg strong { font-size: min(24px, 5.6vh); line-height: 1.05; font-weight: 740; font-stretch: 108%; letter-spacing: -0.03em; }
.avg small { font-size: 10px; font-weight: 560; color: var(--soft); }
.note { min-width: 0; display: grid; gap: 2px; align-content: center; min-height: 54px; }
.note__who { font-size: 12px; font-weight: 700; }
.roll { display: block; height: 17px; line-height: 17px; overflow: hidden; }
.roll span { display: block; white-space: nowrap; }
.note__text { display: block; font-size: 12px; line-height: 1.38; color: color-mix(in srgb, var(--ink) 72%, var(--soft)); }

.subs { margin-top: min(11px, 2.4vh); display: grid; gap: 1px; }
.sub { display: grid; grid-template-columns: 74px minmax(0, 1fr) 30px 38px; align-items: center; gap: 8px; width: 100%; min-height: min(27px, 6.4vh); padding: 0 6px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.25s ease; }
.sub:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sub.is-on { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.sub__name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub__track { position: relative; height: 7px; border-radius: 99px; background: rgba(29, 26, 20, 0.07); overflow: hidden; }
.sub__bar { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 65%, #ffd9a8), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); }
.sub__n { font-size: 13px; font-weight: 720; text-align: right; }
.sub__d { justify-self: end; padding: 1px 6px; border-radius: 99px; font-size: 10px; line-height: 14px; font-weight: 680; white-space: nowrap; background: color-mix(in srgb, var(--accent) 14%, transparent); color: color-mix(in srgb, var(--accent) 78%, #4a2200); }
.sub__d.is-down { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down); }
.sub__d.is-flat { background: rgba(29, 26, 20, 0.06); color: var(--soft); }

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

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #14151a;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(20, 21, 26, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (max-width: 370px) {
  .sub { grid-template-columns: 66px minmax(0, 1fr) 28px 36px; gap: 6px; }
}
/* big in the poster and on a desk, unchanged in the phone's box */
@media (min-width: 700px) and (min-height: 500px) {
  .rep { zoom: 1.2; }
}
@media (min-width: 1100px) and (min-height: 760px) {
  .rep { zoom: 1.65; }
}
