.field select {
  width: 100%;
  border: 1px solid #cfd4cc;
  border-radius: 4px;
  background: #fff;
  padding: 13px 42px 13px 14px;
  color: var(--ink);
  font: inherit;
}

.field select:focus {
  outline: 3px solid #ccef4866;
  border-color: #92ae33;
}

.nested-type-field {
  margin: 10px 0 0;
  padding: 16px;
  border-left: 4px solid var(--lime);
  background: #fff;
}

.save-template-settings {
  margin: 28px 0;
  padding: 22px 24px;
  border: 1px solid #d2d7ce;
  background: #fff;
}

.template-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
}

.template-toggle input {
  width: auto;
  margin-top: 5px;
  accent-color: var(--green);
}

.template-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 400;
}

.save-template-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .75fr);
  gap: 18px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e1e4dc;
}

.save-template-fields .field {
  margin: 0;
}

.template-scope ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.template-scope label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid #cfd4cc;
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
}

.template-scope input {
  width: auto;
  accent-color: var(--green);
}

.template-library-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
}

.template-page {
  width: min(1184px, calc(100% - 56px));
  min-height: 72vh;
  margin: 42px auto 110px;
}

.template-header {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 44px;
  overflow: hidden;
  padding: 48px 52px;
  background: var(--green);
  color: #fff;
}

.template-header::after {
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(204, 239, 72, .35);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(204, 239, 72, .05), 0 0 0 94px rgba(204, 239, 72, .03);
  content: "";
}

.template-header > * {
  position: relative;
  z-index: 1;
}

.template-header .eyebrow {
  margin-bottom: 14px;
  color: #d5dfda;
}

.template-header h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
}

.template-header p:last-child {
  max-width: 670px;
  margin: 18px 0 0;
  color: #cbd7d2;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 34px;
}

.template-card {
  display: flex;
  min-width: 0;
  min-height: 275px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid #dfe2da;
  background: #fff;
  box-shadow: 0 12px 35px rgba(24, 50, 45, .06);
}

.template-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #4f665f;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.template-card-top b {
  color: #7ca230;
  letter-spacing: -3px;
  transform: rotate(-45deg);
}

.template-card h2 {
  margin: 26px 0 7px;
  font-size: 1.45rem;
  overflow-wrap: anywhere;
}

.template-card > p {
  margin: 0;
  color: var(--muted);
}

.template-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
}

.template-card dt {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.template-card dd {
  margin: 2px 0 0;
  font-size: .85rem;
  font-weight: 700;
}

.template-card form,
.template-card small {
  margin-top: auto;
}

.template-card button {
  border: 0;
  background: none;
  padding: 0;
  color: #a04436;
  font: 600 .8rem "DM Sans", sans-serif;
  cursor: pointer;
}

@media (max-width: 850px) {
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .save-template-fields,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .template-page {
    width: min(100% - 36px, 1184px);
    margin-top: 25px;
  }

  .template-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 36px 25px;
  }
}
