.earth-case {
  display: inline-block;
  margin-top: 1rem;
  color: #a2e6f3;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  font-weight: 550;
}
.index-tools,
.compose-actions,
.case-actions,
.discovery-actions,
.case-meta,
.advisor-head,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.index-tools {
  justify-content: space-between;
  gap: 1rem;
  border-block: 1px solid var(--rule);
  padding-block: 1rem;
}
.index-tools .filters {
  margin: 0;
  max-width: 100%;
  flex-wrap: wrap;
}
.index-tools .filters button {
  min-height: 2.6rem;
}
.project-search input,
.advisor textarea,
.handover input:not([type='checkbox']),
.handover textarea,
.privacy-panel input:not([type='checkbox']),
#order-lines {
  border: 1px solid #a7aea8;
  border-radius: 3px;
  background: #fffffa;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
.project-search input {
  width: 15rem;
  max-width: 100%;
}
.index-status {
  margin: 1.1rem 0 1.2rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.catalogue-card {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
  min-width: 0;
}
.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}
.card-info {
  padding-block: 1rem 0.45rem;
}
.card-summary {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.card-meta {
  justify-content: space-between;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}
.card-meta .project-type {
  margin: 0;
}
.project-status {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font: 400 0.75rem/1.4 var(--mono);
  color: #07576a;
  background: #d7eef0;
  border: 1px solid #9fc6cb;
  border-radius: 2px;
}
.card-advisor,
.text-link,
.privacy-link,
.handover a,
.advisor .field-note a,
.ai-permission a,
.privacy-panel a,
.transfer-consent a {
  font-weight: 540;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.card-advisor {
  width: fit-content;
  font-size: 0.9rem;
  margin: 0.1rem 0 0.6rem;
  color: #086779;
}
.card-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.4rem;
}
.case-cover {
  background: #dce8e8;
  padding: 0.8rem;
  display: grid;
  place-items: center;
}
.case-cover img {
  object-fit: contain;
  max-width: 100%;
  height: 100%;
  min-height: 0;
}
.work-grid {
  row-gap: 2.4rem;
  align-items: stretch;
}
.outline-button,
.inline-button {
  color: inherit;
  background: transparent;
  font:
    550 0.92rem/1.35 Geist,
    Arial,
    sans-serif;
}
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 1px solid #a4aaa1;
  border-radius: 3px;
  padding: 0.55rem 0.9rem;
}
.outline-button:hover {
  background: #e1e8e3;
}
.inline-button {
  border: 0;
  padding: 0.35rem 0.15rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.load-projects {
  margin-top: 1.6rem;
}
.case-main,
.privacy-main {
  padding-block: 2rem clamp(3rem, 6vw, 6rem);
}
.case-back {
  display: inline-block;
  color: #086779;
  text-decoration: underline;
  text-underline-offset: 0.23rem;
  margin-bottom: 1.8rem;
}
.case-head {
  max-width: 72rem;
  padding-bottom: 2rem;
}
.case-head h1,
.privacy-main h1 {
  white-space: normal;
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.065em;
  margin: 1.3rem 0;
}
.case-deck {
  max-width: 58ch;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  line-height: 1.45;
}
.case-actions {
  margin-top: 1.4rem;
}
.status-note {
  margin-top: 0.8rem;
  max-width: 70ch;
  padding-left: 0.75rem;
  border-left: 2px solid #269cb1;
  font-size: 0.94rem;
  color: var(--muted);
}
.case-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
  gap: 1.2rem;
}
.case-media {
  margin: 0;
  min-width: 0;
}
.media-open {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 14rem;
  height: clamp(16rem, 32vw, 28rem);
  padding: clamp(0.8rem, 2vw, 2rem);
  background: #dae5e5;
  border: 1px solid #c6d3d0;
  cursor: zoom-in;
}
.media-open img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.media-expand {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
}
.case-media figcaption,
.field-note,
.ai-permission p,
.privacy-panel small {
  font-size: 0.9rem;
  line-height: 1.48;
  color: var(--muted);
  margin: 0.55rem 0;
}
.media-availability {
  border-left: 3px solid #0088a5;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.case-spec {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.5rem, 6vw, 6rem);
  padding-block: clamp(2rem, 4vw, 4rem);
}
.case-spec h2,
#case-demo h2,
.privacy-panel h2 {
  font-size: clamp(1.6rem, 2.7vw, 2.8rem);
  letter-spacing: -0.055em;
  line-height: 1.15;
  margin: 0.55rem 0 0.8rem;
}
.case-spec h3,
.receipt h3 {
  font-size: 1.25rem;
  margin: 1.3rem 0 0.25rem;
}
.case-spec ul,
.case-sources ul,
.privacy-panel ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}
.case-spec li + li,
.case-sources li + li {
  margin-top: 0.4rem;
}
.case-sources {
  border-block: 1px solid var(--rule);
  margin: 1rem 0 2rem;
}
.case-sources summary {
  min-height: 3.35rem;
  font-size: 1.05rem;
}
.case-sources ul {
  margin: 0 0 1rem;
}
#case-demo {
  border: 1px solid var(--rule);
  padding: 1.3rem;
  background: #ecefe7;
}
#order-example {
  display: grid;
  gap: 0.5rem;
  max-width: 32rem;
  margin-top: 1rem;
}
#order-example button {
  justify-self: start;
}
#order-output {
  display: block;
  white-space: pre-line;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.advisor,
