.home-work {
  background: #eae5ed;
}

.home-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(34px, 7vw, 100px);
}

.home-work-photo {
  background: #352a3a;
}

.home-work-photo img {
  width: 100%;
  aspect-ratio: 1.24;
  object-fit: cover;
}

.home-work-copy .eyebrow {
  margin-bottom: 15px;
  color: var(--violet);
}

.work-links {
  margin-top: 29px;
  border-top: 1px solid #c5b8ca;
}

.work-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 2px;
  border-bottom: 1px solid #c5b8ca;
}

.work-links a:hover {
  background: #f7f2f9;
}

.work-links h3 {
  margin-bottom: 4px;
  font: 400 clamp(1.35rem, 2.1vw, 1.8rem)/1.2 var(--serif);
}

.work-links span {
  color: var(--violet);
  font-size: 1.35rem;
}

.work-links p,
.work-note {
  font-size: .88rem;
}

.work-note {
  margin-top: 19px;
}

.work-hero {
  padding: clamp(36px, 5vw, 75px) 0;
  color: #fff7fc;
  background: radial-gradient(ellipse at 78% 16%, #462f50, transparent 70%), #21172b;
}

.work-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 7vw, 104px);
}

.breadcrumbs {
  display: flex;
  align-items: baseline;
  gap: 11px;
  color: #dac9df;
  font-size: .78rem;
}

.breadcrumbs a {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.work-hero h1 {
  margin: 24px 0 19px;
  font-size: clamp(2.85rem, 6vw, 6.1rem);
  text-wrap: balance;
}

.work-hero h1 em {
  color: #e8c9f4;
}

.work-hero p {
  max-width: 49ch;
  color: #ece0ef;
  font-size: clamp(.97rem, 1.25vw, 1.1rem);
}

.work-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  margin-top: 20px;
  border-bottom: 1px solid #bf9cc8;
  color: #fff7fc;
  font-size: .84rem;
}

.work-hero-link:hover {
  color: #e8c9f4;
}

.work-hero-actions,
.next-tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 22px;
}

.next-tool-actions {
  flex-direction: column;
  align-items: flex-start;
}

.work-illustration img {
  width: 100%;
  aspect-ratio: 1.57;
  object-fit: cover;
}

.notebook-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3.5vw, 55px);
  border: 1px solid #9e85a674;
  background: #21172b49;
}

.notebook-prompt img {
  width: clamp(64px, 9vw, 133px);
}

.notebook-prompt p {
  color: #f1daf6;
  font: italic clamp(1.45rem, 2.7vw, 2.5rem)/1.15 var(--serif);
}

.work-section {
  padding-block: clamp(45px, 6vw, 90px);
}

.work-section-intro {
  margin-bottom: 28px;
}

.work-section h2 {
  font-size: clamp(2rem, 3.45vw, 3.3rem);
}

.work-section-intro p {
  max-width: 64ch;
  margin-top: 12px;
}

.inline-link {
  color: #593d67;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.work-layout,
.worksheet-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.worksheet-layout {
  grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr);
}

.tool-panel {
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid #d8cddc;
  background: #fdfaf8;
}

.tool-panel h3,
.worksheet-form legend {
  margin-bottom: 20px;
  color: var(--ink);
  font: 400 clamp(1.42rem, 2vw, 1.75rem)/1.2 var(--serif);
}

.tool-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 620;
}

.tool-panel .optional {
  color: var(--muted);
  font-weight: 400;
}

.tool-panel input,
.tool-panel select,
.tool-panel textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin-bottom: 17px;
  padding: 10px 12px;
  border: 1px solid #aa96b0;
  border-radius: 0;
  color: var(--ink);
  background: white;
  font: 400 1rem/1.5 var(--sans);
}

.tool-panel textarea {
  resize: vertical;
}

.tool-panel input::placeholder,
.tool-panel textarea::placeholder {
  color: #736778;
  opacity: 1;
}

.tool-panel :is(input, select, textarea):focus-visible {
  outline: 2px solid #79518a;
  outline-offset: 2px;
}

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

.form-actions,
.item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 15px;
}

.control-primary,
.control-secondary,
.control-link {
  min-height: 44px;
  border: 1px solid transparent;
  padding: 8px 13px;
  font-size: .85rem;
  font-weight: 620;
  line-height: 1.45;
  text-align: left;
}

.control-primary {
  color: #fff7fc;
  background: #302039;
}

.control-primary:hover {
  background: #543860;
}

.control-secondary {
  color: #4d3158;
  border-color: #bca9c4;
  background: #f2eaf4;
}

.control-secondary:hover {
  background: #e9d8ef;
}

.control-link {
  padding-inline: 3px;
  color: #5b3c69;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.control-link:hover {
  color: #392541;
}

.storage-note,
.tool-feedback {
  margin-top: 13px;
  color: var(--muted);
  font-size: .8rem;
}

