/* MC-Fold components on top of the lab site's design system (/static/site.css):
   only tool-specific styles live here; colours, spacing, type, app bar and footer come from
   the shared tokens so MC-Fold follows the site in light and dark mode. */

/* ---------- tool header ---------- */
.crumbs { font-size: .9rem; color: var(--text-2); margin-bottom: var(--s2); }
.tool-head { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.tool-logo img { width: 96px; height: 96px; border-radius: var(--radius); background: #fff;
  box-shadow: var(--elev-1); object-fit: contain; display: block; }
.tool-name { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; margin: 0; line-height: 1.2; }
.tool-name a { color: inherit; text-decoration: none; }
.tool-tagline { margin: 4px 0 var(--s1); }
.tool-tabs { display: flex; flex-wrap: wrap; gap: var(--s1); }
.tool-tabs a { padding: 4px 12px; border-radius: 16px; border: 1px solid var(--divider);
  text-decoration: none; font-weight: 500; font-size: .95rem; }
.tool-tabs a[aria-current="page"] { background: var(--primary); color: var(--on-primary);
  border-color: var(--primary); }
@media (max-width: 600px) { .tool-logo { display: none; } }

main h1 { margin-top: 0; }

/* ---------- form ---------- */
.messages { padding-left: 1.2em; color: var(--text-2); }
form section, .panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--elev-1);
  padding: var(--s3); margin-bottom: var(--s3); }
form section h2, .panel > h2 { font-size: 1.15rem; margin: 0 0 var(--s2); color: var(--primary); }
label { display: block; margin-top: var(--s2); font-weight: 500; }
label.check { display: flex; gap: var(--s1); align-items: center; font-weight: 400; }
p.inline { margin: var(--s2) 0 0; }
p.inline label { display: inline; font-weight: 400; }
input.wide, select, input[type="text"] {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--divider); border-radius: var(--radius); padding: 8px 12px; }
input.wide { width: 100%; margin-top: 4px; }
input.wide:hover, select:hover { border-color: var(--text-2); }
input.wide:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 0;
  border-color: var(--primary); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.mono, code, pre, input.mono { font-family: var(--mono); }
.invalid { border: 2px solid var(--error) !important; }
.errors { border-left: 4px solid var(--error); background: var(--error-bg); color: var(--text);
  border-radius: var(--radius); padding: var(--s2) var(--s3); margin-bottom: var(--s3); }
.errors a { color: var(--error); }
.hint, .small, .counter, .jobid { color: var(--text-2); font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; }
button { font: inherit; cursor: pointer; }
.actions button[type="submit"] { background: var(--primary); color: var(--on-primary); border: 0;
  border-radius: var(--radius); padding: 8px 22px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .04em; box-shadow: var(--elev-2); }
.actions button[type="submit"]:hover { background: var(--primary-strong); }
.actions button[type="reset"] { background: transparent; color: var(--primary);
  border: 1px solid var(--primary); border-radius: var(--radius); padding: 7px 21px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- job page ---------- */
.status { border-left: 4px solid var(--primary); background: var(--surface);
  box-shadow: var(--elev-1); border-radius: var(--radius); padding: var(--s2) var(--s3); }
.status.failed { border-color: var(--error); background: var(--error-bg); }
.notice-box, p.notice { border-left: 4px solid #a84300; background: var(--surface);
  box-shadow: var(--elev-1); border-radius: var(--radius); padding: var(--s2) var(--s3); }
pre { background: var(--surface-2); border-radius: var(--radius); padding: var(--s1) var(--s2);
  overflow-x: auto; }
pre:focus-visible { outline: 3px solid var(--focus); }
.table-wrap { overflow-x: auto; }
table.structures { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.structures th { text-align: left; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid var(--divider); padding: 6px 10px; }
table.structures td { border-bottom: 1px solid var(--divider); padding: 4px 10px; white-space: nowrap; }
table.structures tbody tr:hover { background: var(--surface-2); }
td.num { text-align: right; font-family: var(--mono); }
details { margin: var(--s1) 0; }
details > summary { cursor: pointer; font-weight: 500; padding: 4px 0; }

/* ---------- citation box ---------- */
.cite { margin-top: var(--s4); }
.cite h2 { font-size: 1.05rem; margin-bottom: var(--s1); }
.cite p:last-child { margin-bottom: 0; }

:root { --error: #c62828; --error-bg: #fdecea; }
@media (prefers-color-scheme: dark) {
  :root { --error: #ef9a9a; --error-bg: #3b2222; }
  .tool-logo img { background: #fff; }
}
p.notice { text-align: left; max-width: none; margin: 0 0 var(--s2); }
