:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --bordo: rgba(17, 17, 19, 0.08);
  --testo: #18181b;
  --testo-2: #71717a;
  --testo-3: #a1a1aa;
  --pillola: #111113;
  --icona: #f4f4f5;
  --verde: #16a34a;
  --accento: #6d5efc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vmin, 40px);
}

/* the end of an article */
.card {
  position: relative;
  width: min(440px, 100%);
  padding: clamp(18px, 4.4vmin, 28px);
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(17, 17, 19, 0.04), 0 18px 48px -18px rgba(17, 17, 19, 0.16);
}

.card__eyebrow {
  font-size: 12.5px;
  font-weight: 560;
  color: var(--accento);
  letter-spacing: 0.01em;
}

.card__title {
  margin-top: 8px;
  font-size: clamp(19px, 5vmin, 24px);
  line-height: 1.18;
  font-weight: 680;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.card__meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--testo-2);
  font-variant-numeric: tabular-nums;
}

/* a thin upright line between date and reading time, never a dot */
.card__meta .sep {
  width: 1px;
  height: 11px;
  background: rgba(17, 17, 19, 0.16);
}

.card__foot {
  position: relative;
  margin-top: clamp(16px, 4vmin, 22px);
  padding-top: clamp(14px, 3.6vmin, 18px);
  border-top: 1px solid var(--bordo);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
}

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

.byline__face {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 640;
  color: #3f3a8c;
  background: radial-gradient(circle at 30% 25%, #e6e2ff, #c9c2ff 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.byline__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  color: var(--testo-2);
  white-space: nowrap;
}

.byline__text b { color: var(--testo); font-weight: 600; }

/* ---- the share pill: GSAP changes its width; the fill is a child so its scale never fights the width ---- */
.share {
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -21px;
  height: 42px;
  width: 104px;
  z-index: 2;
}

.share__fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--pillola);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18), 0 8px 18px -8px rgba(17, 17, 19, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.share__main {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--icona);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.share__main:focus-visible, .act:focus-visible {
  box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--accento);
}

.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share__row {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 5px;
  visibility: hidden;
}

.act {
  position: relative;
  width: 36px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--icona);
  font: inherit;
  cursor: pointer;
  outline: none;
}

.act .ico { width: 19px; height: 19px; }

.act::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.act.is-hot::before { opacity: 1; }

.act--close { width: 32px; color: #a1a1aa; }

.row__sep {
  width: 1px;
  height: 18px;
  margin: 0 3px;
  background: rgba(255, 255, 255, 0.16);
}

.i-check {
  stroke: #4ade80;
  stroke-width: 2;
}

/* the tooltip above each icon */
.tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  padding: 5px 9px 6px;
  border-radius: 8px;
  background: var(--pillola);
  color: #fafafa;
  font-size: 12px;
  font-weight: 540;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 6px 16px -6px rgba(17, 17, 19, 0.45);
}

.tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% -1px;
  border: 5px solid transparent;
  border-top-color: var(--pillola);
}

/* the small note under the card */
.toast {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--bordo);
  box-shadow: 0 10px 30px -12px rgba(17, 17, 19, 0.28);
  font-size: 13.5px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.toast__ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--verde);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast__text { font-weight: 600; }

.toast__url {
  color: var(--testo-3);
  font-variant-numeric: tabular-nums;
}

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #111113;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  opacity: 0;
  z-index: 5;
}

@media (max-width: 400px) {
  .byline__text span { display: none; }
  .toast__url { display: none; }
}

@media (max-width: 340px) {
  .byline__face { display: none; }
}