.tool-feedback:empty {
  margin: 0;
}

.inventory-count {
  margin-bottom: 13px;
  color: var(--ink);
  font-size: .83rem;
}

.empty-inventory {
  padding: 12px 14px;
  border: 1px dashed #cabaca;
  font-size: .92rem;
}

.inventory-items {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-item {
  padding: 12px 15px 8px;
  background: #f4eff5;
  border-left: 2px solid #c3a4cf;
  overflow-wrap: anywhere;
}

.resource-item-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.resource-kind,
.resource-status {
  color: #533b5d;
  font-size: .77rem;
}

.resource-status {
  padding: 2px 6px;
  background: #e9dbec;
}

.resource-status[data-status="disponibila"] {
  background: #e1e9dc;
  color: #384b30;
}

.resource-status[data-status="incerta"] {
  background: #f3e8d5;
  color: #5e4822;
}

.resource-item h4 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.resource-item > p {
  font-size: .86rem;
  white-space: pre-wrap;
}

.work-guide {
  margin-top: clamp(36px, 5vw, 70px);
}

.resource-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin: 24px 0 0;
}

.resource-guide div {
  padding: 15px 0;
  border-top: 1px solid #cabcce;
}

.resource-guide dt {
  color: var(--ink);
  font-weight: 640;
}

.resource-guide dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.worksheet-form fieldset {
  min-width: 0;
  margin: 0 0 23px;
  border: 0;
  border-bottom: 1px solid #ded2e0;
  padding: 0 0 13px;
}

.worksheet-form legend {
  padding: 0;
}

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

.notebook-guide {
  border-color: #d6c6dc;
  background: #ece4ef;
}

.notebook-guide ol {
  padding-left: 1.25em;
  color: var(--muted);
  font-size: .92rem;
}

.notebook-guide li {
  margin-bottom: 9px;
  padding-left: 4px;
}

.clear-notebook {
  margin-top: 13px;
  border: 1px solid #cfbccf;
  padding: 10px 13px;
  background: #f4edf4;
}

.clear-notebook p {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: .89rem;
}

.next-tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: clamp(34px, 5vw, 70px);
  padding: clamp(19px, 4vw, 36px);
  background: #ece5ed;
}

.next-tool h2 {
  margin-bottom: 8px;
  font-size: clamp(1.67rem, 2.6vw, 2.25rem);
}

.next-tool p {
  max-width: 55ch;
  font-size: .91rem;
}

.next-tool .button {
  flex: 0 0 auto;
  gap: 15px;
}

.worked-example {
  padding-block: clamp(46px, 6.5vw, 92px);
  border-block: 1px solid #d7c9dc;
  background: #ece5ed;
}

.example-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(26px, 6vw, 86px);
  margin-bottom: 30px;
}

.example-heading .eyebrow {
  margin-bottom: 14px;
}

.example-heading p:not(.eyebrow) {
  max-width: 42ch;
  margin-top: 16px;
}

.example-heading img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.example-sheet {
  padding: clamp(18px, 3vw, 38px);
  border: 1px solid #d8cddc;
  background: #fdfaf8;
}

.example-sheet h3 {
  margin-bottom: 16px;
  font: 400 clamp(1.35rem, 2vw, 1.8rem)/1.2 var(--serif);
}

.example-fields {
  display: grid;
  gap: 15px;
  margin: 0;
}

.example-fields dt {
  margin-bottom: 3px;
  color: #583b65;
  font-size: .84rem;
  font-weight: 650;
}

.example-fields dd {
  margin: 0;
  color: var(--ink);
  font-size: .95rem;
}

.example-context .example-fields,
.example-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px clamp(18px, 3vw, 37px);
}

.example-options {
  margin-block: 25px;
}

.example-options > div {
  padding: clamp(15px, 2vw, 23px);
  border-top: 2px solid #9675a3;
  background: #f1ebf3;
}

.example-outcome {
  padding-block: 22px;
  border-top: 1px solid #d8cddc;
}

.worksheet-related {
  padding-block: clamp(32px, 5vw, 62px);
}

.worksheet-related .next-tool {
  margin-top: 0;
}

@media (max-width: 960px) {
  .worksheet-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .home-work-grid,
  .work-hero-grid,
  .work-layout,
  .example-heading,
  .example-context .example-fields,
  .example-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-work-photo img {
    aspect-ratio: 1.45;
  }

  .work-hero h1 {
    margin-top: 17px;
  }

  .work-illustration img {
    aspect-ratio: 1.7;
  }

  .notebook-prompt {
    justify-content: flex-start;
  }

  .resource-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next-tool {
    align-items: flex-start;
    flex-direction: column;
  }

  .example-heading {
    gap: 22px;
    margin-bottom: 23px;
  }
}

@media (max-width: 485px) {
  .form-row,
  .worksheet-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .resource-guide {
    gap: 10px 15px;
  }
}
