@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap");

:root{
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #2c2c2c;
  --border-soft: #cfcfcf;
  --field-bg: #ffffff;
  --focus: #111111;

  --radius: 2px;
  --shadow: 0 0 0 rgba(0,0,0,0);

  --max: 560px;
}

*{ box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.35;
}

.page{
  min-height: 100%;
  display: grid;
  place-items: start center;
  padding: 40px 16px 56px;
}

.card{
  width: min(var(--max), 100%);
  padding: 10px 0 0;
}

.card__header{
  text-align: center;
  padding: 6px 0 22px;
}

.kicker{
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.title{
  margin: 0;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.form{
  padding: 0;
}

.section-title{
  margin: 26px 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.grid{
  display: grid;
  gap: 14px;
}

.grid--2{ grid-template-columns: 1fr 1fr; }
.grid--3{ grid-template-columns: 120px 1fr 1fr; }

@media (max-width: 560px){
  .grid--2{ grid-template-columns: 1fr; }
  .grid--3{ grid-template-columns: 1fr; }
}

.field{ min-width: 0; }

.label{
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.input, .textarea, .input--select{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--field-bg);
  padding: 14px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

.input::placeholder, .textarea::placeholder{
  color: #8a8a8a;
}

.textarea{
  resize: vertical;
  min-height: 140px;
}

.input:focus, .textarea:focus, .input--select:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(17,17,17,0.08);
}

/* Controls with icons / split */
.control{
  position: relative;
}

.control--icon .input{
  padding-left: 42px;
}

.icon{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #111;
  opacity: 0.8;
  display: inline-flex;
}

.icon svg{ fill: currentColor; }

.chev{
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-60%) rotate(45deg);
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  opacity: 0.7;
  pointer-events: none;
}

.input--select{
  appearance: none;
  padding-right: 44px;
}

.control--split .split{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0;
}

.split__left{
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 44px;
}

.split__right{
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.chev--inside{
  right: calc(100% - 110px + 14px);
}

/* Checkbox styling */
.checks{
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.check{
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  color: var(--text);
  user-select: none;
}

.check input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check .box{
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-top: 1px;
  position: relative;
}

.check input:checked + .box::after{
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(45deg);
}

.check--muted{
  margin-top: 18px;
  color: #2b2b2b;
  opacity: 0.95;
}

.hint{
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Fine print */
.fineprint{
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Actions */
.actions{
  display: grid;
  place-items: center;
  margin-top: 22px;
}

.btn{
  appearance: none;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 2px;
  padding: 12px 22px;
  font-size: 14px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.btn:hover{ opacity: 0.92; }
.btn:active{ transform: translateY(1px); }

/* Typeahead.js */
.twitter-typeahead{ width: 100%; }

.tt-menu{
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.tt-suggestion{
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #efefef;
}

.tt-suggestion:last-child{ border-bottom: 0; }
.tt-suggestion:hover, .tt-suggestion.tt-cursor{
  background: #f5f5f5;
}
