:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", sans-serif;
  --ink: #201f34;
  --muted: #626679;
  --line: #dddfe8;
  --accent: #5945b8;
  --canvas: #f7f8fb;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.5; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #937aea; outline-offset: 3px;
}
.skip { position: fixed; z-index: 2; top: -5rem; left: 1rem; padding: .5rem; background: white; }
.skip:focus { top: .5rem; }
.shell { max-width: 1240px; padding: 0 clamp(1rem, 4.4vw, 4rem); margin: auto; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.bar, .header-actions, .brand, .structure-heading, .structure-footer, .legend, .section-heading { display: flex; align-items: center; }
.bar { min-height: 68px; justify-content: space-between; gap: 1rem; }
.brand { gap: .7rem; color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 720; letter-spacing: -.055em; }
.brand-mark { display: inline-block; position: relative; width: 32px; height: 32px; background: #5541ac; border-radius: 9px; }
.brand-mark i { position: absolute; width: 6px; height: 6px; background: white; border-radius: 50%; left: 7px; top: 18px; }
.brand-mark i:nth-child(2) { left: 14px; top: 8px; }
.brand-mark i:nth-child(3) { left: 21px; top: 16px; }
.brand-mark i:first-child::after, .brand-mark i:nth-child(2)::after {
  content: ""; position: absolute; top: 2px; left: 3px; width: 12px; height: 2px; background: white; transform-origin: left;
}
.brand-mark i:first-child::after { transform: rotate(-55deg); }
.brand-mark i:nth-child(2)::after { transform: rotate(49deg); width: 10px; }
.header-actions { gap: 1.2rem; }
.guide-button, .text-button { background: none; border: 0; padding: .25rem 0; font-weight: 600; font-size: .9rem; }
.guide-button { display: flex; align-items: center; gap: .45rem; }
.guide-button span { display: grid; place-items: center; width: 17px; height: 17px; font: 600 12px/1 sans-serif; border: 1.5px solid currentColor; border-radius: 50%; }
.guide-button:hover, .text-button:hover { color: var(--accent); text-decoration: underline; }
.model-status { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .65rem; border-radius: 20px; background: #eff0f4; color: #515768; font-size: .81rem; font-weight: 600; }
.model-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.model-status[data-state="online"] { background: #e9f5ee; color: #286b48; }
.model-status[data-state="offline"] { background: #fbece8; color: #984335; }
main.shell { padding-top: clamp(1.7rem, 3.1vw, 2.8rem); padding-bottom: 3rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.08; letter-spacing: -.062em; font-weight: 650; }
h2 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.035em; font-weight: 650; }
h3 { font-size: 1rem; }
.intro { margin-top: .6rem; font-size: 1.04rem; color: var(--muted); }
.task-bar { display: flex; gap: .25rem; margin: 1.55rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.task-bar button { font-size: .94rem; font-weight: 600; padding: .65rem 1rem .75rem; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); }
.task-bar button:first-child { padding-left: .2rem; padding-right: 1.15rem; }
.task-bar button:hover { color: var(--accent); }
.task-bar button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.15rem; align-items: stretch; }
.structure, .card { border-radius: 16px; }
.card { padding: clamp(1.1rem, 2vw, 1.7rem); background: #fff; border: 1px solid var(--line); }
.structure {
  color: #fff; display: flex; flex-direction: column; padding: 1.35rem 1.55rem 1.05rem; position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse at 50% 64%, #3b3258 0, #28233e 52%, #1d1a31 100%);
}
.structure::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(#d8c7ff22 .8px, transparent 1px); background-size: 17px 17px; }
.structure-heading, .section-heading, .structure-footer { justify-content: space-between; gap: .8rem; }
.structure-heading { align-items: flex-start; }
.figure-label { color: #d0c9de; font-size: .8rem; }
.structure h2 { margin-top: .15rem; font-size: 1.6rem; }
.pdb-tag { padding: .16rem .48rem; border: 1px solid #9386a85c; border-radius: 5px; color: #e9e2f3; font: 500 .76rem/1.6 "IBM Plex Mono", Consolas, monospace; letter-spacing: .035em; }
.molecule { flex: 1; min-height: 185px; display: grid; place-items: center; padding: .35rem 0; }
.molecule img { display: block; width: min(95%, 440px); height: clamp(185px, 20vw, 245px); object-fit: contain; filter: drop-shadow(0 7px 8px #110b2290); }
.legend { flex-wrap: wrap; gap: .85rem; font-size: .8rem; color: #f1eef8; }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: .32rem; }
.helix::before { background: #ae96ff; } .sheet::before { background: #49c9c4; } .loop::before { background: #caa6d7; }
.view-switch { display: flex; padding: 2px; border: 1px solid #81768d; border-radius: 7px; }
.view-switch button { background: none; color: #e5dfee; border: 0; border-radius: 4px; padding: .22rem .5rem; font-size: .8rem; }
.view-switch button[aria-pressed="true"] { background: #e8e2f6; color: #302640; }
.settings h2 { margin-bottom: 1.2rem; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
label { display: block; margin-bottom: .36rem; font-size: .9rem; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #bbbfce; border-radius: 7px; background: white; padding: .56rem .68rem; line-height: 1.4; }
textarea { resize: vertical; min-height: 4rem; }
select {
  appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, #535069 50%), linear-gradient(135deg, #535069 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px; background-repeat: no-repeat;
}
.fields { margin-top: 1rem; }
.hint, .muted, #feedback { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.input-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.text-button { color: var(--accent); }
.primary, .secondary { border-radius: 7px; font-weight: 600; }
.primary { width: 100%; margin-top: 1.3rem; padding: .7rem 1rem; border: 0; background: var(--accent); color: #fff; }
.primary:hover { background: #49359e; }
.secondary { background: #fff; border: 1px solid var(--line); padding: .38rem .75rem; font-size: .86rem; }
.secondary:hover { background: #f2effa; }
#feedback[data-error="true"] { color: #9b3229; }
.reference, .results { margin-top: 1.15rem; }
.sequence { display: flex; flex-wrap: wrap; gap: .35rem .92rem; margin-top: 1rem; border-radius: 7px; padding: .8rem 1rem; background: #f4f3f9; font: 500 .95rem/1.7 "IBM Plex Mono", Consolas, monospace; color: #443a60; letter-spacing: .055em; }
.sequence span { white-space: nowrap; }
.result-item { padding-top: 1rem; }
.result-item + .result-item { border-top: 1px solid var(--line); margin-top: 1rem; }
.metrics { display: flex; flex-wrap: wrap; gap: .6rem 2.6rem; margin: .7rem 0 0; }
.metrics dt { font-size: .84rem; color: var(--muted); }
.metrics dd { margin: 0; font-weight: 650; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
dialog { width: min(92vw, 34rem); max-height: 85vh; padding: 1.6rem; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
dialog::backdrop { background: #17152577; }
dialog p, dialog dl { margin: 1rem 0 0; } dialog dt { font-weight: 650; margin-top: .8rem; } dialog dd { margin: .15rem 0; color: var(--muted); }
@media (max-width: 760px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .molecule img { height: 202px; }
  .task-bar button { flex: 1; font-size: .86rem; padding: .55rem .35rem; }
  .task-bar button:first-child { padding: .55rem .35rem; }
}
@media (max-width: 470px) {
  .header-actions { gap: .65rem; } .guide-button span { display: none; }
  .brand { font-size: 1.07rem; gap: .45rem; } .brand-mark { transform: scale(.87); }
  .model-status { padding: .2rem .4rem; font-size: .75rem; }
  .structure { padding: 1rem; } .legend { gap: .45rem; }
  .section-heading { flex-wrap: wrap; }
}
#fold-check { margin-top: 1rem; }
#fold-check summary { cursor: pointer; font-weight: 600; }
#fold-scores { overflow-x: auto; }
#fold-scores table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
#fold-scores caption { text-align: left; padding-bottom: .5rem; }
#fold-scores th, #fold-scores td { padding: .45rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
#trace { display: block; background: #f4f2fa; max-width: 100%; height: auto; margin: .75rem 0; border-radius: .5rem; }
#inspection details { margin: 1rem 0; }
#inspection summary { cursor: pointer; font-weight: 600; }
#numbering { font: .85rem/1.8 monospace; }

/* Shared workspace theme */
:root {
  --ink: #142f2d;
  --muted: #526862;
  --line: #d4dfd9;
  --accent: #166450;
  --canvas: #f4f7f4;
}
body { font-family: "Inter", "Segoe UI", sans-serif; }
.shell { max-width: 1400px; padding-inline: clamp(1.1rem, 5.4vw, 5.5rem); }
.masthead { background: #122e2d; color: #f2faf5; border: 0; }
.bar { min-height: 72px; justify-content: flex-start; gap: clamp(1.2rem, 4vw, 4.4rem); }
.brand { color: inherit; font-size: 1.31rem; letter-spacing: -.045em; }
.brand-mark { background: #b9e0a6; border-radius: 10px 3px 10px 3px; }
.brand-mark i, .brand-mark i:first-child::after, .brand-mark i:nth-child(2)::after { background: #163a35; }
.bar nav { display: flex; gap: clamp(1rem, 2.6vw, 2.6rem); align-self: stretch; }
.bar nav a { display: grid; place-items: center; font-size: .93rem; font-weight: 550; color: #cfdfd7; text-decoration: none; border-block: 3px solid transparent; }
.bar nav a[aria-current="page"] { border-bottom-color: #b9e0a6; color: white; }
.bar nav a:hover { color: white; text-decoration: underline; text-underline-offset: .35rem; }
.lab-label { margin-left: auto; color: #c1d4cc; font: .78rem/1.5 "IBM Plex Mono", Consolas, monospace; }
.eyebrow, .viewer-label { font: 650 .78rem/1.5 "IBM Plex Mono", Consolas, monospace; letter-spacing: .095em; text-transform: uppercase; }
.eyebrow { color: var(--accent); margin-bottom: .45rem; }
main.shell { padding-top: clamp(1.7rem, 3.5vw, 3rem); }
.page-head { margin-bottom: 1.65rem; }
.page-head h1 { font-family: "DM Sans", "Segoe UI", sans-serif; font-size: clamp(2.5rem, 4.2vw, 4rem); font-weight: 580; }
.intro { font-size: 1.04rem; max-width: 70ch; }
a { color: var(--accent); }
.studio-grid, .evidence-grid { display: grid; gap: 1.15rem; grid-template-columns: minmax(0, 1.42fr) minmax(20rem, 1fr); align-items: stretch; }
.studio-controls { display: grid; align-content: start; gap: 1rem; }
.card, .viewer, .structure { border-radius: 14px; }
.card { box-shadow: 0 2px 5px #183c2c06; }
.card-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.marker { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem; background: #eaf2e8; color: #24634b; font: 600 1.3rem/1 Consolas, monospace; }
.viewer, .structure {
  position: relative; isolation: isolate; overflow: hidden; color: #edf9f1; padding: clamp(1.2rem, 2.5vw, 2rem);
  background-color: #143a36;
  background-image: radial-gradient(circle, #c8f4df2b 1px, transparent 1px), radial-gradient(ellipse at 45% 56%, #2e6156, #143a36 75%);
  background-size: 18px 18px, cover;
}
.structure::before { content: none; }
.viewer { display: flex; flex-direction: column; min-height: 395px; }
.viewer-top, .viewer-bottom { display: flex; gap: .6rem; align-items: center; justify-content: space-between; }
.viewer-label { color: #b9d9c5; }
.viewer h2 { font-size: clamp(1.75rem, 2.8vw, 2.55rem); letter-spacing: -.05em; font-weight: 550; margin-top: .2rem; overflow-wrap: anywhere; }
.pdb-tag { color: #e0f1e5; border-color: #ffffff56; }
.viewport { position: relative; flex: 1; min-height: 230px; display: grid; place-items: center; }
.viewport img, #trace { position: absolute; width: 100%; height: 100%; object-fit: contain; padding: .4rem 0; }
.viewport img { filter: drop-shadow(0 10px 14px #062b2788); }
#trace { margin: 0; background: transparent; }
.viewer-bottom { font-size: .82rem; color: #d5e7dc; padding-top: .75rem; border-top: 1px solid #ffffff26; }
.view-switch { border-color: #ffffff50; }
.view-switch button { color: #edfaf0; font-size: .82rem; padding: .3rem .7rem; }
.view-switch button[aria-pressed="true"] { color: #18362e; background: #d6ead7; }
.drop-area { position: relative; display: grid; place-items: center; gap: .25rem; text-align: center; padding: 1.1rem .7rem; background: #f3f8f1; border: 1.5px dashed #7d9e85; border-radius: 9px; cursor: pointer; }
.drop-area strong { font-size: 1.04rem; color: #17523d; }
.drop-area span { color: var(--muted); font-size: .83rem; font-weight: 450; }
.drop-area input { position: absolute; width: 100%; height: 100%; inset: 0; opacity: 0; cursor: pointer; }
.drop-area:focus-within, :focus-visible { outline: 3px solid #7189d1; outline-offset: 3px; }
.drop-area.dragging, .drop-area:hover { background: #e8f2e5; border-color: var(--accent); }
.or { display: flex; align-items: center; gap: .75rem; margin: .72rem 0; color: var(--muted); font-size: .8rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.example-button { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 1px solid var(--line); background: white; padding: .6rem .8rem; border-radius: 7px; color: var(--ink); font-weight: 600; }
.example-button small { font: .78rem/1.5 Consolas, monospace; color: var(--muted); }
.secondary:hover, .example-button:hover { background: #f1f6f1; }
.primary:hover { background: #114f41; }
.status-line:not(:empty) { padding-top: .5rem; color: var(--accent); font-size: .89rem; }
.status-line.error { color: #a02723; }
.design-fields-row { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: .8rem; margin-top: .85rem; }
.chain-card { margin-top: 1.1rem; }
.chain-control { display: flex; align-items: center; gap: .65rem; }
.chain-control select { min-width: 5rem; }
.notice { padding: .72rem .9rem; border-left: 3px solid #82a88b; background: #f1f6ef; margin: 1rem 0; font-size: .93rem; }
#numbering { overflow-wrap: anywhere; }
.sequence { color: #164637; background: #eef5ef; }
.sequence mark { background: #c7e5a9; color: #173821; font-weight: 750; border-bottom: 2px solid #548440; }
.results { border-top: 3px solid var(--accent); }
.benchmark-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem clamp(1rem,3.5vw,3.5rem); margin-top: 1.25rem; padding: 1.1rem 1.4rem; border: 1px solid var(--line); border-radius: 12px; background: #eaf0e9; }
.benchmark-strip h2 { font-size: 1.05rem; }
.benchmark-strip p, .bench-value span { font-size: .82rem; color: var(--muted); }
.bench-value { display: grid; }
.bench-value strong { font-size: 1.32rem; font-variant-numeric: tabular-nums; }
.evidence-link { margin-left: auto; font-weight: 650; text-underline-offset: .2rem; }
.evidence-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
.benchmark-bars { margin: 1.3rem 0; }
.benchmark-bars div { display: grid; grid-template-columns: 1fr auto; margin: 1rem 0; }
.benchmark-bars meter { grid-column: 1/-1; width: 100%; height: .9rem; }
#fold-scores { margin: 1rem 0; }
#fold-scores table { width: 100%; font-size: .89rem; }
#fold-scores caption { color: var(--muted); }
.source-link { margin-top: 1.2rem; }
.page-head .header-actions { flex-shrink: 0; }
@media (max-width: 840px) {
  .studio-grid, .evidence-grid { grid-template-columns: minmax(0,1fr); }
  .viewer { min-height: 350px; }
  .lab-label { display: none; }
  .evidence-link { margin-left: 0; }
}
@media (max-width: 570px) {
  .bar { flex-wrap: wrap; gap: 0; padding-top: .7rem; }
  .bar nav { width: 100%; justify-content: space-between; }
  .bar nav a { padding-block: .6rem; }
  .page-head .section-heading { flex-wrap: wrap; }
  .viewer { min-height: 320px; }
  .benchmark-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .benchmark-strip > :first-child, .benchmark-strip > a { grid-column: 1/-1; }
  .bench-value { border-top: 1px solid var(--line); padding-top: .6rem; }
  .section-heading { flex-wrap: wrap; }
}
