:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  color: #191d32;
  background: #f7f7fb;
  --primary: #484b91;
  --primary-dark: #343777;
  --muted: #565b74;
  --line: #dbddea;
  --card: #fff;
  --tint: #ededf8;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
.shell { width: min(100% - 2rem, 59rem); margin-inline: auto; }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-content { min-height: 6rem; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: block; width: 4.56rem; height: auto; }
.site-name { color: var(--muted); font-weight: 650; font-size: .9375rem; text-decoration: none; }
a.site-name:hover { text-decoration: underline; }
h1, h2, h3, p, dl { margin: 0; }
h1 { line-height: 1.25; font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p, dd { line-height: 1.65; overflow-wrap: anywhere; }
:is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid #5a5cc0; outline-offset: 3px; }

.portal-home .shell { width: min(100% - 3rem, 75rem); }
.portal-sign-in { color: var(--primary-dark); font-weight: 650; margin-inline-start: auto; text-underline-offset: .25em; }
.portal-landscape {
  min-height: clamp(34rem, 52vw, 46rem);
  background-color: #e8f0f4;
  background-image: linear-gradient(90deg, rgb(244 249 252 / .9), rgb(244 249 252 / .5) 35%, transparent 66%), url('/portal/campus.jpg');
  background-position: center, center 49%;
  background-size: cover;
}
.portal-main { padding-block: clamp(4rem, 10vw, 9rem) 3rem; }
.portal-main h1 { font-size: clamp(2rem, 4.1vw, 3.35rem); line-height: 1.14; }
.entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1.65rem; max-width: 36rem; }
.entry-card, .card { border: 1px solid var(--line); border-radius: .85rem; background: var(--card); }
.entry-card { display: flex; flex-direction: column; align-items: flex-start; padding: 1.35rem; background: rgb(255 255 255 / .96); box-shadow: 0 8px 24px rgb(28 48 65 / .09); }
.entry-card > p { color: var(--muted); margin: .6rem 0 1.25rem; }
.entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: auto; }
.entry-actions .button { font-size: .875rem; padding-inline: .75rem; }
.entry-card .entry-help { font-size: .875rem; margin: .75rem 0 0; }
.portal-text-link { color: var(--primary-dark); font-size: .875rem; font-weight: 650; text-underline-offset: .25em; }
.portal-content { padding-block: clamp(1.5rem, 4vw, 3rem) 3rem; }
.portal-information { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 1.25rem; }
.information-card { padding: clamp(1.15rem, 3vw, 1.7rem); }
.information-card h2, .sunshine-card h2 { margin-bottom: .75rem; }
.supplier-guide-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.supplier-guide-card h2 { margin-bottom: .35rem; }
.announcement-list { margin: 0; padding: 0; list-style: none; }
.announcement-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .8rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.announcement-list a { color: var(--primary-dark); font-weight: 650; overflow-wrap: anywhere; text-underline-offset: .25em; }
.announcement-list time { color: var(--muted); font-size: .8125rem; }
.sunshine-card { margin-top: 2rem; padding-top: 1.7rem; border-top: 1px solid var(--line); }
.sunshine-card > p { margin-bottom: 1rem; }
.sunshine-card dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.2rem; margin-bottom: 1rem; }
.sunshine-card dt { font-weight: 650; margin-bottom: .3rem; }
.sunshine-card dd { margin: 0; color: var(--muted); font-size: .9rem; }

