/* RonixStudio license site: the public pages (index.html, plugin.html). Fonts, palette and the key tag come from
   common.css, shared with the admin panel. The license ticket is the one bold element; a plugin's colour appears
   only on its own tag, ticket stripe and buttons. */

:root {
  --gutter: clamp(16px, 4vw, 40px);
  --page: 1120px;
}

body { display: flex; flex-direction: column; font-size: 16px; line-height: 1.55; }
a { color: inherit; }

/* ---- frame: bar, page column, footer share one width so their edges line up ---- */

.bar { border-bottom: 1px solid var(--seam); }
.bar-inner, main, .foot-inner {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.wordmark { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.area { color: var(--haze); padding-left: 12px; border-left: 1px solid var(--seam); }
.nav { display: flex; gap: 20px; }
.nav a { padding: 6px 0; color: var(--haze); font-size: 15px; font-weight: 600; text-decoration: none; }
.nav a:hover { color: var(--moon); }
main { flex: 1; padding-top: clamp(36px, 7vw, 76px); padding-bottom: 96px; }

.foot { border-top: 1px solid var(--seam); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  padding-top: 22px;
  padding-bottom: 26px;
  font-size: 13.5px;
  color: var(--haze);
}
.foot p { margin: 0; }

/* ---- type ---- */

.display {
  font-size: clamp(44px, 7.4vw, 78px);
  font-weight: 700;
  font-stretch: 75%;
  line-height: 0.95;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}
.lede { max-width: 33em; margin: 18px 0 0; color: var(--haze); font-size: 17.5px; line-height: 1.5; }
h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.005em; }

/* ---- buttons ---- */

.primary {
  flex: none;
  border: 0;
  border-radius: 12px;
  padding: 0 26px;
  min-height: 52px;
  font-size: 16px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(100deg, var(--violet), var(--cyan));
}
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.primary:disabled { opacity: 0.65; }
/* On a plugin's page the buttons take the plugin's colour. */
.plugin-page .primary { background: var(--accent); color: var(--on-accent); }

.outline-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--seam);
  border-radius: 11px;
  font-weight: 600;
  text-decoration: none;
}
.outline-button:hover { border-color: var(--haze); }

/* ---- the key form ---- */

.check { container: check / inline-size; margin-top: 30px; }
.label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--haze); }
.check-row { display: flex; gap: 10px; }
.key-input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--well);
  border: 1px solid var(--seam);
  border-radius: 12px;
  font: 500 17px/1.2 var(--mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  outline: none;
}
.key-input::placeholder { color: #6f689c; }
.key-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.18); }
@container check (max-width: 470px) {
  .check-row { flex-direction: column; }
  .key-input { font-size: 16px; }
}

/* Under the field: which plugin the typed key is for, or what keys look like. */
.key-hint { display: flex; align-items: center; gap: 10px; min-height: 26px; margin: 12px 0 0; font-size: 14px; color: var(--haze); }
.key-hint .tag { --tag: 22px; }
.key-hint strong { color: var(--moon); font-weight: 600; }
.key-hint.is-warning { color: var(--lantern); }

/* ---- the license ticket ---- */

.result { --behind: var(--night); min-width: 0; }