.handover,
.privacy-panel {
  max-width: 64rem;
  margin: 2.5rem auto 0;
  padding: clamp(1.15rem, 3vw, 3rem);
  border: 1px solid #a9bebc;
  background: #f9faf4;
  border-radius: 3px;
}
.advisor {
  border-top: 4px solid var(--cyan);
}
.advisor-head h2,
.handover h2 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  letter-spacing: -0.065em;
  line-height: 1.04;
}
.advisor-head .kicker {
  margin-bottom: 0.35rem;
}
.advisor-emblem {
  border-radius: 9px;
  background: #081116;
  padding: 2px;
}
.advisor-intro,
.handover > p {
  margin: 1rem 0;
  max-width: 62ch;
}
.ai-permission,
.handover-consents,
.receipt {
  padding: 1rem;
  background: #e4f1f0;
  border: 1px solid #bdd4d2;
  margin: 1rem 0;
}
.ai-permission label,
.handover-consents label,
.transfer-consent {
  display: block;
  font-size: 0.95rem;
}
input[type='checkbox'] {
  accent-color: #007f98;
  width: 1.05rem;
  height: 1.05rem;
  vertical-align: -0.12em;
  margin-right: 0.4rem;
}
.handover-consents label + label {
  margin-top: 0.8rem;
}
#ask-form > label,
.handover-fields label,
#order-example label,
.privacy-panel label {
  display: block;
  font-size: 0.95rem;
  font-weight: 550;
  margin-bottom: 0.35rem;
}
.advisor textarea,
.handover textarea {
  display: block;
  resize: vertical;
}
.compose-actions,
.discovery-actions {
  margin-top: 0.75rem;
}
.discovery-actions {
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
}
.action-status {
  min-height: 1.5rem;
  margin-top: 0.65rem;
  color: #155664;
  font-size: 0.92rem;
}
.action-status[data-error='true'] {
  color: #862a22;
}
.chat-history {
  max-height: 30rem;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 1rem 0;
}
.chat-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 90%;
  padding: 0.8rem 1rem;
  margin: 0.6rem 0;
  background: #e8efeb;
  border-left: 2px solid #749ca1;
}
.chat-message.user {
  margin-left: auto;
  background: #ecf6f7;
  border-color: #02a8cb;
}
.chat-message strong {
  display: block;
  font-size: 0.78rem;
  color: #175564;
  margin-bottom: 0.25rem;
}
.chat-message button {
  display: block;
  margin-top: 0.4rem;
}
.handover-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.handover-field.wide {
  grid-column: 1/-1;
}
.receipt {
  overflow-wrap: anywhere;
}
.receipt p {
  margin: 0.45rem 0 0.85rem;
}
.privacy-main {
  max-width: 64rem;
}
.privacy-panel {
  margin-top: 1.4rem;
}
.privacy-panel p + p,
.privacy-panel form,
.privacy-panel button {
  margin-top: 0.8rem;
}
.privacy-panel input {
  max-width: 32rem;
  display: block;
}
.privacy-link {
  font-size: 0.9rem;
}
.transfer-consent {
  font-weight: 400;
  line-height: 1.5;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (max-width: 680px) {
  .index-tools {
    align-items: stretch;
  }
  .index-tools .filters {
    width: 100%;
    gap: 0.2rem;
  }
  .index-tools .filters button {
    flex: 1;
    white-space: normal;
  }
  .project-search,
  .project-search input {
    width: 100%;
  }
  .case-spec,
  .handover-fields {
    grid-template-columns: 1fr;
  }
  .case-head h1 {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }
  .case-main {
    padding-top: 1.3rem;
  }
  .compose-actions {
    gap: 0.55rem;
  }
  .chat-message {
    max-width: 100%;
  }
  .case-sources summary {
    padding: 0.7rem 0;
  }
  .case-head h1,
  .case-head p,
  .advisor,
  .handover {
    overflow-wrap: anywhere;
  }
}