.button, button {
  align-items: center;
  appearance: none;
  border: 1px solid transparent;
  border-radius: .5rem;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 650;
  justify-content: center;
  min-height: 2.75rem;
  padding: .55rem 1rem;
  text-align: center;
  text-decoration: none;
}
.primary { color: #fff; background: var(--primary); }
.primary:hover { background: var(--primary-dark); }
.secondary { border-color: #7779a9; color: var(--primary-dark); background: var(--card); }
.secondary:hover { background: var(--tint); }
button:disabled { opacity: .6; cursor: wait; }

.quote-main { padding-block: 2rem 10rem; }
.quote-heading { margin-bottom: 1.15rem; overflow-wrap: anywhere; }
.quote-meta { margin-top: .5rem; color: var(--muted); }
.quote-deadline { margin-top: .5rem; color: var(--primary-dark); font-weight: 650; }
.notice { background: var(--tint); padding: .8rem 1rem; border-radius: .6rem; margin-bottom: 1rem; }
.notice.error { color: #852c36; background: #fbecee; }
.notice button { margin-top: .65rem; }
.requirements { padding: 1rem; margin-bottom: 1.25rem; }
.requirements h2 { margin-bottom: .5rem; }
#requirement-description { white-space: pre-wrap; }
.facts { display: grid; grid-template-columns: minmax(5rem, max-content) minmax(0, 1fr); gap: .4rem 1rem; }
.facts dt { color: var(--muted); line-height: 1.65; }
.facts dd { white-space: pre-wrap; margin: 0; }
.requirements p + .facts { margin-top: .65rem; }
.requirements .facts:empty { display: none; }
.product-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; }
.secondary-text { color: var(--muted); font-size: .875rem; }
#price-help { margin-block: .45rem .65rem; }
#quote-products { display: grid; gap: .6rem; }
.product, .receipt { padding: .15rem 1rem 1rem; overflow-wrap: anywhere; }
.product:not([open]), .receipt:not([open]) { padding-bottom: .15rem; }
summary { cursor: pointer; padding: .85rem 0; }
summary::marker { color: var(--primary); }
summary strong { margin-inline: .15rem .7rem; }
.product-image {
  display: block;
  max-width: 100%;
  width: min(100%, 24rem);
  max-height: 20rem;
  object-fit: contain;
  object-position: left;
  margin-bottom: .8rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
}
.quote-controls { margin: .85rem 0 0; padding: 0; min-width: 0; border: 0; }
.quote-controls legend { padding: 0; font-weight: 650; }
.quote-controls h3 { margin-block: 1rem .55rem; }
.price-table { border-collapse: collapse; width: 100%; table-layout: fixed; margin-top: .45rem; }
.price-table th, .price-table td { padding: .45rem .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.price-table th { overflow-wrap: anywhere; }
.price-table thead { background: var(--tint); color: var(--primary-dark); }
.price-table th:first-child { width: 30%; }
.price-table th:last-child { width: 6.4rem; }
.price-table input:not([type=checkbox]), .field :is(input,select,textarea) {
  appearance: auto;
  background: var(--card);
  border: 1px solid #a9adc7;
  border-radius: .45rem;
  color: inherit;
  display: block;
  font: inherit;
  min-height: 2.75rem;
  min-width: 0;
  padding: .45rem .55rem;
  width: 100%;
}
.price-table input:disabled { background: #f2f3f7; }
.unavailable { min-height: 2.75rem; display: flex; align-items: center; gap: .35rem; font-size: .875rem; white-space: nowrap; }
.unavailable input { accent-color: var(--primary); width: 1.125rem; height: 1.125rem; margin: 0; }
.terms-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.field { display: grid; align-content: start; gap: .3rem; }
.field > span { font-size: .875rem; }
.field.wide { grid-column: 1 / -1; }
.field textarea { resize: vertical; }
#quote-history, #quote-drafts { margin-block-start: 1.25rem; }
.receipt { margin-block-start: .55rem; }
.receipt h3 { margin-top: .6rem; }
.receipt-id { color: var(--muted); font-size: .875rem; }
.receipt-prices { padding-inline-start: 1.1rem; margin-block: .4rem; line-height: 1.6; }
.quote-actions {
  background: var(--card);
  border-top: 1px solid var(--line);
  position: fixed;
  inset: auto 0 0;
  padding: .65rem 0 calc(.65rem + env(safe-area-inset-bottom));
  z-index: 1;
}
.actions-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem 1rem; }
.actions-buttons { display: flex; gap: .6rem; }
#quote-feedback { color: var(--primary-dark); font-size: .875rem; margin-right: auto; }
#quote-feedback.error { color: #852c36; }

@media (max-width: 37rem) {
  .portal-home .shell { width: min(100% - 2rem, 75rem); }
  .portal-landscape {
    min-height: auto;
    background-image: linear-gradient(180deg, transparent 4rem, rgb(232 240 244 / .07) 11rem, #e8f0f4 25rem), url('/portal/campus.jpg');
    background-repeat: no-repeat;
    background-position: center, 70% top;
    background-size: 100% 100%, auto 26rem;
  }
  .portal-main { padding-block: clamp(13rem, 61vw, 16rem) 1.25rem; }
  .entry-grid { grid-template-columns: 1fr; gap: .75rem; }
  .entry-card { padding: 1.1rem; }
  .portal-information, .sunshine-card dl { grid-template-columns: minmax(0,1fr); }
  .portal-sign-in { font-size: .875rem; }
  .header-content { min-height: 5rem; gap: .9rem; }
  .brand { width: 3.75rem; }
  .quote-main { padding-top: 1.4rem; }
  .facts { grid-template-columns: minmax(4rem,min(38%,8rem)) minmax(0,1fr); gap: .35rem .75rem; font-size: .9375rem; }
  .price-table th, .price-table td { padding-inline: .3rem; }
  .price-table th:last-child { width: 5.4rem; }
  .actions-inner { display: grid; gap: .35rem; }
  .actions-buttons { display: grid; grid-template-columns: 1fr auto; }
}

@media (max-width: 23rem) {
  .shell { width: calc(100% - 1.25rem); }
  .product, .receipt { padding-inline: .75rem; }
  .field :is(input,select,textarea) { padding-inline: .4rem; }
}
