.complaint-header {
  padding: 28px var(--gutter);
}

.complaint-intro {
  padding: 32px var(--gutter) 56px;
}

.complaint-intro h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1;
}

.complaint-support a {
  border-bottom: 1px solid currentColor;
  color: var(--mint);
  overflow-wrap: anywhere;
}

.complaint-form,
.complaint-result {
  padding: 40px var(--gutter) 96px;
  color: var(--ink);
  background: var(--paper);
}

.complaint-form fieldset {
  max-width: 860px;
  margin: 0 0 16px;
  padding: 48px 0 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.complaint-form legend {
  float: left;
  width: 100%;
  margin-bottom: 26px;
  padding: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1;
}

.complaint-form legend span {
  margin-right: 12px;
  color: #7d8884;
  font-family: var(--sans);
  font-size: 12px;
  vertical-align: middle;
}

.complaint-form legend + * {
  clear: both;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
}

.complaint-form label {
  display: block;
  margin-bottom: 24px;
}

.complaint-form label > span {
  display: block;
  margin-bottom: 4px;
  color: #486057;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.complaint-form label > small {
  display: block;
  margin-top: 6px;
  color: #6a7672;
  font-size: 12px;
}

.complaint-form input:not([type="checkbox"]),
.complaint-form textarea {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid rgba(7, 18, 15, 0.35);
  border-radius: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  resize: vertical;
}

.complaint-form input:focus,
.complaint-form textarea:focus {
  border-color: #247950;
}

.fieldset-note {
  color: #53605b;
  font-size: 14px;
}

.choices {
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
}

.complaint-form .choice {
  margin: 0;
  padding: 16px 0;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.choices + label {
  margin-top: 8px;
}

.choice-group-title {
  margin: 28px 0 14px;
  color: #486057;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fieldset-note + .choice-group-title,
legend + .choice-group-title {
  margin-top: 8px;
}

.context {
  margin: 0 0 24px;
  padding: 18px 22px;
  border-left: 3px solid #247950;
  color: #3d4a45;
  background: #f4f8f6;
  font-size: 15px;
}

.complaint-form .choice-detail {
  display: none;
  margin: 0;
  padding: 0 0 16px 38px;
  border-bottom: 1px solid var(--line);
}

.complaint-form .choice-item:has(:checked) .choice {
  border-bottom: 0;
}

.complaint-form .choice-item:has(:checked) .choice-detail {
  display: block;
}

.choice-detail input {
  max-width: 320px;
}

.choice input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #247950;
}

.complaint-form .choice > span {
  margin: 0;
  color: #53605b;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.choice strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.more-detail {
  max-width: 860px;
  margin: 32px 0 16px;
  border: 1px dashed rgba(7, 18, 15, 0.3);
  transition: border-color 180ms ease, background 180ms ease;
}

.more-detail[open] {
  border-style: solid;
  border-color: var(--line);
  background: #f7faf8;
}

.more-detail summary {
  padding: 22px 64px 22px 24px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  list-style: none;
  cursor: pointer;
}

.more-detail summary::-webkit-details-marker {
  display: none;
}

.more-detail summary:focus-visible {
  outline: 2px solid #247950;
  outline-offset: 2px;
}

.more-detail-title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.1;
}

.more-detail-hint {
  color: #6a7672;
  font-size: 13px;
}

.more-detail-icon {
  position: absolute;
  top: 50%;
  right: 24px;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border: 1px solid rgba(7, 18, 15, 0.35);
  border-radius: 50%;
  transition: transform 200ms ease, background 180ms ease;
}

.more-detail-icon::before,
.more-detail-icon::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 8px;
  width: 10px;
  height: 1px;
  background: var(--ink);
}

.more-detail-icon::after {
  transform: rotate(90deg);
}

.more-detail summary:hover .more-detail-icon {
  background: var(--mint-pale);
}

.more-detail[open] .more-detail-icon {
  transform: rotate(45deg);
}

.more-detail-body {
  padding: 4px 24px 12px;
}

.more-detail-body h3 {
  margin: 20px 0 16px;
  color: #486057;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.more-detail-body h3:not(:first-child) {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.more-detail-body .choice {
  border-top: 1px solid var(--line);
}

.signature {
  position: relative;
  max-width: 560px;
}

.signature canvas {
  width: 100%;
  aspect-ratio: 3 / 1;
  display: block;
  border: 1px solid rgba(7, 18, 15, 0.35);
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}

.signature canvas:focus-visible {
  outline: 2px solid #247950;
  outline-offset: 2px;
}

