/* SecretGen - self-contained stylesheet, no external framework */

/* Fredoka - self-hosted (SIL Open Font License), variable weight 400-700,
   Latin subset only. https://fonts.google.com/specimen/Fredoka */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/Fredoka.woff2') format('woff2');
}

* { box-sizing: border-box; }

html, body { margin: 0 auto; height: 100%; }

body {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #fff;
  background-color: #181818;
  overflow-x: hidden;
}

a { color: #6366f1; text-decoration: none; }

.fullscreen {
  height: 100%;
  background-color: #181818;
  position: relative;
}

.center-object {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  position: absolute;
  top: 0;
  vertical-align: middle;
  width: 100%;
  padding: 0 1rem;
}

.title { margin: 0; text-align: center; }

.logo-img {
  max-height: 90px;
  max-width: 85vw;
  width: auto;
  height: auto;
  vertical-align: middle;
}

.undertitle {
  display: block;
  flex-direction: column;
  margin: 0;
  text-align: center;
  max-width: 100%;
}

.tagline { font-size: clamp(1.15rem, 4.5vw, 2.5rem); }

.subtext { font-size: clamp(.85rem, 3vw, 1.7rem); }

.accent-text { color: #6366f1; }

.usage {
  margin-top: 1.5rem;
  text-align: center;
}

.usage code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(.75rem, 2.2vw, .95rem);
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  padding: .5em .8em;
  margin: .25em;
}

.generator {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.generator-row {
  display: flex;
  align-items: center;
  flex-flow: row wrap;
  justify-content: center;
  gap: .5rem;
}

.generator-row label {
  font-size: .85rem;
  opacity: .8;
}

.generator-row input[type="number"] {
  width: 5.5em;
  font-size: 16px;
  font-family: inherit;
  color: #fff;
  background-color: rgba(255,255,255,.08);
  border: 1px solid rgba(128,128,128,.4);
  border-radius: 6px;
  padding: .45em .6em;
}

.generator-row input[type="number"]:focus {
  outline: none;
  border-color: #6366f1;
}

.generator-result {
  display: flex;
  align-items: center;
  flex-flow: row wrap;
  justify-content: center;
  gap: .5rem;
  max-width: 90vw;
}

.generator-result code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(.75rem, 2.2vw, .95rem);
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  padding: .5em .8em;
  word-break: break-all;
}

.btn-copy {
  background-color: transparent;
  border: 1px solid rgba(128,128,128,.4);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: .8rem;
  padding: .4em .8em;
}

.btn-copy:hover { border-color: #6366f1; }

.generator-error {
  color: #f87171;
  font-size: .85rem;
  margin: 0;
}

.buttons {
  align-items: center;
  display: flex;
  justify-content: center;
  flex-flow: row wrap;
  text-align: center;
  margin-top: 1.5rem;
}

.btn {
  backface-visibility: hidden;
  background-color: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 16px;
  height: 38px;
  line-height: 38px;
  margin: .5em;
  padding: 0 30px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { filter: brightness(65%); transition: filter 200ms ease; }

.accent-bg { background-color: #6366f1; }

.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 1rem;
  font-size: clamp(.7rem, 2.5vw, .85rem);
  opacity: .7;
  line-height: 1.6;
}

/* Legal pages - shared narrow-column content layout */

body.legal-body { height: auto; max-width: 720px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; line-height: 1.6; overflow-wrap: break-word; }
body.legal-body a { color: #6366f1; }
body.legal-body h1 { margin-bottom: .25rem; }
body.legal-body .legal-back { display: inline-block; margin-bottom: 1.5rem; opacity: .8; }
body.legal-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  padding: .1em .35em;
}

.legal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.legal-card { display: block; padding: 1rem 1.25rem; border-radius: .5rem; border: 1px solid rgba(128,128,128,.3); text-decoration: none; color: inherit; }
.legal-card:hover { border-color: #6366f1; }
.legal-card-name { font-weight: 600; margin-bottom: .35rem; }
.legal-card-desc { font-size: .85rem; opacity: .75; }

footer.legal-footer { margin-top: 3rem; font-size: .85rem; opacity: .7; }

/* Changelog page - typography for the rendered Markdown body */

.changelog-body h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(128,128,128,.3);
}

.changelog-body h2:first-child { margin-top: 1rem; }

.changelog-body h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; opacity: .9; }

.changelog-body .cl-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 1.25rem 0 .5rem;
}

.changelog-body .cl-label {
  color: var(--cl);
  background: color-mix(in srgb, var(--cl) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cl) 45%, transparent);
}
.changelog-body .cl-label-added { --cl: #2ecc71; }
.changelog-body .cl-label-changed { --cl: #3ba7ff; }
.changelog-body .cl-label-fixed { --cl: #ffa64d; }
.changelog-body .cl-label-removed { --cl: #ff4d4d; }
.changelog-body .cl-label-security { --cl: #b06bff; }
.changelog-body .cl-label-deprecated { --cl: #8a8a94; }

.changelog-body ul.cl-list { list-style: none; margin: 0 0 .75rem; padding: 0; }

.changelog-body ul.cl-list li {
  position: relative;
  padding: 3px 0 3px 18px;
  margin: 0;
  font-size: .92rem;
}

.changelog-body ul.cl-list li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: #6366f1;
}
