[data-portal-design="experimental"] {
  --forest: #0d2b18;
  --forest2: #184b2b;
  --forest3: #2f6a43;
  --gold: #c89b2b;
  --gold2: #f2d279;
  --ink: #17291d;
  --muted: #465c4e;
  --line: #ceddd1;
  --wash: #f4f8f3;
  --paper: #fff;
  --cream: #faf1dc;
  --greenwash: #e4f1e5;
  --radius: 14px;
  --shadow: 0 2px 5px rgb(22 62 48 / .045);
  --heading: Georgia, "Times New Roman", serif;
  --design-width: 90rem;
  font-size: 1rem;
  line-height: 1.6;

  & .shell {
    display: flex;
    flex-direction: column;
    --site-shell-width: var(--design-width);
    --site-side-padding: clamp(1rem, 3.4vw, 3rem);
  }

  & .shell:has(#batch-app, #pdf-viewer) {
    --site-shell-width: 100%;
    --site-side-padding: clamp(.75rem, 2vw, 1.5rem);
  }

  & .design-skip-link {
    position: fixed;
    inset: .5rem auto auto .5rem;
    z-index: 2000;
    padding: .65rem 1rem;
    border-radius: .5rem;
    background: var(--forest);
    color: white;
    transform: translateY(calc(-100% - .5rem));
  }

  & .design-skip-link:focus { transform: translateY(0); }

  & .design-header {
    position: relative;
    background: linear-gradient(110deg, #081a0e, var(--forest) 46%, #123922);
    color: white;
    box-shadow: inset 0 -1px rgb(225 191 97 / .32);
  }

  & .design-masthead {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) minmax(7rem, 10.5rem) minmax(0, max-content);
    grid-template-areas: "brand nav search account";
    align-items: center;
    gap: .55rem clamp(.6rem, 1.2vw, 1.1rem);
    width: 100%;
    max-width: var(--design-width);
    min-height: 4.5rem;
    margin-inline: auto;
    padding: .7rem var(--site-side-padding);
  }

  & .design-brand {
    grid-area: brand;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--gold2);
    font: 700 clamp(1.625rem, 2.3125vw, 2.03125rem)/1.1 var(--heading);
  }

  & .design-brand img { width: 2.5rem; height: 2.5rem; object-fit: contain; }

  & .design-search {
    grid-area: search;
    display: flex;
    min-width: 0;
    border: 1px solid #789285;
    border-radius: .65rem;
    background: #ffffff14;
  }

  & .design-search:focus-within {
    border-color: var(--gold2);
    box-shadow: 0 0 0 2px rgb(242 210 121 / .18);
  }

  & .design-search input:focus-visible { outline: none; }
  & .design-search button:focus-visible { outline-offset: -4px; border-radius: .55rem; }
  & .design-search input::-webkit-search-cancel-button { filter: brightness(0) invert(1); opacity: .78; }

  & .design-search input {
    width: 100%;
    min-width: 0;
    padding: .55rem 0 .55rem .85rem;
    border: 0;
    background: transparent;
    color: white;
    font-size: .9375rem;
  }

  & .design-search input::placeholder { color: #e0ebe3; }

  & .design-search button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  & .design-search button {
    display: grid;
    place-items: center;
    flex: 0 0 2.75rem;
    color: var(--gold2);
  }

  & .design-account {
    grid-area: account;
    display: flex;
    align-items: stretch;
    justify-self: end;
    min-width: 0;
    max-width: clamp(12rem, 19vw, 18rem);
    border: 1px solid #ffffff35;
    border-radius: .65rem;
    background: #ffffff0d;
    font-size: .875rem;
  }

  & .design-account a {
    padding: .4rem .6rem;
    color: white;
    font-weight: 650;
  }

  & .design-account-link {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    border-radius: .55rem 0 0 .55rem;
  }

  & .design-account-link svg {
    flex: none;
    color: var(--gold2);
  }

  & .design-account-link > span {
    display: grid;
    min-width: 0;
    line-height: 1.25;
  }

  & .design-account-link strong,
  & .design-account-link small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  & .design-account-link small { color: #c7dccc; font-size: .75rem; font-weight: 500; }

  & .design-logout {
    display: flex;
    align-items: center;
    gap: .25rem;
    min-height: 2.65rem;
    flex: none;
    padding: 0 .55rem;
    border: 0;
    border-inline-start: 1px solid #ffffff29;
    border-radius: 0 .55rem .55rem 0;
    background: transparent;
    color: #e0ebe3;
    font-size: .8125rem;
    cursor: pointer;
  }

  & .design-account :is(a, button):hover { background: #ffffff16; }

  & .design-nav {
    grid-area: nav;
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: .1rem;
    padding: .15rem;
  }

  & .design-nav a {
    display: inline-flex;
    flex: none;
    align-items: center;
    min-height: 2.5rem;
    padding: .28rem clamp(.35rem, .55vw, .6rem);
    border-radius: .45rem;
    color: #f3f7f4;
    white-space: nowrap;
    font-size: .875rem;
    font-weight: 600;
  }

  & .design-nav a:hover { background: #ffffff15; }

  & .design-nav a[aria-current="page"],
  & .design-account a[aria-current="page"] {
    color: var(--gold2);
    text-decoration: underline;
    text-underline-offset: .32em;
  }

  & .design-nav a[aria-current="page"] {
    background: #ffffff16;
    text-decoration-thickness: 2px;
  }

  & .shell > main.page {
    flex: 1;
    min-width: 0;
    padding-block: clamp(1rem, 2.1vw, 1.75rem) clamp(2.5rem, 6vw, 5rem);
    overflow-wrap: normal;
  }

  & .shell > .design-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    width: calc(100% - 2 * var(--site-side-padding));
    max-width: calc(var(--site-shell-width) - 2 * var(--site-side-padding));
    margin: 0 auto;
    padding: 1.15rem 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .875rem;
    text-align: start;
  }

  & .design-footer a { color: var(--forest); font-weight: 750; }

  & :focus-visible {
    outline: 2px solid #97681c;
    outline-offset: 3px;
  }

  & .design-header :focus-visible { outline-color: var(--gold2); }

  & main.page h1 {
    color: var(--forest);
    font: 700 clamp(1.875rem, 4vw, 3.125rem)/1.12 var(--heading);
  }

  & main.page h2 {
    color: var(--forest);
    font: 700 clamp(1.375rem, 2.5vw, 1.75rem)/1.23 var(--heading);
  }

  & main.page h3 { line-height: 1.3; }

  & .page .toolbar.section-heading,
  & .page .page-heading,
  & .page .account-hero {
    gap: .6rem 1.15rem;
    margin-block: 0 1rem;
    padding: clamp(.85rem, 2vw, 1.25rem) clamp(1rem, 2.7vw, 1.75rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #e8f4e8;
    box-shadow: none;
  }

  & .page .catalog-index > .toolbar.section-heading { margin-block-end: 0; }
  & .page .section-heading h1 { margin: 0 0 .2rem; }
  & .page .section-heading .muted {
    max-width: none;
    color: var(--muted);
    font-size: .9375rem;
    line-height: 1.45;
  }

  & .page .hero, & .page .task-original-hero {
    background: #e8f4e8;
    border-color: #c9d9cf;
  }

  & .page .hero::after { content: none; }
  & .page .card { box-shadow: var(--shadow); }
  & .page .btn:not(.tiny):not(.icon-btn) { font-size: .9rem; }

  & .page .btn.primary {
    background: var(--forest2);
    color: white;
    border-color: var(--forest2);
    box-shadow: none;
  }

  & .page .btn.primary:hover:not(:disabled) { background: #143b2b; }

  & .page .btn.secondary {
    border: 1px solid #c5d8cb;
    background: var(--greenwash);
    color: var(--forest);
  }

  & .page .btn.secondary:hover:not(:disabled) { background: #dcebe0; }
  & .page .btn.ghost:hover:not(:disabled) { background: var(--greenwash); }
  & .page .control, & .registration-field :is(input, select, textarea) {
    border-color: #b9cabe;
    font-size: 1rem;
  }

  & :is(input, select, textarea):not([type="hidden"]) { accent-color: var(--forest2); }
  & .page :is(.breadcrumbs, .notice, .filter-group label) { font-size: .875rem; }
  & .page .notice { margin-bottom: .75rem; }

  & .page .notice.success {
    background: var(--greenwash);
    border-color: #b7d2c0;
    color: var(--forest);
  }

  & .page .notice.error {
    background: var(--redbg);
    border-color: #ddb4ae;
    color: var(--red);
  }

  & .page .rolebar {
    margin: 0 0 1rem;
    padding: .6rem .75rem;
    background: transparent;
  }

  /* Bank and task reading */
  & .task-bank-layout .filters { background: #fafcf9; }
  & .task-bank-layout .task-list { gap: .8rem; }

  & .task-list .task-result {
    grid-template-columns: minmax(0, 1fr) max-content auto;
    grid-template-areas:
      "excerpt excerpt actions"
      "meta identity identity"
      "origin origin origin";
    align-items: start;
    border-inline-start: 3px solid #9ebfa5;
    padding: clamp(.875rem, 2vw, 1.25rem);
    overflow-wrap: normal;
  }

  & .task-list .task-result-in-package {
    grid-template-areas: "excerpt excerpt actions" "meta identity identity";
  }

  & .task-list .task-result:hover,
  & .task-list .task-result:focus-within { border-inline-start-color: var(--forest2); }

  & .task-list .task-result-excerpt {
    font: 700 clamp(1.05rem, 1.5vw, 1.25rem)/1.4 var(--heading);
  }

  & .task-result-id {
    justify-self: end;
    white-space: nowrap;
    color: var(--muted) !important;
    font: 500 .8125rem/1.8 ui-monospace, Consolas, monospace;
  }

  & .task-result-meta .badge, & .task-result-origin { font-size: .8125rem; }

  & .task-result-origin {
    display: flex;
    align-items: baseline;
    gap: .45rem;
    white-space: nowrap;
  }

  & .task-result-origin > :not(.design-origin-number) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  & .design-origin-package { flex: 1; }
  & .design-origin-number { flex: none; }

  & .classification-widget .cw-tabs {
    gap: .2rem;
    padding: .25rem;
    border-color: var(--line);
    border-radius: 999px;
    background: #edf3ef;
  }

  & .classification-widget .cw-tabs .btn {
    flex: 1 0 auto;
    min-height: 2.25rem;
    padding: .35rem .6rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .8125rem;
    font-weight: 750;
    white-space: nowrap;
  }

  & .classification-widget .cw-tabs .btn:hover { background: #dfeae3; }

  & .classification-widget .cw-tabs .btn[aria-selected="true"] {
    background: var(--forest);
    color: white;
    box-shadow: 0 2px 5px rgb(15 43 27 / .12);
  }

  & #view-task .task-original-question { padding: clamp(1rem, 3vw, 2rem); }
  & #view-task .task-original-question .question-text { line-height: 1.65; }
  & #view-task .task-reveal-sticky { top: .75rem; }
  & #view-task .task-side-heading { flex-wrap: wrap; }
  & #view-task .task-side-heading .badge { white-space: nowrap; }
  & #view-task .task-side-heading h3 { margin-bottom: 0; }
  & #view-task .task-linear-controls {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  & #view-task .task-linear-controls .btn {
    flex: 1 0 auto;
    width: auto;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
  & #view-task .task-linear-controls .task-control-divider { display: none; }

  /* Search */
  & .design-search-page { display: grid; gap: 1rem; min-width: 0; }
  & .design-search-page .search-results:not(:has(.search-result-card)) { display: none; }

  & .design-search-heading,
  & .design-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .45rem 1.25rem;
  }

  & .design-search-heading h1,
  & .design-profile-header h1 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
  }

  & .design-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem;
  }

  & .design-search-tasks h2 { margin: 0 0 .65rem; }
  & .design-search-tasks h2 span {
    margin-inline-start: .3rem;
    color: var(--muted);
    font: 500 .875rem/1.4 system-ui, sans-serif;
  }

  /* Personal workspace */
  & .design-profile {
    display: grid;
    gap: 1.1rem;
    min-width: 0;
  }

  & .design-profile-identity {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    color: var(--forest);
    overflow-wrap: anywhere;
  }

  & .design-profile-identity .profile-monogram {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    flex: none;
    border-radius: 50%;
    font-size: 1.15rem;
  }

  & .design-profile-identity p { margin: 0; color: var(--muted); font-size: .875rem; }

  & .design-profile-workspace,
  & .design-profile-tools { padding: clamp(.85rem, 2vw, 1.35rem); }
  & .design-profile-workspace h2,
  & .design-profile-tools h2 { margin: 0 0 .75rem; }

  & .design-profile-links,
  & .design-profile-settings {
    display: grid;
    gap: .65rem;
  }
  & .design-profile-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  & .design-profile-links > a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .15rem .6rem;
    align-content: center;
    align-items: center;
    min-height: 4.5rem;
    padding: .65rem .75rem;
    border: 1px solid #dbe7dd;
    border-radius: .65rem;
    background: #f4f8f3;
  }

  & .design-profile-links > a:hover {
    border-color: #92b39a;
    background: var(--greenwash);
    text-decoration: none;
  }

  & .design-profile-links > a:hover strong { text-decoration: underline; }
  & .design-profile-links strong { color: var(--forest); line-height: 1.25; }
  & .design-profile-links strong + span { color: var(--muted); font-size: .8125rem; }
  & .design-profile-icon {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: .45rem;
    background: #e3efe5;
    color: var(--forest2);
  }
  & .design-profile-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  & .design-profile-materials {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.3rem;
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
    font-size: .875rem;
  }

  & .design-profile-settings {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    align-items: start;
  }
  & .design-profile-settings .portal-design-settings { margin: 0; }
  & .design-profile-tools { display: grid; gap: .15rem; }

  & .design-profile-tools a,
  & .design-profile-tools button,
  & .design-profile-details summary {
    display: block;
    padding: .4rem .5rem;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: var(--forest2);
    cursor: pointer;
    text-align: start;
  }
  & .design-profile-details summary { display: list-item; }
  & .design-profile-details[open] > :not(summary) { margin-inline-start: .65rem; }
  & .design-profile-tools :is(a, button, summary):hover { background: var(--greenwash); }

  /* PDF workspace */
  & #batch-app .design-batch-help {
    margin: .75rem 0 1rem;
    padding: 0;
    background: #ebf5ec;
  }

  & #batch-app .design-batch-help summary {
    padding: .65rem 1rem;
    color: var(--forest2);
    font-weight: 650;
    cursor: pointer;
  }

  & #batch-app .design-batch-help > div { padding: 0 1rem .75rem; }
  & #batch-app .design-batch-help p { font-size: .875rem; }

  /* About */
  & #view-about .about-original-hero {
    isolation: isolate;
    padding: clamp(1.25rem, 3vw, 2.75rem);
    background: var(--forest);
    color: white;
  }

  & #view-about .about-original-hero::after { content: none; }

  & .design-about-photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #0d2b18 0%, #0d2b18 40%, rgb(13 43 24 / .86) 74%, rgb(13 43 24 / .46)),
      url("fern.webp") right center / auto 100% no-repeat;
  }

  & #view-about .about-original-hero .about-kicker { color: var(--gold2); }
  & #view-about .about-original-hero h1 {
    color: white;
    font-size: clamp(1.875rem, 3.5vw, 3.1rem);
  }

  & #view-about .about-original-hero .about-intro {
    max-width: 64ch;
    color: #edf5ee;
    font: 400 clamp(1rem, 1.65vw, 1.125rem)/1.6 system-ui, sans-serif;
  }

  & #view-about .about-original-hero .btn.primary {
    background: var(--gold2);
    border-color: var(--gold2);
    color: var(--forest);
  }

  & #view-about .about-original-hero .btn.primary:hover { background: #ffe1a5; }
  & #view-about .about-original-hero .btn.secondary {
    background: #0d2b18c9;
    border-color: #9bb7a1;
    color: white;
  }
  & #view-about .about-original-hero .btn.secondary:hover { background: #28573a; }
  & #view-about .about-original-hero :focus-visible { outline-color: var(--gold2); }
  & #view-about .about-audience-mark { display: none; }
  & #view-about .about-launch-original { background: var(--greenwash); }

  @media (max-width: 75rem) {
    & .design-masthead {
      grid-template-columns: max-content minmax(8rem, 1fr) minmax(0, max-content);
      grid-template-areas: "brand search account" "nav nav nav";
    }
  }

  @media (max-width: 58rem) {
    & .design-profile-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    & .task-result-origin .design-origin-context { display: none; }
  }

  @media (max-width: 43rem) {
    & .design-masthead {
      grid-template-columns: max-content minmax(0, 1fr);
      grid-template-areas: "brand account" "nav nav" "search search";
      padding-block: .65rem;
    }
    & .design-brand { gap: .35rem; font-size: clamp(1.375rem, 5.75vw, 1.85rem); }
    & .design-brand img { width: 2rem; height: 2rem; }
    & .design-account { max-width: 100%; }
    & .design-account-link svg, & .design-logout span { display: none; }
    & .design-logout { padding-inline: .4rem; }
    & .task-list .task-result {
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "excerpt excerpt" "meta meta" "origin origin" "identity actions";
    }
    & .task-list .task-result-in-package {
      grid-template-areas: "excerpt excerpt" "meta meta" "identity actions";
    }
    & .task-result-id { justify-self: start; }
    & .design-about-photo {
      background-image: linear-gradient(90deg, rgb(13 43 24 / .98), rgb(13 43 24 / .86)), url("fern.webp");
    }
  }

  @media (max-width: 24rem) {
    & .design-profile-links { grid-template-columns: minmax(0, 1fr); }
  }

  @media (prefers-reduced-motion: reduce) {
    & *, & *::before, & *::after { scroll-behavior: auto; transition-duration: 0s; }
  }
}
