html:has(.forge-brief[open]) {
  overflow: hidden;
}

.forge-brief {
  --brief-paper: #f4f3ed;
  --brief-ink: #1a1b17;
  --brief-rule: #b4b4a9;
  --brief-accent: #00bddf;
  position: fixed;
  inset: 0;
  width: min(39rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--brief-ink);
  border-radius: 2px;
  background: var(--brief-paper);
  color: var(--brief-ink);
  box-shadow: 0 18px 80px #15160e33;
  font-family: inherit;
  text-align: left;
}

.forge-brief:not([open]), .forge-brief [hidden] { display: none; }
.forge-brief::backdrop { background: rgb(21 23 19 / 58%); backdrop-filter: blur(4px); }
.forge-brief__sheet { padding: clamp(1.1rem, 4vw, 2.4rem); }
.forge-brief__header {
  position: static;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 1.4rem;
  border-bottom: 1px solid var(--brief-ink);
}
.forge-brief__header h2 {
  margin: 0;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.065em;
}
.forge-brief__header h2:focus { outline: none; }
.forge-brief__header h2 span { color: var(--brief-accent); }
.forge-brief * { box-sizing: border-box; }
.forge-brief button { margin: 0; cursor: pointer; font-family: inherit; }
.forge-brief__close {
  display: grid;
  flex: 0 0 auto;
  align-self: center;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--brief-rule);
  border-radius: 50%;
  background: transparent;
  color: var(--brief-ink);
}
.forge-brief__form { display: grid; gap: 1.25rem; padding-top: 1.5rem; }
.forge-brief__types { min-width: 0; padding: 0; margin: 0; border: 0; }
.forge-brief__form legend, .forge-brief__field > label, .forge-brief__manual > label {
  display: block;
  padding: 0;
  margin: 0 0 .55rem;
  color: var(--brief-ink);
  font-size: .9375rem;
  font-weight: 620;
  line-height: 1.45;
}
.forge-brief__field small { font-size: .85rem; font-weight: 400; color: #55574f; }
.forge-brief__choices { display: flex; flex-wrap: wrap; gap: .4rem; }
.forge-brief__choices label { position: relative; margin: 0; cursor: pointer; }
.forge-brief__choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.forge-brief__choices span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .55rem .85rem;
  border: 1px solid var(--brief-rule);
  border-radius: 2px;
  font-size: .9rem;
  line-height: 1.2;
}
.forge-brief__choices input:checked + span {
  border-color: var(--brief-ink);
  background: var(--brief-ink);
  color: var(--brief-paper);
}
.forge-brief__field :is(input, textarea), .forge-brief__manual textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: .7rem .85rem;
  border: 1px solid var(--brief-rule);
  border-radius: 2px;
  background: #fcfbf6;
  color: var(--brief-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
}
.forge-brief textarea { resize: vertical; }
.forge-brief textarea::placeholder { color: #66685f; opacity: 1; }
.forge-brief__actions { display: flex; flex-wrap: wrap; gap: .55rem; padding-top: .25rem; }
.forge-brief__actions button {
  min-height: 3rem;
  padding: .7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.3;
}
.forge-brief__actions .forge-brief__send { background: var(--brief-accent); color: #14150f; }
.forge-brief__actions .forge-brief__copy { border-color: var(--brief-rule); background: transparent; color: var(--brief-ink); }
.forge-brief__form .forge-brief__note, .forge-brief__form .forge-brief__status {
  margin: -.65rem 0 0;
  font-size: .875rem;
  line-height: 1.45;
  color: #52554d;
}
.forge-brief__status:empty { display: none; }
.forge-brief :is(button, textarea, input):focus-visible,
.forge-brief__choices input:focus-visible + span {
  outline: 2px solid #006e83;
  outline-offset: 3px;
}
@media (hover: hover) {
  .forge-brief__choices label:hover span, .forge-brief__close:hover, .forge-brief__actions .forge-brief__copy:hover { border-color: var(--brief-ink); }
  .forge-brief__actions .forge-brief__send:hover { background: #52d9f0; }
}
@media (max-width: 32rem) {
  .forge-brief { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .forge-brief__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge-brief__choices span { padding-inline: .3rem; }
  .forge-brief__header { padding-bottom: 1rem; }
  .forge-brief__form { gap: 1rem; padding-top: 1.1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .forge-brief[open] { animation: forge-brief-appear .18s ease-out both; }
  @keyframes forge-brief-appear { from { opacity: 0; transform: translateY(.5rem); } }
}
