:root {
  color-scheme: light;
  font: 15px/1.6 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #242844;
  background: #f5f8ff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 260px; }

.shell {
  min-height: 100dvh;
  padding: clamp(24px, 7vw, 78px) 16px 36px;
  background: linear-gradient(140deg, #e8f2fc, #f9fbff 55%, #eef6f3);
}

.brand, .card { width: min(100%, 460px); margin: 0 auto; }
.shell[data-delivery] :is(.brand, .card) { width: min(100%, 780px); }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; font-size: 19px; }
.brand img { border: 1px solid #dde4f1; border-radius: 9px; object-fit: contain; background: white; }

.card {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid #dce5f3;
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 40px #3144690a;
}

h1, h2, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(25px, 6vw, 33px); line-height: 1.25; }
h2 { font-size: 17px; }
#help { color: #546179; }

#account-form { display: grid; gap: 14px; }
label { display: grid; gap: 5px; min-width: 0; font-weight: 650; }
input, button, a.secondary { min-height: 43px; border: 1px solid #ccd9eb; border-radius: 8px; font: inherit; }
input { width: 100%; min-width: 0; padding: 8px 10px; color: #242844; background: #fff; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #947fee; outline-offset: 2px; }
button, a.secondary { padding: 8px 12px; cursor: pointer; font-weight: 650; }
button:disabled { cursor: not-allowed; opacity: .6; }
.primary { width: 100%; border-color: #5640c7; background: #5640c7; color: white; }
.secondary { display: inline-grid; align-content: center; background: #f8faff; color: #483591; text-decoration: none; }
.secondary:not(:disabled):hover { background: #eef3fc; }
.verification { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }

.mode-nav { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 4px; border-radius: 10px; background: #f1f4fa; }
.mode-nav button { min-height: 38px; border-color: transparent; background: transparent; color: #495672; }
.mode-nav [aria-pressed="true"] { background: white; color: #412f96; border-color: #e0e5f0; }
.other-nav, .signed-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.other-nav button { min-height: 33px; border: 0; padding: 3px 0; background: none; color: #483591; text-decoration: underline; }

.message { padding: 9px 11px; border: 1px solid #c4e5d3; border-radius: 8px; background: #f1fbf5; color: #325a46; }
.message[data-error] { border-color: #eac5c8; background: #fff4f4; color: #862b37; }
#retry { justify-self: start; }
#history { display: grid; gap: 12px; }
.record { display: grid; gap: 7px; padding: 12px; border: 1px solid #dce5f3; border-radius: 9px; }
.record ul { margin: 0; padding-left: 20px; overflow-wrap: anywhere; }
.report { display: grid; gap: 6px; }
.report button { justify-self: start; min-height: 37px; text-align: left; }
.report p { white-space: pre-wrap; color: #546179; }

#delivery, .delivery-content, .delivery-list, .delivery-rounds { display: grid; gap: 12px; min-width: 0; }
#delivery { padding-top: 16px; border-top: 1px solid #dde5f2; }
.delivery-heading, .delivery-record-line { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; }
.delivery-heading > button { min-height: 36px; }
#delivery-projects { justify-self: start; }
#delivery-picker {
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid #ccd9eb;
  border-radius: 8px;
  color: #242844;
  background: white;
  font: inherit;
}
#delivery-picker:focus-visible { outline: 3px solid #947fee; outline-offset: 2px; }
.delivery-content h3, .delivery-content h4 { margin: 0; overflow-wrap: anywhere; }
.delivery-list { margin: 0; padding: 0; list-style: none; }
.delivery-muted { color: #546179; font-size: 14px; }
.delivery-record { display: grid; gap: 7px; min-width: 0; padding: 10px 12px; border: 1px solid #dce5f3; border-radius: 9px; overflow-wrap: anywhere; }
.delivery-record a { justify-self: start; }
.delivery-status { padding: 2px 8px; border-radius: 20px; background: #f1f5fa; color: #43526b; font-size: 13px; }
.delivery-status[data-progress="in-progress"] { background: #eef2fc; color: #42359c; }
.delivery-status[data-progress="complete"] { background: #e6f6ee; color: #246049; }
.delivery-rounds { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.delivery-round { display: grid; gap: 7px; padding: 10px; border-radius: 7px; background: #f6f8fd; }
.delivery-metrics { display: grid; gap: 5px; margin: 0; }
.delivery-metrics div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.delivery-metrics dt { color: #43526b; font-size: 13px; }
.delivery-metrics dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
