:root {
  --paper: #ffffff;
  --ground: #f7f7f8;
  --ink: #101114;
  --muted: #666b75;
  --line: #d8dbe0;
  --accent: #002fa7;
  --danger: #b42318;
  --success: #087443;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button,
input { font: inherit; }

button { cursor: pointer; }

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.masthead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}

.masthead > * {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 28px;
}

.brand {
  color: var(--ink);
  border-right: 1px solid var(--line);
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
}

.masthead p {
  color: var(--muted);
  font-size: 14px;
}

.intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  padding: 72px 28px 66px;
  border-bottom: 1px solid var(--line);
}

.login {
  display: grid;
  grid-template-columns: 1fr 2fr;
  min-height: calc(100vh - 64px);
  padding: 72px 28px;
}

.login-form {
  align-self: center;
  max-width: 620px;
}

.login-form h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 82px);
  letter-spacing: -.055em;
  line-height: .96;
}

.login-form > p:not(.login-status) {
  margin: 28px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-button {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 0 22px;
  color: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  font-weight: 700;
}

.login-button:disabled { opacity: .6; cursor: wait; }

.login-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-status.error { color: var(--danger); }

.folio {
  margin: 7px 0 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}

.intro h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(44px, 7vw, 90px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .96;
}

.lede {
  grid-column: 2;
  max-width: 650px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.workspace,
.result,
.manager {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--line);
}

.step-label {
  padding: 28px;
  border-right: 1px solid var(--line);
}

.step-label span {
  display: block;
  color: var(--accent);
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1;
}

.step-label p {
  margin: 10px 0 0;
  font-size: 14px;
}

.upload-column,
.result-body,
.manager-body { padding: 42px; }

.drop-zone {
  display: grid;
  min-height: 220px;
  place-content: center;
  padding: 30px;
  border: 1px dashed var(--accent);
  background: var(--paper);
  text-align: center;
  transition: background 150ms ease, color 150ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  color: var(--paper);
  background: var(--accent);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.drop-zone strong {
  font-size: 22px;
  line-height: 1.3;
}

.drop-zone span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.drop-zone:hover span,
.drop-zone.dragging span { color: var(--paper); }

.privacy-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.file-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
}

.file-card span,
.password-field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.file-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.file-card p {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.password-field {
  display: block;
  margin-top: 28px;
}

.password-field input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
}

.password-field input:focus { border-color: var(--accent); }

.publish-button,
.result-actions button {
  min-height: 52px;
  padding: 0 22px;
  color: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  font-weight: 700;
}

.publish-button {
  width: 100%;
  margin-top: 18px;
}

.publish-button:disabled {
  color: #9297a1;
  border-color: var(--line);
  background: var(--ground);
  cursor: not-allowed;
}

.status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status.error { color: var(--danger); }
.status.success { color: var(--success); }

.result { background: var(--accent); }

.result-label {
  color: var(--paper);
  border-right-color: rgba(255, 255, 255, .35);
}

.result-label span { color: var(--paper); }

.result-body h2 {
  margin: 0 0 18px;
  color: var(--paper);
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -.035em;
}

.result-body > a {
  display: block;
  color: var(--paper);
  font-size: clamp(18px, 2.5vw, 30px);
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.result-actions button {
  color: var(--accent);
  border-color: var(--paper);
  background: var(--paper);
}

.result-actions button.secondary {
  color: var(--paper);
  background: transparent;
}

.manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.manager-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.035em;
}

.manager-head p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.manager-head button,
.share-toggle {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--paper);
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.manager-head button:disabled,
.share-toggle:disabled { opacity: .55; cursor: wait; }

.manage-status {
  min-height: 20px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.manage-status.error { color: var(--danger); }
.manage-status.success { color: var(--success); }

.share-list {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.share-empty {
  margin: 0;
  padding: 26px 0;
  color: var(--muted);
  font-size: 14px;
}

.share-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.share-main { min-width: 0; }

.share-name {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.share-main a {
  display: block;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.share-meta {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.share-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-state {
  display: inline-flex;
  min-width: 62px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid currentColor;
  font-size: 12px;
}

.share-state.active { color: var(--success); }
.share-state.closed { color: var(--danger); }
.share-toggle.disable { color: var(--danger); border-color: var(--danger); }

footer {
  padding: 24px 28px 50px;
  color: var(--muted);
  font-size: 12px;
}

footer p { margin: 0; }

@media (max-width: 720px) {
  .shell { width: 100%; border: 0; }
  .masthead { grid-template-columns: 1fr; }
  .brand { min-height: 58px; border-right: 0; border-bottom: 1px solid var(--line); }
  .masthead > * { padding-right: 20px; padding-left: 20px; }
  .masthead p { min-height: 48px; }
  .intro,
  .login,
  .workspace,
  .result,
  .manager { grid-template-columns: 1fr; }
  .intro { padding: 48px 20px; }
  .login { min-height: calc(100vh - 106px); padding: 48px 20px; }
  .login-form { margin-top: 42px; }
  .intro h1 { margin-top: 34px; }
  .lede { grid-column: 1; }
  .step-label { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .step-label span { font-size: 40px; }
  .upload-column,
  .result-body,
  .manager-body { padding: 26px 20px; }
  .drop-zone { min-height: 180px; }
  .file-card { align-items: flex-start; flex-direction: column; gap: 12px; }
  .manager-head { align-items: stretch; flex-direction: column; }
  .manager-head button { width: 100%; }
  .share-item { grid-template-columns: 1fr; gap: 18px; }
  .share-controls { justify-content: space-between; }
}
