/* Shared by the public site and the admin panel: the fonts, the night palette and the plugin key tag.
   Instrument Sans for everything, Martian Mono only for license keys and key prefixes. */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(/assets/fonts/instrument-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(/assets/fonts/instrument-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/martian-mono-latin.woff2) format('woff2');
}

:root {
  --night: #1b1736;   /* page */
  --well: #15112c;    /* inputs, sunk areas */
  --dusk: #231e45;    /* panels */
  --dusk-2: #2c2654;  /* open entry, selected segment */
  --seam: #3a3270;    /* lines */
  --moon: #f1edff;    /* text */
  --haze: #aaa2d4;    /* secondary text */
  --violet: #7b2ff7;  /* studio gradient, from */
  --cyan: #00c2ff;    /* studio gradient, to; focus */
  --mint: #3ddc97;    /* time left */
  --lantern: #ffb547; /* ends soon */
  --coral: #ff7a59;   /* expired */
  --void: #8d86b5;    /* revoked */
  --danger: #ff5d7a;  /* destructive actions */
  --paper: #f5f1ff;   /* license tickets */
  --ink: #1b1736;
  --ink-soft: #5b4f8f;
  --mono: 'Martian Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--moon);
  font: 400 15px/1.5 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

h1, h2, h3 { margin: 0; line-height: 1.25; }

/* A plugin's key tag: the letters every license key of the plugin starts with, on the plugin's colour, cut like a
   key-ring tag (chamfered end, punched hole). Set --accent and --on-accent on it or a parent; --tag sets the size. */
.tag {
  --tag: 44px;
  --cut: calc(var(--tag) * 0.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(var(--tag) * 1.36);
  height: var(--tag);
  padding-left: calc(var(--tag) * 0.3);
  border-radius: 0 calc(var(--tag) * 0.18) calc(var(--tag) * 0.18) 0;
  background: var(--accent, var(--violet));
  color: var(--on-accent, #fff);
  font: 600 calc(var(--tag) * 0.29)/1 var(--mono);
  letter-spacing: 0.02em;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  -webkit-mask: radial-gradient(circle at calc(var(--tag) * 0.25) 50%, transparent calc(var(--tag) * 0.075), #000 calc(var(--tag) * 0.075 + 0.6px));
  mask: radial-gradient(circle at calc(var(--tag) * 0.25) 50%, transparent calc(var(--tag) * 0.075), #000 calc(var(--tag) * 0.075 + 0.6px));
  user-select: none;
}
