:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #172d40;
  background: #edf2f6;
  --navy: #142a40;
  --ink: #172d40;
  --muted: #4b6071;
  --line: #cfdbe4;
  --blue: #175c81;
  --accent: #ffba82;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, textarea { font: inherit; }
a, button, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #007697;
  outline-offset: 3px;
}
p { line-height: 1.55; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.6rem); font-weight: 720; letter-spacing: -.052em; }
h2 { font-size: clamp(1.37rem, 2.45vw, 1.76rem); letter-spacing: -.026em; }
h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
h4 { font-size: 1rem; }

.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: white; border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.session-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; }
.session-actions button { white-space: nowrap; }
.brand { display: inline-flex; gap: .75rem; align-items: center; font-weight: 720; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: flex; justify-content: center; align-items: center; gap: 3px; border-radius: 9px; background: var(--navy); }
.brand-mark i { width: 3px; height: 13px; border-radius: 3px; transform: rotate(28deg); background: #e4ecf1; }
.brand-mark i:nth-child(2) { height: 20px; background: var(--accent); }
.boot { padding-block: 4rem; color: var(--muted); }
#workspace { padding-block: 28px 68px; }

.hero, .login-intro { position: relative; overflow: hidden; color: #f8fafc; background: var(--navy); isolation: isolate; }
.hero { border-radius: 20px; padding: 35px 48px 37px; }
.hero h1 { max-width: 975px; font-size: clamp(2.4rem, 5.2vw, 3.85rem); }
.hero p:last-child, .login-intro p:last-child { color: #d3e2ed; max-width: 570px; font-size: 1.07rem; margin: 15px 0 0; }
.eyebrow { color: #ffc696; font-size: .88rem; font-weight: 700; margin: 0 0 12px; }
.motif {
  position: absolute;
  z-index: -1;
  inset: -70% -155px -75% 53%;
  background: repeating-radial-gradient(ellipse at 82% 55%, transparent 0 24px, #86adb336 25px 26px, transparent 27px 43px);
  transform: rotate(-20deg);
  mask-image: linear-gradient(90deg, transparent, #000);
  pointer-events: none;
}

.login { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); margin: clamp(32px, 10vh, 105px) auto; max-width: 980px; min-height: 400px; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 20px 55px #18344d13; }
.login-intro { display: flex; align-items: center; padding: clamp(28px, 5vw, 56px); }
.login-intro h1 { font-size: clamp(2.3rem, 5vw, 4.05rem); }
.login-form { align-self: center; padding: clamp(24px, 5vw, 54px); }
.login-form h2 { margin-bottom: 28px; }
.login-form input { width: 100%; margin-bottom: 15px; }
.login-form .primary { width: 100%; }

.workflow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 24px; }
.sidebar { position: sticky; top: 24px; }
.steps { list-style: none; margin: 0; padding: 8px; border: 1px solid var(--line); background: #f8fafc; border-radius: 15px; }
.steps a { display: flex; align-items: center; padding: 10px 8px; gap: 10px; font-weight: 650; color: var(--muted); white-space: normal; border-radius: 9px; font-size: .92rem; text-decoration: none; }
.steps a:hover, .steps a[aria-current] { background: #e3edf4; color: #173a53; }
.steps .numeral { width: 24px; height: 24px; font-size: .8rem; }
.steps a[aria-current] .numeral { background: #18415c; color: white; }
.session-note { margin: 13px 10px 0; font-size: .87rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 25px 27px 26px; scroll-margin-top: 20px; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 21px; }
.numeral { flex: 0 0 auto; display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: #e6eff5; color: #1c5673; font-weight: 750; }
.section-description { margin: -5px 0 17px; color: var(--muted); }

label { display: block; font-weight: 650; margin-bottom: 7px; }
.optional { font-size: .86rem; font-weight: 400; color: var(--muted); margin-left: .35rem; }
input:not([type=file]), textarea { color: var(--ink); border: 1px solid #aebfcb; background: white; border-radius: 8px; padding: 10px 12px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #596e7e; }
textarea { display: block; resize: vertical; width: 100%; min-height: 77px; }
textarea[readonly] { border-color: #d4dfe8; background: #f5f8fa; }
.help { font-size: .875rem; color: var(--muted); margin: 7px 0 0; }
.dropzone { border: 2px dashed #abc3d2; background: #f7fafc; border-radius: 11px; padding: 16px; margin-bottom: 12px; transition: background .15s, border-color .15s; }
.dropzone.drag-over { border-color: #175c81; background: #e8f4fa; }
.dropzone label { margin-bottom: 9px; }
.dropzone input[type=file] { display: block; width: 100%; max-width: 100%; color: var(--ink); cursor: pointer; }
.dropzone input[type=file]::file-selector-button { font: inherit; font-weight: 700; color: #164c69; background: white; border: 1px solid #a9bfce; border-radius: 7px; padding: 7px 10px; margin-right: 10px; cursor: pointer; }
.dropzone input[type=file]:disabled, .dropzone input[type=file]:disabled::file-selector-button { cursor: default; opacity: .6; }
.dropzone .help { margin-top: 9px; }
.selection { color: #1c526f; font-size: .9rem; overflow-wrap: anywhere; margin: -4px 0 14px; }
.selection:empty { display: none; }
.manual-import { border: 1px solid var(--line); border-radius: 10px; margin-top: 16px; }
.manual-import summary { cursor: pointer; font-weight: 650; padding: 12px 14px; }
.manual-import form { border-top: 1px solid var(--line); padding: 16px 14px 18px; }
.manual-import .dropzone { margin-bottom: 14px; }
.manual-import textarea { margin-bottom: 4px; }
.job-progress { display: block; width: 100%; height: 9px; margin-top: 14px; accent-color: #175c81; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 13px; }
.button, .quiet { min-height: 42px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 9px 13px; text-decoration: none; font-weight: 700; text-align: center; }
.primary { background: #175c81; color: #fff; }
.primary:hover { background: #124865; }
.secondary { background: #fff; color: #164c69; border-color: #a9bfce; }
.secondary:hover, .quiet:hover { background: #edf4f8; }
.quiet { background: transparent; color: #1c526f; }
.text-action { font-weight: 650; color: #175c81; padding: 8px; text-underline-offset: 3px; }
.button:disabled, .button[aria-disabled=true] { opacity: .53; cursor: default; }
.message { font-size: .9rem; color: #1c526f; margin: 8px 0 0; }
.message:empty { display: none; }
.message.error { color: #923329; }
.clipboard-field { position: fixed; top: 0; left: 0; width: 1px; min-height: 1px; opacity: 0; }

.privacy-note { margin-top: 14px; }
.preview, .report { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.file-info p { margin: 4px 0 17px; color: var(--muted); }
.callout, .warning-list { background: #fff3e7; color: #603b23; border: 1px solid #ead4bf; border-radius: 9px; padding: 11px 13px; margin: 0 0 15px; font-size: .94rem; }
.callout p { margin: 0 0 8px; }
.warning-list { padding-left: 31px; }
.warning-list li + li { margin-top: 5px; }
.mode { margin: 15px 0 0; }
.thesis-list { margin: 10px 0 17px; padding: 0; list-style: none; }
.thesis-list li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); line-height: 1.4; overflow-wrap: anywhere; }
.thesis-list small { display: block; color: var(--muted); margin-top: 3px; font-size: .86rem; }
.date-actions { margin-top: 0; }
.date-actions input { max-width: 100%; width: 170px; }
.state { border: 1px solid #caddE8; color: #254f66; background: #f1f7fa; border-radius: 8px; padding: 7px 10px; font-size: .9rem; }
.state[data-status=complete] { background: #edf6f1; color: #285d46; border-color: #bedacb; }
.state[data-status=partial], .state[data-status=failed] { background: #fff3e7; color: #603b23; border-color: #ead4bf; }
.report h4 { margin: 20px 0 6px; }
.report p, .report li, .report td { overflow-wrap: anywhere; }
.report ul, .report ol { margin: 6px 0 11px; padding-left: 23px; }
.report li + li { margin-top: 6px; }
.report a:not(.button) { color: #175c81; text-underline-offset: 3px; }
.table-scroll { overflow-x: auto; margin: 9px 0; }
.report table { border-collapse: collapse; width: 100%; min-width: 430px; font-size: .92rem; }
.report th, .report td { text-align: left; vertical-align: top; border: 1px solid var(--line); padding: 8px 10px; }
.report th { background: #edf3f7; }
.report td > p { margin: 4px 0; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 36px); }
  .workflow { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
  .sidebar { position: static; }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .session-note { display: none; }
  .hero { padding: 36px 30px; }
}

@media (max-width: 560px) {
  .shell { width: calc(100% - 24px); }
  .topbar-inner { min-height: 60px; flex-wrap: wrap; column-gap: .5rem; row-gap: 0; padding-block: 7px; }
  .session-actions { margin-left: auto; }
  #workspace { padding-top: 14px; }
  .hero, .card { padding: 21px 16px; border-radius: 13px; }
  .hero p:last-child { font-size: 1rem; }
  .login { grid-template-columns: 1fr; }
  .steps a { font-size: .82rem; padding: 6px 4px; gap: 5px; }
  .steps .numeral { width: 19px; height: 19px; }
}
.brief-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 28rem;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--border, #b9c9d4);
  border-radius: 0.6rem;
  background: #f7fafc;
  font: inherit;
  font-size: 0.92rem;
}