.pass {
  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: 470px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, 0.8);
}
.pass::before {
  content: '';
  display: block;
  height: 8px;
  border-radius: 16px 16px 0 0;
  background: var(--accent, var(--violet));
}
.pass.is-new { animation: print 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes print {
  from { opacity: 0; transform: translateY(-12px); clip-path: inset(0 0 100% 0 round 16px); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 16px); }
}
.pass-top { padding: 18px 22px 20px; }
.pass-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pass-head .tag { --tag: 26px; }
.pass-plugin { flex: 1; min-width: 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.stamp { flex: none; padding: 3px 11px; border-radius: 999px; background: var(--mint); color: var(--ink); font-size: 13px; font-weight: 700; }
.state-soon .stamp { background: var(--lantern); }
.state-expired .stamp { background: var(--coral); }
.state-revoked .stamp { background: var(--void); }
.pass-key {
  margin: 14px 0 0;
  font-family: var(--mono);
  /* one line always: 22 characters at about 0.7em each, inside 22px padding */
  font-size: min(18px, calc((100cqi - 44px) / 15.6));
  font-weight: 600;
  white-space: nowrap;
}
.state-revoked .pass-key { text-decoration: line-through; text-decoration-color: var(--void); text-decoration-thickness: 2px; }

.perforation { position: relative; margin: 0 16px; border-top: 2px dashed #cfc6ef; }
.perforation::before, .perforation::after {
  content: '';
  position: absolute;
  top: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--behind);
}
.perforation::before { left: -27px; }
.perforation::after { right: -27px; }

.pass-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; padding: 18px 22px 6px; }
.pass-facts div { min-width: 0; }
.pass-facts dt { font-size: 12.5px; color: var(--ink-soft); }
.pass-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.pass-facts .is-unset { color: var(--ink-soft); font-weight: 500; }
.meter { display: block; height: 5px; margin-top: 7px; border-radius: 999px; background: #e1d9f7; overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: inherit; background: #1fae74; }
.state-soon .meter-fill { background: #e3921c; }
.state-revoked .meter-fill { background: var(--void); }
.pass-note { margin: 0; padding: 12px 22px 20px; font-size: 14px; color: var(--ink-soft); }

/* Before a check: the same ticket, blank, so it is clear what a check shows. */
.pass-blank {
  background: transparent;
  color: var(--haze);
  border: 1.5px dashed var(--seam);
  box-shadow: none;
}
.pass-blank::before { height: 6px; background: var(--seam); border-radius: 14px 14px 0 0; }
.pass-blank .perforation { border-top-color: var(--seam); margin: 0 14px; }
.pass-blank .perforation::before, .pass-blank .perforation::after { border: 1.5px dashed var(--seam); }
.pass-blank .pass-facts dt { color: var(--haze); }
.blank { display: block; height: 10px; margin-top: 8px; border-radius: 999px; background: var(--seam); opacity: 0.7; }
.blank-key { height: 14px; width: 86%; margin-top: 18px; }
.blank-tag { flex: none; width: 34px; height: 26px; margin: 0; border-radius: 6px; }
.blank-short { width: 55%; }

/* Not found, errors, "this key is for another plugin". */
.result-note {
  max-width: 470px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--seam);
  border-left: 4px solid var(--lantern);
  border-radius: 12px;
  background: var(--dusk);
  font-size: 15px;
}
.result-note:last-child { margin-bottom: 0; }
.result-note strong { display: block; margin-bottom: 2px; font-weight: 650; }
.result-note.is-error { border-left-color: var(--danger); }
.result-note a { font-weight: 600; text-underline-offset: 3px; }

/* ---- home ---- */

/* Top-aligned, so a taller result never moves the form. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; }
@media (min-width: 920px) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 64px; }
  .hero .result { justify-self: end; width: 100%; max-width: 470px; margin-top: 6px; }
}
@media (max-width: 919px) {
  .pass-blank { display: none; }
}

.plugins { margin-top: clamp(72px, 11vw, 128px); }
.plugins-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 18px; }
.plugins-head p { margin: 0; color: var(--haze); font-size: 15px; }
.catalog { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--seam); }
.catalog li { border-bottom: 1px solid var(--seam); }
.plugin-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 26px;
  align-items: center;
  padding: 24px 12px;
  text-decoration: none;
}
.plugin-link:hover { background: rgba(241, 237, 255, 0.03); }
.plugin-link .tag { --tag: 52px; }
.plugin-name { display: block; font-size: 26px; font-weight: 700; font-stretch: 85%; line-height: 1.15; }
.plugin-link:hover .plugin-name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.plugin-tagline { display: block; margin-top: 3px; color: var(--haze); }
.plugin-meta { display: grid; justify-items: end; gap: 2px; font-size: 14px; color: var(--haze); text-align: right; }
.plugin-meta strong { color: var(--moon); font-weight: 600; }
.catalog-note { margin: 18px 0 0; color: var(--haze); }
.catalog-note:empty { margin: 0; }
.catalog-note.is-error { color: var(--danger); }

@media (max-width: 640px) {
  .plugin-link { grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; padding: 20px 4px; align-items: start; }
  .plugin-link .tag { --tag: 44px; }
  .plugin-name { font-size: 22px; }
  .plugin-meta { grid-column: 2; justify-items: start; text-align: left; margin-top: 8px; }
}

/* ---- a plugin's page ---- */

.crumbs { margin: 0 0 30px; font-size: 14.5px; color: var(--haze); }
.crumbs a { color: var(--haze); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--moon); }
.crumbs span[aria-hidden] { margin: 0 8px; }

.plugin-hero { display: flex; align-items: center; gap: clamp(18px, 3vw, 30px); }
.plugin-hero .tag { --tag: clamp(58px, 9vw, 86px); }
.plugin-hero .lede { margin-top: 12px; }

.about { display: grid; gap: 22px; max-width: 760px; margin-top: 36px; }
.description { margin: 0; font-size: 17px; max-width: 62ch; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 44px; margin: 0; }
.facts dt { font-size: 13.5px; color: var(--haze); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.about .outline-button { justify-self: start; }

.plugin-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 56px; align-items: start; }
@media (min-width: 920px) {
  .plugin-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
}
.panel { --behind: var(--dusk); padding: clamp(20px, 3vw, 28px); background: var(--dusk); border: 1px solid var(--seam); border-radius: 18px; }
.panel .result { --behind: var(--dusk); margin-top: 22px; }
.panel .pass, .panel .result-note { max-width: none; }
.panel .result:empty { margin-top: 0; }
.panel .check { margin-top: 18px; }

.steps { list-style: none; counter-reset: step; display: grid; gap: 18px; margin: 20px 0 0; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; overflow-wrap: anywhere; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
}
.steps-empty { margin: 16px 0 0; color: var(--haze); }

.missing { max-width: 560px; }
.missing p { color: var(--haze); font-size: 17px; }

@media (max-width: 380px) {
  .area { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pass.is-new { animation: none; }
}
