:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #657087;
  --line: #dce2ec;
  --surface: #ffffff;
  --background: #f3f6fa;
  --primary: #174ea6;
  --primary-dark: #103d82;
  --success: #16845b;
  --danger: #ba3a3a;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--ink); }
.site-header { position: relative; isolation: isolate; min-height: 128px; overflow: hidden; padding: 20px max(24px, calc((100vw - 1080px) / 2)); background: radial-gradient(circle at 77% 50%, #173f76 0, #102a52 32%, #0b213f 100%); color: white; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-identity { position: relative; z-index: 2; display: flex; align-items: center; gap: 25px; }
.brand-lockup { min-width: 190px; padding-right: 25px; border-right: 1px solid rgba(255, 255, 255, .35); line-height: 1; }
.brand-toppan { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 900; letter-spacing: .015em; }
.brand-ecquaria { margin-top: 6px; font-size: 1rem; font-weight: 750; letter-spacing: -.015em; }
.site-header h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.02em; }
.eyebrow, .step { font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { color: #a9c8f5; }
.account { position: relative; z-index: 2; border: 1px solid #6381a6; border-radius: 999px; padding: 8px 13px; background: rgba(8, 27, 52, .58); backdrop-filter: blur(8px); font-size: .86rem; }
.account-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; }
.header-logout-form { margin: 0; }
.header-signout { min-height: 36px; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .82); border-radius: 999px; background: rgba(255, 255, 255, .1); color: white; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 750; transition: background .18s ease, color .18s ease, transform .18s ease; }
.header-signout:hover { background: white; color: #102a52; transform: translateY(-1px); }
.header-signout:focus-visible { outline: 3px solid #a9c8f5; outline-offset: 2px; }
.brand-motion { position: absolute; z-index: 0; top: 50%; right: max(150px, calc((100vw - 1080px) / 2 + 115px)); width: 245px; height: 160px; opacity: .76; transform: translateY(-50%); pointer-events: none; filter: saturate(115%); }
.brand-motion::before { content: ""; position: absolute; inset: 24px 30px; border-radius: 50%; background: rgba(80, 228, 234, .15); filter: blur(25px); animation: motion-glow 6s ease-in-out infinite alternate; }
.motion-block, .motion-core { position: absolute; display: block; border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 0 20px rgba(92, 221, 238, .18), inset 0 0 18px rgba(255, 255, 255, .12); transform-origin: center; }
.motion-block { width: 74px; height: 58px; clip-path: polygon(12% 0, 100% 13%, 89% 100%, 0 87%); }
.motion-block-one { left: 31px; top: 47px; background: linear-gradient(135deg, rgba(82, 232, 211, .78), rgba(55, 180, 220, .38)); animation: motion-float-one 10s ease-in-out infinite alternate; }
.motion-block-two { left: 91px; top: 16px; width: 83px; height: 69px; background: linear-gradient(145deg, rgba(103, 236, 235, .8), rgba(104, 181, 255, .35)); animation: motion-float-two 12s ease-in-out infinite alternate; }
.motion-block-three { left: 137px; top: 74px; width: 79px; height: 61px; background: linear-gradient(135deg, rgba(235, 94, 239, .72), rgba(108, 72, 245, .48)); animation: motion-float-three 9s ease-in-out infinite alternate; }
.motion-block-four { left: 75px; top: 91px; width: 73px; height: 57px; background: linear-gradient(135deg, rgba(70, 158, 255, .75), rgba(83, 70, 231, .48)); animation: motion-float-four 11s ease-in-out infinite alternate; }
.motion-core { left: 98px; top: 61px; width: 63px; height: 50px; background: rgba(224, 255, 255, .72); clip-path: polygon(8% 0, 100% 18%, 88% 100%, 0 82%); filter: drop-shadow(0 0 11px rgba(198, 255, 255, .65)); animation: motion-core 7s ease-in-out infinite alternate; }
@keyframes motion-float-one { to { transform: translate(-8px, -7px) rotate(-6deg) scale(1.05); } }
@keyframes motion-float-two { to { transform: translate(9px, 8px) rotate(7deg) scale(.96); } }
@keyframes motion-float-three { to { transform: translate(8px, -9px) rotate(-8deg) scale(1.04); } }
@keyframes motion-float-four { to { transform: translate(-5px, 8px) rotate(6deg) scale(.97); } }
@keyframes motion-core { to { transform: translate(4px, -3px) rotate(5deg) scale(1.08); opacity: .84; } }
@keyframes motion-glow { to { transform: scale(1.18); opacity: .72; } }
main { width: min(1080px, calc(100% - 32px)); margin: 32px auto 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 22px rgba(31, 49, 82, .06); }
.login-card { max-width: 620px; margin: 72px auto; padding: 42px; }
.login-card h2, .result-card h2 { margin: 10px 0 12px; font-size: 2rem; }
.login-card p, .result-card p, .intro p { color: var(--muted); line-height: 1.6; }
.step { color: var(--primary); }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 22px; }
.intro h2 { margin: 6px 0 4px; font-size: 1.8rem; }
.intro p { margin: 0; }
.form-section { padding: 26px; margin-bottom: 18px; }
.form-section h3 { margin: 0 0 20px; font-size: 1.1rem; }
.profile-section { margin-bottom: 24px; }
.profile-section h3 { margin-bottom: 5px; }
.section-heading-row p { margin: 0; color: var(--muted); font-size: .88rem; }
.profile-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; margin-top: 4px; }
.profile-grid { width: 100%; }
.profile-save { margin-bottom: 0; white-space: nowrap; }
.notice { margin-bottom: 16px; padding: 12px 15px; border-radius: 9px; font-size: .9rem; font-weight: 650; }
.success-notice { border: 1px solid #a8d9c5; background: #ecfaf4; color: #126341; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: block; margin: 16px 0 0; color: #344158; font-size: .9rem; font-weight: 650; }
.grid label { margin-top: 0; }
input, select, textarea { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #cbd4e1; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-weight: 450; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 3px solid #cfe0fb; border-color: var(--primary); }
small { display: block; color: var(--muted); margin-top: 6px; font-weight: 450; }
.conditional-section { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 22px; }
.conditional-heading { margin-bottom: 18px; }
.conditional-heading h4 { margin: 0 0 5px; font-size: 1.05rem; color: var(--primary); }
.conditional-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.field-group { margin: 0 0 16px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; }
.field-group legend { padding: 0 7px; color: #263753; font-weight: 750; }
.field-group > small { margin: -2px 0 13px; }
.repeat-list { display: grid; gap: 9px; margin-bottom: 12px; }
.repeat-row { display: grid; grid-template-columns: 30px 1fr 38px; align-items: center; gap: 8px; }
.repeat-row input { margin-top: 0; }
.row-number { color: var(--muted); text-align: center; font-size: .84rem; }
.remove-row, .add-row { border: 1px solid #cbd4e1; border-radius: 7px; background: white; color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; }
.remove-row { width: 36px; height: 36px; color: var(--muted); font-size: 1.15rem; }
.add-row { padding: 9px 12px; color: var(--primary); }
.remove-row:hover, .add-row:hover { border-color: var(--primary); color: var(--primary); }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 8px; min-height: 42px; margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; font-weight: 550; }
.choice input { width: 17px; margin: 0; accent-color: var(--primary); }
.field-label { display: block; margin: 22px 0 9px; color: #344158; font-size: .9rem; font-weight: 750; }
#affected-systems { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#affected-systems .choice { width: 100%; }
#affected-systems-other-field { margin-top: 18px; }
.table-scroll { margin: 12px 0; overflow-x: auto; }
.entry-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.entry-table th { padding: 0 6px 7px; color: var(--muted); font-size: .78rem; text-align: left; }
.entry-table td { padding: 4px 6px; }
.entry-table td:first-child { width: 38px; }
.entry-table td:nth-child(2) { width: 155px; }
.entry-table td:nth-child(4) { width: 175px; }
.entry-table td:last-child { width: 44px; }
.entry-table input, .entry-table select { margin-top: 0; }
.upload-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.upload-item { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) 34px; align-items: center; gap: 10px; min-height: 70px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.upload-preview { width: 58px; height: 52px; border-radius: 6px; object-fit: cover; background: #e7edf6; }
.upload-details { min-width: 0; }
.upload-name { overflow: hidden; color: #344158; font-size: .82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.upload-size { margin-top: 3px; color: var(--muted); font-size: .74rem; }
.upload-remove { width: 32px; height: 32px; border: 1px solid #cbd4e1; border-radius: 7px; background: white; color: var(--danger); cursor: pointer; font: inherit; font-size: 1.1rem; font-weight: 750; }
.upload-remove:hover { border-color: var(--danger); background: #fff5f5; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 720; text-decoration: none; }
.button.primary { background: var(--primary); color: white; }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: #e7edf6; color: #244164; }
.actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.result-card { max-width: 760px; margin: 64px auto; padding: 40px; text-align: center; }
.result-icon { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; font-size: 1.8rem; font-weight: 800; color: white; background: var(--success); }
.error .result-icon { background: var(--danger); }
dl { margin: 30px 0; border-top: 1px solid var(--line); text-align: left; }
dl div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.result-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .site-header, .intro { align-items: flex-start; flex-direction: column; }
  .account-actions { width: 100%; justify-content: space-between; }
  .header-identity { align-items: flex-start; flex-direction: column; gap: 14px; }
  .brand-lockup { padding: 0 0 13px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .35); }
  .brand-motion { right: -45px; opacity: .38; transform: translateY(-50%) scale(.85); }
  .profile-form { grid-template-columns: 1fr; }
  .profile-save { width: 100%; }
  .grid.two { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  #affected-systems { grid-template-columns: 1fr 1fr; }
  .upload-list { grid-template-columns: 1fr; }
  .intro .button { width: 100%; }
  .login-card, .form-section, .result-card { padding: 22px; }
  dl div { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-motion *, .brand-motion::before { animation: none !important; }
}
