:root {
  font-family: system-ui, sans-serif;
  color: #182944;
  background: #f2f5fa;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  display: flex;
  justify-content: space-between;
  padding: 1rem max(1.25rem, calc((100vw - 68rem) / 2));
  background: #172946;
  color: white;
}
header span { color: #c4d3e8; }
main { max-width: 70rem; margin: auto; padding: 1.25rem; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { margin-top: 0; }
nav, .toolbar { display: flex; gap: .65rem; flex-wrap: wrap; }
nav { margin-bottom: 1rem; }
nav a { color: #234e97; padding: .3rem .5rem; }
fieldset, .card, #login {
  margin: 0 0 1.15rem;
  padding: 1.15rem;
  min-inline-size: 0;
  background: white;
  border: 1px solid #d3deed;
  border-radius: .85rem;
}
legend, summary { font-weight: 650; }
summary { cursor: pointer; }
label { display: inline-flex; gap: .45rem; align-items: center; flex-wrap: wrap; margin: .35rem .55rem .35rem 0; }
label:has(textarea) { display: grid; margin-right: 0; }
input, select, textarea, button {
  font: inherit;
  color: inherit;
  border: 1px solid #a7bad4;
  border-radius: .45rem;
  padding: .45rem .65rem;
  max-width: 100%;
}
textarea { width: 100%; }
button { background: #edf3ff; margin: .2rem 0; }
button:enabled { cursor: pointer; }
button:disabled { opacity: .6; }
.primary { background: #214d9d; color: white; border-color: #214d9d; }
:focus-visible { outline: 3px solid #527fe0; outline-offset: 2px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#preview-source { overflow-wrap: anywhere; }
#status:not(:empty) {
  position: sticky;
  bottom: 0;
  padding: .55rem .85rem;
  background: #e2ebfa;
  border-radius: .5rem;
}
#picker-frame iframe {
  display: block;
  width: 100%;
  min-height: 19rem;
  margin: .75rem 0;
  border: 1px solid #a7bad4;
  border-radius: .65rem;
}

.publication-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .75rem;
  margin: 0 0 1rem;
}
.publication-overview div { padding: .85rem; background: #edf3ff; border-radius: .55rem; }
.publication-overview dt { color: #3e5371; font-size: .9rem; }
.publication-overview dd { margin: .25rem 0 0; font-weight: 650; }
#target-selection { color: #694511; }
#open-site { align-self: center; color: #214d9d; padding: .45rem .65rem; }
@media (min-width: 56rem) {
  #panel:not([hidden]) { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 1.5rem; }
  nav { flex-direction: column; gap: .25rem; position: sticky; top: 1rem; align-self: start; }
  nav a { padding: .5rem .65rem; }
}

.diagnostic-error { color: #9a261c; font-weight: 650; }
#overview, #sites { padding: clamp(1rem, 3vw, 1.75rem); }
#target-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem .75rem;
  align-items: end;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #f2f6ff;
  border-radius: .65rem;
}
#target-check label { display: grid; margin: 0; }
#target-check p { grid-column: 1 / -1; margin: 0; color: #3e5371; }
#target-url { width: 100%; background: white; }
#open-site:not([hidden]) { display: inline-block; }
#panel nav a { border-radius: .45rem; text-decoration: none; }
#panel nav a:hover { background: #e2ebfa; }
#panel :target { scroll-margin-top: 1rem; border-color: #527fe0; }
@media (max-width: 34rem) {
  #target-check { grid-template-columns: minmax(0, 1fr); }
}

header { gap: .75rem; flex-wrap: wrap; }
fieldset, .card, #login { box-shadow: 0 2px 8px #1829440c; }
fieldset:target, .card:target { box-shadow: 0 0 0 3px #527fe026; }
#login { max-width: 30rem; }
#login label { display: grid; margin: 0 0 .75rem; }
#login button { background: #214d9d; border-color: #214d9d; color: white; }
#login-status:empty { display: none; }
#panel nav {
  background: white;
  border: 1px solid #d3deed;
  border-radius: .85rem;
  padding: .5rem;
}
#open-site {
  border: 1px solid #a7bad4;
  border-radius: .45rem;
  font-weight: 650;
  text-decoration: none;
}
#open-site:hover { background: #edf3ff; }
.publication-overview dd, #target-help, #target-selection { overflow-wrap: anywhere; }
label > :is(input, select, textarea) { min-width: 0; }
@media (max-width: 34rem) {
  .toolbar > button { flex: 1 1 auto; }
  #target-check button { justify-self: stretch; }
}
