:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --nero: #111113;
  --nero-2: #232327;
  --bordo: rgba(17, 17, 19, 0.09);
  --testo: #18181b;
  --testo-2: #6b6b73;
  --testo-3: #a1a1aa;
  --accento: #12a36b;
}

* { box-sizing: border-box; margin: 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 {
  overflow: hidden;
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

/* as big as the open state: the button, the menu under it and the line of the note */
.frame {
  position: relative;
  width: 280px;
  height: 214px;
  display: grid;
  justify-items: center;
  align-content: start;
}

.split {
  position: relative;
  margin-top: 6px;
  display: inline-flex;
  align-items: stretch;
  height: 44px;
  border-radius: 999px;
  background: var(--nero);
  color: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18), 0 10px 24px -10px rgba(17, 17, 19, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  z-index: 2;
}

/* the progress: a green sheet that fills the button from the left */
.fill {
  position: absolute;
  inset: 0;
  background: var(--accento);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

.main, .more {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.main:focus-visible, .more:focus-visible { outline: 2px solid var(--accento); outline-offset: -4px; border-radius: 999px; }

.main { padding: 0 14px 0 16px; gap: 9px; }

.ico { position: relative; width: 18px; height: 18px; flex: none; }
.ico svg {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico__clock, .ico__check { opacity: 0; }

.labels {
  position: relative;
  height: 20px;
  overflow: hidden;
  display: block;
}
.label {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 20px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  opacity: 0;
}
.label[data-l="publish"] { opacity: 1; }
.when {
  display: inline-block;
  margin-left: 3px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  font-weight: 560;
  line-height: 18px;
  vertical-align: 1px;
}

.cut {
  width: 1px;
  margin: 11px 0;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
}

.more { width: 40px; justify-content: center; padding-right: 4px; }
.more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.menu {
  position: absolute;
  top: 58px;
  left: 50%;
  width: 252px;
  margin-left: -126px;
  padding: 6px;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 17, 19, 0.05), 0 18px 40px -16px rgba(17, 17, 19, 0.25);
  transform-origin: 82% 0;
  visibility: hidden;
  opacity: 0;
  z-index: 3;
}

.opt {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--testo);
  text-align: left;
  display: grid;
  grid-template-columns: 20px 1fr 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 11px;
  cursor: pointer;
  position: relative;
}
.opt > svg:first-child { width: 20px; height: 20px; fill: none; stroke: var(--testo-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.opt__t { display: grid; gap: 1px; }
.opt b { font-size: 13.5px; font-weight: 600; }
.opt small { font-size: 12px; color: var(--testo-2); }
.tick { width: 18px; height: 18px; fill: none; stroke: var(--accento); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.opt[aria-checked="true"] .tick { opacity: 1; }
.opt.is-hot { background: #f4f4f5; }
.opt:focus-visible { outline: 2px solid var(--accento); outline-offset: -2px; }
@media (hover: hover) {
  .opt:hover { background: #f4f4f5; }
}

.note {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  height: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--testo-2);
}
.note > span { position: absolute; left: 0; right: 0; top: 0; white-space: nowrap; }
.note__b { opacity: 0; color: var(--accento); font-weight: 560; }

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