.signature-clear,
.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: #20764f;
  background: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.signature-clear {
  position: absolute;
  right: 12px;
  bottom: 10px;
}

.form-error {
  margin: 10px 0 0;
  color: #b3261e;
  font-size: 14px;
  font-weight: 500;
}

.complaint-form > .button {
  margin-top: 32px;
}

.nudge {
  max-width: 560px;
  margin-top: 32px;
  padding: 20px 22px;
  border-left: 3px solid #247950;
  background: var(--mint-pale);
}

.nudge p {
  margin-bottom: 16px;
  color: #3d4a45;
  font-size: 15px;
}

.nudge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.nudge-actions .button {
  min-height: 44px;
  padding: 10px 18px;
}

.complaint-result {
  padding-top: 88px;
  background: var(--mint-pale);
}

.complaint-result h2 {
  margin-bottom: 32px;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 0.95;
  outline: none;
}

.send-to {
  max-width: 760px;
  margin-bottom: 32px;
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  border-top: 1px solid rgba(7, 18, 15, 0.2);
  border-bottom: 1px solid rgba(7, 18, 15, 0.2);
}

.send-to span {
  color: #486057;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.send-to strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.result-block {
  max-width: 760px;
  margin-bottom: 32px;
}

.result-block p {
  color: #4e6259;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-outline {
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
}

.result-note {
  max-width: 760px;
  margin-bottom: 8px;
  color: #4e6259;
  font-size: 14px;
}

.complaint-support {
  padding: 56px var(--gutter) 72px;
}

.complaint-support h2 {
  margin-bottom: 12px;
  font-size: 36px;
}

.complaint-support p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.complaint-support .complaint-smallprint {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

@media (max-width: 760px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .result-actions .button {
    width: 100%;
  }
}

.own-points {
  margin-bottom: 8px;
}

.own-point {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
}

.add-own {
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  color: #20764f;
  background: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.add-own::before {
  content: "+";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.add-own:hover {
  color: var(--ink);
}

.preview {
  max-width: 760px;
  margin-bottom: 40px;
}

.preview-tabs {
  display: flex;
  gap: 4px;
}

.preview-tabs button {
  padding: 12px 18px;
  border: 0;
  color: #486057;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.preview-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: #fff;
}

.preview-frame {
  max-height: 70vh;
  padding: clamp(12px, 3vw, 28px);
  overflow: auto;
  background: #fff;
  outline: none;
}

.preview-frame:focus-visible {
  box-shadow: inset 0 0 0 2px #247950;
}

/* A sheet of paper, in the letter's own typeface. Its font size stands for 10pt. */
.paper {
  padding: 9% 10%;
  color: #000;
  background: #fff;
  box-shadow: 0 1px 4px rgba(7, 18, 15, 0.18);
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(11px, 1.7vw, 14px);
  line-height: 1.45;
}

.paper-text {
  margin: 0 0 0.9em;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.paper-text.is-small {
  margin-bottom: 0;
  font-size: 0.95em;
  line-height: 1.37;
}

.paper-text.is-bold {
  font-weight: 700;
}

.paper-list {
  margin: 0 0 0.9em;
  padding-left: 1.8em;
}

.paper-list li {
  margin-bottom: 0.35em;
}

.paper-signature {
  max-width: 200px;
  height: 4.8em;
  display: block;
  object-fit: contain;
  object-position: left;
}

.paper-form-title {
  margin-bottom: 1.6em;
  font-size: 1.7em;
  font-weight: 700;
  line-height: 1.15;
}

.paper-form-heading {
  margin: 1.8em 0 0.8em;
  font-size: 1.15em;
  font-weight: 700;
}

.paper-row {
  padding: 0.5em 0 0.3em;
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 1em;
}

.paper-row:not(.is-plain) .paper-value {
  border-bottom: 1px solid #999;
}

.paper-label {
  display: block;
  color: #595959;
  font-size: 0.9em;
}

.paper-value {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.paper-note {
  margin: 1.2em 0 2.2em;
  color: #595959;
  font-size: 0.85em;
}

.paper-signed {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 1em;
}

.paper-footer {
  margin: 3em 0 0;
  color: #808080;
  font-size: 0.75em;
}

.sources {
  margin: 20px 0 0;
  color: #6a7672;
  font-size: 13px;
}

.sources a,
.confirm a,
.complaint-smallprint a {
  border-bottom: 1px solid currentColor;
}

.complaint-form .confirm {
  margin-top: 24px;
  border-bottom: 0;
}
