/* raft.build/licensing/: the self-hosted license request form. Standalone page
   (outside the React site) using the site's fonts and brutal tokens. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-latin.woff2') format('woff2');
}

:root {
  --yellow: #ffd440;
  --pink: #fe7da8;
  --lavender: #bbafe6;
  --cream: #fffaef;
  --ink: #141111;
  --red: #f97264;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
a { color: inherit; text-underline-offset: 3px; }
[hidden] { display: none !important; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--yellow);
  border-bottom: 2px solid var(--ink);
}
.brand img { display: block; height: 28px; width: auto; }
.lang { display: flex; border: 2px solid var(--ink); background: var(--cream); }
.lang button {
  font: 700 13px 'Space Mono', monospace;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lang button[aria-pressed='true'] { background: var(--ink); color: var(--cream); }

main { max-width: 760px; margin: 0 auto; padding: 56px 24px 40px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 10px;
  font: 700 12px 'Space Mono', monospace;
  background: var(--ink);
  color: var(--cream);
}
h1 { text-wrap: balance; margin: 0 0 18px; font-size: clamp(34px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }
.lede { margin: 0; font-size: 19px; max-width: 620px; text-wrap: pretty; }

.when { margin-top: 52px; }
h2 { margin: 0 0 18px; font-size: 24px; letter-spacing: -0.01em; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards li { background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 16px; }
.cards p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.45; text-wrap: pretty; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid var(--ink);
  font: 700 12px 'Space Mono', monospace;
}
.tag-yellow { background: var(--yellow); }
.tag-pink { background: var(--pink); }
.tag-lav { background: var(--lavender); }
.note { margin: 18px 0 0; font-size: 15px; }

.form { margin-top: 56px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 2px solid var(--ink); background: #fff; box-shadow: var(--shadow); margin: 0 0 28px; padding: 26px 24px 24px; min-width: 0; }
legend { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 21px; font-weight: 700; }
.step {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  font: 700 14px 'Space Mono', monospace;
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.field.wide, .field.handle { margin-top: 18px; }
b { color: #c6304d; font-weight: 700; }
input:not([type='radio']):not([type='checkbox']), textarea {
  width: 100%;
  font: inherit;
  font-weight: 400;
  font-size: 16px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--cream);
  color: var(--ink);
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

.q { margin-top: 24px; }
legend + .q { margin-top: 0; }
.qt { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.hint { margin: 0 0 6px; font-size: 14px; color: #5b5550; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.opts.col { flex-direction: column; align-items: stretch; max-width: 480px; }
/* Pick-any options show a box that fills in, so they don't read as pick-one. */
.opts input[type='checkbox'] + span { display: flex; align-items: center; gap: 10px; }
.opts input[type='checkbox'] + span::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  background: #fff;
}
.opts input[type='checkbox']:checked + span::before {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 5 9l5-6' fill='none' stroke='%23ffd440' stroke-width='2'/%3E%3C/svg%3E") center / 12px no-repeat;
}
/* A full-width question mark already leaves a gap before the star. */
.qt.tight b { margin-left: -0.5em; }
.opts label { position: relative; cursor: pointer; }
.opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opts span {
  display: block;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.08s, box-shadow 0.08s;
}
.opts label:hover span { box-shadow: var(--shadow-sm); transform: translate(-1px, -1px); }
.opts input:checked + span { background: var(--yellow); box-shadow: var(--shadow-sm); font-weight: 700; }
.opts input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.q.bad .qt, .field.bad > span { color: #c6304d; }
.field.bad input { border-color: #c6304d; }

.error { margin: 0 0 18px; padding: 12px 14px; border: 2px solid var(--ink); background: var(--red); font-weight: 600; }
.submit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 13px 26px;
  border: 2px solid var(--ink);
  background: var(--pink);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: var(--shadow-sm); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-ghost { background: #fff; }
.privacy { margin: 0; flex: 1 1 260px; font-size: 14px; color: #5b5550; }

.done { margin-top: 56px; padding: 32px 28px; border: 2px solid var(--ink); background: var(--yellow); box-shadow: var(--shadow); }
.done h2 { font-size: 30px; }
.done p { margin: 0 0 20px; }
.done .preview { font: 700 13px 'Space Mono', monospace; }

.foot { max-width: 760px; margin: 0 auto; padding: 8px 24px 48px; font-size: 15px; }
.site-foot { border-top: 2px solid var(--ink); background: var(--ink); color: var(--cream); }
.site-foot div { max-width: 760px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.site-foot span { margin-right: auto; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 36px 16px 28px; }
  .top { padding: 12px 16px; }
  .cards, .grid { grid-template-columns: 1fr; }
  fieldset { padding: 22px 16px 20px; }
  .foot { padding: 8px 16px 36px; }
  .site-foot div { padding: 18px 16px; }
  .opts.col { max-width: none; }
}
