:root {
  --navy: #102a43;
  --slate: #486581;
  --muted: #71869a;
  --cyan: #0e7490;
  --cyan-dark: #0b5f75;
  --cyan-soft: #e8f5f8;
  --paper: #ffffff;
  --canvas: #f4f8fb;
  --line: #d8e4ec;
  --line-strong: #b9ccd9;
  --shadow: 0 18px 45px rgba(16, 42, 67, .09);
  --font: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--navy); font-family: var(--font); }
a { color: inherit; }

.portal-page {
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(14, 116, 144, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 144, .035) 1px, transparent 1px),
    var(--canvas);
  background-size: 28px 28px;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 18px clamp(22px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

.portal-brand { display: flex; align-items: center; gap: 18px; text-decoration: none; }
.portal-brand strong { font-size: clamp(25px, 2.3vw, 36px); letter-spacing: .02em; }
.broach-mark { width: 48px; height: 48px; color: var(--navy); }
.broach-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; transform: translateY(-1px); }

.portal-main { width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 34px; }
.portal-intro { position: relative; display: flex; justify-content: space-between; min-height: 120px; overflow: hidden; }
.portal-intro h1 { margin: 0 0 14px; font-size: clamp(30px, 3vw, 48px); line-height: 1.15; }
.portal-intro p { max-width: 620px; margin: 0; color: var(--slate); font-size: 16px; line-height: 1.8; }
.broach-drawing { position: absolute; top: -34px; right: 2%; width: min(39vw, 500px); color: rgba(14, 116, 144, .2); stroke-width: 1; }

.workflow { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; padding-top: 26px; }
.workflow-line { position: absolute; top: 48px; left: 8%; right: 7%; height: 2px; background: var(--cyan); }
.workflow-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 50px 28px 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.workflow-card:hover { z-index: 2; transform: translateY(-7px); border-color: var(--cyan); box-shadow: var(--shadow); }
.workflow-card:focus-visible { outline: 3px solid rgba(14,116,144,.3); outline-offset: 4px; }
.workflow-number { position: absolute; top: -25px; left: 28px; display: grid; width: 50px; height: 50px; place-items: center; border: 4px solid var(--canvas); border-radius: 50%; color: #fff; background: var(--cyan); font-size: 18px; font-weight: 800; }
.workflow-icon { display: grid; width: 118px; height: 118px; place-items: center; margin: 4px auto 28px; border: 1px solid #cfe6ec; border-radius: 50%; color: var(--cyan); background: var(--cyan-soft); }
.workflow-icon svg { width: 66px; height: 66px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.workflow-copy { flex: 1; }
.workflow-category { display: block; color: var(--navy); font-size: 17px; font-weight: 750; }
.workflow-copy h2 { margin: 11px 0 12px; color: var(--cyan); font-size: 23px; line-height: 1.3; }
.workflow-copy p { margin: 0; color: var(--slate); font-size: 14px; line-height: 1.75; }
.workflow-arrow { display: inline-flex; align-items: center; margin-top: 24px; color: var(--cyan); font-size: 34px; line-height: 1; transition: transform .2s ease; }
.workflow-card:hover .workflow-arrow { transform: translateX(8px); }
.portal-footer { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 72px; padding: 20px; border-top: 1px solid var(--line); color: var(--slate); background: rgba(255,255,255,.9); font-size: 14px; }
.portal-footer svg { width: 22px; height: 22px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; }

/* Shared chrome for the four functional entry pages. */
.global-nav { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 10px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line); background: #fff; }
.global-nav__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-size: 16px; font-weight: 800; text-decoration: none; }
.global-nav__brand::before { content: ""; width: 25px; height: 25px; border: 2px solid currentColor; border-radius: 50%; box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 7px currentColor; }
.global-nav__home { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); font-size: 13px; font-weight: 700; text-decoration: none; }
.global-nav__home::before { content: "←"; font-size: 18px; }
.global-nav__home:hover { color: var(--cyan-dark); }

@media (max-width: 980px) {
  .portal-header { min-height: 78px; }
  .portal-intro { min-height: 110px; }
  .workflow { grid-template-columns: repeat(2, 1fr); gap: 38px 16px; }
  .workflow-line { display: none; }
  .workflow-card { min-height: 340px; margin-top: 0; border-width: 1px; }
}

@media (max-width: 620px) {
  .portal-header { padding: 14px 16px; }
  .portal-brand { gap: 11px; }
  .portal-brand strong { font-size: 23px; }
  .broach-mark { width: 38px; height: 38px; }
  .portal-main { width: min(100% - 28px, 520px); padding-top: 28px; }
  .portal-intro { display: none; }
  .workflow { grid-template-columns: 1fr; gap: 36px; }
  .workflow-card { min-height: 0; padding: 36px 20px 22px; }
  .workflow-icon { width: 86px; height: 86px; margin: 0 0 20px; }
  .workflow-icon svg { width: 48px; height: 48px; }
  .workflow-copy h2 { font-size: 21px; }
  .global-nav { min-height: 52px; padding: 9px 14px; }
  .global-nav__brand { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-card, .workflow-arrow { transition: none; }
}
